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]
Date:   Fri, 26 Nov 2021 10:10:07 +0100
From:   Jan Kara <jack@...e.cz>
To:     Chengguang Xu <cgxu519@...ernel.net>
Cc:     miklos@...redi.hu, jack@...e.cz, amir73il@...il.com,
        linux-unionfs@...r.kernel.org, linux-fsdevel@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        Chengguang Xu <charliecgxu@...cent.com>
Subject: Re: [RFC PATCH V6 2/7] ovl: mark overlayfs inode dirty when it has
 upper

On Mon 22-11-21 11:00:33, Chengguang Xu wrote:
> From: Chengguang Xu <charliecgxu@...cent.com>
> 
> We simply mark overlayfs inode dirty when it has upper,
> it's much simpler than mark dirtiness on modification.
> 
> Signed-off-by: Chengguang Xu <charliecgxu@...cent.com>
> ---
>  fs/overlayfs/inode.c | 4 +++-
>  fs/overlayfs/util.c  | 1 +
>  2 files changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/fs/overlayfs/inode.c b/fs/overlayfs/inode.c
> index 1f36158c7dbe..027ffc0a2539 100644
> --- a/fs/overlayfs/inode.c
> +++ b/fs/overlayfs/inode.c
> @@ -778,8 +778,10 @@ void ovl_inode_init(struct inode *inode, struct ovl_inode_params *oip,
>  {
>  	struct inode *realinode;
>  
> -	if (oip->upperdentry)
> +	if (oip->upperdentry) {
>  		OVL_I(inode)->__upperdentry = oip->upperdentry;
> +		mark_inode_dirty(inode);
> +	}
>  	if (oip->lowerpath && oip->lowerpath->dentry)
>  		OVL_I(inode)->lower = igrab(d_inode(oip->lowerpath->dentry));
>  	if (oip->lowerdata)

Hum, does this get called only for inodes with upper inode existing? I
suppose we do not need to track inodes that were not copied up because they
cannot be dirty? I'm sorry, my knowledge of overlayfs is rather limited so
I may be missing something basic.



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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ