[PATCH v8 03/10] landlock: Use landlock_walk_path_up() in collect_domain_accesses()

Justin Suess utilityemal77 at gmail.com
Fri May 29 02:24:21 UTC 2026


On Thu, May 28, 2026 at 09:52:02PM -0400, Justin Suess wrote:
> Replace the open-coded loop with landlock_walk_path_up() and change the
> function signature from (mnt_root, dir) to a single struct path.  The
> caller's mount point and starting dentry are now both carried in @path,
> which keeps the traversal logic consistent with
> is_access_to_paths_allowed().
> 
> No functional change intended.
> 
> Signed-off-by: Justin Suess <utilityemal77 at gmail.com>
> ---
> 
> Notes:
>     v7..v8 changes:
>     
>       * Reworded commit message.
>       * Changed collect_domain_accesses() to take a single struct path *
>         instead of separate mnt_root/dir parameters, simplifying the
>         interface and matching is_access_to_paths_allowed().
>       * Tightened the disconnected-directory stop condition to require
>         !d_unhashed(walker_path.dentry) when comparing against the mount
Disregard this note about d_unhashed this note ended up being
an uneccesary leftover from some attempted bugfixes in my draft (now addressed/fixed)
and I forgot to remove bullet this the git notes before sending.

Justin
> [...]



More information about the Linux-security-module-archive mailing list