From patchwork Mon Jan 14 10:35:26 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marc Zyngier X-Patchwork-Id: 10762057 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BFD06139A for ; Mon, 14 Jan 2019 10:35:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B200328B44 for ; Mon, 14 Jan 2019 10:35:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A628528B4F; Mon, 14 Jan 2019 10:35:46 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED 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 5E4A128B44 for ; Mon, 14 Jan 2019 10:35:46 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=Wfht1vvHGgFFN1VTJQeYxJcPPSGAokQcCwgJ9KeAfpE=; b=c0I0yQJsoA6atr W0S9aCj84umUxbqzKR9x4Iu6GMPKWLqm6/PRXUj60hiUOCCbj9ouFYfocyyghVRENYLSKPApYSSnE 6Y04Mav4EgK7rpC5X1CplO9I157NI1QXiS18bFGVqKczY6wGi1T6yqZH88Mt08JdzASJ1Wk+ltXiO UU8ETNZJbqd92Xs+lKFQdtngs2QtgdsbnYf0BfZpRVoETZm76oE9XmYmUNMxen27pCHCZwLI6PONO 2lHaCWe4Qz3/m8UZ2zBTjFKuclhLQuxPZ6ikCAjbJrRhKfQQ77bQH5jChxNokgVHg399kd5gCdbhx zS8JycUdc8WrmRnyDumg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gizaq-00013x-Lu; Mon, 14 Jan 2019 10:35:44 +0000 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70] helo=foss.arm.com) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gizal-0000yX-KK for linux-arm-kernel@lists.infradead.org; Mon, 14 Jan 2019 10:35:42 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A20F580D; Mon, 14 Jan 2019 02:35:38 -0800 (PST) Received: from filthy-habits.cambridge.arm.com (filthy-habits.cambridge.arm.com [10.1.196.62]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 92E6F3F5BD; Mon, 14 Jan 2019 02:35:37 -0800 (PST) From: Marc Zyngier To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 0/2] Spectre-v2 detection fixes Date: Mon, 14 Jan 2019 10:35:26 +0000 Message-Id: <20190114103528.52931-1-marc.zyngier@arm.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190114_023540_162650_70579A0D X-CRM114-Status: UNSURE ( 9.30 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Catalin Marinas , Will Deacon , Jeremy Linton Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP These two patches, now built on top of Jeremy's sysfs series, tweak the way we detect the Spectre-v2 vulnerability by switching from a blacklist to a whitelist, making sure we correctly detect unmitigated systems. We further improve things by relying on firmware to tell us about CPUs that are part of an affected system, but that are not affected themselves (big-little type). For convenience, I've pushed out a branch containing both Jeremy's v3 series and these patches at [1]. [1] git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git arm64/spectre-sysfs Marc Zyngier (2): arm64: Advertise mitigation of Spectre-v2, or lack thereof arm64: Use firmware to detect CPUs that are not affected by Spectre-v2 arch/arm64/kernel/cpu_errata.c | 141 +++++++++++++++++---------------- 1 file changed, 73 insertions(+), 68 deletions(-)