Message ID | 1519633227-29832-25-git-send-email-alex.shi@linaro.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id BFDD360208 for <patchwork-linux-arm@patchwork.kernel.org>; Mon, 26 Feb 2018 09:45:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ADB5329EB9 for <patchwork-linux-arm@patchwork.kernel.org>; Mon, 26 Feb 2018 09:45:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A289F29EC3; Mon, 26 Feb 2018 09:45:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 55C1929EB9 for <patchwork-linux-arm@patchwork.kernel.org>; Mon, 26 Feb 2018 09:45:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=jZ5iMIc0YpoOBMKBdelrSZy4NEnLbltqWHM50KlC4CI=; b=bL+bzfc3j/4l/k cFFkO322QFTx/TQueTG3NOwnxQKjrfbh6O4HRYz2BAM8nClm2tKgXbX4CSf4qm3u9BqgPPqDGvYV9 puCiAGvErZC93MPAyVF6bkwkcyzWVwlxHIAyxWSCQxa+UiXHgDp8yHXEyXtFA9afZNzy/F+m2hUI5 TcPiSfmeV/oKGrLU3dQDR+qOoZImcL6Y700/1VK5bCVvEObXsVsEiclGHCq/BajNT0YRSeaagFxNW fe4sMJKc6cjSCey0l6wUTrUaZpdDHiQ3AnzG0IrhIltPCDd2/IcDoCGi9KoS5hNs4u5N/OgX2/wZQ Iwe2gowzYz00tQyxp3xw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eqFLI-0001QS-4P; Mon, 26 Feb 2018 09:45:08 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eqFIB-0007sG-1w for linux-arm-kernel@bombadil.infradead.org; Mon, 26 Feb 2018 09:41:55 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:To:From:Sender:Reply-To:Cc:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=i1j7Y/8yxFvtha7QKxycJLsEJDbrUtAASAguHbCEvfE=; b=nNSny61fHzD6gimTp8w91kOwp hRZGgqjv+FnoWChkmi3q989noj5kHt6H7P/PbiF8itVXWhKmeVJfgndl5+d+QXy/qek6DpV+cec9k G9eL8RPyY7noSxieZ4AoiTlWAE7sfUrO0Gfyfsphh7MvgJ8SwmhrS4+6zykkngamrLCEUOs12LEmW o8s4koccWEmprFQgf2/oxkZwnVJdKpkwoxDFIK0+eOlnmlPjA2cbpypWyOy3a6OinqfqWufqTDeW6 gVLRMGtZSyzoMlQWjT+vpWyEFNjgtJm6NNzwr6rhhltvPCcBOri5fXdBuJ1oO1HcPef/6xZkBnD98 mOTp3Tf7w==; Received: from mail-pl0-x243.google.com ([2607:f8b0:400e:c01::243]) by merlin.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eqE4y-0003W9-Be for linux-arm-kernel@lists.infradead.org; Mon, 26 Feb 2018 08:24:12 +0000 Received: by mail-pl0-x243.google.com with SMTP id ay8so8854718plb.4 for <linux-arm-kernel@lists.infradead.org>; Mon, 26 Feb 2018 00:24:01 -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=NBb+wu1A+WmOlxD/wzui0SaF94EwN60zRhhjwL++vbG5By0QxUJjbiam7Xznkh1QTl Uw6wBXMBIijIDSm/gN+xEs/kl8lYk5CIDBWMOIa0B7r79auu78OmpOKQywr1K0DeByPx LmtoChXl/jT6vG7c5YgNtRIo3SznX48OAUVbk+b6fQWP1/nHO3JpdS51gIMD8fa6HXgE O67DcHPUrsyDYbOqL5W3tVPOj5YkxLnsjLY7LrSTpByhn7X3MdPcU0TIhL6qlq5FYl8k 1vP30ZtPvTdV65ZBrtH43wZ0zKYGJdD9wn2lArnsPb3br2lM5/XZugryaPbXn+cL5hsp FbLw== X-Gm-Message-State: APf1xPAuRbFFteqRdse1MJKQB7NCg1aGyn8NgZJP1ZuW1awMFlmJxeor WV7A6MiOAOwIgREd8pbWAyAGz5JFDzA= X-Google-Smtp-Source: AG47ELufl0qmkdKDVidMEZTdHEsz0f4xb7hq28FZC1xdfgaVDwaO93LFO+XdwANysvTcZD/BVy1UxA== 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180226_032412_434945_4B0FDB4D X-CRM114-Status: GOOD ( 13.83 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP |
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)