From: "Günther Noack" <gnoack3000@gmail.com>
To: "Mickaël Salaün" <mic@digikod.net>
Cc: "Günther Noack" <gnoack@google.com>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-security-module@vger.kernel.org,
"Paul Moore" <paul@paul-moore.com>
Subject: Re: [PATCH v1 2/2] landlock: Constify get_mode_access()
Date: Fri, 10 Jan 2025 17:39:32 +0100 [thread overview]
Message-ID: <20250110.672e9e7a7417@gnoack.org> (raw)
In-Reply-To: <20250110153918.241810-2-mic@digikod.net>
On Fri, Jan 10, 2025 at 04:39:14PM +0100, Mickaël Salaün wrote:
> Use __attribute_const__ for get_mode_access().
>
> Cc: Günther Noack <gnoack@google.com>
> Signed-off-by: Mickaël Salaün <mic@digikod.net>
> ---
> security/landlock/fs.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/security/landlock/fs.c b/security/landlock/fs.c
> index 7adb25150488..f81d0335b825 100644
> --- a/security/landlock/fs.c
> +++ b/security/landlock/fs.c
> @@ -932,7 +932,7 @@ static int current_check_access_path(const struct path *const path,
> return check_access_path(dom, path, access_request);
> }
>
> -static access_mask_t get_mode_access(const umode_t mode)
> +static __attribute_const__ access_mask_t get_mode_access(const umode_t mode)
> {
> switch (mode & S_IFMT) {
> case S_IFLNK:
> --
> 2.47.1
>
Reviewed-by: Günther Noack <gnoack3000@gmail.com>
next prev parent reply other threads:[~2025-01-10 16:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-10 15:39 [PATCH v1 1/2] landlock: Handle weird files Mickaël Salaün
2025-01-10 15:39 ` [PATCH v1 2/2] landlock: Constify get_mode_access() Mickaël Salaün
2025-01-10 16:39 ` Günther Noack [this message]
2025-01-10 16:37 ` [PATCH v1 1/2] landlock: Handle weird files Günther Noack
2025-01-11 15:38 ` Mickaël Salaün
2025-01-15 7:15 ` Christoph Hellwig
2025-01-15 10:54 ` Christian Brauner
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=20250110.672e9e7a7417@gnoack.org \
--to=gnoack3000@gmail.com \
--cc=gnoack@google.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=mic@digikod.net \
--cc=paul@paul-moore.com \
/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).