linux-security-module.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Serge E. Hallyn" <serge@hallyn.com>
To: Casey Schaufler <casey@schaufler-ca.com>
Cc: paul@paul-moore.com, linux-security-module@vger.kernel.org,
	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, linux-kernel@vger.kernel.org,
	selinux@vger.kernel.org, mic@digikod.net
Subject: Re: [PATCH v2 0/6] LSM: Replace secctx/len pairs with lsm_context
Date: Mon, 14 Oct 2024 16:29:37 -0500	[thread overview]
Message-ID: <20241014212937.GA1100381@mail.hallyn.com> (raw)
In-Reply-To: <20241014151450.73674-1-casey@schaufler-ca.com>

On Mon, Oct 14, 2024 at 08:14:44AM -0700, Casey Schaufler wrote:
> LSM: Replace secctx/len pairs with lsm_context
> 
> Several of the Linux Security Module (LSM) interfaces use a pair of
> pointers for transmitting security context data and data length. The
> data passed is refered to as a security context.  While all existing
> modules provide nul terminated strings, there is no requirement that
> they to so. Hence, the length is necessary.
> 
> Security contexts are provided by a number of interfaces. The interface
> security_release_secctx() is used when the caller is finished with the
> data. Each of the security modules that provide security contexts manages
> them differently. This was safe in the past, because only one security
> module that provides security contexts is allowed to be active. To allow
> multiple active modules that use security contexts it is necessary to
> identify which security module created a security context. Adding a third
> pointer to the interfaces for the LSM identification is not appealing.
> 
> A new structure, lsm_context, is created for use in these interfaces.
> It includes three members: the data pointer, the data length and
> the LSM ID of its creator. The interfaces that create contexts and
> security_release_secctx() now use a pointer to an lsm_context instead
> of a pointer pair.
> 
> The changes are mostly mechanical, and some scaffolding is used within
> the patch set to allow for smaller individual patches.

Hey Casey,

so this set is not bisectable.  Applying just patch 1 will no compile, right?
What is your plan for getting past that?  Squash some or all of them into one?
Or are you planning a wider reorg of the patches down the line, once the
basics of the end result are agreed upon?

-serge

  parent reply	other threads:[~2024-10-14 21:29 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20241014151450.73674-1-casey.ref@schaufler-ca.com>
2024-10-14 15:14 ` [PATCH v2 0/6] LSM: Replace secctx/len pairs with lsm_context Casey Schaufler
2024-10-14 15:14   ` [PATCH v2 1/6] LSM: Ensure the correct LSM context releaser Casey Schaufler
2024-10-15  3:40     ` sergeh
2024-10-21 23:39     ` Paul Moore
2024-10-21 23:58       ` Casey Schaufler
2024-10-22 16:25         ` Paul Moore
2024-10-14 15:14   ` [PATCH v2 2/6] LSM: Replace context+len with lsm_context Casey Schaufler
2024-10-14 15:14   ` [PATCH v2 3/6] LSM: Use lsm_context in security_inode_getsecctx Casey Schaufler
2024-10-14 15:14   ` [PATCH v2 4/6] LSM: lsm_context in security_dentry_init_security Casey Schaufler
2024-10-21 23:39     ` Paul Moore
2024-10-22  0:00       ` Casey Schaufler
2024-10-22 16:35         ` Paul Moore
2024-10-22 16:46           ` Casey Schaufler
2024-10-14 15:14   ` [PATCH v2 5/6] LSM: secctx provider check on release Casey Schaufler
2024-10-21 23:39     ` Paul Moore
2024-10-22  0:05       ` Casey Schaufler
2024-10-22 16:28         ` Paul Moore
2024-10-14 15:14   ` [PATCH v2 6/6] LSM: Use lsm_context in security_inode_notifysecctx Casey Schaufler
2024-10-14 21:29   ` Serge E. Hallyn [this message]
2024-10-14 21:35     ` [PATCH v2 0/6] LSM: Replace secctx/len pairs with lsm_context Serge E. Hallyn
2024-10-14 21:54       ` Casey Schaufler
2024-10-14 21:47     ` Casey Schaufler

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=20241014212937.GA1100381@mail.hallyn.com \
    --to=serge@hallyn.com \
    --cc=casey@schaufler-ca.com \
    --cc=jmorris@namei.org \
    --cc=john.johansen@canonical.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=mic@digikod.net \
    --cc=paul@paul-moore.com \
    --cc=penguin-kernel@i-love.sakura.ne.jp \
    --cc=selinux@vger.kernel.org \
    --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;
as well as URLs for NNTP newsgroup(s).