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] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.20.1606220826430.4529@east.gentwo.org>
Date:	Wed, 22 Jun 2016 08:28:50 -0500 (CDT)
From:	Christoph Lameter <cl@...ux.com>
To:	Yury Norov <ynorov@...iumnetworks.com>
cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Yury Norov <yury.norov@...il.com>, masmart@...dex.ru,
	linux-mm@...ck.org, linux-kernel@...r.kernel.org,
	enberg@...nel.org, rientjes@...gle.com, iamjoonsoo.kim@....com,
	linux@...musvillemoes.dk, Alexey Klimov <klimov.linux@...il.com>
Subject: Re: [PATCH] mm: slab.h: use ilog2() in kmalloc_index()

On Wed, 22 Jun 2016, Yury Norov wrote:

>
> There will be no fls() for constant at runtime because ilog2() calculates
> constant values at compile-time as well. From this point of view,
> this patch removes code duplication, as we already have compile-time
> log() calculation in kernel, and should re-use it whenever possible.\

The reason not to use ilog there was that the constant folding did not
work correctly with one or the other architectures/compilers. If you want
to do this then please verify that all arches reliably do produce a
constant there.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ