Hi Linus,
Please pull these pstore fixes for v5.2-rc4. They've been in linux-next
for a bit now and catch some pstore corner cases found recently.
Thanks!
-Kees
The following changes since commit a188339ca5a396acc588e5851ed7e19f66b0ebd9:
Linux 5.2-rc1 (2019-05-19 15:47:09 -0700)
are available in the Git repository at:
https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git tags/pstore-v5.2-rc4
for you to fetch changes up to 8880fa32c557600f5f624084152668ed3c2ea51e:
pstore/ram: Run without kernel crash dump region (2019-05-31 01:19:06 -0700)
----------------------------------------------------------------
pstore fixes for v5.2-rc4
- Avoid NULL deref when unloading/reloading ramoops module (Pi-Hsun Shih)
- Run ramoops without crash dump region
----------------------------------------------------------------
Kees Cook (1):
pstore/ram: Run without kernel crash dump region
Pi-Hsun Shih (1):
pstore: Set tfm to NULL on free_buf_for_compression
fs/pstore/platform.c | 7 +++++--
fs/pstore/ram.c | 36 +++++++++++++++++++++++-------------
2 files changed, 28 insertions(+), 15 deletions(-)
--
Kees Cook
On Wed, Jun 05, 2019 at 11:08:13AM -0500, Alec Ari wrote:
> I'm having this problem too, build is failing:
>
> Invalid absolute R_X86_64_32S relocation: _etext
>
> I stayed on the 4.14 branch to help prevent these kind of breakages,
> so much for that idea. Gentoo GCC 8.3.0.
It seems to be a problem with the Gold linker. Using ld.bfd appears to
work. I haven't narrowed down the problem, unfortunately.
Greg, given that this change was only for special situations (Clang
CFI), can you revert this for the stable trees?
--
Kees Cook
Greg,
I'm really confused. [1] was my submittal to stable for "binder: fix
race between munmap() and direct reclaim" which I think looks correct.
For "binder: fix handling of misaligned binder object", I only
submitted to LKML [2]. But then I see [3] for 4.14 (that looks
incorrect as Ben pointed out).
So the result is that fix is present in the LTS trees where it is
needed, but it has the wrong commit message and headline.
I agree with Ben that the cleanest approach is to revert and apply the
correct version (to 4.14, 4.19, 5.0). I think the correct version is
the one I sent [1], but please let me know if you see something I
screwed up or if you need me to do something.
[1] https://www.spinics.net/lists/stable/msg299033.html
[2] https://lkml.org/lkml/2019/2/14/1235
[3] https://lkml.org/lkml/2019/4/30/650
-Todd
On Tue, May 28, 2019 at 9:34 AM Todd Kjos <tkjos(a)google.com> wrote:
>
> Probably my screw-up. I was working on both of those bug fixes at about the same time. I'll investigate what happened.
>
> On Mon, May 27, 2019 at 11:51 PM Greg Kroah-Hartman <gregkh(a)linuxfoundation.org> wrote:
>>
>> On Mon, May 27, 2019 at 10:09:32PM +0100, Ben Hutchings wrote:
>> > There are commits in the 4.14, 4.19 and 5.0 stable branches that claim
>> > to be backports of:
>> >
>> > commit 26528be6720bb40bc8844e97ee73a37e530e9c5e
>> > Author: Todd Kjos <tkjos(a)android.com>
>> > Date: Thu Feb 14 15:22:57 2019 -0800
>> >
>> > binder: fix handling of misaligned binder object
>> >
>> > However the source changes actually match:
>> >
>> > commit 5cec2d2e5839f9c0fec319c523a911e0a7fd299f
>> > Author: Todd Kjos <tkjos(a)android.com>
>> > Date: Fri Mar 1 15:06:06 2019 -0800
>> >
>> > binder: fix race between munmap() and direct reclaim
>> >
>> > So far as I can see, the former fixes a bug only introduced in 5.1 and
>> > the latter fixes an older bug, so the changes are correct and only the
>> > metadata is not.
>> >
>> > Similar mix-ups have happened before and I'm a little disturbed that
>> > this keeps happening. In any case, you may want to revert and re-apply
>> > with correct metadata.
>>
>> Note, these backports came directly from Todd, so he can provide more
>> information about them. Todd, did something get messed up on your end
>> and do we need to include another patch to fix this up?
>>
>> thanks,
>>
>> greg k-h
Prior to this commit we fail to init the DSI panel on the GPD MicroPC:
https://www.indiegogo.com/projects/gpd-micropc-6-inch-handheld-industry-lap…
The problem is intel_dsi_vbt_init() failing with the following error:
*ERROR* Burst mode freq is less than computed
The pclk in the VBT panel modeline is 70000, together with 24 bpp and
4 lines this results in a bitrate value of 70000 * 24 / 4 = 420000.
But the target_burst_mode_freq in the VBT is 418000.
This commit works around this problem by adding an intel_fuzzy_clock_check
when target_burst_mode_freq < bitrate and setting target_burst_mode_freq to
bitrate when that checks succeeds, fixing the panel not working.
Cc: stable(a)vger.kernel.org
Signed-off-by: Hans de Goede <hdegoede(a)redhat.com>
---
drivers/gpu/drm/i915/intel_dsi_vbt.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/drivers/gpu/drm/i915/intel_dsi_vbt.c b/drivers/gpu/drm/i915/intel_dsi_vbt.c
index 022bf59418df..a2a9b9d0eeaa 100644
--- a/drivers/gpu/drm/i915/intel_dsi_vbt.c
+++ b/drivers/gpu/drm/i915/intel_dsi_vbt.c
@@ -895,6 +895,17 @@ bool intel_dsi_vbt_init(struct intel_dsi *intel_dsi, u16 panel_id)
if (mipi_config->target_burst_mode_freq) {
u32 bitrate = intel_dsi_bitrate(intel_dsi);
+ /*
+ * Sometimes the VBT contains a slightly lower clock,
+ * then the bitrate we have calculated, in this case
+ * just replace it with the calculated bitrate.
+ */
+ if (mipi_config->target_burst_mode_freq < bitrate &&
+ intel_fuzzy_clock_check(
+ mipi_config->target_burst_mode_freq,
+ bitrate))
+ mipi_config->target_burst_mode_freq = bitrate;
+
if (mipi_config->target_burst_mode_freq < bitrate) {
DRM_ERROR("Burst mode freq is less than computed\n");
return false;
--
2.21.0
This reverts commit 94a9992f7dbdfb28976b565af220e0c4a117144a.
The commit allows for more than 32 bits in hid_field_extract(),
but the return value is a 32 bits int.
So basically what this commit is doing is just silencing those
legitimate errors.
Revert to a previous situation in the hope that a proper
fix will be impletemented.
Fixes: 94a9992f7dbd ("HID: Increase maximum report size allowed by hid_field_extract()")
Cc: stable(a)vger.kernel.org # v5.1
Signed-off-by: Benjamin Tissoires <benjamin.tissoires(a)redhat.com>
---
drivers/hid/hid-core.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index 08d310723e96..205d6b82a706 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -1311,10 +1311,10 @@ static u32 __extract(u8 *report, unsigned offset, int n)
u32 hid_field_extract(const struct hid_device *hid, u8 *report,
unsigned offset, unsigned n)
{
- if (n > 256) {
- hid_warn(hid, "hid_field_extract() called with n (%d) > 256! (%s)\n",
+ if (n > 32) {
+ hid_warn(hid, "hid_field_extract() called with n (%d) > 32! (%s)\n",
n, current->comm);
- n = 256;
+ n = 32;
}
return __extract(report, offset, n);
--
2.19.2