From: Paul Moore <paul@paul-moore.com>
To: Casey Schaufler <casey@schaufler-ca.com>,
casey@schaufler-ca.com, linux-security-module@vger.kernel.org
Cc: jmorris@namei.org, serge@hallyn.com, keescook@chromium.org,
john.johansen@canonical.com, penguin-kernel@i-love.sakura.ne.jp,
stephen.smalley.work@gmail.com, mic@digikod.net
Subject: Re: [PATCH 4/6] LSM: Infrastructure management of the dev_tun blob
Date: Tue, 09 Jul 2024 18:08:03 -0400 [thread overview]
Message-ID: <6e7f6a585d0b3189da2a10ff50fa3a66@paul-moore.com> (raw)
In-Reply-To: <20240708213957.20519-5-casey@schaufler-ca.com>
On Jul 8, 2024 Casey Schaufler <casey@schaufler-ca.com> wrote:
>
> Move management of the dev_tun security blob out of the individual
> security modules and into the LSM infrastructure. The security modules
> tell the infrastructure how much space they require at initialization.
>
> Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
> ---
> include/linux/lsm_hook_defs.h | 2 +-
> include/linux/lsm_hooks.h | 1 +
> security/security.c | 11 ++++++++++-
> security/selinux/hooks.c | 22 ++++++----------------
> security/selinux/include/objsec.h | 6 ++++++
> 5 files changed, 24 insertions(+), 18 deletions(-)
...
> diff --git a/security/security.c b/security/security.c
> index 438ec6708eb3..2c9d075f5f92 100644
> --- a/security/security.c
> +++ b/security/security.c
> @@ -4864,6 +4872,7 @@ EXPORT_SYMBOL(security_tun_dev_alloc_security);
> void security_tun_dev_free_security(void *security)
> {
> call_void_hook(tun_dev_free_security, security);
> + kfree(security);
> }
> EXPORT_SYMBOL(security_tun_dev_free_security);
If we removed key_free in patch 2/6, we should probably do the same
here for the same reasons. Don't forget to mention it in the commit
description.
--
paul-moore.com
next prev parent reply other threads:[~2024-07-09 22:08 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20240708213957.20519-1-casey.ref@schaufler-ca.com>
2024-07-08 21:39 ` [PATCH 0/6] LSM: Infrastructure blob allocation Casey Schaufler
2024-07-08 21:39 ` [PATCH 1/6] LSM: Infrastructure management of the sock security Casey Schaufler
2024-07-09 19:15 ` Paul Moore
2024-07-09 23:00 ` Casey Schaufler
2024-07-09 23:05 ` Paul Moore
2024-07-09 23:29 ` Casey Schaufler
2024-07-10 0:00 ` Paul Moore
2024-07-09 22:08 ` Paul Moore
2024-07-09 22:32 ` John Johansen
2024-07-08 21:39 ` [PATCH 2/6] LSM: Infrastructure management of the key security blob Casey Schaufler
2024-07-09 22:08 ` Paul Moore
2024-07-09 22:47 ` John Johansen
2024-07-09 23:01 ` Paul Moore
2024-07-08 21:39 ` [PATCH 3/6] LSM: Add helper for blob allocations Casey Schaufler
2024-07-09 22:08 ` Paul Moore
2024-07-09 23:09 ` Casey Schaufler
2024-07-10 0:01 ` Paul Moore
2024-07-09 22:51 ` John Johansen
2024-07-08 21:39 ` [PATCH 4/6] LSM: Infrastructure management of the dev_tun blob Casey Schaufler
2024-07-09 22:08 ` Paul Moore [this message]
2024-07-09 23:01 ` John Johansen
2024-07-09 23:11 ` Casey Schaufler
2024-07-08 21:39 ` [PATCH 5/6] LSM: Infrastructure management of the infiniband blob Casey Schaufler
2024-07-09 22:08 ` Paul Moore
2024-07-09 23:38 ` John Johansen
2024-07-08 21:39 ` [PATCH 6/6] LSM: Infrastructure management of the perf_event security blob Casey Schaufler
2024-07-09 22:08 ` Paul Moore
2024-07-09 23:47 ` John Johansen
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=6e7f6a585d0b3189da2a10ff50fa3a66@paul-moore.com \
--to=paul@paul-moore.com \
--cc=casey@schaufler-ca.com \
--cc=jmorris@namei.org \
--cc=john.johansen@canonical.com \
--cc=keescook@chromium.org \
--cc=linux-security-module@vger.kernel.org \
--cc=mic@digikod.net \
--cc=penguin-kernel@i-love.sakura.ne.jp \
--cc=serge@hallyn.com \
--cc=stephen.smalley.work@gmail.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