Re: [PATCH v2 3/3] mm: Protect kernel pgtables in apply_to_pte_range()

2025-04-10 Thread Andrew Morton
On Thu, 10 Apr 2025 16:50:33 +0200 Alexander Gordeev wrote: > On Tue, Apr 08, 2025 at 06:07:32PM +0200, Alexander Gordeev wrote: > > Hi Andrew, > > > The lazy MMU mode can only be entered and left under the protection > > of the page table locks for all page tables which may be modified. > >

Re: [PATCH v2 3/3] mm: Protect kernel pgtables in apply_to_pte_range()

2025-04-10 Thread Alexander Gordeev
On Tue, Apr 08, 2025 at 06:07:32PM +0200, Alexander Gordeev wrote: Hi Andrew, > The lazy MMU mode can only be entered and left under the protection > of the page table locks for all page tables which may be modified. Heiko Carstens noticed that the above claim is not valid, since v6.15-rc1 commi

[PATCH v2 3/3] mm: Protect kernel pgtables in apply_to_pte_range()

2025-04-08 Thread Alexander Gordeev
The lazy MMU mode can only be entered and left under the protection of the page table locks for all page tables which may be modified. Yet, when it comes to kernel mappings apply_to_pte_range() does not take any locks. That does not conform arch_enter|leave_lazy_mmu_mode() semantics and could poten