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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8FB13C433EF for ; Thu, 24 Feb 2022 08:41:51 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 28BEB8D0002; Thu, 24 Feb 2022 03:41:51 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 23B778D0001; Thu, 24 Feb 2022 03:41:51 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1042B8D0002; Thu, 24 Feb 2022 03:41:51 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.25]) by kanga.kvack.org (Postfix) with ESMTP id F14368D0001 for ; Thu, 24 Feb 2022 03:41:50 -0500 (EST) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id CFA9C60CF0 for ; Thu, 24 Feb 2022 08:41:50 +0000 (UTC) X-FDA: 79177030380.13.840EA90 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf16.hostedemail.com (Postfix) with ESMTP id 0C5A1180003 for ; Thu, 24 Feb 2022 08:41:49 +0000 (UTC) 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 dfw.source.kernel.org (Postfix) with ESMTPS id 0899F61AEA for ; Thu, 24 Feb 2022 08:41:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AA762C340F6 for ; Thu, 24 Feb 2022 08:41:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1645692107; bh=3OZhY8JjlWpvQtjxNVEtkpMscELhOM136ShyKCOjsEU=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=IUh0x46q8STA6HKAlbLTizD8XGO+kXYr3toRmLVEmVGpouO/H6aYQ8xiLiANw2a+u HCL4KnuaohqNkiXxcP1D+/lRJl3QntwyWsCstJnQVu8ONZ3jI6BlSUPzyejrcAPQZV +nzKG39Q20gmRhX85bUsq4p1JphZ4DTJi1MSq5KJ4gkH6JLtlV5bg4qOHXvgO90+wI G81tJHNMGlOmgb18Uj2i0lzpFYLeKAgba5P0poH7ixneTHE+747gTxVEDOdEreg2CS CWeIv3qxk2GxmOqug9TFXr2ZvmxluPekB2kCL2kCQbjWzVYCFZXOv5nSavxW7y+xxm sJyHKVwF8yVng== Received: by mail-wr1-f48.google.com with SMTP id s13so1789134wrb.6 for ; Thu, 24 Feb 2022 00:41:47 -0800 (PST) X-Gm-Message-State: AOAM530QhadbcDD2dXJmK6PQptnaQMN9FLTs37qYlvuEr1y+QsQ1oKkO vwqvUtdgP3FoHXFG6H7OVGx4FZrH6L2wc6e5pbk= X-Google-Smtp-Source: ABdhPJzneL/9b5VqISjziF71opYqNdlSHnzAsafkxFgpoEqKa+f7LCyuasR/zxK7OReD5OXFM6yWvfz7KIyaMqF7hrc= X-Received: by 2002:a5d:59aa:0:b0:1ed:9f45:c2ff with SMTP id p10-20020a5d59aa000000b001ed9f45c2ffmr1312686wrr.192.1645692105823; Thu, 24 Feb 2022 00:41:45 -0800 (PST) MIME-Version: 1.0 References: <20220216131332.1489939-1-arnd@kernel.org> <20220216131332.1489939-14-arnd@kernel.org> In-Reply-To: From: Arnd Bergmann Date: Thu, 24 Feb 2022 09:41:29 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 13/18] uaccess: generalize access_ok() To: Stafford Horne Cc: Linus Torvalds , Christoph Hellwig , linux-arch , Linux-MM , Linux API , Arnd Bergmann , Linux Kernel Mailing List , Al Viro , Russell King - ARM Linux , Will Deacon , Guo Ren , Brian Cain , Geert Uytterhoeven , Michal Simek , Thomas Bogendoerfer , Nick Hu , Greentime Hu , Dinh Nguyen , Helge Deller , Michael Ellerman , Peter Zijlstra , Ingo Molnar , Mark Rutland , Heiko Carstens , Rich Felker , David Miller , Richard Weinberger , "the arch/x86 maintainers" , Max Filippov , "Eric W . Biederman" , Andrew Morton , Ard Biesheuvel , alpha , "open list:SYNOPSYS ARC ARCHITECTURE" , linux-csky@vger.kernel.org, "open list:QUALCOMM HEXAGON..." , linux-ia64@vger.kernel.org, linux-m68k , "open list:BROADCOM NVRAM DRIVER" , Openrisc , Parisc List , linuxppc-dev , linux-riscv , linux-s390 , Linux-sh list , sparclinux , linux-um , "open list:TENSILICA XTENSA PORT (xtensa)" Content-Type: text/plain; charset="UTF-8" Authentication-Results: imf16.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=IUh0x46q; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf16.hostedemail.com: domain of arnd@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=arnd@kernel.org X-Rspam-User: X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 0C5A1180003 X-Stat-Signature: phqw97jobjknubaxgejjx91o36qmhefa X-HE-Tag: 1645692109-10821 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 Thu, Feb 24, 2022 at 9:29 AM Stafford Horne wrote: > > - > > -#define access_ok(addr, size) \ > > -({ \ > > - __chk_user_ptr(addr); \ > > - __range_ok((unsigned long)(addr), (size)); \ > > -}) > > +#include > > I was going to ask why we are missing __chk_user_ptr in the generic version. > But this is basically now a no-op so I think its OK. Correct, the type checking is implied by making __access_ok() an inline function that takes a __user pointer. > Acked-by: Stafford Horne [openrisc, asm-generic] Thanks! Arnd