From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D5E9BC433E0 for ; Wed, 10 Jun 2020 06:58:05 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id A14CE2081A for ; Wed, 10 Jun 2020 06:58:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A14CE2081A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 47E4D6B0002; Wed, 10 Jun 2020 02:58:04 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 42DEB6B0005; Wed, 10 Jun 2020 02:58:04 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3433C6B0006; Wed, 10 Jun 2020 02:58:04 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0235.hostedemail.com [216.40.44.235]) by kanga.kvack.org (Postfix) with ESMTP id 1E5BB6B0002 for ; Wed, 10 Jun 2020 02:58:04 -0400 (EDT) Received: from smtpin06.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id CACD81802B4F1 for ; Wed, 10 Jun 2020 06:58:03 +0000 (UTC) X-FDA: 76912397646.06.bells77_5111a9326dc9 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin06.hostedemail.com (Postfix) with ESMTP id 8063710038E27 for ; Wed, 10 Jun 2020 06:58:03 +0000 (UTC) X-HE-Tag: bells77_5111a9326dc9 X-Filterd-Recvd-Size: 2328 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by imf25.hostedemail.com (Postfix) with ESMTP for ; Wed, 10 Jun 2020 06:58:02 +0000 (UTC) Received: by verein.lst.de (Postfix, from userid 2407) id 8A07468AFE; Wed, 10 Jun 2020 08:57:59 +0200 (CEST) Date: Wed, 10 Jun 2020 08:57:59 +0200 From: Christoph Hellwig To: Linus Torvalds Cc: Andrew Morton , Alexei Starovoitov , Daniel Borkmann , Christoph Hellwig , Peter Anvin , Linux-MM , Masami Hiramatsu , Ingo Molnar , mm-commits@vger.kernel.org, Thomas Gleixner Subject: Re: [patch 91/93] x86: use non-set_fs based maccess routines Message-ID: <20200610065759.GB1397@lst.de> References: <20200608212922.5b7fa74ca3f4e2444441b7f9@linux-foundation.org> <20200609043501.zcGYY277G%akpm@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) X-Rspamd-Queue-Id: 8063710038E27 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam05 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Tue, Jun 09, 2020 at 11:06:31AM -0700, Linus Torvalds wrote: > On Tue, Jun 9, 2020 at 11:01 AM Linus Torvalds > wrote: > > > > Because right now it does something horribly horribly wrong if the > > type of 'src' is at all different from the type of dst, or either of > > them is different from 'type' > > Never mind, it's intentional, and the macro always uses 'type' for the > access size. I guess I can see the reason for that, and despite the > name it's more akin to the unsafe_copy_loop() helper than > unsafe_get_user(). Yes. At least for now - I've not forgotten your ideas about a more direct API. But for that I want to wait until: a) all architectures actually use this scheme b) find a user that cares enough about performance to bother with a direct get/put scheme vs the copy calling conventons. > The lack parentheses was a real issue, though. Thanks for fixing it.