Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
* [tglx-devel:uaccess/masked 11/11] fs/select.c:781:4: error: cannot jump from this asm goto statement to one of its possible targets
@ 2025-10-16  1:06 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-10-16  1:06 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: acabe15d70b5c158154ca2c0e766e8e90ca15a59 [11/11] select: Convert to scoped masked user access
config: arm64-randconfig-001-20251016 (https://download.01.org/0day-ci/archive/20251016/202510160910.a7jVqyFo-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/202510160910.a7jVqyFo-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/202510160910.a7jVqyFo-lkp@intel.com/

All errors (new ones prefixed by >>):

>> fs/select.c:781:4: error: cannot jump from this asm goto statement to one of its possible targets
     781 |                         unsafe_get_user(to->size, &from->size, 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)
         |                               ^
   fs/select.c:785:1: note: possible target of asm goto statement
     785 | Efault:
         | ^
   fs/select.c:779:3: note: jump exits scope of variable with __attribute__((cleanup))
     779 |                 scoped_masked_user_rw_access(from, Efault) {
         |                 ^
   include/linux/uaccess.h:831:2: note: expanded from macro 'scoped_masked_user_rw_access'
     831 |         scoped_masked_user_rw_access_size((_uptr), sizeof(*(_uptr)), _elbl)
         |         ^
   include/linux/uaccess.h:819:2: note: expanded from macro 'scoped_masked_user_rw_access_size'
     819 |         __scoped_masked_user_access(rw, (_uptr), (_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;           \
         |                                                          ^
>> fs/select.c:781:4: error: cannot jump from this asm goto statement to one of its possible targets
     781 |                         unsafe_get_user(to->size, &from->size, 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)
         |                               ^
   fs/select.c:785:1: note: possible target of asm goto statement
     785 | Efault:
         | ^
   fs/select.c:779:3: note: jump exits scope of variable with __attribute__((cleanup))
     779 |                 scoped_masked_user_rw_access(from, Efault) {
         |                 ^
   include/linux/uaccess.h:831:2: note: expanded from macro 'scoped_masked_user_rw_access'
     831 |         scoped_masked_user_rw_access_size((_uptr), sizeof(*(_uptr)), _elbl)
         |         ^
   include/linux/uaccess.h:819:2: note: expanded from macro 'scoped_masked_user_rw_access_size'
     819 |         __scoped_masked_user_access(rw, (_uptr), (_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;           \
         |                                                          ^
>> fs/select.c:781:4: error: cannot jump from this asm goto statement to one of its possible targets
     781 |                         unsafe_get_user(to->size, &from->size, 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)
         |                               ^
   fs/select.c:785:1: note: possible target of asm goto statement
     785 | Efault:
         | ^
   fs/select.c:779:3: note: jump exits scope of variable with __attribute__((cleanup))
     779 |                 scoped_masked_user_rw_access(from, Efault) {
         |                 ^
   include/linux/uaccess.h:831:2: note: expanded from macro 'scoped_masked_user_rw_access'
     831 |         scoped_masked_user_rw_access_size((_uptr), sizeof(*(_uptr)), _elbl)
         |         ^
   include/linux/uaccess.h:819:2: note: expanded from macro 'scoped_masked_user_rw_access_size'
     819 |         __scoped_masked_user_access(rw, (_uptr), (_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;           \
         |                                                          ^
>> fs/select.c:781:4: error: cannot jump from this asm goto statement to one of its possible targets
     781 |                         unsafe_get_user(to->size, &from->size, 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)
         |                               ^
   fs/select.c:785:1: note: possible target of asm goto statement
     785 | Efault:
         | ^
   fs/select.c:779:3: note: jump exits scope of variable with __attribute__((cleanup))
     779 |                 scoped_masked_user_rw_access(from, Efault) {
         |                 ^
   include/linux/uaccess.h:831:2: note: expanded from macro 'scoped_masked_user_rw_access'
     831 |         scoped_masked_user_rw_access_size((_uptr), sizeof(*(_uptr)), _elbl)
         |         ^
   include/linux/uaccess.h:819:2: note: expanded from macro 'scoped_masked_user_rw_access_size'
     819 |         __scoped_masked_user_access(rw, (_uptr), (_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;           \
         |                                                          ^
   fs/select.c:780:4: error: cannot jump from this asm goto statement to one of its possible targets
     780 |                         unsafe_get_user(to->p, &from->p, 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)
         |                               ^
   fs/select.c:785:1: note: possible target of asm goto statement
     785 | Efault:
         | ^
   fs/select.c:779:3: note: jump exits scope of variable with __attribute__((cleanup))
     779 |                 scoped_masked_user_rw_access(from, Efault) {
         |                 ^
   include/linux/uaccess.h:831:2: note: expanded from macro 'scoped_masked_user_rw_access'
     831 |         scoped_masked_user_rw_access_size((_uptr), sizeof(*(_uptr)), _elbl)
         |         ^
   include/linux/uaccess.h:819:2: note: expanded from macro 'scoped_masked_user_rw_access_size'
     819 |         __scoped_masked_user_access(rw, (_uptr), (_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;           \
         |                                                          ^
   fs/select.c:780:4: error: cannot jump from this asm goto statement to one of its possible targets
     780 |                         unsafe_get_user(to->p, &from->p, 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)
         |                               ^
   fs/select.c:785:1: note: possible target of asm goto statement
     785 | Efault:
         | ^
   fs/select.c:779:3: note: jump exits scope of variable with __attribute__((cleanup))
     779 |                 scoped_masked_user_rw_access(from, Efault) {
         |                 ^
   include/linux/uaccess.h:831:2: note: expanded from macro 'scoped_masked_user_rw_access'
     831 |         scoped_masked_user_rw_access_size((_uptr), sizeof(*(_uptr)), _elbl)
         |         ^
   include/linux/uaccess.h:819:2: note: expanded from macro 'scoped_masked_user_rw_access_size'
     819 |         __scoped_masked_user_access(rw, (_uptr), (_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;           \
         |                                                          ^
   fs/select.c:780:4: error: cannot jump from this asm goto statement to one of its possible targets
     780 |                         unsafe_get_user(to->p, &from->p, 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(                                                \


vim +781 fs/select.c

7e71609f64ec81 Al Viro         2020-02-19  773  
7e71609f64ec81 Al Viro         2020-02-19  774  static inline int get_sigset_argpack(struct sigset_argpack *to,
7e71609f64ec81 Al Viro         2020-02-19  775  				     struct sigset_argpack __user *from)
7e71609f64ec81 Al Viro         2020-02-19  776  {
7e71609f64ec81 Al Viro         2020-02-19  777  	// the path is hot enough for overhead of copy_from_user() to matter
7e71609f64ec81 Al Viro         2020-02-19  778  	if (from) {
acabe15d70b5c1 Thomas Gleixner 2025-08-13  779  		scoped_masked_user_rw_access(from, Efault) {
7e71609f64ec81 Al Viro         2020-02-19  780  			unsafe_get_user(to->p, &from->p, Efault);
7e71609f64ec81 Al Viro         2020-02-19 @781  			unsafe_get_user(to->size, &from->size, Efault);
acabe15d70b5c1 Thomas Gleixner 2025-08-13  782  		}
7e71609f64ec81 Al Viro         2020-02-19  783  	}
7e71609f64ec81 Al Viro         2020-02-19  784  	return 0;
7e71609f64ec81 Al Viro         2020-02-19  785  Efault:
7e71609f64ec81 Al Viro         2020-02-19  786  	return -EFAULT;
7e71609f64ec81 Al Viro         2020-02-19  787  }
7e71609f64ec81 Al Viro         2020-02-19  788  

:::::: The code at line 781 was first introduced by commit
:::::: 7e71609f64ec81b8367b7fa59ab06bb571d17e3b pselect6() and friends: take handling the combined 6th/7th args into helper

:::::: TO: Al Viro <viro@zeniv.linux.org.uk>
:::::: CC: Al Viro <viro@zeniv.linux.org.uk>

-- 
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  1:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-16  1:06 [tglx-devel:uaccess/masked 11/11] fs/select.c:781:4: 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