Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp1368230pxm; Thu, 24 Feb 2022 01:32:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJz+fTE8VVFS6x3rxoqnawHZoKdBiM9gQ6mXdcRZBxyFyaBT/Lklbhp/DdA9k8hdrDslBpCi X-Received: by 2002:a63:7a16:0:b0:374:90d4:b31 with SMTP id v22-20020a637a16000000b0037490d40b31mr1634353pgc.273.1645695178700; Thu, 24 Feb 2022 01:32:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645695178; cv=none; d=google.com; s=arc-20160816; b=dML+aMvc2alwJrGYTembBw02JMXhg+qaIvwW/7cas/6jAGLPBhlNtVBoobsiR1GaE3 3wYS6LZamSizewaugRy9QkkP26GP6uW2jmaEVM70qCrFb0b/6ZbdX55FG0OwNGAA4QWn mRn6iJTEtxtc06RoH32FgQCs7d+Mj+ktRRf0LbaNCfKJ7N5Eymr5QkT/UNBY1LySQxPh ADcJBEWN8/KXRjq4OWrnjCnlNBKXx9zgluZbo5vs1ilBlmjCPRFVhB5W8iiUykTlzRkL KtrzA7uTilDGVH2Obdjt3QS6+TQjWuvM1fbbC5xr5qy8fycSZgDB0KTnZqSWimPxAeGo CAEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=fIWwj4vs8mouVQJIzWi+hUWNm3bAkUs1ehLZrpWHrkE=; b=Dld6tq2xCHQqvgCADdg1scx11qtbePU6rYdz7TVWsQSNLwCeYPsK4wK4wfaeKjs0HQ 0bdjaNvc0LZanaJIB5zzxR00OUZJIMdd8LBXgmy9hQexwlndvX8+Bccz7gClyjDEkYs+ sQHuugcO7YGVNf0QvsQcL7ELxcY0j6yOLwpAZGA9O1ReldYOgb0aKdN0DmyGG2mfiqnP 0nA6YYadMfVyF1csOypMZATM4D5LEAwghHTzwwEOd2S/reEZkvKbLFCIt36R6rRqik2H zkTjnR51fbqre6lJGqK+QzxcR/NDVpNevnl9ll6ovOOZA1uc+rKCs92B0LXvkBFoOar2 0F3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=IUh0x46q; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f1si2313833plg.503.2022.02.24.01.32.43; Thu, 24 Feb 2022 01:32:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=IUh0x46q; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232019AbiBXImX (ORCPT + 99 others); Thu, 24 Feb 2022 03:42:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53188 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231441AbiBXImT (ORCPT ); Thu, 24 Feb 2022 03:42:19 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EFC3233E1C; Thu, 24 Feb 2022 00:41:48 -0800 (PST) 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 482B461A41; Thu, 24 Feb 2022 08:41:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A6261C340F8; 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-f44.google.com with SMTP id n14so1416445wrq.7; Thu, 24 Feb 2022 00:41:47 -0800 (PST) X-Gm-Message-State: AOAM531XagoZx6Uk1zhQX/CE1ErzZlNWKgx1Hb2dIDj7LHTNtB7aMi2j Pa3pYMHS8M7L9M4uxxK91fu5jbudGewpzKfLI0w= 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" X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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