Re: [PATCH] x86, cpuinfo x86_model_id whitespace cleanup

H. Peter Anvin
2015-05-27T17:19:25Z

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