Messages in this thread | | | Date | Sat, 12 Mar 2016 17:12:38 -0800 | Subject | Re: [PATCH v14] x86, mce: Add memcpy_mcsafe() | From | Linus Torvalds <> |
| |
On Sat, Mar 12, 2016 at 9:16 AM, Ingo Molnar <mingo@kernel.org> wrote: > > Please use the copy_*_user() memory copying API semantics, which are: return > negative code (-EFAULT) on error, 0 on success.
Those are the get_user/put_user() semantics.
copy_*_user() has those annoying "bytes left uncopied" return values that I really wouldn't encourage anybody else use unless they really have to. There are (good) reasons why it's done that way, but it's still not something that should be aped without the same kind of major reasons.
Linus
| |