From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=217.140.110.172 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796384071; b=p18LFrkviNFdeDEv9meJ0SmPvUjOQo30zugQKhOJA2/9CQuzBbNrgRoSHmfdU8ug1VKp tfXTmWGp/M4LQpV4qeQ+oZWi7hKaqtbjcym7UUIvTGzysKdDp7KW0+eD4dNh+J/lT1Yd+ 0Jp7rZ+sj+dnYEQ4T+VLVNYkvpIH3hXhivq69zoJeAgOhpdrounhO6ar/IkmFBk1hC6Ec JsJATYiNBm9FSuEPo3AAbC7GEuuVI/gBmPIXz8Xr535lOdMGa3YvT0GZItDd92cFlmxW4 BM2yqmijsWS6uxywkpb2Ijd3TcIFxwfExSHthgTqLT1E1quZxHaoWlHycmdl+w0Cu2Q== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796384071; h=DMARC-Filter:Received:Received:DKIM-Signature:Date:From:To:Cc: Subject:Message-ID:References:MIME-Version:Content-Type: Content-Disposition:In-Reply-To; bh=xvIx4FGhTdY0wCUBTghxseVvdut35EX5yF80lFD0VcM=; b=CXjfZDWtI2CrIKoQbvFmidQ4cU/N5JuQ7GgLsv2iZ62ZIkAedE7OcTrQyNBqEK025H3w wwvVWUhQnA6CZHj/ndEiCFsRdm4sikrWEFlE+Cg+QYE71btDHtRa4G593mnAFpiEwnWgs aL7u6a9SLvdcoR9Gsv268jOdomLL9CUa/wbSJHQpypRNICfjAlqcxLSXEl1d6C8Ykd3po /1cnI6bFMAYFxg9gLL5IGc74hXiIPN7J+oX2vdNWeWj+/Yo7zkLbqa4ShQ1wZv2yvp0b2 yT3qzelXlekhCeGEYF+itCGewdViu9dT4Z6lVb2G9kUvkxVOZNo3WoW9B4FtLVMpGlQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=arm.com; spf=pass smtp.mailfrom=arm.com; dkim=pass header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=foss header.b=jVRO6C6Q; arc=none smtp.remote-ip=217.140.110.172 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 72499606A322 for ; Fri, 4 Dec 2026 11:34:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 72499606A322 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=foss header.b=jVRO6C6Q 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-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20261203132517.428942-1-fuad.tabba@linux.dev> 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