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: <11808c0d-6d41-0c11-2576-efc21ee9e068@163.com>
Date:	Thu, 30 Jun 2016 22:21:30 +0800
From:	Zhaoxiu Zeng <zengzhaoxiu@....com>
To:	Michal Nazarewicz <mina86@...a86.com>, linux-kernel@...r.kernel.org
Cc:	Zhaoxiu Zeng <zhaoxiu.zeng@...il.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Hidehiro Kawai <hidehiro.kawai.ez@...achi.com>,
	Borislav Petkov <bp@...e.de>, Michal Hocko <mhocko@...e.com>,
	Rasmus Villemoes <linux@...musvillemoes.dk>,
	Nicolas Iooss <nicolas.iooss_linux@....org>,
	"Steven Rostedt (Red Hat)" <rostedt@...dmis.org>,
	Gustavo Padovan <gustavo.padovan@...labora.co.uk>,
	Geert Uytterhoeven <geert@...ux-m68k.org>,
	Horacio Mijail Anton Quiles <hmijail@...il.com>,
	Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Subject: Re: [PATCH 1/2] lib: hexdump: use a look-up table to do hex_to_bin

On 2016/6/30 2:31, Michal Nazarewicz wrote:
> On Thu, Jun 30 2016, zengzhaoxiu wrote:
.......
>> So this replaces table lookup in tolower with an explicit table lookup
>> here while also removing some branches.
>>
>> Is that an improvement?  Hard to say.  _ctype table is used by all the
>> other isfoo macros so there’s a chance it’s already in cache the first
>> time hex_to_bin is called.  Having to read the data into cache may
>> overwhelm advantages of lack of branches.

In the 2nd patch, I use the inlined hex_to_bin to replace the local conversion
in _parse_integer which used by all kstrto... functions, so the heat of h2b_lut
may not be less than _ctype table. 

Additionally,in the vast majority of cases,only these bytes (0x00, 0x30~0x39,
 0x41~0x46, 0x61~0x66) will be used.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ