All of lore.kernel.org
 help / color / mirror / Atom feed
* drivers/bluetooth/hci_vhci.o: error: objtool: vhci_coredump_hdr(): STT_FUNC at end of section
@ 2025-04-12 22:16 kernel test robot
  2025-04-15  0:18 ` Josh Poimboeuf
  0 siblings, 1 reply; 4+ messages in thread
From: kernel test robot @ 2025-04-12 22:16 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp

:::::: 
:::::: Manual check reason: "only suspicious fbc files changed"
:::::: 

BCC: lkp@intel.com
CC: llvm@lists.linux.dev
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: Josh Poimboeuf <jpoimboe@kernel.org>
CC: Ingo Molnar <mingo@kernel.org>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   b676ac484f847bbe5c7d29603f41475b64fefe55
commit: 3e7be635937d19b91bab70695328214a3d789d51 objtool: Change "warning:" to "error: " for fatal errors
date:   12 days ago
:::::: branch date: 2 hours ago
:::::: commit date: 12 days ago
config: x86_64-buildonly-randconfig-001-20250413 (https://download.01.org/0day-ci/archive/20250413/202504130652.o7UWcPMe-lkp@intel.com/config)
compiler: clang version 20.1.2 (https://github.com/llvm/llvm-project 58df0ef89dd64126512e4ee27b4ac3fd8ddf6247)
rustc: rustc 1.78.0 (9b00956e5 2024-04-29)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250413/202504130652.o7UWcPMe-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/r/202504130652.o7UWcPMe-lkp@intel.com/

All errors (new ones prefixed by >>):

>> drivers/bluetooth/hci_vhci.o: error: objtool: vhci_coredump_hdr(): STT_FUNC at end of section

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: drivers/bluetooth/hci_vhci.o: error: objtool: vhci_coredump_hdr(): STT_FUNC at end of section
  2025-04-12 22:16 drivers/bluetooth/hci_vhci.o: error: objtool: vhci_coredump_hdr(): STT_FUNC at end of section kernel test robot
@ 2025-04-15  0:18 ` Josh Poimboeuf
  2025-04-15  0:30   ` Nathan Chancellor
  0 siblings, 1 reply; 4+ messages in thread
From: Josh Poimboeuf @ 2025-04-15  0:18 UTC (permalink / raw)
  To: kernel test robot, Nathan Chancellor
  Cc: oe-kbuild, Peter Zijlstra, linux-kernel

On Sun, Apr 13, 2025 at 06:16:42AM +0800, kernel test robot wrote:
> :::::: 
> :::::: Manual check reason: "only suspicious fbc files changed"
> :::::: 
> 
> BCC: lkp@intel.com
> CC: llvm@lists.linux.dev
> CC: oe-kbuild-all@lists.linux.dev
> CC: linux-kernel@vger.kernel.org
> TO: Josh Poimboeuf <jpoimboe@kernel.org>
> CC: Ingo Molnar <mingo@kernel.org>
> 
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head:   b676ac484f847bbe5c7d29603f41475b64fefe55
> commit: 3e7be635937d19b91bab70695328214a3d789d51 objtool: Change "warning:" to "error: " for fatal errors
> date:   12 days ago
> :::::: branch date: 2 hours ago
> :::::: commit date: 12 days ago
> config: x86_64-buildonly-randconfig-001-20250413 (https://download.01.org/0day-ci/archive/20250413/202504130652.o7UWcPMe-lkp@intel.com/config)
> compiler: clang version 20.1.2 (https://github.com/llvm/llvm-project 58df0ef89dd64126512e4ee27b4ac3fd8ddf6247)
> rustc: rustc 1.78.0 (9b00956e5 2024-04-29)
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250413/202504130652.o7UWcPMe-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/r/202504130652.o7UWcPMe-lkp@intel.com/
> 
> All errors (new ones prefixed by >>):
> 
> >> drivers/bluetooth/hci_vhci.o: error: objtool: vhci_coredump_hdr(): STT_FUNC at end of section

Hi Nathan,

This is looking like a Clang bug to me.  .text.vhci_coredump_hdr has
zero bytes, and its zero-length vhci_coredump_hdr() function is
referenced by force_devcd_write() as a function pointer.  I wasn't able
to find any undefined behavior that might trigger that somehow.

-- 
Josh

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: drivers/bluetooth/hci_vhci.o: error: objtool: vhci_coredump_hdr(): STT_FUNC at end of section
  2025-04-15  0:18 ` Josh Poimboeuf
@ 2025-04-15  0:30   ` Nathan Chancellor
  2025-04-15 16:04     ` Kees Cook
  0 siblings, 1 reply; 4+ messages in thread
From: Nathan Chancellor @ 2025-04-15  0:30 UTC (permalink / raw)
  To: Josh Poimboeuf
  Cc: kernel test robot, oe-kbuild, Peter Zijlstra, linux-kernel,
	Kees Cook

Hi Josh,

On Mon, Apr 14, 2025 at 05:18:08PM -0700, Josh Poimboeuf wrote:
> On Sun, Apr 13, 2025 at 06:16:42AM +0800, kernel test robot wrote:
> > :::::: 
> > :::::: Manual check reason: "only suspicious fbc files changed"
> > :::::: 
> > 
> > BCC: lkp@intel.com
> > CC: llvm@lists.linux.dev
> > CC: oe-kbuild-all@lists.linux.dev
> > CC: linux-kernel@vger.kernel.org
> > TO: Josh Poimboeuf <jpoimboe@kernel.org>
> > CC: Ingo Molnar <mingo@kernel.org>
> > 
> > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> > head:   b676ac484f847bbe5c7d29603f41475b64fefe55
> > commit: 3e7be635937d19b91bab70695328214a3d789d51 objtool: Change "warning:" to "error: " for fatal errors
> > date:   12 days ago
> > :::::: branch date: 2 hours ago
> > :::::: commit date: 12 days ago
> > config: x86_64-buildonly-randconfig-001-20250413 (https://download.01.org/0day-ci/archive/20250413/202504130652.o7UWcPMe-lkp@intel.com/config)
> > compiler: clang version 20.1.2 (https://github.com/llvm/llvm-project 58df0ef89dd64126512e4ee27b4ac3fd8ddf6247)
> > rustc: rustc 1.78.0 (9b00956e5 2024-04-29)
> > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250413/202504130652.o7UWcPMe-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/r/202504130652.o7UWcPMe-lkp@intel.com/
> > 
> > All errors (new ones prefixed by >>):
> > 
> > >> drivers/bluetooth/hci_vhci.o: error: objtool: vhci_coredump_hdr(): STT_FUNC at end of section
> 
> This is looking like a Clang bug to me.  .text.vhci_coredump_hdr has
> zero bytes, and its zero-length vhci_coredump_hdr() function is
> referenced by force_devcd_write() as a function pointer.  I wasn't able
> to find any undefined behavior that might trigger that somehow.

Indeed, this is https://github.com/ClangBuiltLinux/linux/issues/2073,
which does have a fix in LLVM 21 now:
https://github.com/llvm/llvm-project/commit/ea2e66aa8b6e363b89df66dc44275a0d7ecd70ce

I forgot to request a backport for LLVM 20 but I am not really sure I
want to draw more attention to the patch (since the Clang folks will be
asked to ack a backport) since it had some contention in the LLVM issue
after it was merged:
https://github.com/llvm/llvm-project/issues/130649#issuecomment-2719119408

Kees, do you have any thoughts on requesting a backport for that?

Regardless of it being fixed in LLVM 20, the warning impacts all
supported clang versions IIRC, so we should probably submit Kees's patch
to just use a 'const char *' with the string literals instead of calling
snprintf() on the 80 character array.

Cheers,
Nathan

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: drivers/bluetooth/hci_vhci.o: error: objtool: vhci_coredump_hdr(): STT_FUNC at end of section
  2025-04-15  0:30   ` Nathan Chancellor
@ 2025-04-15 16:04     ` Kees Cook
  0 siblings, 0 replies; 4+ messages in thread
From: Kees Cook @ 2025-04-15 16:04 UTC (permalink / raw)
  To: Nathan Chancellor
  Cc: Josh Poimboeuf, kernel test robot, oe-kbuild, Peter Zijlstra,
	linux-kernel

On Mon, Apr 14, 2025 at 05:30:21PM -0700, Nathan Chancellor wrote:
> Hi Josh,
> 
> On Mon, Apr 14, 2025 at 05:18:08PM -0700, Josh Poimboeuf wrote:
> > On Sun, Apr 13, 2025 at 06:16:42AM +0800, kernel test robot wrote:
> > > :::::: 
> > > :::::: Manual check reason: "only suspicious fbc files changed"
> > > :::::: 
> > > 
> > > BCC: lkp@intel.com
> > > CC: llvm@lists.linux.dev
> > > CC: oe-kbuild-all@lists.linux.dev
> > > CC: linux-kernel@vger.kernel.org
> > > TO: Josh Poimboeuf <jpoimboe@kernel.org>
> > > CC: Ingo Molnar <mingo@kernel.org>
> > > 
> > > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> > > head:   b676ac484f847bbe5c7d29603f41475b64fefe55
> > > commit: 3e7be635937d19b91bab70695328214a3d789d51 objtool: Change "warning:" to "error: " for fatal errors
> > > date:   12 days ago
> > > :::::: branch date: 2 hours ago
> > > :::::: commit date: 12 days ago
> > > config: x86_64-buildonly-randconfig-001-20250413 (https://download.01.org/0day-ci/archive/20250413/202504130652.o7UWcPMe-lkp@intel.com/config)
> > > compiler: clang version 20.1.2 (https://github.com/llvm/llvm-project 58df0ef89dd64126512e4ee27b4ac3fd8ddf6247)
> > > rustc: rustc 1.78.0 (9b00956e5 2024-04-29)
> > > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250413/202504130652.o7UWcPMe-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/r/202504130652.o7UWcPMe-lkp@intel.com/
> > > 
> > > All errors (new ones prefixed by >>):
> > > 
> > > >> drivers/bluetooth/hci_vhci.o: error: objtool: vhci_coredump_hdr(): STT_FUNC at end of section
> > 
> > This is looking like a Clang bug to me.  .text.vhci_coredump_hdr has
> > zero bytes, and its zero-length vhci_coredump_hdr() function is
> > referenced by force_devcd_write() as a function pointer.  I wasn't able
> > to find any undefined behavior that might trigger that somehow.
> 
> Indeed, this is https://github.com/ClangBuiltLinux/linux/issues/2073,
> which does have a fix in LLVM 21 now:
> https://github.com/llvm/llvm-project/commit/ea2e66aa8b6e363b89df66dc44275a0d7ecd70ce
> 
> I forgot to request a backport for LLVM 20 but I am not really sure I
> want to draw more attention to the patch (since the Clang folks will be
> asked to ack a backport) since it had some contention in the LLVM issue
> after it was merged:
> https://github.com/llvm/llvm-project/issues/130649#issuecomment-2719119408
> 
> Kees, do you have any thoughts on requesting a backport for that?

I don't think we should especially since we can fix the one place it
tickles the kernel currently. (And the fix actually improves the code.)

> Regardless of it being fixed in LLVM 20, the warning impacts all
> supported clang versions IIRC, so we should probably submit Kees's patch
> to just use a 'const char *' with the string literals instead of calling
> snprintf() on the 80 character array.

I'll send the patch...

-Kees

-- 
Kees Cook

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-04-15 16:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-12 22:16 drivers/bluetooth/hci_vhci.o: error: objtool: vhci_coredump_hdr(): STT_FUNC at end of section kernel test robot
2025-04-15  0:18 ` Josh Poimboeuf
2025-04-15  0:30   ` Nathan Chancellor
2025-04-15 16:04     ` Kees Cook

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.