Re: [PATCH] kernel/entry: Remove some redundancy checks on syscall works
From: Thomas Gleixner
Date: Sat Jun 14 2025 - 02:21:43 EST
Can you please reply to the mail you received, so that there are proper
In-Reply-To and References tags in the mail, which are required for mail
threading?
I almost missed your replies because they ended up as single mail
threads without reference somewhere in my endless mail pile.
On Fri, Jun 13 2025 at 20:28, Khalid Ali wrote:
> First if we are talking about performance then we may need likely() on
> SYSCALL_WORK_ENTER since the probability of condition evaluating as
> true is very high.
That depends on the system configuration scenario and the likely() has
been omitted on purpose.
> Second syscall_enter_audit() missing SYSCALL_WORK_SYSCALL_AUDIT
> evaluation, aren't we supposed to call it only if
> SYSCALL_WORK_SYSCALL_AUDIT is set?
That's redundant as syscall_enter_audit() checks for a valid audit
context already. Both are valid indicators and go in lockstep. So it
might be arguable that evaluating the work bit is cheaper than the
context check, but I doubt it's measurable.
Thanks,
tglx