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]
Date:   Tue, 14 Nov 2017 14:59:06 +0600
From:   Rakib Mullick <rakib.mullick@...il.com>
To:     Rasmus Villemoes <linux@...musvillemoes.dk>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Matthew Wilcox <mawilcox@...rosoft.com>,
        Yury Norov <ynorov@...iumnetworks.com>,
        Mauro Carvalho Chehab <mchehab@...nel.org>
Subject: Re: [PATCH] lib: Avoid redundant sizeof checking in __bitmap_weight() calculation.

On Tue, Nov 14, 2017 at 1:23 PM, Rasmus Villemoes
<linux@...musvillemoes.dk> wrote:
>
> hint: sizeof() very rarely evaluates to zero... So this is the same as
> "is32 = 1". So the patch as-is is broken (and may explain the 1-byte
> delta in vmlinux). But even if this condition is fixed, the patch
> doesn't change anything, since the sizeof() evaluation is done at
> compile-time, regardless of whether it happens inside the inlined
> hweight_long or outside. So it is certainly not worth it to duplicate
> the loop.
>
Right, no need to duplicate the loop. Checking the objdump output, it
didn't changed anything at all. Fixed condition nullifies the vmlinux
size advantage also. Drop it.

Thanks,
Rakib.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ