Messages in this thread | | | Date | Wed, 27 May 2015 10:18:54 -0700 | From | "H. Peter Anvin" <> | Subject | Re: [PATCH] x86, cpuinfo x86_model_id whitespace cleanup |
| |
On 05/19/2015 12:22 PM, Borislav Petkov wrote: > > I guess I'm trying to find out why don't we have a BIG FAT WARNING over > memcpy saying not to use it with overlapping buffers and larger than > byte sizes. Or maybe this is something everyone, except me, just knows > and that's a "Doh, Boris, of course!". >
It kind of is, and doesn't just apply to kernel programming. In C99+ the memcpy() prototype has "restrict" in it to denote that memcpy() buffers have to be non-overlapping.
-hpa
| |