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] [day] [month] [year] [list]
Date:	Thu, 13 Dec 2012 09:14:11 +0900
From:	Jaegeuk Kim <jaegeuk.kim@...sung.com>
To:	Namjae Jeon <linkinjeon@...il.com>
Cc:	Leon Romanovsky <leon@...n.nu>, Fubo Chen <fubo.chen@...il.com>,
	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-f2fs-devel@...ts.sourceforge.net,
	Namjae Jeon <namjae.jeon@...sung.com>,
	Amit Sahrawat <a.sahrawat@...sung.com>
Subject: Re: [PATCH] f2fs: fix up f2fs_get_parent issue to retrieve correct
 parent inode number

2012-12-13 (목), 07:44 +0900, Namjae Jeon:
> 2012/12/13, Leon Romanovsky <leon@...n.nu>:
> > On Wed, Dec 12, 2012 at 8:50 AM, Fubo Chen <fubo.chen@...il.com> wrote:
> >> On Wed, Dec 12, 2012 at 5:12 PM, Leon Romanovsky <leon@...n.nu> wrote:
> >>> On Wed, Dec 12, 2012 at 7:05 AM, Fubo Chen <fubo.chen@...il.com> wrote:
> >>>>
> >>>> On Wed, Dec 12, 2012 at 3:37 PM, Namjae Jeon <linkinjeon@...il.com>
> >>>> wrote:
> >>>> > +       /* dot and dotdot dentries should have zero-value hash code
> >>>> > */
> >>>> > +       if (!memcmp(name, ".", 1) || !memcmp(name, "..", 2))
> >>>> > +               return 0;
> >>>>
> >>>> That looks suspicious. If memcmp(name, "..", 2) == 0 then always
> >>>> memcmp(name, ".", 1) == 0. Why two tests ?
> >>>
> >>> It is not the case vice versa, so you still need to do two checks.
> >>> You need to distinguish dot(.), dotdot(..) and something with dot at
> >>> the beginning (for example - .o)
> >>
> >> Thanks for replying. I understand that the intention is what you
> >> explained. But to me the code says something else: "if the first byte
> >> of name is a dot, return 0". Did I see that correctly ?
> > Excellent catch, I agree with you It will also return 0 for every file
> > which starts from the dot.
> > The right solution must take name length into account.
> Hi.
> Agree. I will change it on v2 patch.
> Thanks for review.

Nice catch!
I made a mistake initially before. Sorry Namjae.
Thanks to all of you.

-- 
Jaegeuk Kim
Samsung

Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ