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 Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 24D1EC433F5 for ; Fri, 18 Feb 2022 07:24:39 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4K0NVs1TMDz3cjS for ; Fri, 18 Feb 2022 18:24:37 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=ZOFYp5FJ; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org (client-ip=2604:1380:40e1:4800::1; helo=sin.source.kernel.org; envelope-from=arnd@kernel.org; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=ZOFYp5FJ; dkim-atps=neutral Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4K0NV73ZMnz3cQb for ; Fri, 18 Feb 2022 18:23:59 +1100 (AEDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 56455CE3153 for ; Fri, 18 Feb 2022 07:23:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F1C43C340F1 for ; Fri, 18 Feb 2022 07:23:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1645169038; bh=iX8k9YjATKpR4c62jPbZyUcM9GG/inNR2Rws8vh+5TI=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=ZOFYp5FJX2fGqfPSxuYQH+Bbh1OaV3AAAeBBi8chN0z46DV33qgEoqw/uVDLhAO3C M7SSK5KVCp/u690ji+AC6ddeNrmfrEtHlpxTQjywW7sqN41FCYUwU8u1S++u9E7NvJ r02NC0wGk3Js2i8Ig4ZzctmVJBkd/nbIt6BJMNxeOiLhLUuLmDw7ePtYo94Bm1dhvX zhvKG88l39cBSukRt8vW5fIaa74f7tmSeWBU4UjjB3Qs0utU9/ubuiEJT38Fpb+j2s 4Qu9ryBlpI6oN7Ii5dugx++U3NyNLtEm3aR4rm4v88RlnNMK3N4jZeMvQv8yTrAfTl N/qcNAXY+Oaag== Received: by mail-lj1-f172.google.com with SMTP id c15so2962475ljf.11 for ; Thu, 17 Feb 2022 23:23:57 -0800 (PST) X-Gm-Message-State: AOAM533hOaUNBCmmnfesHJD40RlZcmlyZiMR0PKVp7188SJaVtvWqqg4 t/+Kgs5TtKFjMjQgDjKnvyDgrP6BnKbDgNG9h4g= X-Google-Smtp-Source: ABdhPJy+O8dl23fyesXRWHjz7SZRLrJN54UunjRaSC3OSIYzwaAC/i9x7WkjUHComAvPWqTtg86CqT1E/gHbWgqhIZI= X-Received: by 2002:adf:90c1:0:b0:1e4:ad27:22b9 with SMTP id i59-20020adf90c1000000b001e4ad2722b9mr4994775wri.219.1645169025031; Thu, 17 Feb 2022 23:23:45 -0800 (PST) MIME-Version: 1.0 References: <20220216131332.1489939-1-arnd@kernel.org> <20220216131332.1489939-14-arnd@kernel.org> <20220218063450.GI22576@lst.de> In-Reply-To: <20220218063450.GI22576@lst.de> From: Arnd Bergmann Date: Fri, 18 Feb 2022 08:23:29 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 13/18] uaccess: generalize access_ok() To: Christoph Hellwig Content-Type: text/plain; charset="UTF-8" X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Rich Felker , linux-ia64@vger.kernel.org, Linux-sh list , Peter Zijlstra , "open list:BROADCOM NVRAM DRIVER" , Linux-MM , Guo Ren , sparclinux , "open list:QUALCOMM HEXAGON..." , linux-riscv , Will Deacon , Ard Biesheuvel , linux-arch , linux-s390 , Brian Cain , Helge Deller , the arch/x86 maintainers , Russell King - ARM Linux , linux-csky@vger.kernel.org, Ingo Molnar , Geert Uytterhoeven , "open list:SYNOPSYS ARC ARCHITECTURE" , "open list:TENSILICA XTENSA PORT \(xtensa\)" , Arnd Bergmann , Heiko Carstens , alpha , linux-um , linuxppc-dev , linux-m68k , Openrisc , Al Viro , Stafford Horne , Michal Simek , Thomas Bogendoerfer , Parisc List , Nick Hu , Max Filippov , Linux API , Linux Kernel Mailing List , Dinh Nguyen , "Eric W . Biederman" , Richard Weinberger , Andrew Morton , Linus Torvalds , David Miller , Greentime Hu Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Fri, Feb 18, 2022 at 7:34 AM Christoph Hellwig wrote: > > > +#include > > Instead of the asm-generic games, shouldn't we just define access_ok in > if not already defined by the architecture? I tried, but couldn't actually make it work because asm/uaccess.h tends to contain inline functions that rely on access_ok(). It could work once we move all the high-level functions into linux/uaccess.h, but that would likely require another long patch series. One option that can work is to require architectures to have an asm/access_ok.h header that gets included by linux/uaccess.h. On most architectures, that would be redirected to asm-generic/access_ok.h, as only ia64, x86, arm64 and um need to override the definition. Arnd