From: Greg Kroah-Hartman Date: Mon, 3 Apr 2023 13:13:05 +0000 (+0200) Subject: 4.14-stable patches X-Git-Tag: v4.14.312~21 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6c0e9a9c7e13d7ef76ef502b8728da7af1037110;p=thirdparty%2Fkernel%2Fstable-queue.git 4.14-stable patches added patches: s390-uaccess-add-missing-earlyclobber-annotations-to-__clear_user.patch usb-host-ohci-pxa27x-fix-and-vs-typo.patch --- diff --git a/queue-4.14/s390-uaccess-add-missing-earlyclobber-annotations-to-__clear_user.patch b/queue-4.14/s390-uaccess-add-missing-earlyclobber-annotations-to-__clear_user.patch new file mode 100644 index 00000000000..017e08c58af --- /dev/null +++ b/queue-4.14/s390-uaccess-add-missing-earlyclobber-annotations-to-__clear_user.patch @@ -0,0 +1,37 @@ +From 89aba4c26fae4e459f755a18912845c348ee48f3 Mon Sep 17 00:00:00 2001 +From: Heiko Carstens +Date: Thu, 23 Mar 2023 13:09:16 +0100 +Subject: s390/uaccess: add missing earlyclobber annotations to __clear_user() + +From: Heiko Carstens + +commit 89aba4c26fae4e459f755a18912845c348ee48f3 upstream. + +Add missing earlyclobber annotation to size, to, and tmp2 operands of the +__clear_user() inline assembly since they are modified or written to before +the last usage of all input operands. This can lead to incorrect register +allocation for the inline assembly. + +Fixes: 6c2a9e6df604 ("[S390] Use alternative user-copy operations for new hardware.") +Reported-by: Mark Rutland +Link: https://lore.kernel.org/all/20230321122514.1743889-3-mark.rutland@arm.com/ +Cc: stable@vger.kernel.org +Reviewed-by: Gerald Schaefer +Signed-off-by: Heiko Carstens +Signed-off-by: Vasily Gorbik +Signed-off-by: Greg Kroah-Hartman +--- + arch/s390/lib/uaccess.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/s390/lib/uaccess.c ++++ b/arch/s390/lib/uaccess.c +@@ -272,7 +272,7 @@ static inline unsigned long clear_user_m + "4: slgr %0,%0\n" + "5:\n" + EX_TABLE(0b,2b) EX_TABLE(3b,5b) +- : "+a" (size), "+a" (to), "+a" (tmp1), "=a" (tmp2) ++ : "+&a" (size), "+&a" (to), "+a" (tmp1), "=&a" (tmp2) + : "a" (empty_zero_page), "d" (reg0) : "cc", "memory"); + return size; + } diff --git a/queue-4.14/series b/queue-4.14/series index 9a85ef0b050..638d6fbc934 100644 --- a/queue-4.14/series +++ b/queue-4.14/series @@ -59,3 +59,5 @@ pinctrl-at91-pio4-fix-domain-name-assignment.patch alsa-hda-conexant-partial-revert-of-a-quirk-for-lenovo.patch alsa-usb-audio-fix-regression-on-detection-of-roland-vs-100.patch drm-etnaviv-fix-reference-leak-when-mmaping-imported-buffer.patch +s390-uaccess-add-missing-earlyclobber-annotations-to-__clear_user.patch +usb-host-ohci-pxa27x-fix-and-vs-typo.patch diff --git a/queue-4.14/usb-host-ohci-pxa27x-fix-and-vs-typo.patch b/queue-4.14/usb-host-ohci-pxa27x-fix-and-vs-typo.patch new file mode 100644 index 00000000000..529ec96f4e4 --- /dev/null +++ b/queue-4.14/usb-host-ohci-pxa27x-fix-and-vs-typo.patch @@ -0,0 +1,34 @@ +From 0709831a50d31b3caf2237e8d7fe89e15b0d919d Mon Sep 17 00:00:00 2001 +From: Dan Carpenter +Date: Sat, 17 Aug 2019 09:55:20 +0300 +Subject: usb: host: ohci-pxa27x: Fix and & vs | typo + +From: Dan Carpenter + +commit 0709831a50d31b3caf2237e8d7fe89e15b0d919d upstream. + +The code is supposed to clear the RH_A_NPS and RH_A_PSM bits, but it's +a no-op because of the & vs | typo. This bug predates git and it was +only discovered using static analysis so it must not affect too many +people in real life. + +Signed-off-by: Dan Carpenter +Acked-by: Alan Stern +Link: https://lore.kernel.org/r/20190817065520.GA29951@mwanda +Signed-off-by: Nobuhiro Iwamatsu (CIP) +Signed-off-by: Greg Kroah-Hartman +--- + drivers/usb/host/ohci-pxa27x.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/usb/host/ohci-pxa27x.c ++++ b/drivers/usb/host/ohci-pxa27x.c +@@ -147,7 +147,7 @@ static int pxa27x_ohci_select_pmm(struct + uhcrhda |= RH_A_NPS; + break; + case PMM_GLOBAL_MODE: +- uhcrhda &= ~(RH_A_NPS & RH_A_PSM); ++ uhcrhda &= ~(RH_A_NPS | RH_A_PSM); + break; + case PMM_PERPORT_MODE: + uhcrhda &= ~(RH_A_NPS);