Message ID | 1519633227-29832-25-git-send-email-alex.shi@linaro.org |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp3357277lja; Mon, 26 Feb 2018 00:24:07 -0800 (PST) X-Google-Smtp-Source: AH8x224LDFrqv0xZmyTp8+TbGrW6FjHB/cp7bkGnUqSPaxI0Cyr4RoyDpS4SgioYaWzoUu7YTuQy X-Received: by 2002:a17:902:b7c2:: with SMTP id v2-v6mr9738511plz.351.1519633447465; Mon, 26 Feb 2018 00:24:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519633447; cv=none; d=google.com; s=arc-20160816; b=vP6hL/KMIJVfqE0w6FsM6df/OdZKE07Oyzert0whdZ1cinmr9GyFS5W2UDvU5ThmKO MWb6v9Xgn3qm7CG6BpjVOxbrzvRheyJ/ToPvTM1v8fQ8SAKBYz9UebqPjXn9U19PkGCl gFYrzft5KHeXn4F/2o4fpicGK5ZvLvtk/5rF84kxhx+7JMTn0Nefq0bCP2xTbgIpyzw6 k+kn+GbQx6/DecX4eCLHgubflu9et60tZjBoTp1unx2axsEGKF2yCHY+kSk/UQa/Q/Bk nDPQcYgNknlEM9YzQoX1WNXLb6NOcQxntmMjK1Z1Z06RM0eRHWTRYvWiyseBIt9YBuyq 5gCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:to:from:dkim-signature:arc-authentication-results; bh=i1j7Y/8yxFvtha7QKxycJLsEJDbrUtAASAguHbCEvfE=; b=om8gLYkY3+HI3kH62izikZwHQ3Fjk+oZm1t2j+GRB77Nv5GYXmyCZrx4iJvSrRrrij EJSDG4+oTCsxkkCKzf5aoyiQtVXxglDV1eM9IkFZOTmJuExI0FoYt99E4n7XfbMxH3zC texWZlGbm6OkVAjMHWzpNEe2ZuUoAseUanVdQ5zLRnVkFIn8Gff00D+ad9e0fquMC6qw fIvnMuu5MftwwRGZQrIxnmjF3q2srNWOUdwfXyjZBFVIQY98+0KaVh7glFres54++oLD UDmZCB38qsRBc5c6uUCzTxYKHbtqr1cqPupe25bAEXfr1p4kfwRb91iZlCOnl2kEmbfd QFWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CEJiCbWl; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: <linux-kernel-owner@vger.kernel.org> Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b11si5249076pgr.612.2018.02.26.00.24.07; Mon, 26 Feb 2018 00:24:07 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CEJiCbWl; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752579AbeBZIYF (ORCPT <rfc822; dan.rue@linaro.org> + 28 others); Mon, 26 Feb 2018 03:24:05 -0500 Received: from mail-pl0-f66.google.com ([209.85.160.66]:40637 "EHLO mail-pl0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752558AbeBZIYA (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 26 Feb 2018 03:24:00 -0500 Received: by mail-pl0-f66.google.com with SMTP id i6so8867570plt.7 for <linux-kernel@vger.kernel.org>; Mon, 26 Feb 2018 00:24:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references; bh=i1j7Y/8yxFvtha7QKxycJLsEJDbrUtAASAguHbCEvfE=; b=CEJiCbWleySP5jLeh92MpVfuwucYcYtIqYEyq+tq/WZTWIrLSmxxBwsx74HHR2IRQI As4BwTeF+xm+NE7vklxC9XWkSvjwRZqmL/IafolLCeHMEZ2ivDMDiagMG/mMaD2piZ2f N571MwRlH3Qj5k9k2SxMmuDIxo1FYSlbR8830= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=i1j7Y/8yxFvtha7QKxycJLsEJDbrUtAASAguHbCEvfE=; b=ETgxPqvAiWlig5h6VZgMRN3ounmUoNFzkdgcRM+5lL7+4y1Rc3ghtVTvKrh354w2eo KDhZAv0f4ogKD3SK4ywK0DBF5piyv7lbOMFvo1jTybSrJg1fFsNzfNHRk6rPuNkmcLNo NBVbIO6jM+/TdCnfgDWPy9zu8k4wVl4WLF2pSk9zcrfupXT7/lC1BKl8ZDZiLDZQi+Mn dr/7BYtnhpKBDlS8vKatBVPD/jl8FSlHG1l1E5F+M0IDHv+XTcbTzrBgD6Nbay6akXQ/ FYXTaCuXbnbEfhJStkdYLWXZARvvqlDfzjlcdHU7TDUDxxu93sZw1gmMI+E8sbfEq04t VB9g== X-Gm-Message-State: APf1xPDx39NyUO/DwIdjOAYV1u6em/FPEKXvgarJrOmMmdnFETW9iwAk 3uRACesLbCprcFWzl1h6MzWuKw== X-Received: by 2002:a17:902:3341:: with SMTP id a59-v6mr4855144plc.20.1519633439665; Mon, 26 Feb 2018 00:23:59 -0800 (PST) Received: from localhost.localdomain (176.122.172.82.16clouds.com. [176.122.172.82]) by smtp.gmail.com with ESMTPSA id o86sm1422706pfi.87.2018.02.26.00.23.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 26 Feb 2018 00:23:59 -0800 (PST) From: Alex Shi <alex.shi@linaro.org> To: Marc Zyngier <marc.zyngier@arm.com>, Will Deacon <will.deacon@arm.com>, Ard Biesheuvel <ard.biesheuvel@linaro.org>, Catalin Marinas <catalin.marinas@arm.com>, stable@vger.kernel.org, linux-arm-kernel@lists.infradead.org (moderated list:ARM64 PORT (AARCH64 ARCHITECTURE)), linux-kernel@vger.kernel.org (open list) Subject: [PATCH 24/52] arm64: Move BP hardening to check_and_switch_context Date: Mon, 26 Feb 2018 16:19:58 +0800 Message-Id: <1519633227-29832-25-git-send-email-alex.shi@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1519633227-29832-1-git-send-email-alex.shi@linaro.org> References: <1519633227-29832-1-git-send-email-alex.shi@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org |
Series |
None
|
expand
|
diff --git a/arch/arm64/mm/context.c b/arch/arm64/mm/context.c index afc9266..36416e4 100644 --- a/arch/arm64/mm/context.c +++ b/arch/arm64/mm/context.c @@ -221,6 +221,7 @@ void check_and_switch_context(struct mm_struct *mm, unsigned int cpu) raw_spin_unlock_irqrestore(&cpu_asid_lock, flags); switch_mm_fastpath: + arm64_apply_bp_hardening(); cpu_switch_mm(mm->pgd, mm); } @@ -231,8 +232,6 @@ asmlinkage void post_ttbr_update_workaround(void) "ic iallu; dsb nsh; isb", ARM64_WORKAROUND_CAVIUM_27456, CONFIG_CAVIUM_ERRATUM_27456)); - - arm64_apply_bp_hardening(); } static int asids_init(void)