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: <5r02p455-26oq-9r61-ss01-679977osr722@syhkavp.arg>
Date:   Wed, 21 Jun 2023 11:29:02 -0400 (EDT)
From:   Nicolas Pitre <nico@...xnic.net>
To:     Jeff Layton <jlayton@...nel.org>
cc:     Christian Brauner <brauner@...nel.org>,
        Al Viro <viro@...iv.linux.org.uk>, Jan Kara <jack@...e.cz>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 20/79] cramfs: switch to new ctime accessors

On Wed, 21 Jun 2023, Jeff Layton wrote:

> In later patches, we're going to change how the ctime.tv_nsec field is
> utilized. Switch to using accessor functions instead of raw accesses of
> inode->i_ctime.
> 
> Signed-off-by: Jeff Layton <jlayton@...nel.org>

Acked-by: Nicolas Pitre <nico@...xnic.net

Yet all that's needed here is to simply set time entries to 0 as cramfs 
doesn't time stamp its files. It could as well be done with memset().

> ---
>  fs/cramfs/inode.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/cramfs/inode.c b/fs/cramfs/inode.c
> index 27c6597aa1be..039ce0f8858b 100644
> --- a/fs/cramfs/inode.c
> +++ b/fs/cramfs/inode.c
> @@ -133,7 +133,7 @@ static struct inode *get_cramfs_inode(struct super_block *sb,
>  	}
>  
>  	/* Struct copy intentional */
> -	inode->i_mtime = inode->i_atime = inode->i_ctime = zerotime;
> +	inode->i_mtime = inode->i_atime = inode_ctime_set(inode, zerotime);
>  	/* inode->i_nlink is left 1 - arguably wrong for directories,
>  	   but it's the best we can do without reading the directory
>  	   contents.  1 yields the right result in GNU find, even
> -- 
> 2.41.0
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ