From: Ville Syrjälä <ville.syrjala(a)linux.intel.com>
These backports fix a plane related regression causing a corrupted
screen and bunch of WARNs from the kernel on some pre-i965 era
hardware.
Cc: <stable(a)vger.kernel.org> # 4.14
Ville Syrjälä (3):
drm/i915: Add .get_hw_state() method for planes
drm/i915: Redo plane sanitation during readout
drm/i915: Fix deadlock in i830_disable_pipe()
drivers/gpu/drm/i915/intel_display.c | 303 ++++++++++++++++++-----------------
drivers/gpu/drm/i915/intel_drv.h | 2 +
drivers/gpu/drm/i915/intel_sprite.c | 83 ++++++++++
3 files changed, 242 insertions(+), 146 deletions(-)
--
2.13.6
These two patches (back-ported from 4.15) implement a work-around for a
rare but serious erratum in Qualcomm Datacenter Technologies Falkor
cores.
One small merge conflict in arch/arm64/Kconfig was resolved when
back-porting patch #2.
P.S. I couldn't find any good examples of submitting a back-ported
patch with resolved merge conflicts to stable(a)vger.kernel.org, so I
hope I'm not forgetting anything.
Shanker Donthineni (2):
[for 4.14] arm64: Define cputype macros for Falkor CPU
[for 4.14] arm64: Add software workaround for Falkor erratum 1041
Documentation/arm64/silicon-errata.txt | 1 +
arch/arm64/Kconfig | 10 ++++++++++
arch/arm64/include/asm/assembler.h | 10 ++++++++++
arch/arm64/include/asm/cputype.h | 2 ++
arch/arm64/kernel/cpu-reset.S | 1 +
arch/arm64/kernel/efi-entry.S | 2 ++
arch/arm64/kernel/head.S | 1 +
arch/arm64/kernel/relocate_kernel.S | 1 +
arch/arm64/kvm/hyp-init.S | 1 +
9 files changed, 29 insertions(+)
--
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm
Technologies, Inc. Qualcomm Technologies, Inc. is a member of the
Code Aurora Forum, a Linux Foundation Collaborative Project.
From: Thomas Gleixner <tglx(a)linutronix.de>
commit cef31d9af908243421258f1df35a4a644604efbe upstream.
Please apply to 4.9-stable, 4.4-stable, and 3.18-stable.
timer_create() specifies via sigevent->sigev_notify the signal delivery for
the new timer. The valid modes are SIGEV_NONE, SIGEV_SIGNAL, SIGEV_THREAD
and (SIGEV_SIGNAL | SIGEV_THREAD_ID).
The sanity check in good_sigevent() is only checking the valid combination
for the SIGEV_THREAD_ID bit, i.e. SIGEV_SIGNAL, but if SIGEV_THREAD_ID is
not set it accepts any random value.
This has no real effects on the posix timer and signal delivery code, but
it affects show_timer() which handles the output of /proc/$PID/timers. That
function uses a string array to pretty print sigev_notify. The access to
that array has no bound checks, so random sigev_notify cause access beyond
the array bounds.
Add proper checks for the valid notify modes and remove the SIGEV_THREAD_ID
masking from various code pathes as SIGEV_NONE can never be set in
combination with SIGEV_THREAD_ID.
Reported-by: Eric Biggers <ebiggers3(a)gmail.com>
Reported-by: Dmitry Vyukov <dvyukov(a)google.com>
Reported-by: Alexey Dobriyan <adobriyan(a)gmail.com>
Signed-off-by: Thomas Gleixner <tglx(a)linutronix.de>
Cc: John Stultz <john.stultz(a)linaro.org>
Signed-off-by: Eric Biggers <ebiggers(a)google.com>
---
kernel/time/posix-timers.c | 34 +++++++++++++++++++---------------
1 file changed, 19 insertions(+), 15 deletions(-)
diff --git a/kernel/time/posix-timers.c b/kernel/time/posix-timers.c
index f2826c35e918..fc7c37ad90a0 100644
--- a/kernel/time/posix-timers.c
+++ b/kernel/time/posix-timers.c
@@ -507,17 +507,22 @@ static struct pid *good_sigevent(sigevent_t * event)
{
struct task_struct *rtn = current->group_leader;
- if ((event->sigev_notify & SIGEV_THREAD_ID ) &&
- (!(rtn = find_task_by_vpid(event->sigev_notify_thread_id)) ||
- !same_thread_group(rtn, current) ||
- (event->sigev_notify & ~SIGEV_THREAD_ID) != SIGEV_SIGNAL))
+ switch (event->sigev_notify) {
+ case SIGEV_SIGNAL | SIGEV_THREAD_ID:
+ rtn = find_task_by_vpid(event->sigev_notify_thread_id);
+ if (!rtn || !same_thread_group(rtn, current))
+ return NULL;
+ /* FALLTHRU */
+ case SIGEV_SIGNAL:
+ case SIGEV_THREAD:
+ if (event->sigev_signo <= 0 || event->sigev_signo > SIGRTMAX)
+ return NULL;
+ /* FALLTHRU */
+ case SIGEV_NONE:
+ return task_pid(rtn);
+ default:
return NULL;
-
- if (((event->sigev_notify & ~SIGEV_THREAD_ID) != SIGEV_NONE) &&
- ((event->sigev_signo <= 0) || (event->sigev_signo > SIGRTMAX)))
- return NULL;
-
- return task_pid(rtn);
+ }
}
void posix_timers_register_clock(const clockid_t clock_id,
@@ -745,8 +750,7 @@ common_timer_get(struct k_itimer *timr, struct itimerspec *cur_setting)
/* interval timer ? */
if (iv.tv64)
cur_setting->it_interval = ktime_to_timespec(iv);
- else if (!hrtimer_active(timer) &&
- (timr->it_sigev_notify & ~SIGEV_THREAD_ID) != SIGEV_NONE)
+ else if (!hrtimer_active(timer) && timr->it_sigev_notify != SIGEV_NONE)
return;
now = timer->base->get_time();
@@ -757,7 +761,7 @@ common_timer_get(struct k_itimer *timr, struct itimerspec *cur_setting)
* expiry is > now.
*/
if (iv.tv64 && (timr->it_requeue_pending & REQUEUE_PENDING ||
- (timr->it_sigev_notify & ~SIGEV_THREAD_ID) == SIGEV_NONE))
+ timr->it_sigev_notify == SIGEV_NONE))
timr->it_overrun += (unsigned int) hrtimer_forward(timer, now, iv);
remaining = __hrtimer_expires_remaining_adjusted(timer, now);
@@ -767,7 +771,7 @@ common_timer_get(struct k_itimer *timr, struct itimerspec *cur_setting)
* A single shot SIGEV_NONE timer must return 0, when
* it is expired !
*/
- if ((timr->it_sigev_notify & ~SIGEV_THREAD_ID) != SIGEV_NONE)
+ if (timr->it_sigev_notify != SIGEV_NONE)
cur_setting->it_value.tv_nsec = 1;
} else
cur_setting->it_value = ktime_to_timespec(remaining);
@@ -865,7 +869,7 @@ common_timer_set(struct k_itimer *timr, int flags,
timr->it.real.interval = timespec_to_ktime(new_setting->it_interval);
/* SIGEV_NONE timers are not queued ! See common_timer_get */
- if (((timr->it_sigev_notify & ~SIGEV_THREAD_ID) == SIGEV_NONE)) {
+ if (timr->it_sigev_notify == SIGEV_NONE) {
/* Setup correct expiry time for relative timers */
if (mode == HRTIMER_MODE_REL) {
hrtimer_add_expires(timer, timer->base->get_time());
--
2.16.0.rc1.238.g530d649a79-goog
Hi Greg, can you please apply commit dc3ee32e96d7 ("netfilter: nf_queue: Make
the queue_handler pernet") to 4.4-stable? syzbot is hitting the crash in
nfqnl_nf_hook_drop() by interrupting thread creation in pg_net_init(). An OOM
condition is not required, contrary to what is suggested by the original commit
message.
Thanks,
Eric
Hi stable maintainers
Can I get you to consider including
bc137dfdbec2 watchdog: gpio_wdt: set WDOG_HW_RUNNING in gpio_wdt_stop
in -stable? Without that, any (always-running) gpio watchdog effectively
fails to honour the magic close feature, causing an unexpected reset
shortly after userspace gracefully closes the device.
Anything containing 3c10bbde10 ("watchdog: core: Clear WDOG_HW_RUNNING
before calling the stop function") probably needs it (i.e. 4.8+), but at
the very least 4.14 and 4.15.
Rasmus
On Sat, 10 Feb 2018, Tobias Jakobi wrote:
> Hello,
>
> I noticed a compile error with a recent version (4.4.115) of the 4.4.y branch:
> arch/x86/mm/kaiser.c: In function ‘kaiser_init’:
> arch/x86/mm/kaiser.c:348:8: error: ‘vsyscall_pgprot’ undeclared (first use in
> this function)
>
> It seems like my combination of kernel options doesn't work for KAISER.
> X86_VSYSCALL_EMULATION is not set on my system, while LEGACY_VSYSCALL is set to
> NONE (LEGACY_VSYSCALL_NONE=y). I have managed to get things compiling again, by
> moving the 'extern unsigned long vsyscall_pgprot' outside of the preprocessor
> statement. This works for me, I guess because the code in question is never
> called during runtime anyway (vsyscall_enabled() always returns false).
>
> With best wishes,
> Tobias
Yes, sorry about that, thanks Tobias. Same error on 4.9 too.
Here's the patch that you correctly suggest, and it's good for both:
[PATCH 4.4 and 4.9] kaiser: fix compile error without vsyscall
Tobias noticed a compile error on 4.4.115, and it's the same on 4.9.80:
arch/x86/mm/kaiser.c: In function ‘kaiser_init’:
arch/x86/mm/kaiser.c:348:8: error: ‘vsyscall_pgprot’ undeclared
(first use in this function)
It seems like his combination of kernel options doesn't work for KAISER.
X86_VSYSCALL_EMULATION is not set on his system, while LEGACY_VSYSCALL
is set to NONE (LEGACY_VSYSCALL_NONE=y). He managed to get things
compiling again, by moving the 'extern unsigned long vsyscall_pgprot'
outside of the preprocessor statement. This works because the optimizer
removes that code (vsyscall_enabled() is always false) - and that's how
it was done in some older backports.
Reported-by: Tobias Jakobi <tjakobi(a)math.uni-bielefeld.de>
Signed-off-by: Hugh Dickins <hughd(a)google.com>
---
arch/x86/include/asm/vsyscall.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/arch/x86/include/asm/vsyscall.h
+++ b/arch/x86/include/asm/vsyscall.h
@@ -13,7 +13,6 @@ extern void map_vsyscall(void);
*/
extern bool emulate_vsyscall(struct pt_regs *regs, unsigned long address);
extern bool vsyscall_enabled(void);
-extern unsigned long vsyscall_pgprot;
#else
static inline void map_vsyscall(void) {}
static inline bool emulate_vsyscall(struct pt_regs *regs, unsigned long address)
@@ -22,5 +21,6 @@ static inline bool emulate_vsyscall(struct pt_regs *regs, unsigned long address)
}
static inline bool vsyscall_enabled(void) { return false; }
#endif
+extern unsigned long vsyscall_pgprot;
#endif /* _ASM_X86_VSYSCALL_H */
On Mon, Feb 12, 2018 at 03:22:32PM +0000, James Hogan wrote:
> On Mon, Feb 12, 2018 at 05:08:10PM +0200, Kalle Valo wrote:
> > James Hogan <jhogan(a)kernel.org> writes:
> > > On Mon, Feb 05, 2018 at 01:23:31PM -0500, Adric Blake wrote:
> > >> I bisected to this "first bad commit:"
> > >>
> > >> commit 58eae1416b804d900014d84feadda7195007cc30
> > >> Author: James Hogan <jhogan(a)kernel.org>
> > >> Date: Mon Jan 15 21:17:14 2018 +0000
> > >>
> > >> ssb: Disable PCI host for PCI_DRIVERS_GENERIC
> > >
> > > Yes, really sorry about that and thanks for going to the effort of
> > > bisecting. There is a patch here:
> > > https://patchwork.kernel.org/patch/10185397/
> > >
> > > which is applied to linux-next as commit
> > > a9e6d44ddeccd3522670e641f1ed9b068e746ff7, and is tagged for stable,
> > > though I've just noticed the stable email address is incorrect... I'll
> > > make sure it gets applied to the 4.15 stable branch though as soon as
> > > I notice its merged.
> >
> > The commit is now in v4.16-rc1.
>
> Yes, thanks,
>
> Greg: Please can commit a9e6d44ddeccd3522670e641f1ed9b068e746ff7 ("ssb:
> Do not disable PCI host on non-Mips") be applied to 4.15 stable (the
> wrong stable email address was Cc'd in the commit message).
Now applied, thanks.
greg k-h
Please apply commit: 66b3bd2356e0a1531c71a3dcf96944621e25c17c (dmaengine:
dmatest: fix container_of member in dmatest_callback) to stable
This fixes a bug in dmatest that will cause the test to give a false negative.
--
Adam Wallis
Qualcomm Datacenter Technologies as an affiliate of Qualcomm Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project.