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: <20230706135852.l2yu7xzffrhbctbb@quack3>
Date:   Thu, 6 Jul 2023 15:58:52 +0200
From:   Jan Kara <jack@...e.cz>
To:     Jeff Layton <jlayton@...nel.org>
Cc:     Christian Brauner <brauner@...nel.org>,
        Miklos Szeredi <miklos@...redi.hu>,
        Amir Goldstein <amir73il@...il.com>,
        Al Viro <viro@...iv.linux.org.uk>, Jan Kara <jack@...e.cz>,
        linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-unionfs@...r.kernel.org
Subject: Re: [PATCH v2 66/92] overlayfs: convert to ctime accessor functions

On Wed 05-07-23 15:01:31, 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.
> 
> Reviewed-by: Amir Goldstein <amir73il@...il.com>
> Signed-off-by: Jeff Layton <jlayton@...nel.org>
...
> diff --git a/fs/overlayfs/file.c b/fs/overlayfs/file.c
> index 21245b00722a..7acd3e3fe790 100644
> --- a/fs/overlayfs/file.c
> +++ b/fs/overlayfs/file.c
...
> @@ -249,10 +250,12 @@ static void ovl_file_accessed(struct file *file)
>  	if (!upperinode)
>  		return;
>  
> +	ctime = inode_get_ctime(inode);
> +	uctime = inode_get_ctime(upperinode);
>  	if ((!timespec64_equal(&inode->i_mtime, &upperinode->i_mtime) ||
> -	     !timespec64_equal(&inode->i_ctime, &upperinode->i_ctime))) {
> +	     !timespec64_equal(&ctime, &uctime))) {
>  		inode->i_mtime = upperinode->i_mtime;
> -		inode->i_ctime = upperinode->i_ctime;
> +		inode_set_ctime_to_ts(inode, inode_get_ctime(upperinode));

I think you can use uctime here instead of inode_get_ctime(upperinode)?
Otherwise the patch looks good. Feel free to add:

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

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ