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: <20150309035242.GB4472@jaegeuk-mac02>
Date:	Sun, 8 Mar 2015 20:52:42 -0700
From:	Jaegeuk Kim <jaegeuk@...nel.org>
To:	Wanpeng Li <wanpeng.li@...ux.intel.com>
Cc:	Changman Lee <cm224.lee@...sung.com>,
	Chao Yu <chao2.yu@...sung.com>,
	linux-f2fs-devel@...ts.sourceforge.net,
	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/3] f2fs: guarantee node/meta inode number won't be
 reused

Hi Wanpeng,

On Mon, Mar 09, 2015 at 11:00:53AM +0800, Wanpeng Li wrote:
> Node/Meta inode numbers are also should not be reused, this patch
> guarantee it.

We don't need to do this, since the mkfs.f2fs assigns block addresses as 1
for node and meta nids in their nat entries.
So, this should not happen.
Otherwise, we should fix any bugs in nat operations.

Thanks,

> 
> Signed-off-by: Wanpeng Li <wanpeng.li@...ux.intel.com>
> ---
>  fs/f2fs/node.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
> index 4687eae..1a7e925 100644
> --- a/fs/f2fs/node.c
> +++ b/fs/f2fs/node.c
> @@ -1421,7 +1421,7 @@ static int add_free_nid(struct f2fs_sb_info *sbi, nid_t nid, bool build)
>  		return -1;
>  
>  	/* 0 nid should not be used */
> -	if (unlikely(nid == 0))
> +	if (unlikely(nid == 0 || nid == 1 || nid == 2))
>  		return 0;
>  
>  	if (build) {
> -- 
> 1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ