Re: [PATCH 0/2] arm64: mm: Fix a TLBI operand and a TTBR1 write in the KPTI nG rewrite
From: Catalin Marinas
Date: Fri Dec 04 2026 - 06:34:54 EST
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 <catalin.marinas@xxxxxxx>