All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nathan Chancellor <nathan@kernel.org>
To: Josh Poimboeuf <jpoimboe@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>,
	Peter Zijlstra <peterz@infradead.org>,
	linux-kernel@vger.kernel.org
Subject: Re: clang/objtool failures on linux-next
Date: Mon, 9 Mar 2026 14:15:29 -0700	[thread overview]
Message-ID: <20260309211529.GA3411535@ax162> (raw)
In-Reply-To: <dq2zuhqoifcowdfi5zhibfcbi5zt2vlmdnfoupa7li3wkj4i3i@ijpbtscje4i6>

On Fri, Mar 06, 2026 at 05:35:20PM -0800, Josh Poimboeuf wrote:
> On Fri, Mar 06, 2026 at 11:04:50PM +0100, Arnd Bergmann wrote:
> > ==> build/x86/0x8FD83285_defconfig/log <==
> > drivers/gpu/drm/amd/amdgpu/amdgpu_cs.o: warning: objtool: amdgpu_cs_parser_bos+0x723: unreachable instruction
> > drivers/gpu/drm/xe/xe_bo.o: warning: objtool: xe_bo_create_pin_map_at_novm+0x11d: unreachable instruction
> > drivers/gpu/drm/panthor/panthor_drv.o: warning: objtool: panthor_ioctl_vm_bind+0x2df: unreachable instruction
> 
> These three warnings are accurate, for each of these, Clang is leaving
> an unreachable JMP at the end of the function:
> 
>     166e:	4c 89 ea             	mov    %r13,%rdx
>     1671:	e8 00 00 00 00       	call   1676 <amdgpu_cs_parser_bos+0x716>	1672: R_X86_64_PLT32	__ubsan_handle_shift_out_of_bounds-0x4
>     1676:	49 8b 94 24 08 1d 01 00 	mov    0x11d08(%r12),%rdx
>     167e:	e9 c6 fd ff ff       	jmp    1449 <amdgpu_cs_parser_bos+0x4e9>
>     1683:	e9 8c f9 ff ff       	jmp    1014 <amdgpu_cs_parser_bos+0xb4>
>     1688:	0f 1f 84 00 00 00 00 00 	nopl   0x0(%rax,%rax,1)
> 
> Nathan, any idea?  I haven't seen this pattern before.

This seems pretty similar to

  https://github.com/ClangBuiltLinux/linux/issues/2130
  https://github.com/llvm/llvm-project/issues/167774

as they all use drm_exec_until_all_locked(). Justin fixed this in main
(23.0.0) and it was backported to 22.1.0:

  https://github.com/llvm/llvm-project/commit/404920838836a022b0ae4b9a462befba89ee0cdc
  https://github.com/llvm/llvm-project/commit/2fb8921a7c70b264f670569ac319d1c96e9f5acc

I don't think Arnd has that fix based on the .comment section:

  Debian clang version 22.0.0 (++20251025104945+e219cf60598c-1~exp1~20251025225011.1789)

I don't see a configuration file for these so I cannot verify that they
are actually fixed with a newer version of clang.

Unfortunately, the problematic change landed in the 21.1.0 release so
that version will still see these warnings. I am guessing it is probably
not too easy to workaround this in objtool though, so maybe we will just
have to live with them?

Cheers,
Nathan

  reply	other threads:[~2026-03-09 21:15 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-06 12:41 clang/objtool failures on linux-next Arnd Bergmann
2026-03-06 17:30 ` Josh Poimboeuf
2026-03-06 18:29   ` Josh Poimboeuf
2026-03-06 21:02     ` Arnd Bergmann
2026-03-06 21:17       ` Josh Poimboeuf
2026-03-06 22:04         ` Arnd Bergmann
2026-03-07  1:35           ` Josh Poimboeuf
2026-03-09 21:15             ` Nathan Chancellor [this message]
2026-03-09 21:27               ` Arnd Bergmann
2026-03-07  1:37           ` Josh Poimboeuf
2026-03-06 23:25       ` Nathan Chancellor
2026-03-16 21:27 ` Arnd Bergmann
2026-03-17  0:29   ` Josh Poimboeuf

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=20260309211529.GA3411535@ax162 \
    --to=nathan@kernel.org \
    --cc=arnd@arndb.de \
    --cc=jpoimboe@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.