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: <aQj_xgm5_dnyJ2cc@smile.fi.intel.com>
Date: Mon, 3 Nov 2025 21:17:26 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Andrew Morton <akpm@...ux-foundation.org>,
	Guan-Chun Wu <409411716@....tku.edu.tw>,
	Kuan-Wei Chiu <visitorckw@...il.com>, linux-kernel@...r.kernel.org
Cc: David Laight <david.laight.linux@...il.com>
Subject: Re: [PATCH v1 1/1] base64: Unroll the tables initialisers

On Mon, Nov 03, 2025 at 08:05:10PM +0100, Andy Shevchenko wrote:
> Currently the initialisers of the tables have duplicate indices.
> This prevents from building with `make W=1`.
> 
> To address the issue, unroll the table initialisers with generated
> arrays by the following Python excerpt:
> 
> CHARS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
> 
> def gen_table(ch62, ch63):
>     table = [ 0xff ] * 256
>     for idx, char in enumerate(CHARS):
>         table[ord(char)] = idx
>     table[ord(ch62)] = 62
>     table[ord(ch63)] = 63
> 
>     for i in range(0, len(table), 8):
>         print (f"\t{', '.join(f"0x{c:02x}" for c in table[i:i+8])},\t/* {i:-3d} - {i+7:-3d} */")

I haven't added a Fixes tag as the idea to fold this to the initial
contribution.

-- 
With Best Regards,
Andy Shevchenko



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ