From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 87834606A322 for ; Fri, 4 Dec 2026 11:39:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=JXcDrvS5; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=foss header.b=jVRO6C6Q DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Unsubscribe-Post:List-Owner; bh=xvIx4FGhTdY0wCUBTghxseVvdut35EX5yF80lFD0VcM=; b=JXcDrvS5RLP6OoGQ8wreVaxG6b xdKuxX7UQFC2NWrgWVKAa+3QzntCwoP8w/ORpjd3XSLl/Bbg64mVIkxoJdt3z9FfYyZBFrgl2ELhH 3H61CVtOmHQfsz/jjThV3Hyuy6AJg7Bwa1THsEhdSVlcUzT1n7yOzm3nHar9Pbd6B6LkHvyJLMi9K zq0Ti2OnDZyKI+XX/Xth3qoW6a5jr6h7vjgccLPfsd8i/EgRNw0QO6zK6KzfG0ayc/uFUYHxikuYr 7hMp5HGGifGCWVpg4WmdEpaZHSWSaLyP8y58NsMmbsfB3fBLTktpMlc+x9dbwFR8od1vX4fIIaEeV PoHy6hbg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZRbs-00000000ACt-36Eg; Fri, 04 Dec 2026 11:37:57 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZRYe-00000000A7C-0OHd for linux-arm-kernel@lists.infradead.org; Fri, 04 Dec 2026 11:37:08 +0000 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 D612B14BF; Fri, 4 Dec 2026 03:34:27 -0800 (PST) Received: from arm.com (usa-sjc-mx-foss1.foss.arm.com [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 943AA3F632; Fri, 4 Dec 2026 03:34:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss; t=1796384070; bh=TnkUZjTZkqHAzyy+yBLj9YYyEXyTekLsELrsOfYe/3c=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=jVRO6C6QdTz2OGsmFaKveqEEkiQnBfA27orhBp9UTb37FHMtdNa3KYi1/YMe3fsYz RNm2cawjilu2lFuiyjX+msbqtb25LcdrKB3Jel3q1mWF87zMj9JmPLqJIWneVK13lL DLRvKo7ZCCbZKkkzKzbJz5PyXDs2kdUlbkPYyr8o= Date: Fri, 4 Dec 2026 11:34:22 +0000 From: Catalin Marinas To: Fuad Tabba Cc: Will Deacon , Mark Rutland , Ard Biesheuvel , Ryan Roberts , Anshuman Khandual , Kevin Brodsky , Vladimir Murzin , Carl Worth , Linu Cherian , Yeoreum Yun , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Fuad Tabba Subject: Re: [PATCH 0/2] arm64: mm: Fix a TLBI operand and a TTBR1 write in the KPTI nG rewrite Message-ID: References: <20261203132517.428942-1-fuad.tabba@linux.dev> X-Archived-By: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20261203132517.428942-1-fuad.tabba@linux.dev> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261204_033600_161117_36E21308 X-CRM114-Status: GOOD ( 15.64 ) X-Spam-Score: -4.4 (----) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" X-Spam-Status: No, score=-11.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 On Thu, Dec 03, 2026 at 01:25:15PM +0000, Fuad Tabba wrote: > This series fixes a TLBI operand and a TTBR1_EL1 write in > idmap_kpti_install_ng_mappings(). Both came up while I was working on > the ISB fix to the same code [1]. > > The first masks the TLBI operand in kpti_map_pgtbl(). Its upper bits > hold a wrong TTL hint on 4K and 16K kernels, which can leave kernel > mappings global. I couldn't find a CPU with FEAT_TTL that requires > KPTI, so hitting this takes kpti=on. The Falkor workaround in > tramp_map_kernel has the same unmasked operand. I left it alone, as > AFAICT the CPUs with that erratum predate FEAT_TTL. > > The second converts the temporary pgd's address before writing it to > TTBR1_EL1, which changes the value only for tables above 2^48 on a > 52-bit PA kernel. > > Both bugs were introduced by commit 47546a1912fc4 ("arm64: mm: install > KPTI nG mappings with MMU enabled"). I left out the Fixes: tags, as I > don't think either is worth a backport. We could add Fixes: but without cc: stable. Anyway, we can do this when applying (well, the Sasha's bot may pick them up either way). I don't think it's worth queuing for -rc6, so I'll leave them to Will. Reviewed-by: Catalin Marinas