mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [tip: core/rseq] arm64: uaccess: Use unsafe wrappers for ASM GOTO
@ 2025-11-03 14:48 tip-bot2 for Thomas Gleixner
  0 siblings, 0 replies; 2+ messages in thread
From: tip-bot2 for Thomas Gleixner @ 2025-11-03 14:48 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Stephen Rothwell, kernel test robot, Thomas Gleixner, x86, linux-kernel

The following commit has been merged into the core/rseq branch of tip:

Commit-ID:     2e5a46fcf229c0226884dd92dd74a68ca8693eb5
Gitweb:        https://git.kernel.org/tip/2e5a46fcf229c0226884dd92dd74a68ca8693eb5
Author:        Thomas Gleixner <tglx@linutronix.de>
AuthorDate:    Fri, 31 Oct 2025 10:37:09 +01:00
Committer:     Peter Zijlstra <peterz@infradead.org>
CommitterDate: Mon, 03 Nov 2025 15:26:10 +01:00

arm64: uaccess: Use unsafe wrappers for ASM GOTO

Clang propagates a provided label, which is outside of a cleanup scope to
ASM GOTO despite the fact that __raw_get_mem() has a local label for that
purpose:

  "error: cannot jump from this asm goto statement to one of its possible targets"

Using the unsafe wrapper with the extra local label indirection cures that.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 arch/arm64/include/asm/uaccess.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/include/asm/uaccess.h b/arch/arm64/include/asm/uaccess.h
index 1aa4ecb..6490930 100644
--- a/arch/arm64/include/asm/uaccess.h
+++ b/arch/arm64/include/asm/uaccess.h
@@ -422,9 +422,9 @@ static __must_check __always_inline bool user_access_begin(const void __user *pt
 }
 #define user_access_begin(a,b)	user_access_begin(a,b)
 #define user_access_end()	uaccess_ttbr0_disable()
-#define unsafe_put_user(x, ptr, label) \
+#define arch_unsafe_put_user(x, ptr, label) \
 	__raw_put_mem("sttr", x, uaccess_mask_ptr(ptr), label, U)
-#define unsafe_get_user(x, ptr, label) \
+#define arch_unsafe_get_user(x, ptr, label) \
 	__raw_get_mem("ldtr", x, uaccess_mask_ptr(ptr), label, U)
 
 /*

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

* [tip: core/rseq] arm64: uaccess: Use unsafe wrappers for ASM GOTO
@ 2025-11-04  8:17 tip-bot2 for Thomas Gleixner
  0 siblings, 0 replies; 2+ messages in thread
From: tip-bot2 for Thomas Gleixner @ 2025-11-04  8:17 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Stephen Rothwell, kernel test robot, Thomas Gleixner,
	Peter Zijlstra (Intel),
	Ingo Molnar, x86, linux-kernel

The following commit has been merged into the core/rseq branch of tip:

Commit-ID:     2db48d8bf87d3cb9d968e73623efc1c5a02523e7
Gitweb:        https://git.kernel.org/tip/2db48d8bf87d3cb9d968e73623efc1c5a02523e7
Author:        Thomas Gleixner <tglx@linutronix.de>
AuthorDate:    Fri, 31 Oct 2025 10:37:09 +01:00
Committer:     Ingo Molnar <mingo@kernel.org>
CommitterDate: Tue, 04 Nov 2025 08:27:20 +01:00

arm64: uaccess: Use unsafe wrappers for ASM GOTO

Clang propagates a provided label, which is outside of a cleanup scope to
ASM GOTO despite the fact that __raw_get_mem() has a local label for that
purpose:

  "error: cannot jump from this asm goto statement to one of its possible targets"

Using the unsafe wrapper with the extra local label indirection cures that.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 arch/arm64/include/asm/uaccess.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/include/asm/uaccess.h b/arch/arm64/include/asm/uaccess.h
index 1aa4ecb..6490930 100644
--- a/arch/arm64/include/asm/uaccess.h
+++ b/arch/arm64/include/asm/uaccess.h
@@ -422,9 +422,9 @@ static __must_check __always_inline bool user_access_begin(const void __user *pt
 }
 #define user_access_begin(a,b)	user_access_begin(a,b)
 #define user_access_end()	uaccess_ttbr0_disable()
-#define unsafe_put_user(x, ptr, label) \
+#define arch_unsafe_put_user(x, ptr, label) \
 	__raw_put_mem("sttr", x, uaccess_mask_ptr(ptr), label, U)
-#define unsafe_get_user(x, ptr, label) \
+#define arch_unsafe_get_user(x, ptr, label) \
 	__raw_get_mem("ldtr", x, uaccess_mask_ptr(ptr), label, U)
 
 /*

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

end of thread, other threads:[~2025-11-04  8:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-11-03 14:48 [tip: core/rseq] arm64: uaccess: Use unsafe wrappers for ASM GOTO tip-bot2 for Thomas Gleixner
2025-11-04  8:17 tip-bot2 for Thomas Gleixner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®