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=-6.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS 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 98A1DC43460 for ; Wed, 28 Apr 2021 13:07:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 65E8260241 for ; Wed, 28 Apr 2021 13:07:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239723AbhD1NIK (ORCPT ); Wed, 28 Apr 2021 09:08:10 -0400 Received: from mail.kernel.org ([198.145.29.99]:43826 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239600AbhD1NIH (ORCPT ); Wed, 28 Apr 2021 09:08:07 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7ADA96141B; Wed, 28 Apr 2021 13:07:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1619615242; bh=8/STA7bGiSjXSDV4A6R9tGC/6aPDB16dVaxkyZxGoGk=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=bf0T+ByNax+99vYSpD7zdcAHPg6qYJIjVDlIa0VUKkYfcD00MV93+sLjI7YBVpGpF aurg7sg9/TKYUP8avmnZgAaZEfSaH3F+No5GmAzP7LbVEv/Txf+ltjVnh0jD7gBBtH ZZpWCMaYvsSRcgS3HvMxvPthb5pminu0Y0375XEaoeZzCNNI3Sp0DG0QJ8C7brAlp5 lRY9D3SuWLq3Ln86AfiJnXRUW2IJKWl7IG1NucxGPfki9ppYkTSnSWD9EHU/zH7TjG MyjMIt4gBC+bBvRUn2QikPGX9FkpvbD1lTPl5i7gYHzw/23QsrDRnNK49uhTW2XfHB htCwdOx1BR9/A== Received: by mail-lf1-f50.google.com with SMTP id y4so58907967lfl.10; Wed, 28 Apr 2021 06:07:22 -0700 (PDT) X-Gm-Message-State: AOAM531W7s41rREuysoQU3dWOKuDkKZZceHhbippIA/pP3VgTQcPAmgN u2lrhQgDv3cqFvUtebKAmzYM4BSJ6/MTGZkqBDo= X-Google-Smtp-Source: ABdhPJzg7CZ/H+IwoHlzbqtk1Ck8bLUOLPuNwWOnqjfXDfp7yV+ahc6SMkQr2DK1tVW6xM14eIkU3IQ3WgMytns6Ios= X-Received: by 2002:a19:711b:: with SMTP id m27mr21117190lfc.346.1619615240721; Wed, 28 Apr 2021 06:07:20 -0700 (PDT) MIME-Version: 1.0 References: <1618995255-91499-1-git-send-email-guoren@kernel.org> <20210428031807.GA27619@roeck-us.net> <20210428124946.GA1976154@infradead.org> In-Reply-To: <20210428124946.GA1976154@infradead.org> From: Guo Ren Date: Wed, 28 Apr 2021 21:07:09 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] csky: uaccess.h: Coding convention with asm generic To: Christoph Hellwig Cc: Arnd Bergmann , Guenter Roeck , Linux Kernel Mailing List , linux-csky@vger.kernel.org, linux-arch , Guo Ren Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 28, 2021 at 8:50 PM Christoph Hellwig wrote: > > 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. I still think the arch should base on asm-generic/uaccess.h, not abandon it. Thx for reviewing. > > > 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. -- Best Regards Guo Ren ML: https://lore.kernel.org/linux-csky/