public inbox for linux-security-module@vger.kernel.org
 help / color / mirror / Atom feed
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 5/6] LSM: Infrastructure management of the infiniband blob
Date: Tue, 09 Jul 2024 18:08:04 -0400	[thread overview]
Message-ID: <e1977a9222cb9cfc7ef55b3767819ea6@paul-moore.com> (raw)
In-Reply-To: <20240708213957.20519-6-casey@schaufler-ca.com>

On Jul  8, 2024 Casey Schaufler <casey@schaufler-ca.com> wrote:
> 
> Move management of the infiniband 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          | 16 +++-------------
>  security/selinux/include/objsec.h |  6 ++++++
>  5 files changed, 21 insertions(+), 15 deletions(-)

...

> diff --git a/security/security.c b/security/security.c
> index 2c9d075f5f92..731a54fabc79 100644
> --- a/security/security.c
> +++ b/security/security.c
> @@ -5081,6 +5089,7 @@ EXPORT_SYMBOL(security_ib_alloc_security);
>  void security_ib_free_security(void *sec)
>  {
>  	call_void_hook(ib_free_security, sec);
> +	kfree(sec);
>  }
>  EXPORT_SYMBOL(security_ib_free_security);

Same comment as elsewhere, let's be consistent with the *free() hooks,
either we keep them or we remove them if unused (preferable).

--
paul-moore.com

  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
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 [this message]
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=e1977a9222cb9cfc7ef55b3767819ea6@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