Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp605459pxy; Wed, 28 Apr 2021 10:19:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzeQNSYnUmO+9uIgB+uyimcHwHz39okxDwqHbVc2Y/rXTzfRrHgiWQnqpuZ2VMSJoaL0drv X-Received: by 2002:aa7:c850:: with SMTP id g16mr12545933edt.324.1619630352013; Wed, 28 Apr 2021 10:19:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619630352; cv=none; d=google.com; s=arc-20160816; b=uxqpFV9Fk8EXuRYkH3WBKnAKdHna1/cwI9+8bNVsEx1ewwDiqRLPG0oEcTvowgu+k5 LraxvxAUHnGxh/9Pl+tB1/9+wfz2dznJUAacei8dIU0otgAbranC0KSv9mchtKzwVhcj HtMYds//2JecHhFnLFqkpcfPSdRYoxUVFCcLvns6okWK5oS/PFNKJUJC3AIQ1gImyRHG hzVNtnstjEu8ALGBOspgO2lUEmk9vOSnK0Z1koY4JJrXWozMSVrun4s4om1QDuBJu1fL iZ1gOrR6plSzBoYGwL88otyA4BIcIz19MCrTFQwqhVEir1F9m4+1uaLEw/F/1pogU9xb rJWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=352/lgOwUkMwD9iQddxtMDN0ioz58bz5rwYjNmwVsLg=; b=d4/rjG1f3LsSODq9jPlqAqtiFNtjKsPyrE+D80kYVbRvuOahI9mjYnJJgfNWVNkgUM xYoFgsNImpqrQW4VIECLhCmTfOoI81XZ/blvBmCEH3dFN7offnOhAaI7vJmCElW7bwDj UjFXTulUJgLb3srKCVUzNMYr+iB7M9ddog8zKKSqWmXs466MLe6EHKRyznKd7uTQVRem WBkGm9WV278HJ6RpiQ6hEiu88eoQyoXWw1vigye2E3bruV7TeLIfGQBv3XK3ewlCAGfH NOIXRSRoM2ogNg4QtTOs2mqCQVxXsG4dngN9fAh54Yp6HF7c3uwdl/ROBA+XApoersow Gdlw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=ThQ1R+bu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dd21si322371edb.45.2021.04.28.10.18.46; Wed, 28 Apr 2021 10:19:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=ThQ1R+bu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239514AbhD1Mus (ORCPT + 99 others); Wed, 28 Apr 2021 08:50:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39886 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231506AbhD1Mur (ORCPT ); Wed, 28 Apr 2021 08:50:47 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 706CAC061574; Wed, 28 Apr 2021 05:50:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=352/lgOwUkMwD9iQddxtMDN0ioz58bz5rwYjNmwVsLg=; b=ThQ1R+bu1jlRN4CBDTXlPRSiBB Im7+XUv4tbT84Nq8pHPlrVK21IqwldG3jSqVsC0/vak1Rfo31p/Q4huE10skEY6eKtt2ncUbG9u49 VDURGTOVAud7akyVmGymqunXCrecN+WEcM/zL8fs6OHkUbHAG11sTsxUoFT3WmxKMHP6R5r6/Y57s /tS1KXTrSWrYpN0pH25R1XtMehHR86Ocf7xdw3GDgcbyrbFW5NuA9kDY297gsERzS3DmzuTQN1Ibj YC8V2U1e2bFFmTFOyugZW/N3jRsffPc9OdrjavccbtUJ5FJoI0dXNdCup93iA82HDcqQ0WoZ1S/yn StV88iSQ==; Received: from hch by casper.infradead.org with local (Exim 4.94 #2 (Red Hat Linux)) id 1lbjdS-008IOe-4O; Wed, 28 Apr 2021 12:49:47 +0000 Date: Wed, 28 Apr 2021 13:49:46 +0100 From: Christoph Hellwig To: Arnd Bergmann Cc: Guo Ren , Guenter Roeck , Linux Kernel Mailing List , linux-csky@vger.kernel.org, linux-arch , Guo Ren , Christoph Hellwig Subject: Re: [PATCH] csky: uaccess.h: Coding convention with asm generic Message-ID: <20210428124946.GA1976154@infradead.org> References: <1618995255-91499-1-git-send-email-guoren@kernel.org> <20210428031807.GA27619@roeck-us.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 28, 2021 at 11:25:29AM +0200, Arnd Bergmann wrote: > Actually, please don't use the asm-generic __put_user version based > on copy_to_user, we probably have killed it off long ago. Yes, they are horrible. > We might want to come up with a new version of asm-generic/uaccess.h > that actually makes it easier to have a sane per-architecture > implementation of the low-level accessors without set_fs(). > > I've added Christoph to Cc here, he probably has some ideas > on where we should be heading. I think asm-generic/uaccess.h pretty much only makes sense for nommu. For that case we can just kill the __{get,put}_user_fn indirection. I actually have work for that in an old branch. Trying to use any of asm-generic/uaccess.h for MMU based kernel is just asking for trouble. > One noteworthy aspect is that almost nothing users the low-level > __get_user()/__put_user() helpers any more outside of architecture > specific code, so we may not need to have separate versions > for much longer. Al has been trying to kill them off entirely for a while, and I hope he'll eventually succeed. That being said the difference should be that the __ versions just skip the access_ok, so having both is fairly trivial to implement.