All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mimi Zohar <zohar@linux.ibm.com>
To: Roberto Sassu <roberto.sassu@huaweicloud.com>,
	mark@fasheh.com, jlbec@evilplan.org, joseph.qi@linux.alibaba.com,
	dmitry.kasatkin@gmail.com, paul@paul-moore.com,
	jmorris@namei.org, serge@hallyn.com,
	stephen.smalley.work@gmail.com, eparis@parisplace.org,
	casey@schaufler-ca.com
Cc: ocfs2-devel@oss.oracle.com, reiserfs-devel@vger.kernel.org,
	linux-integrity@vger.kernel.org,
	linux-security-module@vger.kernel.org, selinux@vger.kernel.org,
	linux-kernel@vger.kernel.org, keescook@chromium.org,
	nicolas.bouchinet@clip-os.org,
	Roberto Sassu <roberto.sassu@huawei.com>
Subject: Re: [PATCH v6 0/6] evm: Do HMAC of multiple per LSM xattrs for new inodes
Date: Wed, 23 Nov 2022 11:22:59 -0500	[thread overview]
Message-ID: <33329a29d779096e043f53c681f26ef32b093e5c.camel@linux.ibm.com> (raw)
In-Reply-To: <20221123154712.752074-1-roberto.sassu@huaweicloud.com>

Hi Roberto,

On Wed, 2022-11-23 at 16:47 +0100, Roberto Sassu wrote:
> The second problem this patch set addresses is the limitation of the
> call_int_hook() of stopping the loop when the return value from a hook
> implementation is not zero. Unfortunately, for the inode_init_security hook
> it is a legitimate case to return -EOPNOTSUPP, but this would not
> necessarily mean that there is an error to report to the LSM infrastructure
> but just that an LSM does not will to set an xattr. Other LSMs should be
> still consulted as well.

This is just a heads up.  In reviewing the ocfs2 v5 patch, I realized
the meaning of -EOPNOTSUPP is being overloaded to mean multiple things.
Originally, -EOPNOTSUPP meant that the file system didn't implement
xattr support.  Now, it is being used to also mean no LSM xattr.  In
the former case, none of the LSM xattrs would be written.  In the
latter case, some of them will be written.

I'm not convinced that overloading the -EOPNOTSUPP is a good idea.  
Still reviewing the patch set...

-- 
thanks,

Mimi


WARNING: multiple messages have this Message-ID (diff)
From: Mimi Zohar via Ocfs2-devel <ocfs2-devel@oss.oracle.com>
To: Roberto Sassu <roberto.sassu@huaweicloud.com>,
	mark@fasheh.com, jlbec@evilplan.org, joseph.qi@linux.alibaba.com,
	dmitry.kasatkin@gmail.com, paul@paul-moore.com,
	jmorris@namei.org, serge@hallyn.com,
	stephen.smalley.work@gmail.com, eparis@parisplace.org,
	casey@schaufler-ca.com
Cc: nicolas.bouchinet@clip-os.org, keescook@chromium.org,
	selinux@vger.kernel.org, Roberto Sassu <roberto.sassu@huawei.com>,
	reiserfs-devel@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-security-module@vger.kernel.org,
	linux-integrity@vger.kernel.org, ocfs2-devel@oss.oracle.com
Subject: Re: [Ocfs2-devel] [PATCH v6 0/6] evm: Do HMAC of multiple per LSM xattrs for new inodes
Date: Wed, 23 Nov 2022 11:22:59 -0500	[thread overview]
Message-ID: <33329a29d779096e043f53c681f26ef32b093e5c.camel@linux.ibm.com> (raw)
In-Reply-To: <20221123154712.752074-1-roberto.sassu@huaweicloud.com>

Hi Roberto,

On Wed, 2022-11-23 at 16:47 +0100, Roberto Sassu wrote:
> The second problem this patch set addresses is the limitation of the
> call_int_hook() of stopping the loop when the return value from a hook
> implementation is not zero. Unfortunately, for the inode_init_security hook
> it is a legitimate case to return -EOPNOTSUPP, but this would not
> necessarily mean that there is an error to report to the LSM infrastructure
> but just that an LSM does not will to set an xattr. Other LSMs should be
> still consulted as well.

This is just a heads up.  In reviewing the ocfs2 v5 patch, I realized
the meaning of -EOPNOTSUPP is being overloaded to mean multiple things.
Originally, -EOPNOTSUPP meant that the file system didn't implement
xattr support.  Now, it is being used to also mean no LSM xattr.  In
the former case, none of the LSM xattrs would be written.  In the
latter case, some of them will be written.

I'm not convinced that overloading the -EOPNOTSUPP is a good idea.  
Still reviewing the patch set...

-- 
thanks,

Mimi


_______________________________________________
Ocfs2-devel mailing list
Ocfs2-devel@oss.oracle.com
https://oss.oracle.com/mailman/listinfo/ocfs2-devel

  parent reply	other threads:[~2022-11-23 16:23 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-23 15:47 [PATCH v6 0/6] evm: Do HMAC of multiple per LSM xattrs for new inodes Roberto Sassu
2022-11-23 15:47 ` [Ocfs2-devel] " Roberto Sassu via Ocfs2-devel
2022-11-23 15:47 ` [PATCH v6 1/6] reiserfs: Switch to security_inode_init_security() Roberto Sassu
2022-11-23 15:47   ` [Ocfs2-devel] " Roberto Sassu via Ocfs2-devel
2022-11-23 15:47 ` [PATCH v6 2/6] ocfs2: " Roberto Sassu
2022-11-23 15:47   ` [Ocfs2-devel] " Roberto Sassu via Ocfs2-devel
2022-11-23 15:47 ` [PATCH v6 3/6] security: Remove security_old_inode_init_security() Roberto Sassu
2022-11-23 15:47   ` [Ocfs2-devel] " Roberto Sassu via Ocfs2-devel
2022-11-23 15:47 ` [Ocfs2-devel] [PATCH v6 4/6] security: Allow all LSMs to provide xattrs for inode_init_security hook Roberto Sassu via Ocfs2-devel
2022-11-23 15:47   ` Roberto Sassu
2022-11-23 17:17   ` Casey Schaufler
2022-11-23 17:17     ` [Ocfs2-devel] " Casey Schaufler via Ocfs2-devel
2022-11-24  7:55     ` Roberto Sassu
2022-11-24  7:55       ` [Ocfs2-devel] " Roberto Sassu via Ocfs2-devel
2022-11-24  1:14   ` Mimi Zohar
2022-11-24  1:14     ` [Ocfs2-devel] " Mimi Zohar via Ocfs2-devel
2022-11-24  8:17     ` Roberto Sassu
2022-11-24  8:17       ` [Ocfs2-devel] " Roberto Sassu via Ocfs2-devel
2022-11-29 11:23       ` Mimi Zohar
2022-11-29 11:23         ` [Ocfs2-devel] " Mimi Zohar via Ocfs2-devel
2022-11-29 15:39         ` Casey Schaufler
2022-11-29 15:39           ` [Ocfs2-devel] " Casey Schaufler via Ocfs2-devel
2022-11-30 21:23           ` Mimi Zohar
2022-11-30 21:23             ` [Ocfs2-devel] " Mimi Zohar via Ocfs2-devel
2022-11-23 15:47 ` [Ocfs2-devel] [PATCH v6 5/6] evm: Align evm_inode_init_security() definition with LSM infrastructure Roberto Sassu via Ocfs2-devel
2022-11-23 15:47   ` Roberto Sassu
2022-11-23 15:47 ` [PATCH v6 6/6] evm: Support multiple LSMs providing an xattr Roberto Sassu
2022-11-23 15:47   ` [Ocfs2-devel] " Roberto Sassu via Ocfs2-devel
2022-11-23 16:22 ` Mimi Zohar [this message]
2022-11-23 16:22   ` [Ocfs2-devel] [PATCH v6 0/6] evm: Do HMAC of multiple per LSM xattrs for new inodes Mimi Zohar via Ocfs2-devel
2022-11-23 17:20 ` Casey Schaufler
2022-11-23 17:20   ` [Ocfs2-devel] " Casey Schaufler via Ocfs2-devel

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=33329a29d779096e043f53c681f26ef32b093e5c.camel@linux.ibm.com \
    --to=zohar@linux.ibm.com \
    --cc=casey@schaufler-ca.com \
    --cc=dmitry.kasatkin@gmail.com \
    --cc=eparis@parisplace.org \
    --cc=jlbec@evilplan.org \
    --cc=jmorris@namei.org \
    --cc=joseph.qi@linux.alibaba.com \
    --cc=keescook@chromium.org \
    --cc=linux-integrity@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=mark@fasheh.com \
    --cc=nicolas.bouchinet@clip-os.org \
    --cc=ocfs2-devel@oss.oracle.com \
    --cc=paul@paul-moore.com \
    --cc=reiserfs-devel@vger.kernel.org \
    --cc=roberto.sassu@huawei.com \
    --cc=roberto.sassu@huaweicloud.com \
    --cc=selinux@vger.kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.