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=-9.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 F11F3C55ABD for ; Fri, 13 Nov 2020 02:40:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9F4BF21D46 for ; Fri, 13 Nov 2020 02:40:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726342AbgKMCkn (ORCPT ); Thu, 12 Nov 2020 21:40:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60140 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726050AbgKMCkm (ORCPT ); Thu, 12 Nov 2020 21:40:42 -0500 Received: from ZenIV.linux.org.uk (zeniv.linux.org.uk [IPv6:2002:c35c:fd02::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4EEEDC0613D6 for ; Thu, 12 Nov 2020 18:40:41 -0800 (PST) Received: from viro by ZenIV.linux.org.uk with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1kdP0q-004lse-UG; Fri, 13 Nov 2020 02:40:33 +0000 Date: Fri, 13 Nov 2020 02:40:32 +0000 From: Al Viro To: Andrew Morton Cc: ansuelsmth@gmail.com, 'Will Deacon' , 'Catalin Marinas' , 'Mark Rutland' , 'Pavel Tatashin' , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: R: [PATCH] arm64: fix missing include in asm uaccess.h Message-ID: <20201113024032.GF3576660@ZenIV.linux.org.uk> References: <20201111004440.8783-1-ansuelsmth@gmail.com> <20201111005826.GY3576660@ZenIV.linux.org.uk> <20201111010910.GZ3576660@ZenIV.linux.org.uk> <000001d6b7c8$bfed23e0$3fc76ba0$@gmail.com> <20201112164809.81f1c14f5d1f1d998f279287@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201112164809.81f1c14f5d1f1d998f279287@linux-foundation.org> Sender: Al Viro Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 12, 2020 at 04:48:09PM -0800, Andrew Morton wrote: > [viro@zeniv.linux.org.uk: use linux/uaccess.h] > Link: https://lkml.kernel.org/r/20201111005826.GY3576660@ZenIV.linux.org.uk > Link: https://lkml.kernel.org/r/20201111004440.8783-1-ansuelsmth@gmail.com > Fixes: df325e05a682 ("arm64: Validate tagged addresses in access_ok() called from kernel threads") > Signed-off-by: Ansuel Smith > Cc: Will Deacon > Cc: Catalin Marinas > Cc: Mark Rutland > Cc: Pavel Tatashin > Cc: > Signed-off-by: Andrew Morton > --- > > arch/arm64/include/asm/uaccess.h | 2 ++ > 1 file changed, 2 insertions(+) > > --- a/arch/arm64/include/asm/uaccess.h~arm64-fix-missing-include-in-asm-uaccessh > +++ a/arch/arm64/include/asm/uaccess.h > @@ -7,6 +7,8 @@ > #ifndef __ASM_UACCESS_H > #define __ASM_UACCESS_H > > +#include > + > #include > #include > #include Huh? You are creating a loop for no reason whatsoever. Again, * asm/uaccess.h should be included only by linux/uaccess.h * asm/uaccess.h should NOT, NOT, NOT! include linux/uaccess.h * any place other than linux/uaccess.h that includes asm/uaccess.h, should include linux/uaccess.h instead (assuming it really needs either of those). The last one applies to arch/arm64/include/asm-prototypes.h - the include of asm/uaccess.h there should be replaced with include of linux/uaccess.h. diff --git a/arch/arm64/include/asm/asm-prototypes.h b/arch/arm64/include/asm/asm-prototypes.h index 1c9a3a0c5fa5..80077350dbc5 100644 --- a/arch/arm64/include/asm/asm-prototypes.h +++ b/arch/arm64/include/asm/asm-prototypes.h @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include diff --git a/arch/nds32/math-emu/fpuemu.c b/arch/nds32/math-emu/fpuemu.c index 46558a15c0dc..6fabf75c19b3 100644 --- a/arch/nds32/math-emu/fpuemu.c +++ b/arch/nds32/math-emu/fpuemu.c @@ -2,7 +2,7 @@ // Copyright (C) 2005-2018 Andes Technology Corporation #include -#include +#include #include #include #include diff --git a/arch/powerpc/kvm/book3s_xive_native.c b/arch/powerpc/kvm/book3s_xive_native.c index d0c2db0e07fa..3a4468cd21b9 100644 --- a/arch/powerpc/kvm/book3s_xive_native.c +++ b/arch/powerpc/kvm/book3s_xive_native.c @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/arch/powerpc/mm/book3s64/radix_pgtable.c b/arch/powerpc/mm/book3s64/radix_pgtable.c index 3adcf730f478..93aaeaf24151 100644 --- a/arch/powerpc/mm/book3s64/radix_pgtable.c +++ b/arch/powerpc/mm/book3s64/radix_pgtable.c @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include #include diff --git a/drivers/s390/net/ctcm_mpc.c b/drivers/s390/net/ctcm_mpc.c index 85a1a4533cbe..88b74ddd88f0 100644 --- a/drivers/s390/net/ctcm_mpc.c +++ b/drivers/s390/net/ctcm_mpc.c @@ -47,7 +47,7 @@ #include #include #include /* instead of ok ? */ -#include /* instead of ok ? */ +#include #include #include #include diff --git a/include/linux/uaccess.h b/include/linux/uaccess.h index c7c6e8b8344d..3743957e207f 100644 --- a/include/linux/uaccess.h +++ b/include/linux/uaccess.h @@ -8,6 +8,11 @@ #include #include +/* + * NOTE: This is the one and only place that has any business trying + * to include asm/uaccess.h; if you see such include anywhere else, + * kill it. + */ #include #ifdef CONFIG_SET_FS