All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mimi Zohar <zohar@linux.ibm.com>
To: Roberto Sassu <roberto.sassu@huaweicloud.com>,
	corbet@lwn.net, viro@zeniv.linux.org.uk, brauner@kernel.org,
	jack@suse.cz, dmitry.kasatkin@gmail.com,
	eric.snowberg@oracle.com, paul@paul-moore.com, jmorris@namei.org,
	serge@hallyn.com
Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-fsdevel@vger.kernel.org, linux-integrity@vger.kernel.org,
	linux-security-module@vger.kernel.org,
	Roberto Sassu <roberto.sassu@huawei.com>,
	Shu Han <ebpqwerty472123@gmail.com>
Subject: Re: [PATCH v3 1/6] fs: ima: Remove S_IMA and IS_IMA()
Date: Fri, 31 Jan 2025 11:54:48 -0500	[thread overview]
Message-ID: <82b6fb1320c96b5839cda02f8df52e0a43401dbf.camel@linux.ibm.com> (raw)
In-Reply-To: <20250122172432.3074180-2-roberto.sassu@huaweicloud.com>

On Wed, 2025-01-22 at 18:24 +0100, Roberto Sassu wrote:
> From: Roberto Sassu <roberto.sassu@huawei.com>
> 
> Commit 196f518128d2e ("IMA: explicit IMA i_flag to remove global lock on
> inode_delete") introduced the new S_IMA inode flag to determine whether or
> not an inode was processed by IMA. In that way, it was not necessary to
> take the global lock on inode delete.
> 
> Since commit 4de2f084fbff ("ima: Make it independent from 'integrity'
> LSM"), the pointer of the inode integrity metadata managed by IMA has been
> moved to the inode security blob, from the rb-tree. The pointer is not NULL
> only if the inode has been processed by IMA, i.e. ima_inode_get() has been
> called for that inode.
> 
> Thus, since the IS_IMA() check can be now implemented by trivially testing
> whether or not the pointer of inode integrity metadata is NULL, remove the
> S_IMA definition in include/linux/fs.h and also the IS_IMA() macro.
> 
> Remove also the IS_IMA() invocation in ima_rdwr_violation_check(), since
> whether the inode was processed by IMA will be anyway detected by a
> subsequent call to ima_iint_find(). It does not have an additional overhead
> since the decision can be made in constant time, as opposed to logarithm
> when the inode integrity metadata was stored in the rb-tree.
> 
> Suggested-by: Shu Han <ebpqwerty472123@gmail.com>
> Reviewed-by: Christian Brauner <brauner@kernel.org>
> Acked-by: Jan Kara <jack@suse.cz>
> Signed-off-by: Roberto Sassu <roberto.sassu@huawei.com>

Reviewd-by: Mimi Zohar <zohar@linux.ibm.com>

  reply	other threads:[~2025-01-31 16:55 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-22 17:24 [PATCH v3 0/6] ima: Remove unnecessary inode locks Roberto Sassu
2025-01-22 17:24 ` [PATCH v3 1/6] fs: ima: Remove S_IMA and IS_IMA() Roberto Sassu
2025-01-31 16:54   ` Mimi Zohar [this message]
2025-01-22 17:24 ` [PATCH v3 2/6] ima: Remove inode lock Roberto Sassu
2025-01-31 16:56   ` Mimi Zohar
2025-01-22 17:24 ` [PATCH v3 3/6] ima: Detect if lock is held when iint pointer is set in inode security blob Roberto Sassu
2025-01-31 16:51   ` Mimi Zohar
2025-01-22 17:24 ` [PATCH v3 4/6] ima: Mark concurrent accesses to the iint pointer in the " Roberto Sassu
2025-01-31 16:59   ` Mimi Zohar
2025-01-22 17:24 ` [PATCH v3 5/6] ima: Defer fixing security.ima to __fput() Roberto Sassu
2025-01-31 16:52   ` Mimi Zohar
2025-01-22 17:24 ` [PATCH v3 6/6] ima: Reset IMA_NONACTION_RULE_FLAGS after post_setattr Roberto Sassu
2025-02-03  1:31   ` Mimi Zohar

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=82b6fb1320c96b5839cda02f8df52e0a43401dbf.camel@linux.ibm.com \
    --to=zohar@linux.ibm.com \
    --cc=brauner@kernel.org \
    --cc=corbet@lwn.net \
    --cc=dmitry.kasatkin@gmail.com \
    --cc=ebpqwerty472123@gmail.com \
    --cc=eric.snowberg@oracle.com \
    --cc=jack@suse.cz \
    --cc=jmorris@namei.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-integrity@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=paul@paul-moore.com \
    --cc=roberto.sassu@huawei.com \
    --cc=roberto.sassu@huaweicloud.com \
    --cc=serge@hallyn.com \
    --cc=viro@zeniv.linux.org.uk \
    /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.