[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHC9VhT8NrsXMM-PPZJ0EPLxFHQ1vOu+ASCd+82Xth_mJPnDiA@mail.gmail.com>
Date: Fri, 5 Sep 2025 22:13:01 -0400
From: Paul Moore <paul@...l-moore.com>
To: Neill Kapron <nkapron@...gle.com>
Cc: Stephen Smalley <stephen.smalley.work@...il.com>, Ondrej Mosnacek <omosnace@...hat.com>,
kernel-team@...roid.com, selinux@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] selinux: fix logic issue with per-file labeling for functionfs
On Fri, Sep 5, 2025 at 6:27 PM Neill Kapron <nkapron@...gle.com> wrote:
>
> This patch resolves a logic issue with selinux_set_mnt_opts when
> selinux_policycap_functionfs_seclabel is enabled. The issue was
> introduced between v1 and v2 of the original patchset.
>
> Fixes: 1b22454bb5e6 ("selinux: enable per-file labeling for functionfs")
> Signed-off-by: Neill Kapron <nkapron@...gle.com>
> ---
> security/selinux/hooks.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
With the original patch sitting at the top of the selinux/dev branch,
are you okay if I simply fixup the existing patch by adding the
missing '!'?
> diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
> index 333bb6cba25e..0e47b4bb8d40 100644
> --- a/security/selinux/hooks.c
> +++ b/security/selinux/hooks.c
> @@ -745,7 +745,7 @@ static int selinux_set_mnt_opts(struct super_block *sb,
> !strcmp(sb->s_type->name, "pstore") ||
> !strcmp(sb->s_type->name, "securityfs") ||
> (selinux_policycap_functionfs_seclabel() &&
> - strcmp(sb->s_type->name, "functionfs")))
> + !strcmp(sb->s_type->name, "functionfs")))
> sbsec->flags |= SE_SBGENFS;
>
> if (!strcmp(sb->s_type->name, "sysfs") ||
> --
> 2.51.0.355.g5224444f11-goog
--
paul-moore.com
Powered by blists - more mailing lists