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]
Date:   Mon, 31 Jul 2017 22:31:29 +0300
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     OGAWA Hirofumi <hirofumi@...l.parknet.co.jp>
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Joe Perches <joe@...ches.com>
Subject: Re: [PATCH v5] vfat: Deduplicate hex2bin()

On Mon, Jul 31, 2017 at 9:44 PM, OGAWA Hirofumi
<hirofumi@...l.parknet.co.jp> wrote:
> We may use hex2bin() instead of custom approach.

>  #include <linux/ctype.h>
>  #include <linux/slab.h>
>  #include <linux/namei.h>
> +#include <linux/kernel.h>

Would not be better to squeeze it somehow alphabetically ordered (in
most ordered part)?


> +
> +                               *(wchar_t *)op = uc[0] << 8 | uc[1];
> +
> +                               op += 2;

This had been in the original patch 6 years ago and had been refused
because of endianess issues.

>                                 charlen = nls->char2uni(ip, len - i,
> -                                                                       (wchar_t *)op);
> +                                                       (wchar_t *)op);

It perfectly fits one line.

-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ