landlock: Remove useless include
Subsystems (2)
Mickaël Salaün
maintainerPATCH 1/5 landlock: Remove useless include
Remove useless audit.h include.
--- security/landlock/ruleset.c | 1 - 1 file changed, 1 deletion(-)
security/landlock/ruleset.c +0 -1
@@ -23,7 +23,6 @@#include <linux/workqueue.h> #include "access.h" -#include "audit.h" #include "domain.h" #include "limits.h" #include "object.h"
Signature · 1 line
2.52.0
Mickaël Salaün
maintainerPATCH 2/5 landlock: Improve erratum documentation
Improve description about scoped signal handling.
--- security/landlock/errata/abi-6.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
security/landlock/errata/abi-6.h +1 -1
@@ -9,7 +9,7 @@* This fix addresses an issue where signal scoping was overly restrictive, * preventing sandboxed threads from signaling other threads within the same * process if they belonged to different domains. Because threads are not -* security boundaries, user space might assume that any thread within the same +* security boundaries, user space might assume that all threads within the same * process can send signals between themselves (see :manpage:`nptl(7)` and * :manpage:`libpsx(3)`). Consistent with :manpage:`ptrace(2)` behavior, direct * interaction between threads of the same process should always be allowed.
Signature · 1 line
2.52.0
Re: [PATCH v1 2/5] landlock: Improve erratum documentation
Quoted 4 lines · Mickaël Salaün
Improve description about scoped signal handling.
Reported-by Günther Noack <[email protected]>Signed-off-by Mickaël Salaün <[email protected]>
Mickaël Salaün
maintainerPATCH 3/5 landlock: Clean up hook_ptrace_access_check()
In reply to Mickaël SalaünMake variable's scope minimal in hook_ptrace_access_check().
--- security/landlock/task.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
security/landlock/task.c +2 -2
@@ -86,7 +86,6 @@ static int hook_ptrace_access_check(struct task_struct *const child, const unsigned int mode) {const struct landlock_cred_security *parent_subject; -const struct landlock_ruleset *child_dom;int err;/* Quick return for non-landlocked tasks. */
@@ -96,7 +95,8 @@ static int hook_ptrace_access_check(struct task_struct *const child,scoped_guard (rcu) { - child_dom =landlock_get_task_domain (child); +const struct landlock_ruleset *const child_dom = +landlock_get_task_domain (child); err =domain_ptrace (parent_subject->domain, child_dom); }
Signature · 1 line
2.52.0
Re: [PATCH v1 3/5] landlock: Clean up hook_ptrace_access_check()
Quoted 4 lines · Mickaël Salaün
Make variable's scope minimal in
hook_ptrace_access_check().Cc Günther Noack <[email protected]>Signed-off-by Mickaël Salaün <[email protected]>
Mickaël Salaün
maintainerPATCH 4/5 landlock: Fix spelling
In reply to Mickaël Salaün--- security/landlock/domain.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
security/landlock/domain.h +1 -1
@@ -97,7 +97,7 @@ struct landlock_hierarchy {*/ atomic64_t num_denials;/** -* @id: Landlock domain ID, sets once at domain creation time. +* @id: Landlock domain ID, set once at domain creation time. */ u64 id;/**
Signature · 1 line
2.52.0
Re: [PATCH v1 4/5] landlock: Fix spelling
Quoted 22 lines · Mickaël Salaün
Cc Günther Noack <[email protected]>Signed-off-by Mickaël Salaün <[email protected]>--- security/landlock/domain.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)security/landlock/domain.h +1
-1@@ -97,7 +97,7 @@ struct landlock_hierarchy {*/ atomic64_t num_denials;/** -* @id: Landlock domain ID, sets once at domain creation time. +* @id: Landlock domain ID, set once at domain creation time. */ u64 id;/** Signature · 1 line
2.52.0
Mickaël Salaün
maintainerPATCH 5/5 landlock: Fix formatting
In reply to Mickaël SalaünFormat with clang-format -i security/landlock/*.[ch]
--- security/landlock/fs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
security/landlock/fs.c +2 -1
@@ -1314,7 +1314,8 @@ static void hook_sb_delete(struct super_block *const sb)* second call to iput() for the same Landlock object. Also * checks I_NEW because such inode cannot be tied to an object. */ -if (inode_state_read (inode) & (I_FREEING |I_WILL_FREE |I_NEW )) { +if (inode_state_read (inode) & + (I_FREEING |I_WILL_FREE |I_NEW )) {spin_unlock (&inode->i_lock);continue ; }
Signature · 1 line
2.52.0
Re: [PATCH v1 5/5] landlock: Fix formatting
Quoted 28 lines · Mickaël Salaün
Format with clang-format -i security/landlock/*.[ch]
Cc Christian Brauner <[email protected]>Cc Günther Noack <[email protected]>Cc Mateusz Guzik <[email protected]>Fixes b4dbfd8653b3 ("Coccinelle-based conversion to use ->i_state accessors")Signed-off-by Mickaël Salaün <[email protected]>--- security/landlock/fs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)security/landlock/fs.c +2
-1@@ -1314,7 +1314,8 @@ static void hook_sb_delete(struct super_block *const sb)* second call to iput() for the same Landlock object. Also * checks I_NEW because such inode cannot be tied to an object. */ -if (inode_state_read (inode) & (I_FREEING |I_WILL_FREE |I_NEW )) { +if (inode_state_read (inode) & + (I_FREEING |I_WILL_FREE |I_NEW )) {spin_unlock (&inode->i_lock);continue ; }Signature · 1 line
2.52.0
Quoted 24 lines · Mickaël Salaün
Remove useless
audit.hinclude.Cc Günther Noack <[email protected]>Fixes 33e65b0d3add ("landlock: Add AUDIT_LANDLOCK_ACCESS and log ptrace denials")Signed-off-by Mickaël Salaün <[email protected]>--- security/landlock/ruleset.c | 1 - 1 file changed, 1 deletion(-)security/landlock/ruleset.c +0
-1@@ -23,7 +23,6 @@#include <linux/workqueue.h> #include "access.h" -#include "audit.h" #include "domain.h" #include "limits.h" #include "object.h" Signature · 1 line
2.52.0