From patchwork Wed May 26 19:36:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Catalin Marinas X-Patchwork-Id: 12282693 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 92343C47082 for ; Wed, 26 May 2021 20:26:31 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 548EC613B5 for ; Wed, 26 May 2021 20:26:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 548EC613B5 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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: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:In-Reply-To:References: List-Owner; bh=fQtNyaMzMk71Tkt9ZVC/6cUwTYuWC7luX+zRVKZEktM=; b=GUDhvaSQS/JkpL O/wXySK3HGPR1Pn5vAPfHVWG+dy2GEQTSTX4IcGREim2mJM9TOQoiYljnDiwBCYxeiduKNyTG0bHN qMM6eV8w/kN/IfhhZAjOtHr5EOwCWUTRSuN8U/RE+2yn/JbE4iw3Hj5C0sHEineK1cL9n2GfalI1X I+oxpXKwkTzdS3oQVzIwrVqHSDtHlYt9gfSV8eELfBBT1X8Xa2Nohkmnj6Wqb/1NVXuOfOLpNkdh5 jsIzMpg/p5U2gqI/ZafLPiXsooSi7tTmVOUM+YpuAbgrn3gmNrN8NaXaHT1/SbiFvuNUb3QljU9EQ pqNQDJ1UVN2LZGNFlpeg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lm04F-00HMgv-GY; Wed, 26 May 2021 20:23:52 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1llzKL-00H0um-3x for linux-arm-kernel@lists.infradead.org; Wed, 26 May 2021 19:36:26 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9A06E613CD; Wed, 26 May 2021 19:36:23 +0000 (UTC) From: Catalin Marinas To: linux-arm-kernel@lists.infradead.org Cc: Will Deacon , Mark Rutland , Suzuki K Poulose Subject: [PATCH v2 0/2] arm64: Taint the kernel on different GMID_EL1.BS Date: Wed, 26 May 2021 20:36:19 +0100 Message-Id: <20210526193621.21559-1-catalin.marinas@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-20210526_123625_220363_8A4DCDBC X-CRM114-Status: GOOD ( 10.56 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi, An updated version of the GMID_EL1.BS sanity check since the first one broke the boot on CPUs not supporting MTE. Changes since v1 [1]: - Add an id_aa64pfr1_mte() function to check whether the CPU supports MTE before reading the GMID_EL1 register and updating the sanitised one - Dropped Mark's ack on the second patch because of the changes. [1] https://lore.kernel.org/r/20210511182322.3830-1-catalin.marinas@arm.com Catalin Marinas (2): arm64: Change the cpuinfo_arm64 member type for some sysregs to u64 arm64: Check if GMID_EL1.BS is the same on all CPUs arch/arm64/include/asm/cpu.h | 11 ++++++----- arch/arm64/include/asm/cpufeature.h | 7 +++++++ arch/arm64/kernel/cpufeature.c | 21 +++++++++++++++++++++ arch/arm64/kernel/cpuinfo.c | 5 ++++- 4 files changed, 38 insertions(+), 6 deletions(-)