From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BBC0128469A for ; Mon, 9 Mar 2026 21:15:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773090933; cv=none; b=e7SQ71JQ6CRkbNIHLLxBVU/M5WzeLyLBrRfee1gW/AOoJ4ruZCXV7ZYXLC0QbQ0CMGSad/6KwWNO5x7Yz5JKDrhE2zBGxBi8Se/PA6xMWTBBksXkjk9TcR5CfoHy4SEWymt3LmwrNCris1Tz7xsDkfx7eR8X3mGWODQf6FQoeig= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773090933; c=relaxed/simple; bh=8qIc1DMBJF+pqym561XncSvVVFZeaGTl4nRpapHytSs=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=uOgejQY4GXaUiKoYoVe5t5GyoZiATYPhH8wIXrn1jqBgqu4sT0xh9zpRqSWbF/irfj7hmwr43AMiYOmS3DR3kmczwCNELXE4KR+FriX3qbubKJt7dsCVD34X7OzOk90ygSk+aIxEnl8I0TmJCuoYVoR4FizMQtK0EoUbMnHp6qM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=drRE+A9j; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="drRE+A9j" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 80D80C4CEF7; Mon, 9 Mar 2026 21:15:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1773090933; bh=8qIc1DMBJF+pqym561XncSvVVFZeaGTl4nRpapHytSs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=drRE+A9j6GCltqu4x2bf8tF84CzeQDg47y7lwBlAZelSi+lfSbPkjMIvAuVlLsoHf /tChB9BVLbnsVAJk5wJTHt/SEbj8i12boE0Mjv3xrl8Lz6m53duzLiEMrRrn/qaPuS lyOMUtD/37T6eY3+XntPXcDhg3JGSifoXBahk5cXX+eOBWN1R/Oc4nbrZ0uoVKrpIF Xvc0J5Qf+sGQoBbFLsKnzOyE3MFFQa2RyIKvAturmKCE6B0nWeus9GXlSUi84zs4X+ thKjJz9mj0eJK9adP8h98Q0tVjRBT50aj6hTMp4MNNnPS4OpT1DaV21obHUecfWdmp sAZL4zx67A32Q== Date: Mon, 9 Mar 2026 14:15:29 -0700 From: Nathan Chancellor To: Josh Poimboeuf Cc: Arnd Bergmann , Peter Zijlstra , linux-kernel@vger.kernel.org Subject: Re: clang/objtool failures on linux-next Message-ID: <20260309211529.GA3411535@ax162> References: <90956545-2066-46e3-b547-10c884582eb0@app.fastmail.com> <7irkxmwqfqrz5bpfow7uuid2d3k73e4q4tepdht64yfm4wczs4@6fu7dgd4kloz> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 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 > 1683: e9 8c f9 ff ff jmp 1014 > 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