linux-security-module.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Mickaël Salaün" <mic@digikod.net>
To: Tingmao Wang <m@maowtm.org>
Cc: "Günther Noack" <gnoack@google.com>,
	linux-security-module@vger.kernel.org
Subject: Re: [PATCH] landlock/ruleset: Minor comments improvements
Date: Tue, 22 Jul 2025 14:54:04 +0200	[thread overview]
Message-ID: <20250722.ahCe4yi4thou@digikod.net> (raw)
In-Reply-To: <20250603215636.111939-1-m@maowtm.org>

I updated the comments with the disconnected directory patch series, and
I took this patch into account.  Thanks!

On Tue, Jun 03, 2025 at 10:56:35PM +0100, Tingmao Wang wrote:
> As discussed in chat, here is another one for you to consider and squash :)
> 
> Current comment here is IMO a bit confusing - it says "Only allow ...
> internal filesystems" but that's not the case.
> 
> Signed-off-by: Tingmao Wang <m@maowtm.org>
> ---
>  security/landlock/fs.c | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/security/landlock/fs.c b/security/landlock/fs.c
> index 9396d2d9df40..11b469002c03 100644
> --- a/security/landlock/fs.c
> +++ b/security/landlock/fs.c
> @@ -911,9 +911,10 @@ static bool is_access_to_paths_allowed(
>  		}
>  		if (unlikely(IS_ROOT(walker_path.dentry))) {
>  			/*
> -			 * Stops at disconnected root directories.  Only allows
> -			 * access to internal filesystems (e.g. nsfs, which is
> -			 * reachable through /proc/<pid>/ns/<namespace>).
> +			 * Stops at disconnected root directories.  Allows access to
> +			 * internal filesystems (e.g. nsfs, which is reachable through
> +			 * /proc/<pid>/ns/<namespace>), in addition to what's already
> +			 * allowed.
>  			 */
>  			if (walker_path.mnt->mnt_flags & MNT_INTERNAL) {
>  				allowed_parent1 = true;
> --
> 2.49.0
> 

  reply	other threads:[~2025-07-22 12:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-27 20:54 [PATCH] landlock/ruleset: Minor comments improvements Tingmao Wang
2025-06-02 13:41 ` [PATCH] Another one Tingmao Wang
2025-06-03 21:56 ` [PATCH] landlock/ruleset: Minor comments improvements Tingmao Wang
2025-07-22 12:54   ` Mickaël Salaün [this message]
2025-07-22 12:52 ` Mickaël Salaün

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=20250722.ahCe4yi4thou@digikod.net \
    --to=mic@digikod.net \
    --cc=gnoack@google.com \
    --cc=linux-security-module@vger.kernel.org \
    --cc=m@maowtm.org \
    /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).