From: Roberto Sassu <roberto.sassu@huaweicloud.com>
To: zohar@linux.ibm.com, dmitry.kasatkin@gmail.com,
paul@paul-moore.com, jmorris@namei.org, serge@hallyn.com,
mic@digikod.net
Cc: linux-integrity@vger.kernel.org,
linux-security-module@vger.kernel.org, bpf@vger.kernel.org,
linux-kernel@vger.kernel.org, keescook@chromium.org,
Roberto Sassu <roberto.sassu@huawei.com>
Subject: [PATCH v3 2/3] Revert "integrity: double check iint_cache was initialized"
Date: Thu, 9 Mar 2023 09:54:32 +0100 [thread overview]
Message-ID: <20230309085433.1810314-3-roberto.sassu@huaweicloud.com> (raw)
In-Reply-To: <20230309085433.1810314-1-roberto.sassu@huaweicloud.com>
From: Roberto Sassu <roberto.sassu@huawei.com>
With the recent introduction of LSM_ORDER_LAST, the 'integrity' LSM is
always initialized and the iint_cache is always created (the kernel panics
on error). Thus, the additional check of iint_cache in
integrity_inode_get() is no longer necessary.
This reverts commit 92063f3ca73aab794bd5408d3361fd5b5ea33079.
Signed-off-by: Roberto Sassu <roberto.sassu@huawei.com>
---
security/integrity/iint.c | 8 --------
1 file changed, 8 deletions(-)
diff --git a/security/integrity/iint.c b/security/integrity/iint.c
index b97eb59e0e3..c73858e8c6d 100644
--- a/security/integrity/iint.c
+++ b/security/integrity/iint.c
@@ -98,14 +98,6 @@ struct integrity_iint_cache *integrity_inode_get(struct inode *inode)
struct rb_node *node, *parent = NULL;
struct integrity_iint_cache *iint, *test_iint;
- /*
- * The integrity's "iint_cache" is initialized at security_init(),
- * unless it is not included in the ordered list of LSMs enabled
- * on the boot command line.
- */
- if (!iint_cache)
- panic("%s: lsm=integrity required.\n", __func__);
-
iint = integrity_iint_find(inode);
if (iint)
return iint;
--
2.25.1
next prev parent reply other threads:[~2023-03-09 8:57 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-09 8:54 [PATCH v3 0/3] security: Always enable integrity LSM Roberto Sassu
2023-03-09 8:54 ` [PATCH v3 1/3] security: Introduce LSM_ORDER_LAST and set it for the " Roberto Sassu
2023-03-09 13:20 ` Mimi Zohar
2023-03-09 22:04 ` Paul Moore
2023-03-10 13:38 ` Mimi Zohar
2023-03-10 16:22 ` Paul Moore
2023-03-10 16:33 ` Roberto Sassu
2023-03-10 19:59 ` Mimi Zohar
2023-03-09 23:44 ` Paul Moore
2023-03-10 7:57 ` Roberto Sassu
2023-03-09 8:54 ` Roberto Sassu [this message]
2023-03-09 13:20 ` [PATCH v3 2/3] Revert "integrity: double check iint_cache was initialized" Mimi Zohar
2023-03-09 8:54 ` [PATCH v3 3/3] security: Remove integrity from the LSM list in Kconfig Roberto Sassu
2023-03-09 13:20 ` Mimi Zohar
2023-03-09 13:29 ` Roberto Sassu
2023-03-09 23:45 ` Paul Moore
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=20230309085433.1810314-3-roberto.sassu@huaweicloud.com \
--to=roberto.sassu@huaweicloud.com \
--cc=bpf@vger.kernel.org \
--cc=dmitry.kasatkin@gmail.com \
--cc=jmorris@namei.org \
--cc=keescook@chromium.org \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=mic@digikod.net \
--cc=paul@paul-moore.com \
--cc=roberto.sassu@huawei.com \
--cc=serge@hallyn.com \
--cc=zohar@linux.ibm.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).