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] [thread-next>] [day] [month] [year] [list]
Message-ID: <holqxdoanjsu7cnuczcrdmnzd2u73lbc6do4hxupi6nctwrhzp@yrp4dz73tbde>
Date: Mon, 10 Nov 2025 11:15:17 +0100
From: Jan Kara <jack@...e.cz>
To: Mateusz Guzik <mjguzik@...il.com>
Cc: brauner@...nel.org, viro@...iv.linux.org.uk, jack@...e.cz, 
	linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org, linux-ext4@...r.kernel.org, 
	tytso@....edu, torvalds@...ux-foundation.org, josef@...icpanda.com, 
	linux-btrfs@...r.kernel.org
Subject: Re: [PATCH v3 3/3] fs: retire now stale MAY_WRITE predicts in
 inode_permission()

On Fri 07-11-25 15:21:49, Mateusz Guzik wrote:
> The primary non-MAY_WRITE consumer now uses lookup_inode_permission_may_exec().
> 
> Signed-off-by: Mateusz Guzik <mjguzik@...il.com>

Makes sense. Feel free to add:

Reviewed-by: Jan Kara <jack@...e.cz>

								Honza

> ---
>  fs/namei.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/namei.c b/fs/namei.c
> index 6b2a5a5478e7..2a112b2c0951 100644
> --- a/fs/namei.c
> +++ b/fs/namei.c
> @@ -546,7 +546,7 @@ static inline int do_inode_permission(struct mnt_idmap *idmap,
>   */
>  static int sb_permission(struct super_block *sb, struct inode *inode, int mask)
>  {
> -	if (unlikely(mask & MAY_WRITE)) {
> +	if (mask & MAY_WRITE) {
>  		umode_t mode = inode->i_mode;
>  
>  		/* Nobody gets write access to a read-only fs. */
> @@ -577,7 +577,7 @@ int inode_permission(struct mnt_idmap *idmap,
>  	if (unlikely(retval))
>  		return retval;
>  
> -	if (unlikely(mask & MAY_WRITE)) {
> +	if (mask & MAY_WRITE) {
>  		/*
>  		 * Nobody gets write access to an immutable file.
>  		 */
> -- 
> 2.48.1
> 
-- 
Jan Kara <jack@...e.com>
SUSE Labs, CR

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ