[PATCH 2/3] arm64: mm: Add an ISB after remapping the KPTI page-table slot

Ryan Roberts ryan.roberts at arm.com
Sat Nov 21 02:48:13 PST 2026


On 20/11/2026 12:16, Fuad Tabba wrote:
> kpti_map_pgtbl remaps a temporary slot with break-before-make, and
> kpti_mk_tbl_ng then reads the page tables through it. The make ends in
> a DSB alone, so the reads can fault on a translation of the slot made
> speculatively before the new entry was written. With the temporary page
> tables in TTBR1 the kernel's vectors are unmapped, and the boot hangs.
> 
> Add an ISB after the DSB.

Reviewed-by: Ryan Roberts <ryan.roberts at arm.com>

> 
> Fixes: 47546a1912fc4 ("arm64: mm: install KPTI nG mappings with MMU enabled")
> Cc: stable at vger.kernel.org
> Signed-off-by: Fuad Tabba <fuad.tabba at linux.dev>
> ---
>  arch/arm64/mm/proc.S | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/arm64/mm/proc.S b/arch/arm64/mm/proc.S
> index 12aacc74f7647..7ca36d59bf77f 100644
> --- a/arch/arm64/mm/proc.S
> +++ b/arch/arm64/mm/proc.S
> @@ -262,6 +262,7 @@ SYM_FUNC_ALIAS(__pi_idmap_cpu_replace_ttbr1, idmap_cpu_replace_ttbr1)
>  	orr	pte, pte, pte_flags
>  	str	pte, [temp_pte, #8 * (\level + 2)]
>  	dsb	nshst
> +	isb
>  	.endm
>  
>  /*




More information about the linux-arm-kernel mailing list