From: sashiko-bot@kernel.org
Cc: linux-security-module@vger.kernel.org
Subject: Re: [PATCH RFC 1/3] lsm: Call inode_init_security hooks without xattrs
Date: Sat, 24 Oct 2026 21:38:27 +0000 [thread overview]
Message-ID: <sashiko-outbox-183890@kernel.org> (raw)
In-Reply-To: <20261024-landlock-created-rights-v1-1-77c8db3f6bd2@gmail.com>
> security_inode_init_security() returns early when no LSM reserves an
> xattr slot, so the inode_init_security hooks never run on a kernel
> whose LSMs provide no xattr. An LSM can then not use the hook to
> observe inode creation unless some other LSM happens to label inodes.
>
> Call the hooks regardless of the reserved xattr count, and only skip
> allocating the xattr array when no slot is reserved. LSMs that write
> xattrs still need a reserved slot, so they are unaffected. Landlock
> uses the hook in the next patch to track the files a sandboxed task
> creates.
>
> Assisted-by: LLM
> Signed-off-by: Farid Zakaria <farid.m.zakaria@gmail.com>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261024-landlock-created-rights-v1-0-77c8db3f6bd2@gmail.com?part=1
next prev parent reply other threads:[~2026-10-24 21:38 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-24 20:39 [PATCH RFC 0/3] landlock: Add access rights on created files Farid Zakaria
2026-10-24 20:39 ` [PATCH RFC 1/3] lsm: Call inode_init_security hooks without xattrs Farid Zakaria
2026-10-24 21:38 ` sashiko-bot [this message]
2026-10-24 20:39 ` [PATCH RFC 2/3] landlock: Add access rights on created files Farid Zakaria
2026-10-24 22:06 ` sashiko-bot
2026-10-24 20:39 ` [PATCH RFC 3/3] selftests/landlock: Test LANDLOCK_ADD_RULE_CREATED Farid Zakaria
2026-10-24 21:41 ` sashiko-bot
2026-10-24 21:43 ` [PATCH RFC 0/3] landlock: Add access rights on created files Justin Suess
2026-10-24 22:03 ` Justin Suess
2026-10-24 23:59 ` Farid Zakaria
2026-10-25 11:07 ` Günther Noack
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=sashiko-outbox-183890@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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