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: <20241202153543.2y6nt5hada47pf2r@quack3>
Date: Mon, 2 Dec 2024 16:35:43 +0100
From: Jan Kara <jack@...e.cz>
To: Christian Brauner <brauner@...nel.org>
Cc: Erin Shepherd <erin.shepherd@....eu>,
	Amir Goldstein <amir73il@...il.com>,
	Jeff Layton <jlayton@...nel.org>,
	Alexander Viro <viro@...iv.linux.org.uk>, Jan Kara <jack@...e.cz>,
	Chuck Lever <chuck.lever@...cle.com>, linux-fsdevel@...r.kernel.org,
	linux-kernel@...r.kernel.org, linux-nfs@...r.kernel.org
Subject: Re: [PATCH RFC v2 3/3] pidfs: support FS_IOC_GETVERSION

On Fri 29-11-24 14:02:25, Christian Brauner wrote:
> This will allow 32 bit userspace to detect when a given inode number has
> been recycled and also to construct a unique 64 bit identifier.
> 
> Signed-off-by: Christian Brauner <brauner@...nel.org>

Looks good. Feel free to add:

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

								Honza

> ---
>  fs/pidfs.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/fs/pidfs.c b/fs/pidfs.c
> index ff4f25078f3d983bce630e597adbb12262e5d727..f73a47e1d8379df886a90a044fb887f8d06f7c0b 100644
> --- a/fs/pidfs.c
> +++ b/fs/pidfs.c
> @@ -262,6 +262,15 @@ static long pidfd_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
>  	if (arg)
>  		return -EINVAL;
>  
> +	switch (cmd) {
> +	case FS_IOC32_GETVERSION:
> +		fallthrough;
> +	case FS_IOC_GETVERSION: {
> +		__u32 __user *argp = (__u32 __user *)arg;
> +		return put_user(file_inode(file)->i_generation, argp);
> +	}
> +	}
> +
>  	scoped_guard(task_lock, task) {
>  		nsp = task->nsproxy;
>  		if (nsp)
> 
> -- 
> 2.45.2
> 
-- 
Jan Kara <jack@...e.com>
SUSE Labs, CR

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ