mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@kernel.org>
To: Paul Moore <paul@paul-moore.com>
Cc: Jinjie Ruan <ruanjinjie@huawei.com>,
	eparis@redhat.com, audit@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] audit: Force audit_context() to be always inlined
Date: Fri, 24 Jul 2026 16:53:35 +0200	[thread overview]
Message-ID: <87mrvgjv68.ffs@fw13> (raw)
In-Reply-To: <CAHC9VhSohbG8n5WW4VaEjU7nVA4WCrkJ1eD-=34ioaJOQ0-rCg@mail.gmail.com>

On Thu, Jul 23 2026 at 13:21, Paul Moore wrote:
> On Tue, Jul 21, 2026 at 3:59 AM Thomas Gleixner <tglx@kernel.org> wrote:
>> On Tue, Jul 21 2026 at 12:01, Jinjie Ruan wrote:
>> > commit 6f25517010dd ("entry: Rework syscall_audit_enter()") relies on
>> > dead code elimination to remove the call to syscall_enter_audit() when
>> > CONFIG_AUDITSYSCALL is disabled. However, with s390 GCC 13.4.0 +
>> > CONFIG_KASAN, audit_context() is not inlined despite being marked
>> > inline, causing an undefined reference to syscall_enter_audit().
>> >
>> > Force audit_context() to be __always_inline to ensure the conditional
>> > can be constant-folded and dead code elimination works correctly.
>> >
>> > Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
>> > Suggested-by: Thomas Gleixner <tglx@kernel.org>
>> > Reported-by: kernel test robot <lkp@intel.com>
>> > Closes: https://lore.kernel.org/oe-kbuild-all/202607181530.2nx8zb3J-lkp@intel.com/
>>
>> Obsolete. Is already in:
>>
>> https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?h=core/entry&id=6f25517010ddd3f8080d7e06b9b1cb1b64b73772
>
> It would have been nice to see that patch CC'd to the audit mailing
> list for obvious reasons.
>
> Since I'm just looking at that tip tree patch now (perhaps there are
> other preceding patches that affect this?), does it still compile
> properly when CONFIG_AUDITSYSCALL is not defined?  With
> syscall_trace_enter() calling out to syscall_enter_audit() that is no
> longer inlined in the same header, and no dummy function/macro defined
> for syscall_enter_audit() when !CONFIG_AUDITSYSCALL, it looks like
> there might be an issue on some configurations, no?

It compiles properly due to dead code elimination on everything except on
old s390 compilers for whatever reasons.

I'll bite the bullet and add the stub inline for syscall_enter_audit(),
though keeping audit_context() __always_inline makes a lot of sense as
especially clang has a tendency to out of line the most trivial inlines.

Thanks,

        tglx

  reply	other threads:[~2026-07-24 14:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-21  4:01 Jinjie Ruan
2026-07-21  7:59 ` Thomas Gleixner
2026-07-23 17:21   ` Paul Moore
2026-07-24 14:53     ` Thomas Gleixner [this message]
2026-07-29 17:54       ` Paul Moore

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=87mrvgjv68.ffs@fw13 \
    --to=tglx@kernel.org \
    --cc=audit@vger.kernel.org \
    --cc=eparis@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paul@paul-moore.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®