lkml.org 
[lkml]   [2015]   [May]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [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




    \
     
     \ /
      Last update: 2015-05-27 20:01    [W:4.074 / U:0.136 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site