Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'for-next/fixes' into for-next/core

Merge in arm64 fixes queued for 6.7 so that kpti_install_ng_mappings()
can be updated to use arm64_kernel_unmapped_at_el0() instead of checking
the ARM64_UNMAP_KERNEL_AT_EL0 CPU capability directly.

* for-next/fixes:
arm64: mm: Always make sw-dirty PTEs hw-dirty in pte_modify
perf/arm-cmn: Fail DTC counter allocation correctly
arm64: Avoid enabling KPTI unnecessarily

+11 -1
+6
arch/arm64/include/asm/pgtable.h
··· 834 834 pte = set_pte_bit(pte, __pgprot(PTE_DIRTY)); 835 835 836 836 pte_val(pte) = (pte_val(pte) & ~mask) | (pgprot_val(newprot) & mask); 837 + /* 838 + * If we end up clearing hw dirtiness for a sw-dirty PTE, set hardware 839 + * dirtiness again. 840 + */ 841 + if (pte_sw_dirty(pte)) 842 + pte = pte_mkdirty(pte); 837 843 return pte; 838 844 } 839 845
+4
arch/arm64/kernel/cpufeature.c
··· 1843 1843 1844 1844 static void __init kpti_install_ng_mappings(void) 1845 1845 { 1846 + /* Check whether KPTI is going to be used */ 1847 + if (!arm64_kernel_unmapped_at_el0()) 1848 + return; 1849 + 1846 1850 /* 1847 1851 * We don't need to rewrite the page-tables if either we've done 1848 1852 * it already or we have KASLR enabled and therefore have not
+1 -1
drivers/perf/arm-cmn.c
··· 1816 1816 idx = 0; 1817 1817 while (cmn->dtc[j].counters[idx]) 1818 1818 if (++idx == CMN_DT_NUM_COUNTERS) 1819 - goto free_dtms; 1819 + return -ENOSPC; 1820 1820 } 1821 1821 hw->dtc_idx[j] = idx; 1822 1822 }