Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp2724280rwi; Tue, 1 Nov 2022 10:58:07 -0700 (PDT) X-Google-Smtp-Source: AMsMyM51nbg3ZlMShJRzPvfP/TjQVu5Y0BbFaROJ5g6TG2o33+uwcQL++poU3it+KujJfvVbFp+G X-Received: by 2002:a05:6402:51c9:b0:45d:5efe:d1a3 with SMTP id r9-20020a05640251c900b0045d5efed1a3mr20364705edd.58.1667325487592; Tue, 01 Nov 2022 10:58:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667325487; cv=none; d=google.com; s=arc-20160816; b=hQ1Kf9poZmuVCyoAtZU28qUepV5uvZTPFgPTdKE2M4waZxXzwcwLBpcheGDTSKxJbR wWNjkztzlPl5NfEr6mQVz2/gNE/dP3AGuMOwcm8WOeOFF+2Hnx8yIz8Vhafbs5v5xn3W IgfVMGpJDKXYtmzLplWwGJWu+7AmJ+cfh5FMWJh0VMpf6Hp0V6TGcv7BJ1hansXv8tI1 go2Theoe5zTluBhGyE8iyS9zBdxKX17FXZkW/FbNiDGG5q7mPfAr2sx8bZeS7frxEocO 1YPaggMV6OmtIB87B1NBDo9uUQ5EP11PQwU6bosvekDGuQ/Kd8Mu/tblG6rxVZ+CeeVw /sXw== 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; bh=szft7H6y+DQecgsr5R0B8hao6uGcsdKC3WfkmotKvfU=; b=VEcKxwS3WwNCQCFLIqZkd9nUr2bDY40Ou6DTtbRwV5q60PU7k6BPcM4TqKvYXTc0mH OUJnX847Efe3WwypcBpr0mrH/au1N5elXj187pJ/P/YgxfM+1A5VvzV9N/XSN6SrA9m4 eMBOQfgfg1LKGfywoHbAzUPpRk+OEStpWCzD+sS/vgIRvrQhlQggAA5givnDrLWMxVnY lYHFDnb8FZp/RPqZDLDMwn7bc1j69g4+Bh4qZv/JceYTmWK+dV/pJZkgZ1MYSaYIfetH f1P+RjAuKlU/+eg+5vnwA9v1MCWui0Z9QM8JgbNSI6KXx6C6M/2+xthu+0Y8RbcMC2jA JzsA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o19-20020a056402039300b00461a2654335si10396335edv.425.2022.11.01.10.57.44; Tue, 01 Nov 2022 10:58:07 -0700 (PDT) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229740AbiKARrW (ORCPT + 97 others); Tue, 1 Nov 2022 13:47:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44274 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229562AbiKARrS (ORCPT ); Tue, 1 Nov 2022 13:47:18 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 514231D0D3; Tue, 1 Nov 2022 10:47:17 -0700 (PDT) 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 E0AF6616D8; Tue, 1 Nov 2022 17:47:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2CD53C433D6; Tue, 1 Nov 2022 17:47:05 +0000 (UTC) Date: Tue, 1 Nov 2022 17:47:01 +0000 From: Catalin Marinas To: Kefeng Wang Cc: Andrew Morton , linux-alpha@vger.kernel.org, linux-kernel@vger.kernel.org, linux-snps-arc@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-csky@vger.kernel.org, linux-hexagon@vger.kernel.org, linux-ia64@vger.kernel.org, loongarch@lists.linux.dev, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, openrisc@lists.librecores.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, linux-um@lists.infradead.org, linux-xtensa@linux-xtensa.org, linux-fsdevel@vger.kernel.org, Richard Henderson , Ivan Kokshaysky , Matt Turner , Vineet Gupta , Russell King , Will Deacon , Guo Ren , Huacai Chen , WANG Xuerui , Geert Uytterhoeven , Greg Ungerer , Michal Simek , Thomas Bogendoerfer , Dinh Nguyen , Jonas Bonn , Stefan Kristiansson , Stafford Horne , "James E . J . Bottomley" , Helge Deller , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Paul Walmsley , Palmer Dabbelt , Albert Ou , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , Yoshinori Sato , Rich Felker , "David S . Miller" , Richard Weinberger , Anton Ivanov , Johannes Berg , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H . Peter Anvin" , Andy Lutomirski , Peter Zijlstra , Chris Zankel , Max Filippov Subject: Re: [PATCH] mm: remove kern_addr_valid() completely Message-ID: References: <20221018074014.185687-1-wangkefeng.wang@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221018074014.185687-1-wangkefeng.wang@huawei.com> X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS 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 Tue, Oct 18, 2022 at 03:40:14PM +0800, Kefeng Wang wrote: > Most architectures(except arm64/x86/sparc) simply return 1 for > kern_addr_valid(), which is only used in read_kcore(), and it > calls copy_from_kernel_nofault() which could check whether the > address is a valid kernel address, so no need kern_addr_valid(), > let's remove unneeded kern_addr_valid() completely. > > Signed-off-by: Kefeng Wang For arm64: Acked-by: Catalin Marinas