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: <20230706133236.vwvm4utsgnhty3mk@quack3>
Date:   Thu, 6 Jul 2023 15:32:36 +0200
From:   Jan Kara <jack@...e.cz>
To:     Jeff Layton <jlayton@...nel.org>
Cc:     Christian Brauner <brauner@...nel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Tejun Heo <tj@...nel.org>,
        Alexander Viro <viro@...iv.linux.org.uk>,
        Jan Kara <jack@...e.cz>, linux-fsdevel@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 56/92] kernfs: convert to ctime accessor functions

On Wed 05-07-23 15:01:21, Jeff Layton wrote:
> In later patches, we're going to change how the inode's ctime field is
> used. Switch to using accessor functions instead of raw accesses of
> inode->i_ctime.
> 
> Acked-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> Signed-off-by: Jeff Layton <jlayton@...nel.org>

It looks like there are like three commits squashed into this patch -
kernfs, libfs, minix.

kernfs and libfs parts look good to me - feel free to add:

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

to them. For the minix part I have one nit:

> diff --git a/fs/minix/inode.c b/fs/minix/inode.c
> index e9fbb5303a22..3715a3940bd4 100644
> --- a/fs/minix/inode.c
> +++ b/fs/minix/inode.c
> @@ -501,10 +501,11 @@ static struct inode *V1_minix_iget(struct inode *inode)
>  	i_gid_write(inode, raw_inode->i_gid);
>  	set_nlink(inode, raw_inode->i_nlinks);
>  	inode->i_size = raw_inode->i_size;
> -	inode->i_mtime.tv_sec = inode->i_atime.tv_sec = inode->i_ctime.tv_sec = raw_inode->i_time;
> +	inode->i_mtime.tv_sec = inode->i_atime.tv_sec = inode_set_ctime(inode,
> +									raw_inode->i_time,
> +									0).tv_sec;
>  	inode->i_mtime.tv_nsec = 0;
>  	inode->i_atime.tv_nsec = 0;
> -	inode->i_ctime.tv_nsec = 0;

The usual simplification:
	inode->i_mtime = inode->i_atime = inode_set_ctime(inode,
							  raw_inode->i_time, 0);

								Honza
-- 
Jan Kara <jack@...e.com>
SUSE Labs, CR

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ