All of lore.kernel.org
 help / color / mirror / Atom feed
* FAILED: patch "[PATCH] s390/uaccess: add missing earlyclobber annotations to" failed to apply to 4.14-stable tree
@ 2023-04-03  8:43 gregkh
  2023-04-03  9:43 ` [PATCH 4.14.y] s390/uaccess: add missing earlyclobber annotations to __clear_user() Heiko Carstens
  0 siblings, 1 reply; 3+ messages in thread
From: gregkh @ 2023-04-03  8:43 UTC (permalink / raw)
  To: hca, gerald.schaefer, gor, mark.rutland; +Cc: stable


The patch below does not apply to the 4.14-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable@vger.kernel.org>.

To reproduce the conflict and resubmit, you may use the following commands:

git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-4.14.y
git checkout FETCH_HEAD
git cherry-pick -x 89aba4c26fae4e459f755a18912845c348ee48f3
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable@vger.kernel.org>' --in-reply-to '2023040339-copartner-curliness-0c67@gregkh' --subject-prefix 'PATCH 4.14.y' HEAD^..

Possible dependencies:

89aba4c26fae ("s390/uaccess: add missing earlyclobber annotations to __clear_user()")
4e1b5a86a5ed ("s390/uaccess: add missing EX_TABLE entries to __clear_user()")
731efc9613ee ("s390: convert ".insn" encoding to instruction names")
012a224e1fa3 ("s390/uaccess: introduce bit field for OAC specifier")
b087dfab4d39 ("s390/crypto: add SIMD implementation for ChaCha20")
de5012b41e5c ("s390/ftrace: implement hotpatching")
f8c2602733c9 ("s390/ftrace: fix ftrace_update_ftrace_func implementation")
d1e18efa8fa9 ("s390/lib,uaccess: get rid of register asm")
fcc91d5d4047 ("s390/timex: get rid of register asm")
dbb8864b28d6 ("s390/uaccess: get rid of register asm")
53c1c2504b6b ("s390/pgtable: use register pair instead of register asm")
80f06306240e ("s390/vdso: reimplement getcpu vdso syscall")
87d598634521 ("s390/mm: remove set_fs / rework address space handling")
c9343637d6b2 ("s390/ftrace: assume -mhotpatch or -mrecord-mcount always available")
ab177c5d00cd ("s390/mm: remove unused clear_user_asce()")
cfef9aa69a73 ("s390/vdso: remove unused constants")
847d4287a0c6 ("Merge tag 's390-5.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux")

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From 89aba4c26fae4e459f755a18912845c348ee48f3 Mon Sep 17 00:00:00 2001
From: Heiko Carstens <hca@linux.ibm.com>
Date: Thu, 23 Mar 2023 13:09:16 +0100
Subject: [PATCH] s390/uaccess: add missing earlyclobber annotations to
 __clear_user()

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 <mark.rutland@arm.com>
Link: https://lore.kernel.org/all/20230321122514.1743889-3-mark.rutland@arm.com/
Cc: stable@vger.kernel.org
Reviewed-by: Gerald Schaefer <gerald.schaefer@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>

diff --git a/arch/s390/lib/uaccess.c b/arch/s390/lib/uaccess.c
index 720036fb1924..d44214072779 100644
--- a/arch/s390/lib/uaccess.c
+++ b/arch/s390/lib/uaccess.c
@@ -172,7 +172,7 @@ unsigned long __clear_user(void __user *to, unsigned long size)
 		"4: slgr  %0,%0\n"
 		"5:\n"
 		EX_TABLE(0b,2b) EX_TABLE(6b,2b) EX_TABLE(3b,5b) EX_TABLE(7b,5b)
-		: "+a" (size), "+a" (to), "+a" (tmp1), "=a" (tmp2)
+		: "+&a" (size), "+&a" (to), "+a" (tmp1), "=&a" (tmp2)
 		: "a" (empty_zero_page), [spec] "d" (spec.val)
 		: "cc", "memory", "0");
 	return size;


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 4.14.y] s390/uaccess: add missing earlyclobber annotations to __clear_user()
  2023-04-03  8:43 FAILED: patch "[PATCH] s390/uaccess: add missing earlyclobber annotations to" failed to apply to 4.14-stable tree gregkh
@ 2023-04-03  9:43 ` Heiko Carstens
  2023-04-03 13:01   ` Greg KH
  0 siblings, 1 reply; 3+ messages in thread
From: Heiko Carstens @ 2023-04-03  9:43 UTC (permalink / raw)
  To: stable; +Cc: Heiko Carstens, Mark Rutland, Gerald Schaefer, Vasily Gorbik

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 <mark.rutland@arm.com>
Link: https://lore.kernel.org/all/20230321122514.1743889-3-mark.rutland@arm.com/
Cc: stable@vger.kernel.org
Reviewed-by: Gerald Schaefer <gerald.schaefer@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
---
 arch/s390/lib/uaccess.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/s390/lib/uaccess.c b/arch/s390/lib/uaccess.c
index 802903c50de1..b11ebcb3d33b 100644
--- a/arch/s390/lib/uaccess.c
+++ b/arch/s390/lib/uaccess.c
@@ -272,7 +272,7 @@ static inline unsigned long clear_user_mvcos(void __user *to, unsigned long size
 		"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;
 }
-- 
2.37.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 4.14.y] s390/uaccess: add missing earlyclobber annotations to __clear_user()
  2023-04-03  9:43 ` [PATCH 4.14.y] s390/uaccess: add missing earlyclobber annotations to __clear_user() Heiko Carstens
@ 2023-04-03 13:01   ` Greg KH
  0 siblings, 0 replies; 3+ messages in thread
From: Greg KH @ 2023-04-03 13:01 UTC (permalink / raw)
  To: Heiko Carstens; +Cc: stable, Mark Rutland, Gerald Schaefer, Vasily Gorbik

On Mon, Apr 03, 2023 at 11:43:36AM +0200, Heiko Carstens wrote:
> 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 <mark.rutland@arm.com>
> Link: https://lore.kernel.org/all/20230321122514.1743889-3-mark.rutland@arm.com/
> Cc: stable@vger.kernel.org
> Reviewed-by: Gerald Schaefer <gerald.schaefer@linux.ibm.com>
> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
> Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
> ---
>  arch/s390/lib/uaccess.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/s390/lib/uaccess.c b/arch/s390/lib/uaccess.c
> index 802903c50de1..b11ebcb3d33b 100644
> --- a/arch/s390/lib/uaccess.c
> +++ b/arch/s390/lib/uaccess.c
> @@ -272,7 +272,7 @@ static inline unsigned long clear_user_mvcos(void __user *to, unsigned long size
>  		"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;
>  }
> -- 
> 2.37.2
> 

All now queued up, thanks!

greg k-h

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-04-03 13:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-03  8:43 FAILED: patch "[PATCH] s390/uaccess: add missing earlyclobber annotations to" failed to apply to 4.14-stable tree gregkh
2023-04-03  9:43 ` [PATCH 4.14.y] s390/uaccess: add missing earlyclobber annotations to __clear_user() Heiko Carstens
2023-04-03 13:01   ` Greg KH

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.