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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 49110C433EF for ; Tue, 25 Jan 2022 09:28:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345927AbiAYJ12 (ORCPT ); Tue, 25 Jan 2022 04:27:28 -0500 Received: from ams.source.kernel.org ([145.40.68.75]:51674 "EHLO ams.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1354906AbiAYJP3 (ORCPT ); Tue, 25 Jan 2022 04:15:29 -0500 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 ams.source.kernel.org (Postfix) with ESMTPS id 4911CB81730 for ; Tue, 25 Jan 2022 09:15:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E6DC6C36AE7; Tue, 25 Jan 2022 09:15:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1643102120; bh=xxnXuAM2X8RiqH87OTJXGT/piAFSBEImiMZaqipeFWI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YhVEcVfPonezSZTM7d+ZSwSgOV68BWZnmo7HO9doqB8+7/GWVIAQMi6Qc7OD7il3P bSohmTPQ7oKCTXMIx4asxUIz9JA+h912jeaIEYBGXfxGHZzP6SYJAk2YVqt/9HrP7u 8OBUHZ5UfX5Ak/UbxiygTke80dM1QrAk+44o8coEkgSXKagjuYUelKVGGdnXvU3PWZ hNq3fBNBxGfSRrXWRtBs1ss9DXkV+2DCO8UrRhoTXmH972G15SetSjozttK8fPa7vb IHOZH6uDSF4biIEXlymiWgH/qAHRGtgpeWPqJOzNPuMZcbExRk8Nu5D4qfxgujK/wT BlG0uF2IsSkiQ== From: Ard Biesheuvel To: linux@armlinux.org.uk, linux-arm-kernel@lists.infradead.org Cc: linux-hardening@vger.kernel.org, Ard Biesheuvel , Arnd Bergmann , Kees Cook , Keith Packard , Linus Walleij , Nick Desaulniers , Marc Zyngier Subject: [PATCH v6 7/8] ARM: drop pointless SMP check on secondary startup path Date: Tue, 25 Jan 2022 10:14:52 +0100 Message-Id: <20220125091453.1475246-8-ardb@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220125091453.1475246-1-ardb@kernel.org> References: <20220125091453.1475246-1-ardb@kernel.org> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=740; h=from:subject; bh=xxnXuAM2X8RiqH87OTJXGT/piAFSBEImiMZaqipeFWI=; b=owEB7QES/pANAwAKAcNPIjmS2Y8kAcsmYgBh77+KoLNbnFvtA845WHBMCSCBH1Wd62Cjt7MlR28K Ryln972JAbMEAAEKAB0WIQT72WJ8QGnJQhU3VynDTyI5ktmPJAUCYe+/igAKCRDDTyI5ktmPJL+9C/ 9UbtPJXPKGXGYlhu2Xt6Ks3ysK/ETivNcjSf0FCgR4Udp1Ua/oO/MeCg5c+ELOdwNWTQNpW1sZ5AAC rISQG4vVTh5DpVMh92wW+cOp4TLv/gBkh1UDJW1gLQzWLd3+UyNBEZtEYvQSlcBHRZ9HBLdsWCQR/t kOztlTY5kytaPyjCALqV20nhOKt57bYXi8HyjaECbiM0CqRruarQINXZfi6Wh0yJZ9zMHgxp1sa2Sx sO2EJjDhECunPhnnf//j80qaWvrFMkEh744eCYO7Hadhm6T3kiY2bbpt3K+I752kPU2s05yF3WfR3+ OrqvAfiQClWMEbLIEEQjwJrL9YuLhzFe4z8RBxKnFWjkZhnKxO4bfg+8vqmJXsuccwFalj6UVKrlDK ebhSfn/eWwLv5GKUpUa3irZfGKRnEkZFKVQ18ooBGbFQtcMpjZM6SsXTbOsVHLBs5tOVE9gJW+/pO0 zbK7eD+EkDZwFn4wqL7RqA+f2VCn5/8rR+nj7EPQu31kA= X-Developer-Key: i=ardb@kernel.org; a=openpgp; fpr=F43D03328115A198C90016883D200E9CA6329909 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-hardening@vger.kernel.org Only SMP systems use the secondary startup path by definition, so there is no need for SMP conditionals there. Signed-off-by: Ard Biesheuvel --- arch/arm/kernel/smp.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c index 951559e5bea3..e34efa96cea1 100644 --- a/arch/arm/kernel/smp.c +++ b/arch/arm/kernel/smp.c @@ -405,11 +405,6 @@ static void smp_store_cpu_info(unsigned int cpuid) static void set_current(struct task_struct *cur) { - if (!IS_ENABLED(CONFIG_CURRENT_POINTER_IN_TPIDRURO) && !is_smp()) { - __current = cur; - return; - } - /* Set TPIDRURO */ asm("mcr p15, 0, %0, c13, c0, 3" :: "r"(cur) : "memory"); } -- 2.30.2 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3228FC433EF for ; Tue, 25 Jan 2022 09:44:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=SA8E2kRl9wR1rGTFRU+EyEwOLI/Mtgil/hBBgI7iMLI=; b=Cd7ZtTnZp2lqXu iPFBzSt8ZwVXlB1+DoWK1oDHiM39KLDP7wAD50sSsPwo3YU1ACVHUCVA5G4xTxTRdL1wCQgAjqD6T maOXA8s+16Wyvf/LXvdQbKkwzzva3wLe80hpfBRdzXOJAUPo9re1okxu7lbUWfd0s0qZvqaBvFrFn RGQlK1Mnt5eWn3z1/DrFznQCc6jsB3hqg7Gr3qPwHOnX2wZoytEqFcx1A7gJbq8D7b2aN67vXBOhg 1YlNRT9NGaiid40Rxo9fxagPLGgpKLfkFH73PUqrfjMoSComDZcy916PKY3qAqdEGQkAz8OXQlqy6 DrBWgy2Tyq+SzFicCvZg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nCILQ-007Ed8-8U; Tue, 25 Jan 2022 09:42:33 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nCHv7-0073Sl-BT for linux-arm-kernel@lists.infradead.org; Tue, 25 Jan 2022 09:15:22 +0000 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 94ECF61527; Tue, 25 Jan 2022 09:15:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E6DC6C36AE7; Tue, 25 Jan 2022 09:15:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1643102120; bh=xxnXuAM2X8RiqH87OTJXGT/piAFSBEImiMZaqipeFWI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YhVEcVfPonezSZTM7d+ZSwSgOV68BWZnmo7HO9doqB8+7/GWVIAQMi6Qc7OD7il3P bSohmTPQ7oKCTXMIx4asxUIz9JA+h912jeaIEYBGXfxGHZzP6SYJAk2YVqt/9HrP7u 8OBUHZ5UfX5Ak/UbxiygTke80dM1QrAk+44o8coEkgSXKagjuYUelKVGGdnXvU3PWZ hNq3fBNBxGfSRrXWRtBs1ss9DXkV+2DCO8UrRhoTXmH972G15SetSjozttK8fPa7vb IHOZH6uDSF4biIEXlymiWgH/qAHRGtgpeWPqJOzNPuMZcbExRk8Nu5D4qfxgujK/wT BlG0uF2IsSkiQ== From: Ard Biesheuvel To: linux@armlinux.org.uk, linux-arm-kernel@lists.infradead.org Cc: linux-hardening@vger.kernel.org, Ard Biesheuvel , Arnd Bergmann , Kees Cook , Keith Packard , Linus Walleij , Nick Desaulniers , Marc Zyngier Subject: [PATCH v6 7/8] ARM: drop pointless SMP check on secondary startup path Date: Tue, 25 Jan 2022 10:14:52 +0100 Message-Id: <20220125091453.1475246-8-ardb@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220125091453.1475246-1-ardb@kernel.org> References: <20220125091453.1475246-1-ardb@kernel.org> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=740; h=from:subject; bh=xxnXuAM2X8RiqH87OTJXGT/piAFSBEImiMZaqipeFWI=; b=owEB7QES/pANAwAKAcNPIjmS2Y8kAcsmYgBh77+KoLNbnFvtA845WHBMCSCBH1Wd62Cjt7MlR28K Ryln972JAbMEAAEKAB0WIQT72WJ8QGnJQhU3VynDTyI5ktmPJAUCYe+/igAKCRDDTyI5ktmPJL+9C/ 9UbtPJXPKGXGYlhu2Xt6Ks3ysK/ETivNcjSf0FCgR4Udp1Ua/oO/MeCg5c+ELOdwNWTQNpW1sZ5AAC rISQG4vVTh5DpVMh92wW+cOp4TLv/gBkh1UDJW1gLQzWLd3+UyNBEZtEYvQSlcBHRZ9HBLdsWCQR/t kOztlTY5kytaPyjCALqV20nhOKt57bYXi8HyjaECbiM0CqRruarQINXZfi6Wh0yJZ9zMHgxp1sa2Sx sO2EJjDhECunPhnnf//j80qaWvrFMkEh744eCYO7Hadhm6T3kiY2bbpt3K+I752kPU2s05yF3WfR3+ OrqvAfiQClWMEbLIEEQjwJrL9YuLhzFe4z8RBxKnFWjkZhnKxO4bfg+8vqmJXsuccwFalj6UVKrlDK ebhSfn/eWwLv5GKUpUa3irZfGKRnEkZFKVQ18ooBGbFQtcMpjZM6SsXTbOsVHLBs5tOVE9gJW+/pO0 zbK7eD+EkDZwFn4wqL7RqA+f2VCn5/8rR+nj7EPQu31kA= X-Developer-Key: i=ardb@kernel.org; a=openpgp; fpr=F43D03328115A198C90016883D200E9CA6329909 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220125_011521_456598_1890962E X-CRM114-Status: GOOD ( 11.98 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Only SMP systems use the secondary startup path by definition, so there is no need for SMP conditionals there. Signed-off-by: Ard Biesheuvel --- arch/arm/kernel/smp.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c index 951559e5bea3..e34efa96cea1 100644 --- a/arch/arm/kernel/smp.c +++ b/arch/arm/kernel/smp.c @@ -405,11 +405,6 @@ static void smp_store_cpu_info(unsigned int cpuid) static void set_current(struct task_struct *cur) { - if (!IS_ENABLED(CONFIG_CURRENT_POINTER_IN_TPIDRURO) && !is_smp()) { - __current = cur; - return; - } - /* Set TPIDRURO */ asm("mcr p15, 0, %0, c13, c0, 3" :: "r"(cur) : "memory"); } -- 2.30.2 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel