From patchwork Tue Nov 24 23:10:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thadeu Lima de Souza Cascardo X-Patchwork-Id: 1405763 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Cgfrh1CKhz9sTc; Wed, 25 Nov 2020 10:10:43 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1khhSK-00031k-T2; Tue, 24 Nov 2020 23:10:40 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1khhSK-00031U-1r for kernel-team@lists.ubuntu.com; Tue, 24 Nov 2020 23:10:40 +0000 Received: from 1.general.cascardo.uk.vpn ([10.172.198.58] helo=localhost.localdomain) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1khhSJ-0002QR-CV for kernel-team@lists.ubuntu.com; Tue, 24 Nov 2020 23:10:39 +0000 From: Thadeu Lima de Souza Cascardo To: kernel-team@lists.ubuntu.com Subject: [SRU Xenial 1/2] powerpc/uaccess-flush: fix corenet64_smp_defconfig build Date: Tue, 24 Nov 2020 20:10:06 -0300 Message-Id: <20201124231007.2309907-2-cascardo@canonical.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20201124231007.2309907-1-cascardo@canonical.com> References: <20201124231007.2309907-1-cascardo@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Daniel Axtens BugLink: https://bugs.launchpad.net/bugs/1905475 Gunter reports problems with the corenet64_smp_defconfig: In file included from arch/powerpc/kernel/ppc_ksyms.c:10:0: arch/powerpc/include/asm/book3s/64/kup-radix.h:11:29: error: redefinition of ‘allow_user_access’ static __always_inline void allow_user_access(void __user *to, const void __user *from, ^~~~~~~~~~~~~~~~~ In file included from arch/powerpc/include/asm/uaccess.h:12:0, from arch/powerpc/kernel/ppc_ksyms.c:8: arch/powerpc/include/asm/kup.h:12:20: note: previous definition of ‘allow_user_access’ was here static inline void allow_user_access(void __user *to, const void __user *from, ^~~~~~~~~~~~~~~~~ This is because ppc_ksyms.c imports asm/book3s/64/kup-radix.h guarded by CONFIG_PPC64, rather than CONFIG_PPC_BOOK3S_64 which it should do. Fix it. Reported-by: Guenter Roeck Signed-off-by: Daniel Axtens (cherry-picked from commit ddedb548ba8501ecbe78f9f61292518745220a8d linux-4.4.y) Signed-off-by: Thadeu Lima de Souza Cascardo --- arch/powerpc/kernel/ppc_ksyms.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/kernel/ppc_ksyms.c b/arch/powerpc/kernel/ppc_ksyms.c index 80eb47113d5d..0f05c85cbde3 100644 --- a/arch/powerpc/kernel/ppc_ksyms.c +++ b/arch/powerpc/kernel/ppc_ksyms.c @@ -6,7 +6,7 @@ #include #include #include -#ifdef CONFIG_PPC64 +#ifdef CONFIG_PPC_BOOK3S_64 #include #endif @@ -50,6 +50,6 @@ EXPORT_SYMBOL(current_stack_pointer); EXPORT_SYMBOL(__arch_clear_user); -#ifdef CONFIG_PPC64 +#ifdef CONFIG_PPC_BOOK3S_64 EXPORT_SYMBOL(do_uaccess_flush); #endif From patchwork Tue Nov 24 23:10:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thadeu Lima de Souza Cascardo X-Patchwork-Id: 1405764 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Cgfrj6hn3z9sRR; Wed, 25 Nov 2020 10:10:45 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1khhSN-00032a-1X; Tue, 24 Nov 2020 23:10:43 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1khhSM-00032R-Fd for kernel-team@lists.ubuntu.com; Tue, 24 Nov 2020 23:10:42 +0000 Received: from 1.general.cascardo.uk.vpn ([10.172.198.58] helo=localhost.localdomain) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1khhSL-0002QR-Ql for kernel-team@lists.ubuntu.com; Tue, 24 Nov 2020 23:10:42 +0000 From: Thadeu Lima de Souza Cascardo To: kernel-team@lists.ubuntu.com Subject: [SRU Xenial 2/2] UBUNTU: SAUCE: powerpc/uaccess: only include kup-radix.h on PPC_BOOK3S_64 Date: Tue, 24 Nov 2020 20:10:07 -0300 Message-Id: <20201124231007.2309907-3-cascardo@canonical.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20201124231007.2309907-1-cascardo@canonical.com> References: <20201124231007.2309907-1-cascardo@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" BugLink: https://bugs.launchpad.net/bugs/1905475 This fixes up backport of upstream commit 9a32a7e78bd0cd9a9b6332cbdc345ee5ffd0c5de ("powerpc/64s: flush L1D after user accesses"). That backport fails to build with configurations that have CONFIG_PPC64 but not CONFIG_PPC_BOOK3S_64, which is used in some flavours of powerpc. Signed-off-by: Thadeu Lima de Souza Cascardo --- arch/powerpc/include/asm/kup.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/include/asm/kup.h b/arch/powerpc/include/asm/kup.h index e87f41cd9615..0935de3bae27 100644 --- a/arch/powerpc/include/asm/kup.h +++ b/arch/powerpc/include/asm/kup.h @@ -6,7 +6,7 @@ #include -#ifdef CONFIG_PPC64 +#ifdef CONFIG_PPC_BOOK3S_64 #include #else static inline void allow_user_access(void __user *to, const void __user *from,