public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Nathan Chancellor <nathan@kernel.org>
To: kernel test robot <lkp@intel.com>
Cc: Thomas Gleixner <tglx@kernel.org>,
	llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	linux-kernel@vger.kernel.org, Ingo Molnar <mingo@kernel.org>,
	"Peter Zijlstra (Intel)" <peterz@infradead.org>
Subject: Re: kernel/futex/core.c:604:23: error: cannot jump from this asm goto statement to one of its possible targets
Date: Mon, 2 Feb 2026 20:56:03 -0700	[thread overview]
Message-ID: <20260203035603.GC52989@ax162> (raw)
In-Reply-To: <202602030343.HVSlSqJ1-lkp@intel.com>

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@intel.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

  reply	other threads:[~2026-02-03  3:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-02 19:34 kernel/futex/core.c:604:23: error: cannot jump from this asm goto statement to one of its possible targets kernel test robot
2026-02-03  3:56 ` Nathan Chancellor [this message]
2026-02-04  8:22   ` Peter Zijlstra
  -- strict thread matches above, loose matches on Subject: below --
2026-01-23 11:53 kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260203035603.GC52989@ax162 \
    --to=nathan@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=llvm@lists.linux.dev \
    --cc=mingo@kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=peterz@infradead.org \
    --cc=tglx@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox