Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753621AbcCMBMr (ORCPT ); Sat, 12 Mar 2016 20:12:47 -0500 Received: from mail-io0-f196.google.com ([209.85.223.196]:35200 "EHLO mail-io0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751843AbcCMBMj (ORCPT ); Sat, 12 Mar 2016 20:12:39 -0500 MIME-Version: 1.0 In-Reply-To: <20160312171648.GA12167@gmail.com> References: <56E1CA7B.5040706@nextfour.com> <3908561D78D1C84285E8C5FCA982C28F3A005009@ORSMSX114.amr.corp.intel.com> <20160312171648.GA12167@gmail.com> Date: Sat, 12 Mar 2016 17:12:38 -0800 X-Google-Sender-Auth: oXPJYUAgK290tyxsNwQRP4pJ0gM Message-ID: Subject: Re: [PATCH v14] x86, mce: Add memcpy_mcsafe() From: Linus Torvalds To: Ingo Molnar Cc: Tony Luck , =?UTF-8?Q?Mika_Penttil=C3=A4?= , "linux-kernel@vger.kernel.org" , Thomas Gleixner , Borislav Petkov , Andrew Morton , Peter Zijlstra , "H. Peter Anvin" , Andy Lutomirski , "Williams, Dan J" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 554 Lines: 14 On Sat, Mar 12, 2016 at 9:16 AM, Ingo Molnar 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