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,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 4A167C4724C for ; Wed, 6 May 2020 18:15:48 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 1DD0420747 for ; Wed, 6 May 2020 18:15:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1DD0420747 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 A72D48E0008; Wed, 6 May 2020 14:15:47 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A233E8E0003; Wed, 6 May 2020 14:15:47 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 938E78E0008; Wed, 6 May 2020 14:15:47 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0196.hostedemail.com [216.40.44.196]) by kanga.kvack.org (Postfix) with ESMTP id 7CB6A8E0003 for ; Wed, 6 May 2020 14:15:47 -0400 (EDT) Received: from smtpin23.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 3CC7310F61 for ; Wed, 6 May 2020 18:15:47 +0000 (UTC) X-FDA: 76787097534.23.unit25_89c90f69a9327 X-HE-Tag: unit25_89c90f69a9327 X-Filterd-Recvd-Size: 2616 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by imf38.hostedemail.com (Postfix) with ESMTP for ; Wed, 6 May 2020 18:15:46 +0000 (UTC) Received: by verein.lst.de (Postfix, from userid 2407) id E9BF768C7B; Wed, 6 May 2020 20:15:43 +0200 (CEST) Date: Wed, 6 May 2020 20:15:43 +0200 From: Christoph Hellwig To: Linus Torvalds Cc: Christoph Hellwig , the arch/x86 maintainers , Alexei Starovoitov , Daniel Borkmann , Masami Hiramatsu , Andrew Morton , linux-parisc@vger.kernel.org, linux-um , Netdev , bpf@vger.kernel.org, Linux-MM , Linux Kernel Mailing List Subject: Re: [PATCH 15/15] x86: use non-set_fs based maccess routines Message-ID: <20200506181543.GA7873@lst.de> References: <20200506062223.30032-1-hch@lst.de> <20200506062223.30032-16-hch@lst.de> 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-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 Wed, May 06, 2020 at 10:51:51AM -0700, Linus Torvalds wrote: > My private tree no longer has those __get/put_user_size() things, > because "unsafe_get/put_user()" is the only thing that remains with my > conversion to asm goto. > > And we're actively trying to get rid of the whole __get_user() mess. > Admittedly "__get_user_size()" is just the internal helper that > doesn't have the problem, but it really is an internal helper for a > legacy operation, and the new op that uses it is that > "unsafe_get_user()". > > Also, because you use __get_user_size(), you then have to duplicate > the error handling logic that we already have in unsafe_get_user(). > > IOW - is there some reason why you didn't just make these use > "unsafe_get/put_user()" directly, and avoid both of those issues? That was the first prototype, and or x86 it works great, just the __user cases in maccess.c are a little ugly. And they point to the real problem - for architectures like sparc and s390 that use an entirely separate address space for the kernel vs userspace I dont think just use unsafe_{get,put}_user will work, as they need different instructions. Btw, where is you magic private tree and what is the plan for it?