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:   Fri, 26 Aug 2016 15:23:21 -0700
From:   Joe Perches <joe@...ches.com>
To:     Alexey Dobriyan <adobriyan@...il.com>, akpm@...ux-foundation.org
Cc:     linux-kernel@...r.kernel.org, Andi Kleen <andi@...stfloor.org>
Subject: Re: [PATCH] smaller strlen()

On Fri, 2016-08-26 at 23:01 +0300, Alexey Dobriyan wrote:
> gcc prefers "*s++" style code for some reason, doesn't unroll loop
> condition check once. Kernel strings are small but they aren't of 0
> length, so that additional branch was almost never taken.

Hey Alexey.

Is this gcc version specific?

And I'm confused why there isn't an asm __HAVE_ARCH_STRLEN
version x86_64 strlen like x86_32 or if __builtin_strlen()
is or isn't used.  Maybe Andi Kleen knows/remembers (cc'd).

> 	$ ./scripts/bloat-o-meter ../vmlinux-000 ../obj/vmlinux
> 	strlen         30      26      -4
> 	strlcpy        71      64      -7
> 	strlcat       120      99     -21
> 
> strlcpy() and strlcat() are collateral damage :^)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ