From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934680AbdC3S7W (ORCPT ); Thu, 30 Mar 2017 14:59:22 -0400 Received: from mail-io0-f195.google.com ([209.85.223.195]:33473 "EHLO mail-io0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933406AbdC3S7S (ORCPT ); Thu, 30 Mar 2017 14:59:18 -0400 MIME-Version: 1.0 In-Reply-To: <20170330185427.GT29622@ZenIV.linux.org.uk> References: <20170329055706.GH29622@ZenIV.linux.org.uk> <20170330162241.GG7909@n2100.armlinux.org.uk> <20170330164342.GR29622@ZenIV.linux.org.uk> <20170330184824.GS29622@ZenIV.linux.org.uk> <20170330185427.GT29622@ZenIV.linux.org.uk> From: Linus Torvalds Date: Thu, 30 Mar 2017 11:59:16 -0700 X-Google-Sender-Auth: Z91ftoJINnatn419IG01XcTCC-U Message-ID: Subject: Re: [RFC][CFT][PATCHSET v1] uaccess unification To: Al Viro Cc: Russell King - ARM Linux , "linux-arch@vger.kernel.org" , Linux Kernel Mailing List , Richard Henderson , Will Deacon , Haavard Skinnemoen , Vineet Gupta , Steven Miao , Jesper Nilsson , Mark Salter , Yoshinori Sato , Richard Kuo , Tony Luck , Geert Uytterhoeven , James Hogan , Michal Simek , David Howells , Ley Foon Tan , Jonas Bonn , Helge Deller , Martin Schwidefsky , Ralf Baechle , Benjamin Herrenschmidt , Chen Liqin , "David S. Miller" , Chris Metcalf , Richard Weinberger , Guan Xuetao , Thomas Gleixner , Chris Zankel Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 30, 2017 at 11:54 AM, Al Viro wrote: > > Not even that - again, it will happily trigger page faults unless the > caller disables those. __copy_from_user_I_know_what_I_am_doing()? That's a horrible name. Everybody always thinks they know what they are doing. There's a reason I called the new odd user access functions "unsafe_get/put_user()" But regardless of that, I think you're being silly to even look at the iovec code. That code simply *isn't* critical enough that one or two extra instructions matter. Show me profiles to the contrary. I dare you. Those things shouldn't be using *anything* odd at all. They should be using "copy_from_user()". Nothing else. Linus From mboxrd@z Thu Jan 1 00:00:00 1970 From: Linus Torvalds Subject: Re: [RFC][CFT][PATCHSET v1] uaccess unification Date: Thu, 30 Mar 2017 11:59:16 -0700 Message-ID: References: <20170329055706.GH29622@ZenIV.linux.org.uk> <20170330162241.GG7909@n2100.armlinux.org.uk> <20170330164342.GR29622@ZenIV.linux.org.uk> <20170330184824.GS29622@ZenIV.linux.org.uk> <20170330185427.GT29622@ZenIV.linux.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from mail-io0-f195.google.com ([209.85.223.195]:33473 "EHLO mail-io0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933406AbdC3S7S (ORCPT ); Thu, 30 Mar 2017 14:59:18 -0400 In-Reply-To: <20170330185427.GT29622@ZenIV.linux.org.uk> Sender: linux-arch-owner@vger.kernel.org List-ID: To: Al Viro Cc: Russell King - ARM Linux , "linux-arch@vger.kernel.org" , Linux Kernel Mailing List , Richard Henderson , Will Deacon , Haavard Skinnemoen , Vineet Gupta , Steven Miao , Jesper Nilsson , Mark Salter , Yoshinori Sato , Richard Kuo , Tony Luck , Geert Uytterhoeven , James Hogan , Michal Simek , David Howells , Ley Foon Tan , Jonas Bonn On Thu, Mar 30, 2017 at 11:54 AM, Al Viro wrote: > > Not even that - again, it will happily trigger page faults unless the > caller disables those. __copy_from_user_I_know_what_I_am_doing()? That's a horrible name. Everybody always thinks they know what they are doing. There's a reason I called the new odd user access functions "unsafe_get/put_user()" But regardless of that, I think you're being silly to even look at the iovec code. That code simply *isn't* critical enough that one or two extra instructions matter. Show me profiles to the contrary. I dare you. Those things shouldn't be using *anything* odd at all. They should be using "copy_from_user()". Nothing else. Linus