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:   Sat, 20 Jan 2018 17:29:05 +0800
From:   Chao Yu <chao@...nel.org>
To:     Jaegeuk Kim <jaegeuk@...nel.org>, linux-kernel@...r.kernel.org,
        linux-f2fs-devel@...ts.sourceforge.net
Subject: Re: [f2fs-dev] [PATCH 1/2] f2fs: allow to recover node blocks given
 updated checkpoint

On 2018/1/20 12:26, Jaegeuk Kim wrote:
> If fsck.f2fs changes crc, we have no way to recover some inode blocks by roll-
> forward recovery. Let's relax the condition to recover them.

As this is fsck case only, what about writing checkpoint with special flag
for such case, and relax the condition if flag was set, so, for normal case,
it can avoid recovering obsolete data.

Thanks,

> 
> Signed-off-by: Jaegeuk Kim <jaegeuk@...nel.org>
> ---
>  fs/f2fs/node.h | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/fs/f2fs/node.h b/fs/f2fs/node.h
> index 0ee3e5ff49a3..15280eeb24ea 100644
> --- a/fs/f2fs/node.h
> +++ b/fs/f2fs/node.h
> @@ -305,10 +305,11 @@ static inline bool is_recoverable_dnode(struct page *page)
>  	struct f2fs_checkpoint *ckpt = F2FS_CKPT(F2FS_P_SB(page));
>  	__u64 cp_ver = cur_cp_version(ckpt);
>  
> -	if (__is_set_ckpt_flags(ckpt, CP_CRC_RECOVERY_FLAG))
> +	if (__is_set_ckpt_flags(ckpt, CP_CRC_RECOVERY_FLAG)) {
>  		cp_ver |= (cur_cp_crc(ckpt) << 32);
> -
> -	return cp_ver == cpver_of_node(page);
> +		return cp_ver == cpver_of_node(page);
> +	}
> +	return (cp_ver << 32) == (cpver_of_node(page) << 32);
>  }
>  
>  /*
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ