lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250110.672e9e7a7417@gnoack.org>
Date: Fri, 10 Jan 2025 17:39:32 +0100
From: Günther Noack <gnoack3000@...il.com>
To: Mickaël Salaün <mic@...ikod.net>
Cc: Günther Noack <gnoack@...gle.com>,
	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-security-module@...r.kernel.org,
	Paul Moore <paul@...l-moore.com>
Subject: Re: [PATCH v1 2/2] landlock: Constify get_mode_access()

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@...gle.com>
> Signed-off-by: Mickaël Salaün <mic@...ikod.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@...il.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ