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: <20170523074112.GD29525@infradead.org>
Date:   Tue, 23 May 2017 00:41:12 -0700
From:   Christoph Hellwig <hch@...radead.org>
To:     Shaohua Li <shli@...com>
Cc:     linux-kernel@...r.kernel.org, tj@...nel.org,
        gregkh@...uxfoundation.org, viro@...iv.linux.org.uk,
        Kernel-team@...com
Subject: Re: [PATCH 1/5] kernfs: implement i_generation

On Mon, May 22, 2017 at 03:53:05PM -0700, Shaohua Li wrote:
> Set i_generation for kernfs inod. This is required to implement exportfs
> operations.
> 
> Signed-off-by: Shaohua Li <shli@...com>
> ---
>  fs/kernfs/dir.c        | 2 ++
>  fs/kernfs/inode.c      | 1 +
>  include/linux/kernfs.h | 2 ++
>  3 files changed, 5 insertions(+)
> 
> diff --git a/fs/kernfs/dir.c b/fs/kernfs/dir.c
> index db5900aaa..09d093e 100644
> --- a/fs/kernfs/dir.c
> +++ b/fs/kernfs/dir.c
> @@ -634,6 +634,7 @@ static struct kernfs_node *__kernfs_new_node(struct kernfs_root *root,
>  	if (ret < 0)
>  		goto err_out2;
>  	kn->ino = ret;
> +	kn->generation = atomic_inc_return(&root->next_generation);

i_generation is only supposed to be valid on a per-inode basis, so this
global counter seems really odd.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ