linux-security-module.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Roberto Sassu <roberto.sassu@huaweicloud.com>
To: Paul Moore <paul@paul-moore.com>
Cc: David Howells <dhowells@redhat.com>,
	casey@schaufler-ca.com, omosnace@redhat.com,
	john.johansen@canonical.com, kpsingh@kernel.org,
	bpf@vger.kernel.org, linux-security-module@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Roberto Sassu <roberto.sassu@huawei.com>
Subject: Re: [PATCH v2 2/2] lsm: Add/fix return values in lsm_hooks.h and fix formatting
Date: Thu, 08 Dec 2022 10:29:20 +0100	[thread overview]
Message-ID: <b989b278a16c48e104b32ba7243e4298491a6056.camel@huaweicloud.com> (raw)
In-Reply-To: <CAHC9VhQZ3VKWsNarUGPcHZuoRLgb8owKgbdLymwR759qVyQ+2Q@mail.gmail.com>

On Wed, 2022-12-07 at 14:34 -0500, Paul Moore wrote:
> On Wed, Dec 7, 2022 at 4:18 AM Roberto Sassu
> <roberto.sassu@huaweicloud.com> wrote:
> > For this patch, I saw it is already in lsm/next. Paul, should I do an
> > incremental patch or change the one in the repo and you force push it?
> > I would just remove the three lines after the parameters description.
> 
> Just send a patch against the current lsm/next branch to remove those
> lines, and please do it ASAP as the merge window opens this
> weekend/Monday.

Ok, was about to send but I would need a clarification first.

In mount_api.rst, there is for security_fs_context_parse_param():

     The value pointed to by param may be modified (if a string) or stolen
     (provided the value pointer is NULL'd out).  If it is stolen, 0 must be
     returned to prevent it being passed to the filesystem.

Looking at security.c:

	hlist_for_each_entry(hp, &security_hook_heads.fs_context_parse_param,
			     list) {
		trc = hp->hook.fs_context_parse_param(fc, param);
		if (trc == 0)
			rc = 0;
		else if (trc != -ENOPARAM)
			return trc;
	}

If, as mount_api.rst says, the value is modified by an LSM or stolen,
should it be passed to other LSMs too?

Thanks

Roberto


  reply	other threads:[~2022-12-08  9:29 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-28 14:42 [PATCH v2 0/2] lsm: Improve LSM hooks documentation Roberto Sassu
2022-11-28 14:42 ` [PATCH v2 1/2] lsm: Clarify documentation of vm_enough_memory hook Roberto Sassu
2022-12-06 22:51   ` Paul Moore
2022-11-28 14:42 ` [PATCH v2 2/2] lsm: Add/fix return values in lsm_hooks.h and fix formatting Roberto Sassu
2022-12-07  0:21   ` Paul Moore
2022-12-07  7:58     ` Roberto Sassu
2022-12-07  9:17       ` Roberto Sassu
2022-12-07 19:34         ` Paul Moore
2022-12-08  9:29           ` Roberto Sassu [this message]
2022-12-08 21:59             ` Paul Moore
2022-12-08 22:18               ` Casey Schaufler
2022-11-29 16:48 ` [PATCH v2 0/2] lsm: Improve LSM hooks documentation 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=b989b278a16c48e104b32ba7243e4298491a6056.camel@huaweicloud.com \
    --to=roberto.sassu@huaweicloud.com \
    --cc=bpf@vger.kernel.org \
    --cc=casey@schaufler-ca.com \
    --cc=dhowells@redhat.com \
    --cc=john.johansen@canonical.com \
    --cc=kpsingh@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=omosnace@redhat.com \
    --cc=paul@paul-moore.com \
    --cc=roberto.sassu@huawei.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).