lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20260203035603.GC52989@ax162>
Date: Mon, 2 Feb 2026 20:56:03 -0700
From: Nathan Chancellor <nathan@...nel.org>
To: kernel test robot <lkp@...el.com>
Cc: Thomas Gleixner <tglx@...nel.org>, llvm@...ts.linux.dev,
	oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org,
	Ingo Molnar <mingo@...nel.org>,
	"Peter Zijlstra (Intel)" <peterz@...radead.org>
Subject: Re: kernel/futex/core.c:604:23: error: cannot jump from this asm
 goto statement to one of its possible targets

On Tue, Feb 03, 2026 at 03:34:29AM +0800, kernel test robot wrote:
> 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/torvalds/linux.git master
> head:   18f7fcd5e69a04df57b563360b88be72471d6b62
> commit: e4e28fd6986e8cf963ec4137e6c0b95403f636ab futex: Convert to get/put_user_inline()
> date:   3 months ago
> config: powerpc64-randconfig-001-20260203 (https://download.01.org/0day-ci/archive/20260203/202602030343.HVSlSqJ1-lkp@intel.com/config)
> compiler: clang version 16.0.6 (https://github.com/llvm/llvm-project 7cbf1a2591520c2491aa35339f227775f4d3adf6)
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260203/202602030343.HVSlSqJ1-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@...el.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202602030343.HVSlSqJ1-lkp@intel.com/
> 
> All errors (new ones prefixed by >>):
> 
> >> kernel/futex/core.c:604:23: error: cannot jump from this asm goto statement to one of its possible targets
>                    if (node_updated && put_user_inline(node, naddr))
>                                        ^
>    include/linux/uaccess.h:870:3: note: expanded from macro 'put_user_inline'
>                    unsafe_put_user(val, _tmpdst, efault);          \
>                    ^
>    include/linux/uaccess.h:616:2: note: expanded from macro 'unsafe_put_user'
>            arch_unsafe_put_user(x, ptr, local_label);      \
>            ^
>    arch/powerpc/include/asm/uaccess.h:463:2: note: expanded from macro 'arch_unsafe_put_user'
>            __put_user_size_goto((__typeof__(*(p)))(x), (p), sizeof(*(p)), e)
>            ^
>    arch/powerpc/include/asm/uaccess.h:127:10: note: expanded from macro '__put_user_size_goto'
>            case 1: __put_user_asm_goto(x, __pus_addr, label, "stb"); break;        \
>                    ^
>    arch/powerpc/include/asm/uaccess.h:87:2: note: expanded from macro '__put_user_asm_goto'
>            asm goto(                                       \
>            ^
>    kernel/futex/core.c:604:23: note: possible target of asm goto statement
>    include/linux/uaccess.h:870:3: note: expanded from macro 'put_user_inline'
>                    unsafe_put_user(val, _tmpdst, efault);          \
>                    ^
>    include/linux/uaccess.h:618:2: note: expanded from macro 'unsafe_put_user'
>            local_label:                                    \
>            ^
>    kernel/futex/core.c:604:23: note: jump exits scope of variable with __attribute__((cleanup))
>    include/linux/uaccess.h:869:2: note: expanded from macro 'put_user_inline'
>            scoped_user_write_access(_tmpdst, efault)               \
>            ^
>    include/linux/uaccess.h:803:2: note: expanded from macro 'scoped_user_write_access'
>            scoped_user_write_access_size(udst, sizeof(*(udst)), elbl)
>            ^
>    include/linux/uaccess.h:791:2: note: expanded from macro 'scoped_user_write_access_size'
>            __scoped_user_access(write, udst, size, elbl)
>            ^
>    include/linux/uaccess.h:755:36: note: expanded from macro '__scoped_user_access'
>                    for (CLASS(user_##mode##_access, scope)(_tmpptr); !done; done = true)   \
>                                                     ^
>    kernel/futex/core.c:604:23: note: jump bypasses initialization of variable with __attribute__((cleanup))
>    include/linux/uaccess.h:869:2: note: expanded from macro 'put_user_inline'
>            scoped_user_write_access(_tmpdst, efault)               \
>            ^
>    include/linux/uaccess.h:803:2: note: expanded from macro 'scoped_user_write_access'
>            scoped_user_write_access_size(udst, sizeof(*(udst)), elbl)
>            ^
>    include/linux/uaccess.h:791:2: note: expanded from macro 'scoped_user_write_access_size'
>            __scoped_user_access(write, udst, size, elbl)
>            ^
>    include/linux/uaccess.h:755:36: note: expanded from macro '__scoped_user_access'
>                    for (CLASS(user_##mode##_access, scope)(_tmpptr); !done; done = true)   \
>                                                     ^

This appears to be the same error that necessitated e2ffa15b9baa ("kbuild:
Disable CC_HAS_ASM_GOTO_OUTPUT on clang < 17") upstream but this is just
regular 'asm goto', not 'asm goto' with outputs. I had noted during
review that change might not be sufficient to avoid the error in all
cases:

  https://lore.kernel.org/20250916184440.GA1245207@ax162/

This is not the only recent instance of this error because cleanup
macros are becoming quite popular so I think it is getting to the point
where we will need to raise the minimum supported version of LLVM for
building the kernel to 17.0.1 or newer to ensure that we have this
fixed. LLVM 22.1.0 should be released in a month or so, so I can look at
crafting a series for 7.1/7.2 that does this bump.

Cheers,
Nathan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ