Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp707967rwb; Wed, 16 Nov 2022 06:44:01 -0800 (PST) X-Google-Smtp-Source: AA0mqf5oPq1at32rqDYPPqWLQ94DVURSQs/Qap/VF78eyC0qF3vmldahy+y9bpaCKYXlnhXdiApx X-Received: by 2002:a65:5a4e:0:b0:46f:6afe:d94b with SMTP id z14-20020a655a4e000000b0046f6afed94bmr21145509pgs.72.1668609841101; Wed, 16 Nov 2022 06:44:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668609841; cv=none; d=google.com; s=arc-20160816; b=uGWlEsRZd6Bi6OfCU3ewX+itZls6p8TiHCoBnAK2q0DzHpYTRNlAUrcIh+GMAEzxVG NM3e+KYooITGZZn0QqY3P/IdlGAhHVVy4yDJZc2QKav1KCGPKK9vGP9vE7DctYAIMKa+ 7VCUN77hQ2hv6V6Y6gBmrW2ArYRDA5HBDQdvP5T5q3xxcb7/+4FxreTT4p4sG4JDe/ve jKpG0AGESzuN1xQxVc434GNOEuA29wdviwF0uePCn2pBIrGg23AXZORMCm6O3FYU2jcW P6/FZ5LZfV1/tdwgWyFtbY/jLIchu6IMtVyzwEvMttwbyKedw3J/b+qCXiPGogJioXjD 3TSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=Gnby6m7dxcT3QEAqQHkZ2PwuYsx8JQkkpVScIkZFEww=; b=KhPqqa3tHRHhSUj1sGymjFjSMguHcduEmgAxzsh2+ek/x2EM+411pRG7nhisIZqeKI EBvderIwVj9BkClJLwMnFO8KGDbj91IP2A/2ZKASWLaqAzPwC+vLx9QAJQZ1t0YqQaW+ 4XjLF4Lq2E16q6HSlxD/OzcAKFqrjXHpJa5Js0LRvH496IEpD05SVyY2ZXaU0jTAqcVe HHcDaY3R9OqSxJjNxLkdXMRJY1rYtnLUReTiYJEyZA+pkthvSGI7FAEkbGoOezJvvjjh 5gPgJHjArBeo8NOYv/p+fTc1MvsqRyc/+b9/16mCNageWEPXp3V+a4eJY1KkLLRk38hn aL/w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c2-20020a056a00248200b005631aaf81f2si14288230pfv.183.2022.11.16.06.43.46; Wed, 16 Nov 2022 06:44:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233496AbiKPOKi (ORCPT + 91 others); Wed, 16 Nov 2022 09:10:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44856 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231209AbiKPOKN (ORCPT ); Wed, 16 Nov 2022 09:10:13 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 5DD6FBA3; Wed, 16 Nov 2022 06:09:29 -0800 (PST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 276401477; Wed, 16 Nov 2022 06:09:35 -0800 (PST) Received: from a077893.arm.com (unknown [10.163.40.231]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id EFF573F663; Wed, 16 Nov 2022 06:09:25 -0800 (PST) From: Anshuman Khandual To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, catalin.marinas@arm.com, will@kernel.org Cc: Anshuman Khandual , Suzuki K Poulose , James Morse , Jonathan Corbet , Mark Rutland , linux-doc@vger.kernel.org Subject: [PATCH V3 0/2] arm64: errata: Workaround Cortex-A715 errata #2645198 Date: Wed, 16 Nov 2022 19:39:13 +0530 Message-Id: <20221116140915.356601-1-anshuman.khandual@arm.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This series adds Cortex-A715 partnumber and workarounds the errata #2645198 which gets triggered when an userspace page mapping permission changes from executable to non-executable, corrupting both ESR_EL1/FAR_EL1 registers when an instruction abort is taken. This series applies on v6.1-rc5. The errata description can be found here. https://developer.arm.com/documentation/SDEN2148827/1000/?lang=en Cc: Catalin Marinas Cc: Will Deacon Cc: Suzuki K Poulose Cc: James Morse Cc: Jonathan Corbet Cc: Mark Rutland Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Cc: linux-doc@vger.kernel.org Changes in V3: - Replaced __set_pte_at() with set_pte_at() in ptep_modify_prot_commit() - Dropped local variable 'pte_t pte', replaced with direct READ_ONCE(*ptep) - Moved cpus_have_const_cap() earlier as per Catalin Changes in V2: https://lore.kernel.org/all/20221113012645.190301-1-anshuman.khandual@arm.com/ - Added ptep_modify_prot_start/commit declaration into [asm/pgtable.h] - Moved ptep_modify_prot_start/commit definitions into [arch/arm64/mm/mmu.c] - Above code movements solved ptep_clear_flush() related build dependency - Replaced __flush_tlb_range() with ptep_clear_flush()/huge_ptep_clear_flush() Changes in V1: https://lore.kernel.org/all/20221027023915.1318100-1-anshuman.khandual@arm.com/ Anshuman Khandual (2): arm64: Add Cortex-715 CPU part definition arm64: errata: Workaround possible Cortex-A715 [ESR|FAR]_ELx corruption Documentation/arm64/silicon-errata.rst | 2 ++ arch/arm64/Kconfig | 16 ++++++++++++++++ arch/arm64/include/asm/cputype.h | 2 ++ arch/arm64/include/asm/hugetlb.h | 9 +++++++++ arch/arm64/include/asm/pgtable.h | 9 +++++++++ arch/arm64/kernel/cpu_errata.c | 7 +++++++ arch/arm64/mm/hugetlbpage.c | 21 +++++++++++++++++++++ arch/arm64/mm/mmu.c | 21 +++++++++++++++++++++ arch/arm64/tools/cpucaps | 1 + 9 files changed, 88 insertions(+) -- 2.25.1