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: <20230706135939.iyens427je5jwape@quack3>
Date:   Thu, 6 Jul 2023 15:59:39 +0200
From:   Jan Kara <jack@...e.cz>
To:     Jeff Layton <jlayton@...nel.org>
Cc:     Christian Brauner <brauner@...nel.org>,
        Luis Chamberlain <mcgrof@...nel.org>,
        Kees Cook <keescook@...omium.org>,
        Iurii Zaikin <yzaikin@...gle.com>,
        Al 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 67/92] procfs: convert to ctime accessor functions

On Wed 05-07-23 15:01:32, 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: Luis Chamberlain <mcgrof@...nel.org>
> Signed-off-by: Jeff Layton <jlayton@...nel.org>

Looks good. Feel free to add:

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

								Honza

> ---
>  fs/proc/base.c        | 2 +-
>  fs/proc/inode.c       | 2 +-
>  fs/proc/proc_sysctl.c | 2 +-
>  fs/proc/self.c        | 2 +-
>  fs/proc/thread_self.c | 2 +-
>  5 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/fs/proc/base.c b/fs/proc/base.c
> index eb2e498e3b8d..bbc998fd2a2f 100644
> --- a/fs/proc/base.c
> +++ b/fs/proc/base.c
> @@ -1902,7 +1902,7 @@ struct inode *proc_pid_make_inode(struct super_block *sb,
>  	ei = PROC_I(inode);
>  	inode->i_mode = mode;
>  	inode->i_ino = get_next_ino();
> -	inode->i_mtime = inode->i_atime = inode->i_ctime = current_time(inode);
> +	inode->i_mtime = inode->i_atime = inode_set_ctime_current(inode);
>  	inode->i_op = &proc_def_inode_operations;
>  
>  	/*
> diff --git a/fs/proc/inode.c b/fs/proc/inode.c
> index 67b09a1d9433..532dc9d240f7 100644
> --- a/fs/proc/inode.c
> +++ b/fs/proc/inode.c
> @@ -660,7 +660,7 @@ struct inode *proc_get_inode(struct super_block *sb, struct proc_dir_entry *de)
>  
>  	inode->i_private = de->data;
>  	inode->i_ino = de->low_ino;
> -	inode->i_mtime = inode->i_atime = inode->i_ctime = current_time(inode);
> +	inode->i_mtime = inode->i_atime = inode_set_ctime_current(inode);
>  	PROC_I(inode)->pde = de;
>  	if (is_empty_pde(de)) {
>  		make_empty_dir_inode(inode);
> diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c
> index 5ea42653126e..6bc10e7e0ff7 100644
> --- a/fs/proc/proc_sysctl.c
> +++ b/fs/proc/proc_sysctl.c
> @@ -463,7 +463,7 @@ static struct inode *proc_sys_make_inode(struct super_block *sb,
>  	head->count++;
>  	spin_unlock(&sysctl_lock);
>  
> -	inode->i_mtime = inode->i_atime = inode->i_ctime = current_time(inode);
> +	inode->i_mtime = inode->i_atime = inode_set_ctime_current(inode);
>  	inode->i_mode = table->mode;
>  	if (!S_ISDIR(table->mode)) {
>  		inode->i_mode |= S_IFREG;
> diff --git a/fs/proc/self.c b/fs/proc/self.c
> index 72cd69bcaf4a..ecc4da8d265e 100644
> --- a/fs/proc/self.c
> +++ b/fs/proc/self.c
> @@ -46,7 +46,7 @@ int proc_setup_self(struct super_block *s)
>  		struct inode *inode = new_inode(s);
>  		if (inode) {
>  			inode->i_ino = self_inum;
> -			inode->i_mtime = inode->i_atime = inode->i_ctime = current_time(inode);
> +			inode->i_mtime = inode->i_atime = inode_set_ctime_current(inode);
>  			inode->i_mode = S_IFLNK | S_IRWXUGO;
>  			inode->i_uid = GLOBAL_ROOT_UID;
>  			inode->i_gid = GLOBAL_ROOT_GID;
> diff --git a/fs/proc/thread_self.c b/fs/proc/thread_self.c
> index a553273fbd41..63ac1f93289f 100644
> --- a/fs/proc/thread_self.c
> +++ b/fs/proc/thread_self.c
> @@ -46,7 +46,7 @@ int proc_setup_thread_self(struct super_block *s)
>  		struct inode *inode = new_inode(s);
>  		if (inode) {
>  			inode->i_ino = thread_self_inum;
> -			inode->i_mtime = inode->i_atime = inode->i_ctime = current_time(inode);
> +			inode->i_mtime = inode->i_atime = inode_set_ctime_current(inode);
>  			inode->i_mode = S_IFLNK | S_IRWXUGO;
>  			inode->i_uid = GLOBAL_ROOT_UID;
>  			inode->i_gid = GLOBAL_ROOT_GID;
> -- 
> 2.41.0
> 
-- 
Jan Kara <jack@...e.com>
SUSE Labs, CR

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ