* [PATCH] mm: use proper PTE accessor in move_ptes()
@ 2026-07-20 14:16 Alexander Gordeev
2026-07-30 11:41 ` Usama Anjum
2026-07-30 13:07 ` David Hildenbrand (Arm)
0 siblings, 2 replies; 6+ messages in thread
From: Alexander Gordeev @ 2026-07-20 14:16 UTC (permalink / raw)
To: linux-mm, linux-kernel; +Cc: Pu Lehui
Follow the pattern established by commit c33c794828f2
("mm: ptep_get() conversion") and use the proper PTE
accessor instead of a direct pointer dereference.
Fixes: b36b701bbcd9 ("mm: expose abnormal new_pte during move_ptes")
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
---
mm/mremap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/mremap.c b/mm/mremap.c
index 0dfe3de39ccc..e99b19a9850b 100644
--- a/mm/mremap.c
+++ b/mm/mremap.c
@@ -264,7 +264,7 @@ static int move_ptes(struct pagetable_move_control *pmc,
for (; old_addr < old_end; old_ptep += nr_ptes, old_addr += nr_ptes * PAGE_SIZE,
new_ptep += nr_ptes, new_addr += nr_ptes * PAGE_SIZE) {
- VM_WARN_ON_ONCE(!pte_none(*new_ptep));
+ VM_WARN_ON_ONCE(!pte_none(ptep_get(new_ptep)));
nr_ptes = 1;
max_nr_ptes = (old_end - old_addr) >> PAGE_SHIFT;
--
2.53.0
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] mm: use proper PTE accessor in move_ptes()
2026-07-20 14:16 [PATCH] mm: use proper PTE accessor in move_ptes() Alexander Gordeev
@ 2026-07-30 11:41 ` Usama Anjum
2026-07-30 13:07 ` David Hildenbrand (Arm)
1 sibling, 0 replies; 6+ messages in thread
From: Usama Anjum @ 2026-07-30 11:41 UTC (permalink / raw)
To: Alexander Gordeev, linux-mm, linux-kernel; +Cc: usama.anjum, Pu Lehui
On 20/07/2026 3:16 pm, Alexander Gordeev wrote:
> Follow the pattern established by commit c33c794828f2
> ("mm: ptep_get() conversion") and use the proper PTE
> accessor instead of a direct pointer dereference.
>
> Fixes: b36b701bbcd9 ("mm: expose abnormal new_pte during move_ptes")
> Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
> ---
> mm/mremap.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/mremap.c b/mm/mremap.c
> index 0dfe3de39ccc..e99b19a9850b 100644
> --- a/mm/mremap.c
> +++ b/mm/mremap.c
> @@ -264,7 +264,7 @@ static int move_ptes(struct pagetable_move_control *pmc,
>
> for (; old_addr < old_end; old_ptep += nr_ptes, old_addr += nr_ptes * PAGE_SIZE,
> new_ptep += nr_ptes, new_addr += nr_ptes * PAGE_SIZE) {
> - VM_WARN_ON_ONCE(!pte_none(*new_ptep));
> + VM_WARN_ON_ONCE(!pte_none(ptep_get(new_ptep)));
I'd the same patch in my RFC branch. Hence:
Reviewed-by: Muhammad Usama Anjum <usama.anjum@arm.com>
>
> nr_ptes = 1;
> max_nr_ptes = (old_end - old_addr) >> PAGE_SHIFT;
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] mm: use proper PTE accessor in move_ptes()
2026-07-20 14:16 [PATCH] mm: use proper PTE accessor in move_ptes() Alexander Gordeev
2026-07-30 11:41 ` Usama Anjum
@ 2026-07-30 13:07 ` David Hildenbrand (Arm)
2026-07-30 13:08 ` David Hildenbrand (Arm)
1 sibling, 1 reply; 6+ messages in thread
From: David Hildenbrand (Arm) @ 2026-07-30 13:07 UTC (permalink / raw)
To: Alexander Gordeev, linux-mm, linux-kernel; +Cc: Pu Lehui
On 7/20/26 16:16, Alexander Gordeev wrote:
> Follow the pattern established by commit c33c794828f2
> ("mm: ptep_get() conversion") and use the proper PTE
> accessor instead of a direct pointer dereference.
>
> Fixes: b36b701bbcd9 ("mm: expose abnormal new_pte during move_ptes")
> Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
> ---
> mm/mremap.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/mremap.c b/mm/mremap.c
> index 0dfe3de39ccc..e99b19a9850b 100644
> --- a/mm/mremap.c
> +++ b/mm/mremap.c
> @@ -264,7 +264,7 @@ static int move_ptes(struct pagetable_move_control *pmc,
>
> for (; old_addr < old_end; old_ptep += nr_ptes, old_addr += nr_ptes * PAGE_SIZE,
> new_ptep += nr_ptes, new_addr += nr_ptes * PAGE_SIZE) {
> - VM_WARN_ON_ONCE(!pte_none(*new_ptep));
> + VM_WARN_ON_ONCE(!pte_none(ptep_get(new_ptep)));
>
> nr_ptes = 1;
> max_nr_ptes = (old_end - old_addr) >> PAGE_SHIFT;
Acked-by: David Hildenbrand (Arm) <david@kernel.org>
--
Cheers,
David
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] mm: use proper PTE accessor in move_ptes()
2026-07-30 13:07 ` David Hildenbrand (Arm)
@ 2026-07-30 13:08 ` David Hildenbrand (Arm)
2026-07-30 14:50 ` Alexander Gordeev
0 siblings, 1 reply; 6+ messages in thread
From: David Hildenbrand (Arm) @ 2026-07-30 13:08 UTC (permalink / raw)
To: Alexander Gordeev, linux-mm, linux-kernel; +Cc: Pu Lehui
On 7/30/26 15:07, David Hildenbrand (Arm) wrote:
> On 7/20/26 16:16, Alexander Gordeev wrote:
>> Follow the pattern established by commit c33c794828f2
>> ("mm: ptep_get() conversion") and use the proper PTE
>> accessor instead of a direct pointer dereference.
>>
>> Fixes: b36b701bbcd9 ("mm: expose abnormal new_pte during move_ptes")
>> Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
>> ---
>> mm/mremap.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/mm/mremap.c b/mm/mremap.c
>> index 0dfe3de39ccc..e99b19a9850b 100644
>> --- a/mm/mremap.c
>> +++ b/mm/mremap.c
>> @@ -264,7 +264,7 @@ static int move_ptes(struct pagetable_move_control *pmc,
>>
>> for (; old_addr < old_end; old_ptep += nr_ptes, old_addr += nr_ptes * PAGE_SIZE,
>> new_ptep += nr_ptes, new_addr += nr_ptes * PAGE_SIZE) {
>> - VM_WARN_ON_ONCE(!pte_none(*new_ptep));
>> + VM_WARN_ON_ONCE(!pte_none(ptep_get(new_ptep)));
>>
>> nr_ptes = 1;
>> max_nr_ptes = (old_end - old_addr) >> PAGE_SHIFT;
>
> Acked-by: David Hildenbrand (Arm) <david@kernel.org>
>
Ah, but I think we should drop the Fixes: tag, or am I missing something?
--
Cheers,
David
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] mm: use proper PTE accessor in move_ptes()
2026-07-30 13:08 ` David Hildenbrand (Arm)
@ 2026-07-30 14:50 ` Alexander Gordeev
2026-07-30 17:06 ` David Hildenbrand (Arm)
0 siblings, 1 reply; 6+ messages in thread
From: Alexander Gordeev @ 2026-07-30 14:50 UTC (permalink / raw)
To: David Hildenbrand (Arm); +Cc: linux-mm, linux-kernel, Pu Lehui
On Thu, Jul 30, 2026 at 03:08:04PM +0200, David Hildenbrand (Arm) wrote:
> On 7/30/26 15:07, David Hildenbrand (Arm) wrote:
> > On 7/20/26 16:16, Alexander Gordeev wrote:
> >> Follow the pattern established by commit c33c794828f2
> >> ("mm: ptep_get() conversion") and use the proper PTE
> >> accessor instead of a direct pointer dereference.
> >>
> >> Fixes: b36b701bbcd9 ("mm: expose abnormal new_pte during move_ptes")
> >> Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
> >> ---
> >> mm/mremap.c | 2 +-
> >> 1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/mm/mremap.c b/mm/mremap.c
> >> index 0dfe3de39ccc..e99b19a9850b 100644
> >> --- a/mm/mremap.c
> >> +++ b/mm/mremap.c
> >> @@ -264,7 +264,7 @@ static int move_ptes(struct pagetable_move_control *pmc,
> >>
> >> for (; old_addr < old_end; old_ptep += nr_ptes, old_addr += nr_ptes * PAGE_SIZE,
> >> new_ptep += nr_ptes, new_addr += nr_ptes * PAGE_SIZE) {
> >> - VM_WARN_ON_ONCE(!pte_none(*new_ptep));
> >> + VM_WARN_ON_ONCE(!pte_none(ptep_get(new_ptep)));
> >>
> >> nr_ptes = 1;
> >> max_nr_ptes = (old_end - old_addr) >> PAGE_SHIFT;
> >
> > Acked-by: David Hildenbrand (Arm) <david@kernel.org>
> >
>
> Ah, but I think we should drop the Fixes: tag, or am I missing something?
No, you do not. I confused it with ptep_get_lockless(), so no bugfix
here. Should I send v2?
> --
> Cheers,
>
> David
Thanks!
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] mm: use proper PTE accessor in move_ptes()
2026-07-30 14:50 ` Alexander Gordeev
@ 2026-07-30 17:06 ` David Hildenbrand (Arm)
0 siblings, 0 replies; 6+ messages in thread
From: David Hildenbrand (Arm) @ 2026-07-30 17:06 UTC (permalink / raw)
To: Alexander Gordeev; +Cc: linux-mm, linux-kernel, Pu Lehui, Andrew Morton
On 7/30/26 16:50, Alexander Gordeev wrote:
> On Thu, Jul 30, 2026 at 03:08:04PM +0200, David Hildenbrand (Arm) wrote:
>> On 7/30/26 15:07, David Hildenbrand (Arm) wrote:
>>>
>>> Acked-by: David Hildenbrand (Arm) <david@kernel.org>
>>>
>>
>> Ah, but I think we should drop the Fixes: tag, or am I missing something?
>
> No, you do not. I confused it with ptep_get_lockless(), so no bugfix
> here. Should I send v2?
I assume Andrew would fixup when applying.
But looks like you missed to CC him? So better send a v1 to make his life easier.
--
Cheers,
David
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-07-30 17:06 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-20 14:16 [PATCH] mm: use proper PTE accessor in move_ptes() Alexander Gordeev
2026-07-30 11:41 ` Usama Anjum
2026-07-30 13:07 ` David Hildenbrand (Arm)
2026-07-30 13:08 ` David Hildenbrand (Arm)
2026-07-30 14:50 ` Alexander Gordeev
2026-07-30 17:06 ` David Hildenbrand (Arm)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®