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: <003101d5c204$5046e9a0$f0d4bce0$@samsung.com>
Date:   Fri, 3 Jan 2020 16:06:25 +0900
From:   "Namjae Jeon" <namjae.jeon@...sung.com>
To:     'Pali Rohár' <pali.rohar@...il.com>
Cc:     <linux-kernel@...r.kernel.org>, <linux-fsdevel@...r.kernel.org>,
        <gregkh@...uxfoundation.org>, <valdis.kletnieks@...edu>,
        <hch@....de>, <sj1557.seo@...sung.com>, <linkinjeon@...il.com>
Subject: RE: [PATCH v9 10/13] exfat: add nls operations

> On Thursday 02 January 2020 16:20:33 Namjae Jeon wrote:
> > This adds the implementation of nls operations for exfat.
> >
> > Signed-off-by: Namjae Jeon <namjae.jeon@...sung.com>
> > Signed-off-by: Sungjong Seo <sj1557.seo@...sung.com>
> > ---
> >  fs/exfat/nls.c | 809
> > +++++++++++++++++++++++++++++++++++++++++++++++++
> >  1 file changed, 809 insertions(+)
> >  create mode 100644 fs/exfat/nls.c
> >
> > diff --git a/fs/exfat/nls.c b/fs/exfat/nls.c new file mode 100644
> > index 000000000000..af52328e28ff
> > --- /dev/null
> > +++ b/fs/exfat/nls.c
> 
> ...
> 
> > +int exfat_nls_uni16s_to_vfsname(struct super_block *sb,
> > +		struct exfat_uni_name *uniname, unsigned char *p_cstring,
> > +		int buflen)
> > +{
> > +	if (EXFAT_SB(sb)->options.utf8)
> > +		return __exfat_nls_utf16s_to_vfsname(sb, uniname, p_cstring,
> > +				buflen);
> > +	return __exfat_nls_uni16s_to_vfsname(sb, uniname, p_cstring,
> buflen);
> > +}
> 
> Hello, I'm looking at this function and basically it do nothing.
> Or was it supposed that this function should do something more for UTF-8
> encoding?
> 
> There is one if- statement, but in both branches is executed exactly
> same code.
> 
> And executed function just pass same arguments as current callee
> function.
> 
> So calls to exfat_nls_uni16s_to_vfsname() can be replaced by direct
> calls to __exfat_nls_uni16s_to_vfsname().
Ah, The function names are similar, but not same. see utf16s/uni16s.

Thanks!

> 
> Or maybe better, rename __exfat_nls_uni16s_to_vfsname() function to
> exfat_nls_uni16s_to_vfsname().
> 
> > +int exfat_nls_vfsname_to_uni16s(struct super_block *sb,
> > +		const unsigned char *p_cstring, const int len,
> > +		struct exfat_uni_name *uniname, int *p_lossy)
> > +{
> > +	if (EXFAT_SB(sb)->options.utf8)
> > +		return __exfat_nls_vfsname_to_utf16s(sb, p_cstring, len,
> > +				uniname, p_lossy);
> > +	return __exfat_nls_vfsname_to_uni16s(sb, p_cstring, len, uniname,
> > +			p_lossy);
> > +}
> 
> And same for this function.
> 
> --
> Pali Rohár
> pali.rohar@...il.com


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ