Re: [PATCH v2 2/2] arm64: hugetlb: Fix set_huge_pte_at() to work with all swap entries

2023-09-22 Thread Axel Rasmussen
Looks correct to me - thanks for the fix! Reviewed-by: Axel Rasmussen On Fri, Sep 22, 2023 at 9:41 AM Ryan Roberts wrote: > > On 22/09/2023 17:14, Will Deacon wrote: > > On Fri, Sep 22, 2023 at 12:58:04PM +0100, Ryan Roberts wrote: > >> When called with a swap entry that does not embed a PFN (e

Re: [PATCH v2 2/2] arm64: hugetlb: Fix set_huge_pte_at() to work with all swap entries

2023-09-22 Thread Ryan Roberts
On 22/09/2023 17:14, Will Deacon wrote: > On Fri, Sep 22, 2023 at 12:58:04PM +0100, Ryan Roberts wrote: >> When called with a swap entry that does not embed a PFN (e.g. >> PTE_MARKER_POISONED or PTE_MARKER_UFFD_WP), the previous implementation >> of set_huge_pte_at() would either cause a BUG() to f

Re: [PATCH v2 2/2] arm64: hugetlb: Fix set_huge_pte_at() to work with all swap entries

2023-09-22 Thread Will Deacon
On Fri, Sep 22, 2023 at 12:58:04PM +0100, Ryan Roberts wrote: > When called with a swap entry that does not embed a PFN (e.g. > PTE_MARKER_POISONED or PTE_MARKER_UFFD_WP), the previous implementation > of set_huge_pte_at() would either cause a BUG() to fire (if > CONFIG_DEBUG_VM is enabled) or caus

[PATCH v2 2/2] arm64: hugetlb: Fix set_huge_pte_at() to work with all swap entries

2023-09-22 Thread Ryan Roberts
When called with a swap entry that does not embed a PFN (e.g. PTE_MARKER_POISONED or PTE_MARKER_UFFD_WP), the previous implementation of set_huge_pte_at() would either cause a BUG() to fire (if CONFIG_DEBUG_VM is enabled) or cause a dereference of an invalid address and subsequent panic. arm64's h