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]
Date:	Fri, 26 Sep 2008 13:07:11 -0700
From:	"H. Peter Anvin" <hpa@...or.com>
To:	Joris van Rantwijk <jorispubl@...all.nl>
CC:	linux-kernel@...r.kernel.org
Subject: Re: Inflation of vmlinux by linker on x86_64

Joris van Rantwijk wrote:
> 
> On 26 sep 2008, at 20:52, H. Peter Anvin wrote:
>> Instead of adding a comment like this, we should simply rename it 
>> memmove().
> 
> Yes. I tried, but it clashed with an existing memmove declaration in 
> asm-x86/string_32.h.
> 
> What is the accepted solution for this?
> Redefining memmove should be allowed, but then it could no longer be a 
> static function.
> Using the memmove implementation from the main kernel would be painful 
> and ugly.
> We could also define "__memmove()" plus "#define memmove __memmove", 
> which would also be ugly.
> 
>> Furthermore, we probably spend enough time copying that using a real 
>> memmove() implementation, using string instructions, would be good.
> 
> Are string instructions that much faster?
> We can also get some speedup by copying ints instead of chars.
> 

String instructions are indeed very much faster, especially on recent 
hardware where they are optimized in microcode.

In this case, I think the easiest thing to do is to provide an optimized 
memmove and not making it a static function.  I have a reasonably 
optimized memmove in 32-bit assembly at:

http://git.kernel.org/?p=boot/syslinux/syslinux.git;a=blob;f=com32/lib/memmove.S;hb=HEAD

A 64-bit implementation can be done on similar principles.

	-hpa

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ