From: Kees Cook <keescook@chromium.org>
To: KP Singh <kpsingh@kernel.org>
Cc: linux-security-module@vger.kernel.org, bpf@vger.kernel.org,
paul@paul-moore.com, casey@schaufler-ca.com, song@kernel.org,
daniel@iogearbox.net, ast@kernel.org, renauld@google.com,
pabeni@redhat.com
Subject: Re: [PATCH v8 5/5] security: Add CONFIG_SECURITY_HOOK_LIKELY
Date: Fri, 8 Dec 2023 09:36:05 -0800 [thread overview]
Message-ID: <202312080934.6D172E5@keescook> (raw)
In-Reply-To: <20231110222038.1450156-6-kpsingh@kernel.org>
On Fri, Nov 10, 2023 at 11:20:37PM +0100, KP Singh wrote:
> [...]
> ---
> security/Kconfig | 11 +++++++++++
> 1 file changed, 11 insertions(+)
Did something go missing from this patch? I don't see anything depending
on CONFIG_SECURITY_HOOK_LIKELY (I think this was working in v7, though?)
Regardless, Paul, please take patches 1-4, they bring us measurable
speed-ups across the board.
-Kees
>
> diff --git a/security/Kconfig b/security/Kconfig
> index 52c9af08ad35..317018dcbc67 100644
> --- a/security/Kconfig
> +++ b/security/Kconfig
> @@ -32,6 +32,17 @@ config SECURITY
>
> If you are unsure how to answer this question, answer N.
>
> +config SECURITY_HOOK_LIKELY
> + bool "LSM hooks are likely to be initialized"
> + depends on SECURITY && EXPERT
> + default SECURITY_SELINUX || SECURITY_SMACK || SECURITY_TOMOYO || SECURITY_APPARMOR
> + help
> + This controls the behaviour of the static keys that guard LSM hooks.
> + If LSM hooks are likely to be initialized by LSMs, then one gets
> + better performance by enabling this option. However, if the system is
> + using an LSM where hooks are much likely to be disabled, one gets
> + better performance by disabling this config.
> +
> config SECURITYFS
> bool "Enable the securityfs filesystem"
> help
> --
> 2.42.0.869.gea05f2083d-goog
>
--
Kees Cook
next prev parent reply other threads:[~2023-12-08 17:36 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-10 22:20 [PATCH v8 0/5] Reduce overhead of LSMs with static calls KP Singh
2023-11-10 22:20 ` [PATCH v8 1/5] kernel: Add helper macros for loop unrolling KP Singh
2023-11-10 22:20 ` [PATCH v8 2/5] security: Count the LSMs enabled at compile time KP Singh
2023-11-10 22:20 ` [PATCH v8 3/5] security: Replace indirect LSM hook calls with static calls KP Singh
2023-11-10 22:20 ` [PATCH v8 4/5] bpf: Only enable BPF LSM hooks when an LSM program is attached KP Singh
2023-11-10 22:20 ` [PATCH v8 5/5] security: Add CONFIG_SECURITY_HOOK_LIKELY KP Singh
2023-12-08 17:36 ` Kees Cook [this message]
2023-12-08 17:46 ` Paul Moore
2023-12-08 17:55 ` Paul Moore
2023-12-08 18:22 ` Kees Cook
2023-12-08 20:51 ` Paul Moore
2023-12-08 21:13 ` Kees Cook
2023-12-08 21:43 ` Paul Moore
2023-12-08 22:05 ` Kees Cook
2023-12-08 22:40 ` KP Singh
2023-12-08 22:59 ` Paul Moore
2023-12-08 23:06 ` KP Singh
2023-12-08 23:27 ` Paul Moore
2023-12-08 22:56 ` Tetsuo Handa
2023-11-11 0:07 ` [PATCH v8 0/5] Reduce overhead of LSMs with static calls Andrii Nakryiko
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=202312080934.6D172E5@keescook \
--to=keescook@chromium.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=casey@schaufler-ca.com \
--cc=daniel@iogearbox.net \
--cc=kpsingh@kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=paul@paul-moore.com \
--cc=renauld@google.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.