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: <48139A35.6050608@zytor.com>
Date:	Sat, 26 Apr 2008 14:10:13 -0700
From:	"H. Peter Anvin" <hpa@...or.com>
To:	Adrian Bunk <bunk@...nel.org>
CC:	Andrew Morton <akpm@...ux-foundation.org>,
	Ingo Molnar <mingo@...e.hu>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	linux-kernel@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>,
	Yinghai Lu <yinghai.lu@....com>,
	Yinghai Lu <yhlu.kernel@...il.com>, jbarnes@...tuousgeek.org
Subject: Re: [git pull] "big box" x86 changes, boot protocol

Adrian Bunk wrote:
>>> +	memcpy(&early_res[i], &early_res[i + 1],
>>> +	       (j - 1 - i) * sizeof(struct early_res));

>> nit: memcpy() shouldn't be used for overlapping copies.  It happens to be
>> OK (for dst<src) in the kernel implementations.  We hope.
>> ...
> 
> We always use the gcc builtin for memcpy() here.
> 

You have to do something pretty weird for memcpy() to not work for
dst <= src even with overlap; this usually involves architectures that 
have explicit cache control instructions to establish the dst in the 
cache, if used before src is read.

This is not an issue on x86, though.

	-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