Re: [PATCH 02/12] mm/pgtable: add PAE safety to __pte_offset_map()

2023-06-01 Thread Hugh Dickins
On Wed, 31 May 2023, Jason Gunthorpe wrote: > On Sun, May 28, 2023 at 11:16:16PM -0700, Hugh Dickins wrote: > > There is a faint risk that __pte_offset_map(), on a 32-bit architecture > > with a 64-bit pmd_t e.g. x86-32 with CONFIG_X86_PAE=y, would succeed on > > a pmdval assembled from a pmd_low a

Re: [PATCH 02/12] mm/pgtable: add PAE safety to __pte_offset_map()

2023-05-31 Thread Jason Gunthorpe
On Sun, May 28, 2023 at 11:16:16PM -0700, Hugh Dickins wrote: > There is a faint risk that __pte_offset_map(), on a 32-bit architecture > with a 64-bit pmd_t e.g. x86-32 with CONFIG_X86_PAE=y, would succeed on > a pmdval assembled from a pmd_low and a pmd_high which never belonged > together: their

Re: [PATCH 02/12] mm/pgtable: add PAE safety to __pte_offset_map()

2023-05-29 Thread Matthew Wilcox
On Sun, May 28, 2023 at 11:16:16PM -0700, Hugh Dickins wrote: > +#if defined(CONFIG_GUP_GET_PXX_LOW_HIGH) && \ > + (defined(CONFIG_SMP) || defined(CONFIG_PREEMPT_RCU)) > +/* > + * See the comment above ptep_get_lockless() in include/linux/pgtable.h: > + * the barriers in pmdp_get_lockless() can

[PATCH 02/12] mm/pgtable: add PAE safety to __pte_offset_map()

2023-05-28 Thread Hugh Dickins
There is a faint risk that __pte_offset_map(), on a 32-bit architecture with a 64-bit pmd_t e.g. x86-32 with CONFIG_X86_PAE=y, would succeed on a pmdval assembled from a pmd_low and a pmd_high which never belonged together: their combination not pointing to a page table at all, perhaps not even a v