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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1341244281.1695.28.camel@iscandar.digidescorp.com>
Date:	Mon, 02 Jul 2012 10:51:21 -0500
From:	"Steven J. Magnani" <steve@...idescorp.com>
To:	OGAWA Hirofumi <hirofumi@...l.parknet.co.jp>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] fat: Refactor shortname parsing

On Tue, 2012-07-03 at 00:11 +0900, OGAWA Hirofumi wrote: 
> "Steven J. Magnani" <steve@...idescorp.com> writes:
> 
> > On Mon, 2012-07-02 at 23:36 +0900, OGAWA Hirofumi wrote: 
> >> "Steven J. Magnani" <steve@...idescorp.com> writes:
> >> 
> >> > True, but with the change you suggest we lose the incrementing of 'i',
> >> > which likely would cause an infinite loop for 1:1 Unicode conversions.
> >> 
> >> You meant, we just have to do
> >> 
> >> 	if (!is_vfat)
> >>         	ptname[i] = ...;
> >> 	i++;
> >> 
> >> or something? I still feel this looks better to indicate, we don't use
> >> ptname in the case of vfat.
> >
> > I can change it, but there are other places in that function where
> > ptname is used that are not qualified with !is_vfat, so I don't know
> > whether this improves clarity or reduces it.
> >
> > I do think fat_tolower() should not be making decisions. IMHO the
> > trigraph and a comment, perhaps before the vfat-only reassignment of
> > 'name', would be clearer. 
> 
> Hm, the primary case is vfat. fat_tolower()/hidden is required only for
> msdos, and ptname too. So, my suggestion is trying to keep vfat case
> clean.

It's not clear to me where you want to go with this. 

1. Split fat_parse_short() into msdos and vfat versions. This may
improve clarity, but there would be some replication of code.

2. Sprinkle "if (!isvfat)" throughout the already-proposed version of
fat_parse_short()
  A. Everywhere
  B. Only in the places you've proposed

3. Retain the already-proposed version of fat_parse_short(), but add a
comment that the uni_name overrides the msdos "ptname", and separate out
the decision to lowercase from fat_tolower() [i.e., the trigraph].

4. Other options?

The NFS changes I would like to post depend on fat_parse_short() in some
form.

Steve


--
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