Re: [PATCH v17 05/10] fs,landlock: Support filesystem access-control

From
Mickaël Salaün <mic@digikod.net>
Date
2020-05-14 10:40:05
Also in
linux-arch, linux-doc, linux-fsdevel, linux-kselftest, linux-security-module, lkml
Reply to
James Morris, 2020-05-14
On 14/05/2020 05:37, James Morris wrote:
On Mon, 11 May 2020, Mickaël Salaün wrote:

quoted
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 45cc10cdf6dd..2276642f8e05 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1517,6 +1517,11 @@ struct super_block {
 	/* Pending fsnotify inode refs */
 	atomic_long_t s_fsnotify_inode_refs;
 
+#ifdef CONFIG_SECURITY_LANDLOCK
+	/* References to Landlock underlying objects */
+	atomic_long_t s_landlock_inode_refs;
+#endif
+
This needs to be converted to the LSM API via superblock blob stacking.

See Casey's old patch: 
https://lore.kernel.org/linux-security-module/20190829232935.7099-2-casey@schaufler-ca.com/ (local)
s_landlock_inode_refs is quite similar to s_fsnotify_inode_refs, but I
can do it once the superblock security blob patch is upstream. Is it a
blocker for now? What is the current status of lbs_superblock?

Anyway, we also need to have a call to landlock_release_inodes() in
generic_shutdown_super(), which does not fit the LSM framework, and I
think it is not an issue. Landlock handling of inodes is quite similar
to fsnotify.
Thread (21 messages) 21 messages, 3 authors, last reply 2020-05-14
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help