From: Jonathan Corbet <corbet@lwn.net>
To: KP Singh <kpsingh@kernel.org>,
linux-security-module@vger.kernel.org, bpf@vger.kernel.org
Cc: ast@kernel.org, paul@paul-moore.com, casey@schaufler-ca.com,
andrii@kernel.org, keescook@chromium.org, daniel@iogearbox.net,
renauld@google.com, revest@chromium.org, song@kernel.org,
KP Singh <kpsingh@kernel.org>
Subject: Re: [PATCH v12 3/5] security: Replace indirect LSM hook calls with static calls
Date: Thu, 27 Jun 2024 14:28:03 -0600 [thread overview]
Message-ID: <87ikxuuo4s.fsf@trenco.lwn.net> (raw)
In-Reply-To: <20240516003524.143243-4-kpsingh@kernel.org>
KP Singh <kpsingh@kernel.org> writes:
> LSM hooks are currently invoked from a linked list as indirect calls
> which are invoked using retpolines as a mitigation for speculative
> attacks (Branch History / Target injection) and add extra overhead which
> is especially bad in kernel hot paths:
I hate to bug you with a changelog nit, but this is the sort of thing
that might save others some work..
[...]
> A static key guards whether an LSM static call is enabled or not,
> without this static key, for LSM hooks that return an int, the presence
> of the hook that returns a default value can create side-effects which
> has resulted in bugs [1].
I looked in vain for [1] to see what these bugs were. After sufficient
digging, I found that the relevant URL:
https://lore.kernel.org/linux-security-module/20220609234601.2026362-1-kpsingh@kernel.org/
was evidently dropped in v4 of the patch set last September, and nobody
evidently noticed. If there's a v13, I might humbly suggest putting it
back :)
Thanks,
jon
next prev parent reply other threads:[~2024-06-27 20:28 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-16 0:35 [PATCH v12 0/5] Reduce overhead of LSMs with static calls KP Singh
2024-05-16 0:35 ` [PATCH v12 1/5] kernel: Add helper macros for loop unrolling KP Singh
2024-05-17 8:03 ` John Johansen
2024-05-16 0:35 ` [PATCH v12 2/5] security: Count the LSMs enabled at compile time KP Singh
2024-05-17 8:09 ` John Johansen
2024-05-16 0:35 ` [PATCH v12 3/5] security: Replace indirect LSM hook calls with static calls KP Singh
2024-06-27 20:28 ` Jonathan Corbet [this message]
2024-06-29 8:28 ` KP Singh
2024-05-16 0:35 ` [PATCH v12 4/5] security: Update non standard hooks to use " KP Singh
2024-05-16 0:35 ` [PATCH v12 5/5] bpf: Only enable BPF LSM hooks when an LSM program is attached KP Singh
2024-06-11 1:05 ` Paul Moore
2024-06-29 8:13 ` KP Singh
2024-07-01 23:40 ` Paul Moore
2024-05-18 6:01 ` [PATCH v12 0/5] Reduce overhead of LSMs with static calls Tetsuo Handa
2024-06-06 15:58 ` Kees Cook
2024-06-06 16:36 ` Paul Moore
2024-06-06 18:07 ` Kees Cook
2024-06-06 20:07 ` 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=87ikxuuo4s.fsf@trenco.lwn.net \
--to=corbet@lwn.net \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=casey@schaufler-ca.com \
--cc=daniel@iogearbox.net \
--cc=keescook@chromium.org \
--cc=kpsingh@kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=paul@paul-moore.com \
--cc=renauld@google.com \
--cc=revest@chromium.org \
--cc=song@kernel.org \
/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