Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
From: Nathan Chancellor <nathan@kernel.org>
To: Huacai Chen <chenhuacai@kernel.org>,
	WANG Xuerui <kernel@xen0n.name>, WANG Rui <wangrui@loongson.cn>
Cc: loongarch@lists.linux.dev, llvm@lists.linux.dev
Subject: objtool warnings "sibling call from callable instruction with modified stack frame" with CONFIG_LTO_CLANG_THIN
Date: Thu, 31 Jul 2025 10:56:55 -0700	[thread overview]
Message-ID: <20250731175655.GA1455142@ax162> (raw)

Hi LoongArch folks,

The kernel test robot recently generated several reports when building
with LLVM that appear to be related (the "warning: objtool:" reports):

https://lore.kernel.org/all/?q=loongarch-randconfig-002-20250730

This can be easily reproduced by enabling CONFIG_LTO_CLANG_THIN on top
of defconfig:

  $ make -skj"$(nproc)" ARCH=loongarch LLVM=1 clean defconfig

  $ scripts/config -d LTO_NONE -e LTO_CLANG_THIN

  $ make -skj"$(nproc)" ARCH=loongarch LLVM=1 olddefconfig all
  drivers/char/ipmi/ipmi_devintf.o: warning: objtool: ipmi_ioctl+0x7c: sibling call from callable instruction with modified stack frame
  net/802/garp.o: warning: objtool: garp_pdu_rcv+0x170: sibling call from callable instruction with modified stack frame
  drivers/rapidio/devices/rio_mport_cdev.o: warning: objtool: mport_cdev_ioctl+0xe4: sibling call from callable instruction with modified stack frame
  net/802/mrp.o: warning: objtool: mrp_attr_event+0x5c: sibling call from callable instruction with modified stack frame
  net/netfilter/nfnetlink_osf.o: warning: objtool: nf_osf_match_one+0x1ac: unreachable instruction
  arch/loongarch/kvm/kvm.o: warning: objtool: kvm_set_memslot+0x22c: sibling call from callable instruction with modified stack frame
  arch/loongarch/kvm/kvm.o: warning: objtool: kvm_dev_ioctl+0x68: sibling call from callable instruction with modified stack frame
  arch/loongarch/kvm/kvm.o: warning: objtool: kvm_emu_iocsr+0x74: sibling call from callable instruction with modified stack frame
  arch/loongarch/kvm/kvm.o: warning: objtool: kvm_emu_mmio_read+0x58: sibling call from callable instruction with modified stack frame
  arch/loongarch/kvm/kvm.o: warning: objtool: kvm_emu_mmio_write+0x114: sibling call from callable instruction with modified stack frame
  arch/loongarch/kvm/kvm.o: warning: objtool: kvm_handle_gspr.llvm.8483686505109456213+0x230: sibling call from callable instruction with modified stack frame
  arch/loongarch/kvm/kvm.o: warning: objtool: kvm_arch_vcpu_ioctl+0x3ac: sibling call from callable instruction with modified stack frame
  arch/loongarch/kvm/kvm.o: warning: objtool: kvm_arch_vm_ioctl+0xec: sibling call from callable instruction with modified stack frame
  arch/loongarch/kvm/kvm.o: warning: objtool: kvm_ipi_read+0xe8: sibling call from callable instruction with modified stack frame
  arch/loongarch/kvm/kvm.o: warning: objtool: kvm_ipi_write+0x12c: sibling call from callable instruction with modified stack frame
  arch/loongarch/kvm/kvm.o: warning: objtool: kvm_ipi_regs_access+0x84: sibling call from callable instruction with modified stack frame
  arch/loongarch/kvm/kvm.o: warning: objtool: kvm_eiointc_regs_access+0x50: sibling call from callable instruction with modified stack frame
  arch/loongarch/kvm/kvm.o: warning: objtool: kvm_pch_pic_regs_access+0x54: sibling call from callable instruction with modified stack frame
  arch/loongarch/kvm/kvm.o: warning: objtool: kvm_pch_pic_read+0x64: sibling call from callable instruction with modified stack frame
  arch/loongarch/kvm/kvm.o: warning: objtool: kvm_pch_pic_write+0x7c: sibling call from callable instruction with modified stack frame
  drivers/char/ipmi/ipmi_si.o: warning: objtool: smi_event_handler+0x120: sibling call from callable instruction with modified stack frame
  drivers/char/ipmi/ipmi_si.o: warning: objtool: kcs_event.llvm.13474012466233770392+0x140: sibling call from callable instruction with modified stack frame
  ...

x86_64 does not see these objtool warnings when LTO is enabled, is this
a backend issue or does objtool need to account for something that LLVM
does yet GCC does not?

Cheers,
Nathan

             reply	other threads:[~2025-07-31 17:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-31 17:56 Nathan Chancellor [this message]
2025-08-05  2:41 ` objtool warnings "sibling call from callable instruction with modified stack frame" with CONFIG_LTO_CLANG_THIN Tiezhu Yang

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=20250731175655.GA1455142@ax162 \
    --to=nathan@kernel.org \
    --cc=chenhuacai@kernel.org \
    --cc=kernel@xen0n.name \
    --cc=llvm@lists.linux.dev \
    --cc=loongarch@lists.linux.dev \
    --cc=wangrui@loongson.cn \
    /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