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 6/6] LSM: Infrastructure management of the perf_event  security blob
Date: Tue, 09 Jul 2024 18:08:05 -0400	[thread overview]
Message-ID: <1ce72483abcf8d2a53592ad81cdfd69f@paul-moore.com> (raw)
In-Reply-To: <20240708213957.20519-7-casey@schaufler-ca.com>

On Jul  8, 2024 Casey Schaufler <casey@schaufler-ca.com> wrote:
> 
> Move management of the perf_event->security blob out of the individual
> security modules and into the security infrastructure. Instead of
> allocating the blobs from within the modules the modules tell the
> infrastructure how much space is required, and the space is allocated
> there.
> 
> Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
> ---
>  include/linux/lsm_hooks.h         |  1 +
>  security/security.c               | 12 ++++++++++++
>  security/selinux/hooks.c          | 18 ++++--------------
>  security/selinux/include/objsec.h |  6 ++++++
>  4 files changed, 23 insertions(+), 14 deletions(-)

...

> @@ -5665,6 +5675,8 @@ int security_perf_event_alloc(struct perf_event *event)
>  void security_perf_event_free(struct perf_event *event)
>  {
>  	call_void_hook(perf_event_free, event);
> +	kfree(event->security);
> +	event->security = NULL;
>  }

See previous comments regarding the *free() hooks.

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