mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@kernel.org>
To: Philip Li <philip.li@intel.com>
Cc: kernel test robot <lkp@intel.com>,
	oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
	Jinjie Ruan <ruanjinjie@huawei.com>
Subject: Re: include/linux/irq-entry-common.h:218: undefined reference to `syscall_enter_audit'
Date: Sat, 05 Sep 2026 00:40:07 +0200	[thread overview]
Message-ID: <875x0k7i9k.ffs@fw13> (raw)
In-Reply-To: <aprKt3OlFvdQN5w+@rli9-mobl>

On Fri, Sep 04 2026 at 21:42, Philip Li wrote:
> On Thu, Sep 03, 2026 at 10:03:56PM +0200, Thomas Gleixner wrote:
>> > All errors (new ones prefixed by >>):
>> >
>> >    riscv64-linux-ld: arch/riscv/kernel/traps.o: in function `__exit_to_user_mode_validate':
>> >>> include/linux/irq-entry-common.h:218: undefined reference to `syscall_enter_audit'
>> 
>> Seriously?
>> 
>> >
>> > vim +218 include/linux/irq-entry-common.h
>> >
>> > a70e9f647f501e3 Jinjie Ruan     2025-06-24  212  
>> > 70fe25a3bc53a89 Thomas Gleixner 2025-10-27  213  static __always_inline void __exit_to_user_mode_validate(void)
>> > 70fe25a3bc53a89 Thomas Gleixner 2025-10-27  214  {
>> > a70e9f647f501e3 Jinjie Ruan     2025-06-24  215  	/* Ensure that kernel state is sane for a return to userspace */
>> > a70e9f647f501e3 Jinjie Ruan     2025-06-24  216  	kmap_assert_nomap();
>> > a70e9f647f501e3 Jinjie Ruan     2025-06-24  217  	lockdep_assert_irqs_disabled();
>> > a70e9f647f501e3 Jinjie Ruan     2025-06-24 @218  	lockdep_sys_exit();
>> 
>> What the heck has line 218 to do with that failure?
>> 
>> This is getting stupid. It seems there is yet another compiler aside of
>> s390 gcc which fails to do dead code elimination but this time it's
>> worse it also points to the wrong place ....
>
> Sorry for the confusion, I give a try with riscv gcc 12.5.0 for the same kconfig, the
> result is below
>
> 	include/asm-generic/preempt.h:54:(.noinstr.text+0x1a20): undefined reference to 'syscall_enter_audit'

which has nothing to do with the unresolved reference either. preempt.h
definitely does not invoke syscall_enter_audit(). I love broken tools.

IIRC I saw something like this before with some broken S390 compiler
failing to eliminate the call because it out of lined the condition
inline which when inlined causes the dead code elimination to get rid of
it. I'll grab that config tomorrow and look at the output.




  reply	other threads:[~2026-09-04 22:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-03 11:35 kernel test robot
2026-09-03 20:03 ` Thomas Gleixner
2026-09-04 13:42   ` Philip Li
2026-09-04 22:40     ` Thomas Gleixner [this message]
2026-09-05  8:43       ` [PATCH] entry: Guard syscall_enter_audit() invocation with CONFIG_AUDITSYSCALL Thomas Gleixner

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=875x0k7i9k.ffs@fw13 \
    --to=tglx@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=philip.li@intel.com \
    --cc=ruanjinjie@huawei.com \
    /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

all inboxes | Powered by JetHome®