Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
* [tglx-devel:uaccess/masked 9/11] kernel/futex/futex.h:292:3: error: cannot jump from this asm goto statement to one of its possible targets
@ 2025-10-16  0:14 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-10-16  0:14 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: llvm, oe-kbuild-all

Hi Thomas,

FYI, the error/warning was bisected to this commit, please ignore it if it's irrelevant.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel.git uaccess/masked
head:   acabe15d70b5c158154ca2c0e766e8e90ca15a59
commit: f6ac10db12b5fa73d73089af300ac80c45255fd2 [9/11] futex: Convert to scoped masked user access
config: arm64-randconfig-001-20251016 (https://download.01.org/0day-ci/archive/20251016/202510160811.WXvO1laX-lkp@intel.com/config)
compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project 39f292ffa13d7ca0d1edff27ac8fd55024bb4d19)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251016/202510160811.WXvO1laX-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202510160811.WXvO1laX-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from kernel/futex/pi.c:7:
>> kernel/futex/futex.h:292:3: error: cannot jump from this asm goto statement to one of its possible targets
     292 |                 unsafe_get_user(*dest, from, efault);
         |                 ^
   arch/arm64/include/asm/uaccess.h:428:2: note: expanded from macro 'unsafe_get_user'
     428 |         __raw_get_mem("ldtr", x, uaccess_mask_ptr(ptr), label, U)
         |         ^
   arch/arm64/include/asm/uaccess.h:220:3: note: expanded from macro '__raw_get_mem'
     220 |                 __get_mem_asm(ldr, "%x",  __gu_val, (ptr), label, type);        \
         |                 ^
   arch/arm64/include/asm/uaccess.h:189:2: note: expanded from macro '__get_mem_asm'
     189 |         asm_goto_output(                                                \
         |         ^
   include/linux/compiler_types.h:513:31: note: expanded from macro 'asm_goto_output'
     513 | #define asm_goto_output(x...) asm volatile goto(x)
         |                               ^
   kernel/futex/futex.h:294:1: note: possible target of asm goto statement
     294 | efault:
         | ^
   kernel/futex/futex.h:291:2: note: jump exits scope of variable with __attribute__((cleanup))
     291 |         scoped_masked_user_read_access(from, efault)
         |         ^
   include/linux/uaccess.h:778:2: note: expanded from macro 'scoped_masked_user_read_access'
     778 |         scoped_masked_user_read_access_size((_usrc), sizeof(*(_usrc)), _elbl)
         |         ^
   include/linux/uaccess.h:766:2: note: expanded from macro 'scoped_masked_user_read_access_size'
     766 |         __scoped_masked_user_access(read, (_usrc), (_size), _elbl)
         |         ^
   include/linux/uaccess.h:751:44: note: expanded from macro '__scoped_masked_user_access'
     751 |                 for (CLASS(masked_user_##_mode##_access, scope) (_tmpptr); !____stop;           \
         |                                                          ^
   In file included from kernel/futex/pi.c:7:
>> kernel/futex/futex.h:292:3: error: cannot jump from this asm goto statement to one of its possible targets
     292 |                 unsafe_get_user(*dest, from, efault);
         |                 ^
   arch/arm64/include/asm/uaccess.h:428:2: note: expanded from macro 'unsafe_get_user'
     428 |         __raw_get_mem("ldtr", x, uaccess_mask_ptr(ptr), label, U)
         |         ^
   arch/arm64/include/asm/uaccess.h:217:3: note: expanded from macro '__raw_get_mem'
     217 |                 __get_mem_asm(ldr, "%w", __gu_val, (ptr), label, type);         \
         |                 ^
   arch/arm64/include/asm/uaccess.h:189:2: note: expanded from macro '__get_mem_asm'
     189 |         asm_goto_output(                                                \
         |         ^
   include/linux/compiler_types.h:513:31: note: expanded from macro 'asm_goto_output'
     513 | #define asm_goto_output(x...) asm volatile goto(x)
         |                               ^
   kernel/futex/futex.h:294:1: note: possible target of asm goto statement
     294 | efault:
         | ^
   kernel/futex/futex.h:291:2: note: jump exits scope of variable with __attribute__((cleanup))
     291 |         scoped_masked_user_read_access(from, efault)
         |         ^
   include/linux/uaccess.h:778:2: note: expanded from macro 'scoped_masked_user_read_access'
     778 |         scoped_masked_user_read_access_size((_usrc), sizeof(*(_usrc)), _elbl)
         |         ^
   include/linux/uaccess.h:766:2: note: expanded from macro 'scoped_masked_user_read_access_size'
     766 |         __scoped_masked_user_access(read, (_usrc), (_size), _elbl)
         |         ^
   include/linux/uaccess.h:751:44: note: expanded from macro '__scoped_masked_user_access'
     751 |                 for (CLASS(masked_user_##_mode##_access, scope) (_tmpptr); !____stop;           \
         |                                                          ^
   In file included from kernel/futex/pi.c:7:
>> kernel/futex/futex.h:292:3: error: cannot jump from this asm goto statement to one of its possible targets
     292 |                 unsafe_get_user(*dest, from, efault);
         |                 ^
   arch/arm64/include/asm/uaccess.h:428:2: note: expanded from macro 'unsafe_get_user'
     428 |         __raw_get_mem("ldtr", x, uaccess_mask_ptr(ptr), label, U)
         |         ^
   arch/arm64/include/asm/uaccess.h:214:3: note: expanded from macro '__raw_get_mem'
     214 |                 __get_mem_asm(ldr "h", "%w", __gu_val, (ptr), label, type);     \
         |                 ^
   arch/arm64/include/asm/uaccess.h:189:2: note: expanded from macro '__get_mem_asm'
     189 |         asm_goto_output(                                                \
         |         ^
   include/linux/compiler_types.h:513:31: note: expanded from macro 'asm_goto_output'
     513 | #define asm_goto_output(x...) asm volatile goto(x)
         |                               ^
   kernel/futex/futex.h:294:1: note: possible target of asm goto statement
     294 | efault:
         | ^
   kernel/futex/futex.h:291:2: note: jump exits scope of variable with __attribute__((cleanup))
     291 |         scoped_masked_user_read_access(from, efault)
         |         ^
   include/linux/uaccess.h:778:2: note: expanded from macro 'scoped_masked_user_read_access'
     778 |         scoped_masked_user_read_access_size((_usrc), sizeof(*(_usrc)), _elbl)
         |         ^
   include/linux/uaccess.h:766:2: note: expanded from macro 'scoped_masked_user_read_access_size'
     766 |         __scoped_masked_user_access(read, (_usrc), (_size), _elbl)
         |         ^
   include/linux/uaccess.h:751:44: note: expanded from macro '__scoped_masked_user_access'
     751 |                 for (CLASS(masked_user_##_mode##_access, scope) (_tmpptr); !____stop;           \
         |                                                          ^
   In file included from kernel/futex/pi.c:7:
>> kernel/futex/futex.h:292:3: error: cannot jump from this asm goto statement to one of its possible targets
     292 |                 unsafe_get_user(*dest, from, efault);
         |                 ^
   arch/arm64/include/asm/uaccess.h:428:2: note: expanded from macro 'unsafe_get_user'
     428 |         __raw_get_mem("ldtr", x, uaccess_mask_ptr(ptr), label, U)
         |         ^
   arch/arm64/include/asm/uaccess.h:211:3: note: expanded from macro '__raw_get_mem'
     211 |                 __get_mem_asm(ldr "b", "%w", __gu_val, (ptr), label, type);     \
         |                 ^
   arch/arm64/include/asm/uaccess.h:189:2: note: expanded from macro '__get_mem_asm'
     189 |         asm_goto_output(                                                \
         |         ^
   include/linux/compiler_types.h:513:31: note: expanded from macro 'asm_goto_output'
     513 | #define asm_goto_output(x...) asm volatile goto(x)
         |                               ^
   kernel/futex/futex.h:294:1: note: possible target of asm goto statement
     294 | efault:
         | ^
   kernel/futex/futex.h:291:2: note: jump exits scope of variable with __attribute__((cleanup))
     291 |         scoped_masked_user_read_access(from, efault)
         |         ^
   include/linux/uaccess.h:778:2: note: expanded from macro 'scoped_masked_user_read_access'
     778 |         scoped_masked_user_read_access_size((_usrc), sizeof(*(_usrc)), _elbl)
         |         ^
   include/linux/uaccess.h:766:2: note: expanded from macro 'scoped_masked_user_read_access_size'
     766 |         __scoped_masked_user_access(read, (_usrc), (_size), _elbl)
         |         ^
   include/linux/uaccess.h:751:44: note: expanded from macro '__scoped_masked_user_access'
     751 |                 for (CLASS(masked_user_##_mode##_access, scope) (_tmpptr); !____stop;           \
         |                                                          ^
   In file included from kernel/futex/pi.c:7:
   kernel/futex/futex.h:301:3: error: cannot jump from this asm goto statement to one of its possible targets
     301 |                 unsafe_put_user(val, to, efault);
         |                 ^
   arch/arm64/include/asm/uaccess.h:426:2: note: expanded from macro 'unsafe_put_user'
     426 |         __raw_put_mem("sttr", x, uaccess_mask_ptr(ptr), label, U)
         |         ^
   arch/arm64/include/asm/uaccess.h:318:3: note: expanded from macro '__raw_put_mem'
     318 |                 __put_mem_asm(str, "%x", __pu_val, (ptr), label, type);         \
         |                 ^
   arch/arm64/include/asm/uaccess.h:298:2: note: expanded from macro '__put_mem_asm'
     298 |         asm goto(                                                       \
         |         ^
   kernel/futex/futex.h:303:1: note: possible target of asm goto statement
     303 | efault:
         | ^
   kernel/futex/futex.h:300:2: note: jump exits scope of variable with __attribute__((cleanup))
     300 |         scoped_masked_user_write_access(to, efault)
         |         ^
   include/linux/uaccess.h:808:2: note: expanded from macro 'scoped_masked_user_write_access'
     808 |         scoped_masked_user_write_access_size((_udst), sizeof(*(_udst)), _elbl)
         |         ^
   include/linux/uaccess.h:796:2: note: expanded from macro 'scoped_masked_user_write_access_size'
     796 |         __scoped_masked_user_access(write, (_udst),  (_size), _elbl)
         |         ^
   include/linux/uaccess.h:751:44: note: expanded from macro '__scoped_masked_user_access'
     751 |                 for (CLASS(masked_user_##_mode##_access, scope) (_tmpptr); !____stop;           \
         |                                                          ^
   In file included from kernel/futex/pi.c:7:
   kernel/futex/futex.h:301:3: error: cannot jump from this asm goto statement to one of its possible targets
     301 |                 unsafe_put_user(val, to, efault);
         |                 ^
   arch/arm64/include/asm/uaccess.h:426:2: note: expanded from macro 'unsafe_put_user'
     426 |         __raw_put_mem("sttr", x, uaccess_mask_ptr(ptr), label, U)
         |         ^
   arch/arm64/include/asm/uaccess.h:315:3: note: expanded from macro '__raw_put_mem'
     315 |                 __put_mem_asm(str, "%w", __pu_val, (ptr), label, type);         \
         |                 ^
   arch/arm64/include/asm/uaccess.h:298:2: note: expanded from macro '__put_mem_asm'
     298 |         asm goto(                                                       \
         |         ^
   kernel/futex/futex.h:303:1: note: possible target of asm goto statement
     303 | efault:
         | ^
   kernel/futex/futex.h:300:2: note: jump exits scope of variable with __attribute__((cleanup))
     300 |         scoped_masked_user_write_access(to, efault)
         |         ^
   include/linux/uaccess.h:808:2: note: expanded from macro 'scoped_masked_user_write_access'
     808 |         scoped_masked_user_write_access_size((_udst), sizeof(*(_udst)), _elbl)
         |         ^
   include/linux/uaccess.h:796:2: note: expanded from macro 'scoped_masked_user_write_access_size'
     796 |         __scoped_masked_user_access(write, (_udst),  (_size), _elbl)
         |         ^
   include/linux/uaccess.h:751:44: note: expanded from macro '__scoped_masked_user_access'
     751 |                 for (CLASS(masked_user_##_mode##_access, scope) (_tmpptr); !____stop;           \
         |                                                          ^
   In file included from kernel/futex/pi.c:7:
   kernel/futex/futex.h:301:3: error: cannot jump from this asm goto statement to one of its possible targets
     301 |                 unsafe_put_user(val, to, efault);
         |                 ^
   arch/arm64/include/asm/uaccess.h:426:2: note: expanded from macro 'unsafe_put_user'
     426 |         __raw_put_mem("sttr", x, uaccess_mask_ptr(ptr), label, U)
         |         ^
   arch/arm64/include/asm/uaccess.h:312:3: note: expanded from macro '__raw_put_mem'
     312 |                 __put_mem_asm(str "h", "%w", __pu_val, (ptr), label, type);     \
         |                 ^
   arch/arm64/include/asm/uaccess.h:298:2: note: expanded from macro '__put_mem_asm'
     298 |         asm goto(                                                       \
         |         ^
   kernel/futex/futex.h:303:1: note: possible target of asm goto statement
     303 | efault:


vim +292 kernel/futex/futex.h

   283	
   284	/*
   285	 * This does a plain atomic user space read, and the user pointer has
   286	 * already been verified earlier by get_futex_key() to be both aligned
   287	 * and actually in user space, just like futex_atomic_cmpxchg_inatomic().
   288	 */
   289	static __always_inline int futex_get_value(u32 *dest, u32 __user *from)
   290	{
   291		scoped_masked_user_read_access(from, efault)
 > 292			unsafe_get_user(*dest, from, efault);
   293		return 0;
   294	efault:
   295		return -EFAULT;
   296	}
   297	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-10-16  0:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-16  0:14 [tglx-devel:uaccess/masked 9/11] kernel/futex/futex.h:292:3: error: cannot jump from this asm goto statement to one of its possible targets kernel test robot

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