Re: [PATCH v3 8/8] mm/mprotect: fix dax pud handlings

2024-07-26 Thread Peter Xu
On Thu, Jul 25, 2024 at 05:23:48PM -0700, James Houghton wrote: > On Thu, Jul 25, 2024 at 3:41 PM Peter Xu wrote: > > > > On Thu, Jul 25, 2024 at 11:29:49AM -0700, James Houghton wrote: > > > > - pages += change_pmd_range(tlb, vma, pud, addr, next, > > > > newprot, > > > > + > > > >

Re: [PATCH v3 8/8] mm/mprotect: fix dax pud handlings

2024-07-25 Thread James Houghton
On Thu, Jul 25, 2024 at 3:41 PM Peter Xu wrote: > > On Thu, Jul 25, 2024 at 11:29:49AM -0700, James Houghton wrote: > > > - pages += change_pmd_range(tlb, vma, pud, addr, next, > > > newprot, > > > + > > > + if (pud_leaf(pud)) { > > > + if ((next

Re: [PATCH v3 8/8] mm/mprotect: fix dax pud handlings

2024-07-25 Thread Peter Xu
On Thu, Jul 25, 2024 at 11:29:49AM -0700, James Houghton wrote: > > - pages += change_pmd_range(tlb, vma, pud, addr, next, > > newprot, > > + > > + if (pud_leaf(pud)) { > > + if ((next - addr != PUD_SIZE) || > > + pgtable_

Re: [PATCH v3 8/8] mm/mprotect: fix dax pud handlings

2024-07-25 Thread James Houghton
On Mon, Jul 15, 2024 at 12:22 PM Peter Xu wrote: > > This is only relevant to the two archs that support PUD dax, aka, x86_64 > and ppc64. PUD THPs do not yet exist elsewhere, and hugetlb PUDs do not > count in this case. > > DAX have had PUD mappings for years, but change protection path never >

[PATCH v3 8/8] mm/mprotect: fix dax pud handlings

2024-07-15 Thread Peter Xu
This is only relevant to the two archs that support PUD dax, aka, x86_64 and ppc64. PUD THPs do not yet exist elsewhere, and hugetlb PUDs do not count in this case. DAX have had PUD mappings for years, but change protection path never worked. When the path is triggered in any form (a simple test