]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
arm64: uaccess: Use unsafe wrappers for ASM GOTO
authorThomas Gleixner <tglx@linutronix.de>
Fri, 31 Oct 2025 09:37:09 +0000 (10:37 +0100)
committerIngo Molnar <mingo@kernel.org>
Tue, 4 Nov 2025 07:27:20 +0000 (08:27 +0100)
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

index 1aa4ecb73429fed92d3863e18e559099cdd913bf..6490930deef84d89fb45808353a0f90dbbb23eb3 100644 (file)
@@ -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)
 
 /*