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



On Sun, 27 Apr 2008, Adrian Bunk wrote:

> On Sat, Apr 26, 2008 at 01:39:28PM -0700, Andrew Morton wrote:
> > On Sat, 26 Apr 2008 21:54:07 +0200 Ingo Molnar <mingo@...e.hu> 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.

It's probably hard to write a reasonable x86 memcpy() that wouldn't happen 
to do the right thing for this case, but I do agee - we should still use 
memmove() for this, just to make it clear that it does overlapping things.

		Linus
--
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