Skip to contentSkip to conversation

mm: arm64: advance pte for contpte_ptep_set_access_flags

RFC PATCH In review Barry Song 4 participants 8 messages Aug 31, 2024 – Sep 5, 2024

Subsystems (2)
lore
Share & tools
lore

Barry Song

author
#0 lore raw

RFC PATCH 1/1 mm: arm64: advance pte for contpte_ptep_set_access_flags

From: Barry Song <[email protected]>

Hi Ryan, David,
it seems contpte_ptep_set_access_flags() has never advanced pte pfn, and it is setting all entries' pfn to the first subpage. But I feel quite strange we never have a bug reported. Am I missing something?

Fixes 4602e5757bcc ("arm64/mm: wire up PTE_CONT for user mappings")
Cc Ard Biesheuvel <[email protected]>
Cc John Hubbard <[email protected]>
Cc Mark Rutland <[email protected]>
Cc Catalin Marinas <[email protected]>
Cc David Hildenbrand <[email protected]>
Cc Will Deacon <[email protected]>
---
 arch/arm64/mm/contpte.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
arch/arm64/mm/contpte.c +3 -1
index a3edced29ac1..10dcd2641184 100644
@@ -421,8 +421,10 @@ int contpte_ptep_set_access_flags(struct vm_area_struct *vma,
 		ptep = contpte_align_down(ptep);
 		start_addr = addr = ALIGN_DOWN(addr, CONT_PTE_SIZE);
 
-		for (i = 0; i < CONT_PTES; i++, ptep++, addr += PAGE_SIZE)
+		for (i = 0; i < CONT_PTES; i++, ptep++, addr += PAGE_SIZE) {
 			__ptep_set_access_flags(vma, addr, ptep, entry, 0);
+			entry = pte_advance_pfn(entry, 1);
+		}
 
 		if (dirty)
 			__flush_tlb_range(vma, start_addr, addr,
Signature · 1 line
2.39.3 (Apple Git-146)
#1 lore raw
Quoted 26 lines · Barry Song

From: Barry Song <[email protected]>

Hi Ryan, David,
it seems contpte_ptep_set_access_flags() has never advanced pte pfn, and it is setting all entries' pfn to the first subpage. But I feel quite strange we never have a bug reported. Am I missing something?

Fixes 4602e5757bcc ("arm64/mm: wire up PTE_CONT for user mappings")
Cc Ard Biesheuvel <[email protected]>
Cc John Hubbard <[email protected]>
Cc Mark Rutland <[email protected]>
Cc Catalin Marinas <[email protected]>
Cc David Hildenbrand <[email protected]>
Cc Will Deacon <[email protected]>
---
  arch/arm64/mm/contpte.c | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)
arch/arm64/mm/contpte.c +0 -0
index a3edced29ac1..10dcd2641184 100644
@@ -421,8 +421,10 @@ int contpte_ptep_set_access_flags(struct vm_area_struct *vma,
  		ptep = contpte_align_down(ptep);

arch/arm64/mm/contpte.c int contpte_ptep_set_access_flags(struct vm_area_struct *vma, · line 430

Quoted 10 lines
arch/arm64/mm/contpte.c +3 -1
  		start_addr = addr = ALIGN_DOWN(addr, CONT_PTE_SIZE);
 
-		for (i = 0; i < CONT_PTES; i++, ptep++, addr += PAGE_SIZE)
+		for (i = 0; i < CONT_PTES; i++, ptep++, addr += PAGE_SIZE) {
  			__ptep_set_access_flags(vma, addr, ptep, entry, 0);
+			entry = pte_advance_pfn(entry, 1);
+		}
 
  		if (dirty)
  			__flush_tlb_range(vma, start_addr, addr,

Taking a closer look at __ptep_set_access_flags(), there is:

/* only preserve the access flags and write permission * pte_val(entry) &= PTE_RDONLY | PTE_AF | PTE_WRITE | PTE_DIRTY;

So it looks like it doesn't need the PFN?

OTOH, there is the initial:

if (pte_same(pte, entry))

	return 0;

check that might accelerate things.

So unless I am missing something, this works as expected? (and if the pte_same() would frequently be taken with your change would be worthwile to optimize)

Signature · 3 lines
Cheers,

David / dhildenb
author
#2 lore raw
Quoted 41 lines · David Hildenbrand
Quoted 26 lines · Barry Song

From: Barry Song <[email protected]>

Hi Ryan, David,
it seems contpte_ptep_set_access_flags() has never advanced pte pfn, and it is setting all entries' pfn to the first subpage. But I feel quite strange we never have a bug reported. Am I missing something?

Fixes 4602e5757bcc ("arm64/mm: wire up PTE_CONT for user mappings")
Cc Ard Biesheuvel <[email protected]>
Cc John Hubbard <[email protected]>
Cc Mark Rutland <[email protected]>
Cc Catalin Marinas <[email protected]>
Cc David Hildenbrand <[email protected]>
Cc Will Deacon <[email protected]>
---
  arch/arm64/mm/contpte.c | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)
arch/arm64/mm/contpte.c +0 -0
index a3edced29ac1..10dcd2641184 100644
@@ -421,8 +421,10 @@ int contpte_ptep_set_access_flags(struct vm_area_struct *vma,
              ptep = contpte_align_down(ptep);

arch/arm64/mm/contpte.c int contpte_ptep_set_access_flags(struct vm_area_struct *vma, · line 430

Quoted 10 lines
arch/arm64/mm/contpte.c +3 -1
              start_addr = addr = ALIGN_DOWN(addr, CONT_PTE_SIZE);
 
-             for (i = 0; i < CONT_PTES; i++, ptep++, addr += PAGE_SIZE)
+             for (i = 0; i < CONT_PTES; i++, ptep++, addr += PAGE_SIZE) {
                      __ptep_set_access_flags(vma, addr, ptep, entry, 0);
+                     entry = pte_advance_pfn(entry, 1);
+             }
 
              if (dirty)
                      __flush_tlb_range(vma, start_addr, addr,

Taking a closer look at __ptep_set_access_flags(), there is:

Quoted 4 lines

/* only preserve the access flags and write permission * pte_val(entry) &= PTE_RDONLY | PTE_AF | PTE_WRITE | PTE_DIRTY;

So it looks like it doesn't need the PFN?

right.

Quoted 5 lines

OTOH, there is the initial:

Quoted 8 lines

if (pte_same(pte, entry))

        return 0;

check that might accelerate things.

So unless I am missing something, this works as expected? (and if the pte_same() would frequently be taken with your change would be worthwile to optimize)

Right. From page 1 to page (nr_pages - 1), we consistently get FALSE for pte_same().
This seems quite strange. I think we might need to "fix" it, at least for the sake of code
semantics. on the other hand, if pte_same() is not important, it should be dropped.

Hi Ryan,
what is your take on this?

Quoted 6 lines

--
Cheers,

David / dhildenb

Thanks
Barry

maintainer
#3 lore raw

(Adding Ryan, since you're asking him a question!)

Quoted 83 lines · Barry Song
Quoted 41 lines · David Hildenbrand
Quoted 26 lines · Barry Song

From: Barry Song <[email protected]>

Hi Ryan, David,
it seems contpte_ptep_set_access_flags() has never advanced pte pfn, and it is setting all entries' pfn to the first subpage. But I feel quite strange we never have a bug reported. Am I missing something?

Fixes 4602e5757bcc ("arm64/mm: wire up PTE_CONT for user mappings")
Cc Ard Biesheuvel <[email protected]>
Cc John Hubbard <[email protected]>
Cc Mark Rutland <[email protected]>
Cc Catalin Marinas <[email protected]>
Cc David Hildenbrand <[email protected]>
Cc Will Deacon <[email protected]>
---
  arch/arm64/mm/contpte.c | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)
arch/arm64/mm/contpte.c +0 -0
index a3edced29ac1..10dcd2641184 100644
@@ -421,8 +421,10 @@ int contpte_ptep_set_access_flags(struct vm_area_struct *vma,
              ptep = contpte_align_down(ptep);

arch/arm64/mm/contpte.c int contpte_ptep_set_access_flags(struct vm_area_struct *vma, · line 430

Quoted 10 lines
arch/arm64/mm/contpte.c +3 -1
              start_addr = addr = ALIGN_DOWN(addr, CONT_PTE_SIZE);
 
-             for (i = 0; i < CONT_PTES; i++, ptep++, addr += PAGE_SIZE)
+             for (i = 0; i < CONT_PTES; i++, ptep++, addr += PAGE_SIZE) {
                      __ptep_set_access_flags(vma, addr, ptep, entry, 0);
+                     entry = pte_advance_pfn(entry, 1);
+             }
 
              if (dirty)
                      __flush_tlb_range(vma, start_addr, addr,

Taking a closer look at __ptep_set_access_flags(), there is:

Quoted 4 lines

/* only preserve the access flags and write permission * pte_val(entry) &= PTE_RDONLY | PTE_AF | PTE_WRITE | PTE_DIRTY;

So it looks like it doesn't need the PFN?

right.

Quoted 5 lines

OTOH, there is the initial:

Quoted 8 lines

if (pte_same(pte, entry))

        return 0;

check that might accelerate things.

So unless I am missing something, this works as expected? (and if the pte_same() would frequently be taken with your change would be worthwile to optimize)

Right. From page 1 to page (nr_pages - 1), we consistently get FALSE for pte_same().
This seems quite strange. I think we might need to "fix" it, at least for the sake of code
semantics. on the other hand, if pte_same() is not important, it should be dropped.

Hi Ryan,
what is your take on this?

Quoted 6 lines

--
Cheers,

David / dhildenb

Thanks
Barry

#4 lore raw
Quoted 1 line · Will Deacon

(Adding Ryan, since you're asking him a question!)

Thanks, Will!

Afraid I don't do a good job of monitoring the list; I'm guessing there are automated ways to filter for mentions of my name so I catch this sort of thing in future?

Quoted 44 lines · Barry Song
Quoted 42 lines · David Hildenbrand
Quoted 41 lines · Barry Song
Quoted 26 lines

From: Barry Song <[email protected]>

Hi Ryan, David,
it seems contpte_ptep_set_access_flags() has never advanced pte pfn, and it is setting all entries' pfn to the first subpage. But I feel quite strange we never have a bug reported. Am I missing something?

Fixes 4602e5757bcc ("arm64/mm: wire up PTE_CONT for user mappings")
Cc Ard Biesheuvel <[email protected]>
Cc John Hubbard <[email protected]>
Cc Mark Rutland <[email protected]>
Cc Catalin Marinas <[email protected]>
Cc David Hildenbrand <[email protected]>
Cc Will Deacon <[email protected]>
---
  arch/arm64/mm/contpte.c | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)
arch/arm64/mm/contpte.c +0 -0
index a3edced29ac1..10dcd2641184 100644
@@ -421,8 +421,10 @@ int contpte_ptep_set_access_flags(struct vm_area_struct *vma,
              ptep = contpte_align_down(ptep);

arch/arm64/mm/contpte.c int contpte_ptep_set_access_flags(struct vm_area_struct *vma, · line 430

Quoted 10 lines
arch/arm64/mm/contpte.c +3 -1
              start_addr = addr = ALIGN_DOWN(addr, CONT_PTE_SIZE);
 
-             for (i = 0; i < CONT_PTES; i++, ptep++, addr += PAGE_SIZE)
+             for (i = 0; i < CONT_PTES; i++, ptep++, addr += PAGE_SIZE) {
                      __ptep_set_access_flags(vma, addr, ptep, entry, 0);
+                     entry = pte_advance_pfn(entry, 1);
+             }
 
              if (dirty)
                      __flush_tlb_range(vma, start_addr, addr,

Taking a closer look at __ptep_set_access_flags(), there is:

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

/* only preserve the access flags and write permission * pte_val(entry) &= PTE_RDONLY | PTE_AF | PTE_WRITE | PTE_DIRTY;

So it looks like it doesn't need the PFN?

Correct, I don't believe there is a bug here; __ptep_set_access_flags() only consumes the access flags from entry.

Quoted 5 lines
Quoted 5 lines

right.

Quoted 2 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

OTOH, there is the initial:

if (pte_same(pte, entry))

        return 0;

check that might accelerate things.

There is an equivalent check in contpte_ptep_set_access_flags() which is checking for the whole contpte block and returning early if so. So I don't think there is a problem here either.

Quoted 13 lines
Quoted 13 lines
Quoted 4 lines

So unless I am missing something, this works as expected? (and if the pte_same() would frequently be taken with your change would be worthwile to optimize)

Right. From page 1 to page (nr_pages - 1), we consistently get FALSE for pte_same().
This seems quite strange. I think we might need to "fix" it, at least for the sake of code
semantics. on the other hand, if pte_same() is not important, it should be dropped.

Quoted 2 lines
Quoted 2 lines

Hi Ryan,
what is your take on this?

The code is correct and working as intended, AFAICT. But I accept that this is not exactly obvious. I'd be happy to Rb your proposed change if you feel it clarifies things.

Thanks,
Ryan

Quoted 10 lines
Quoted 10 lines
Quoted 7 lines

--
Cheers,

David / dhildenb

Thanks
Barry

author
#5 lore raw
Quoted 9 lines · Ryan Roberts
Quoted 1 line · Will Deacon

(Adding Ryan, since you're asking him a question!)

Thanks, Will!

Afraid I don't do a good job of monitoring the list; I'm guessing there are automated ways to filter for mentions of my name so I catch this sort of thing in future?

It's not your fault. I just realized that, for some unknown reason, I forgot to CC you.

Quoted 83 lines
Quoted 45 lines · Barry Song
Quoted 42 lines · David Hildenbrand
Quoted 41 lines · Barry Song
Quoted 26 lines

From: Barry Song <[email protected]>

Hi Ryan, David,
it seems contpte_ptep_set_access_flags() has never advanced pte pfn, and it is setting all entries' pfn to the first subpage. But I feel quite strange we never have a bug reported. Am I missing something?

Fixes 4602e5757bcc ("arm64/mm: wire up PTE_CONT for user mappings")
Cc Ard Biesheuvel <[email protected]>
Cc John Hubbard <[email protected]>
Cc Mark Rutland <[email protected]>
Cc Catalin Marinas <[email protected]>
Cc David Hildenbrand <[email protected]>
Cc Will Deacon <[email protected]>
---
  arch/arm64/mm/contpte.c | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)
arch/arm64/mm/contpte.c +0 -0
index a3edced29ac1..10dcd2641184 100644
@@ -421,8 +421,10 @@ int contpte_ptep_set_access_flags(struct vm_area_struct *vma,
              ptep = contpte_align_down(ptep);

arch/arm64/mm/contpte.c int contpte_ptep_set_access_flags(struct vm_area_struct *vma, · line 430

Quoted 10 lines
arch/arm64/mm/contpte.c +3 -1
              start_addr = addr = ALIGN_DOWN(addr, CONT_PTE_SIZE);
 
-             for (i = 0; i < CONT_PTES; i++, ptep++, addr += PAGE_SIZE)
+             for (i = 0; i < CONT_PTES; i++, ptep++, addr += PAGE_SIZE) {
                      __ptep_set_access_flags(vma, addr, ptep, entry, 0);
+                     entry = pte_advance_pfn(entry, 1);
+             }
 
              if (dirty)
                      __flush_tlb_range(vma, start_addr, addr,

Taking a closer look at __ptep_set_access_flags(), there is:

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

/* only preserve the access flags and write permission * pte_val(entry) &= PTE_RDONLY | PTE_AF | PTE_WRITE | PTE_DIRTY;

So it looks like it doesn't need the PFN?

Correct, I don't believe there is a bug here; __ptep_set_access_flags() only consumes the access flags from entry.

Quoted 5 lines
Quoted 5 lines

right.

Quoted 2 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

OTOH, there is the initial:

if (pte_same(pte, entry))

        return 0;

check that might accelerate things.

There is an equivalent check in contpte_ptep_set_access_flags() which is checking for the whole contpte block and returning early if so. So I don't think there is a problem here either.

Quoted 13 lines
Quoted 13 lines
Quoted 4 lines

So unless I am missing something, this works as expected? (and if the pte_same() would frequently be taken with your change would be worthwile to optimize)

Right. From page 1 to page (nr_pages - 1), we consistently get FALSE for pte_same().
This seems quite strange. I think we might need to "fix" it, at least for the sake of code
semantics. on the other hand, if pte_same() is not important, it should be dropped.

Quoted 6 lines
Quoted 2 lines
Quoted 2 lines

Hi Ryan,
what is your take on this?

The code is correct and working as intended, AFAICT. But I accept that this is not exactly obvious. I'd be happy to Rb your proposed change if you feel it clarifies things.

If this is the case, I'd rather add some comments instead in v2?

arch/arm64/mm/contpte.c +0 -0
index a3edced29ac1..55107d27d3f8 100644
@@ -421,6 +421,12 @@ int contpte_ptep_set_access_flags(struct

vm_area_struct *vma,

                ptep = contpte_align_down(ptep);
                start_addr = addr = ALIGN_DOWN(addr, CONT_PTE_SIZE);

+ /*
+ * We are not advancing entry because __ptep_set_access_flags()
+ * only consumes access flags from entry. And since we
have checked

+                * for the whole contpte block and returned early, pte_same()
+                * within __ptep_set_access_flags() is likely false.
+                */
                for (i = 0; i < CONT_PTES; i++, ptep++, addr += PAGE_SIZE)
                        __ptep_set_access_flags(vma, addr, ptep, entry, 0);
Signature · 4 lines
2.39.3 (Apple Git-146)

Thanks
Barry
Reviewed-by
#6 lore raw
Quoted 5 lines · Barry Song
Quoted 4 lines · Ryan Roberts
Quoted 1 line · Will Deacon

(Adding Ryan, since you're asking him a question!)

Quoted 8 lines
Quoted 5 lines

Thanks, Will!

Afraid I don't do a good job of monitoring the list; I'm guessing there are automated ways to filter for mentions of my name so I catch this sort of thing in future?

It's not your fault. I just realized that, for some unknown reason, I forgot to CC you.

No worries. I was just asking if there is a general approach that people take to monitor mail that they are not explicitly cc'ed on, but I guess that's a bit off topic.

Quoted 106 lines
Quoted 84 lines
Quoted 46 lines · Barry Song
Quoted 42 lines · David Hildenbrand
Quoted 41 lines · Barry Song
Quoted 26 lines

From: Barry Song <[email protected]>

Hi Ryan, David,
it seems contpte_ptep_set_access_flags() has never advanced pte pfn, and it is setting all entries' pfn to the first subpage. But I feel quite strange we never have a bug reported. Am I missing something?

Fixes 4602e5757bcc ("arm64/mm: wire up PTE_CONT for user mappings")
Cc Ard Biesheuvel <[email protected]>
Cc John Hubbard <[email protected]>
Cc Mark Rutland <[email protected]>
Cc Catalin Marinas <[email protected]>
Cc David Hildenbrand <[email protected]>
Cc Will Deacon <[email protected]>
---
  arch/arm64/mm/contpte.c | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)
arch/arm64/mm/contpte.c +0 -0
index a3edced29ac1..10dcd2641184 100644
@@ -421,8 +421,10 @@ int contpte_ptep_set_access_flags(struct vm_area_struct *vma,
              ptep = contpte_align_down(ptep);

arch/arm64/mm/contpte.c int contpte_ptep_set_access_flags(struct vm_area_struct *vma, · line 430

Quoted 10 lines
arch/arm64/mm/contpte.c +3 -1
              start_addr = addr = ALIGN_DOWN(addr, CONT_PTE_SIZE);
 
-             for (i = 0; i < CONT_PTES; i++, ptep++, addr += PAGE_SIZE)
+             for (i = 0; i < CONT_PTES; i++, ptep++, addr += PAGE_SIZE) {
                      __ptep_set_access_flags(vma, addr, ptep, entry, 0);
+                     entry = pte_advance_pfn(entry, 1);
+             }
 
              if (dirty)
                      __flush_tlb_range(vma, start_addr, addr,

Taking a closer look at __ptep_set_access_flags(), there is:

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

/* only preserve the access flags and write permission * pte_val(entry) &= PTE_RDONLY | PTE_AF | PTE_WRITE | PTE_DIRTY;

So it looks like it doesn't need the PFN?

Correct, I don't believe there is a bug here; __ptep_set_access_flags() only consumes the access flags from entry.

Quoted 5 lines
Quoted 5 lines

right.

Quoted 2 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

OTOH, there is the initial:

if (pte_same(pte, entry))

        return 0;

check that might accelerate things.

There is an equivalent check in contpte_ptep_set_access_flags() which is checking for the whole contpte block and returning early if so. So I don't think there is a problem here either.

Quoted 13 lines
Quoted 13 lines
Quoted 4 lines

So unless I am missing something, this works as expected? (and if the pte_same() would frequently be taken with your change would be worthwile to optimize)

Right. From page 1 to page (nr_pages - 1), we consistently get FALSE for pte_same().
This seems quite strange. I think we might need to "fix" it, at least for the sake of code
semantics. on the other hand, if pte_same() is not important, it should be dropped.

Quoted 6 lines
Quoted 2 lines
Quoted 2 lines

Hi Ryan,
what is your take on this?

The code is correct and working as intended, AFAICT. But I accept that this is not exactly obvious. I'd be happy to Rb your proposed change if you feel it clarifies things.

If this is the case, I'd rather add some comments instead in v2?

arch/arm64/mm/contpte.c +3 -0
index a3edced29ac1..55107d27d3f8 100644
@@ -421,6 +421,12 @@ int contpte_ptep_set_access_flags(struct
 vm_area_struct *vma,
                ptep = contpte_align_down(ptep);
                start_addr = addr = ALIGN_DOWN(addr, CONT_PTE_SIZE);
 
+               /*
+                * We are not advancing entry because __ptep_set_access_flags()
+                * only consumes access flags from entry. And since we

have checked

arch/arm64/mm/contpte.c

Quoted 5 lines
arch/arm64/mm/contpte.c +3 -0
+                * for the whole contpte block and returned early, pte_same()
+                * within __ptep_set_access_flags() is likely false.
+                */
                for (i = 0; i < CONT_PTES; i++, ptep++, addr += PAGE_SIZE)
                        __ptep_set_access_flags(vma, addr, ptep, entry, 0);

LGTM:

#7 lore raw
Quoted 12 lines · Ryan Roberts
Quoted 11 lines · Barry Song
Quoted 9 lines · Ryan Roberts
Quoted 1 line · Will Deacon

(Adding Ryan, since you're asking him a question!)

Thanks, Will!

Afraid I don't do a good job of monitoring the list; I'm guessing there are automated ways to filter for mentions of my name so I catch this sort of thing in future?

Quoted 6 lines
Quoted 2 lines

It's not your fault. I just realized that, for some unknown reason, I forgot to CC you.

No worries. I was just asking if there is a general approach that people take to monitor mail that they are not explicitly cc'ed on, but I guess that's a bit off topic.

I do something slightly different: I filter mails based on keywords. For example, whenever a patch contains page_mapcount(), folio_mapcount(), folio_mapped(), ... it gets put into a separate "mapcount" folder :) Same regarding file names.

For you, it would probably make sense to filter for contpte or sth like that :)

[...]

Quoted 28 lines
Quoted 20 lines
Quoted 4 lines

The code is correct and working as intended, AFAICT. But I accept that this is not exactly obvious. I'd be happy to Rb your proposed change if you feel it clarifies things.

If this is the case, I'd rather add some comments instead in v2?

arch/arm64/mm/contpte.c +3 -0
index a3edced29ac1..55107d27d3f8 100644
@@ -421,6 +421,12 @@ int contpte_ptep_set_access_flags(struct
 vm_area_struct *vma,
                 ptep = contpte_align_down(ptep);
                 start_addr = addr = ALIGN_DOWN(addr, CONT_PTE_SIZE);
 
+               /*
+                * We are not advancing entry because __ptep_set_access_flags()
+                * only consumes access flags from entry. And since we

have checked

arch/arm64/mm/contpte.c

Quoted 5 lines
arch/arm64/mm/contpte.c +3 -0
+                * for the whole contpte block and returned early, pte_same()
+                * within __ptep_set_access_flags() is likely false.
+                */
                 for (i = 0; i < CONT_PTES; i++, ptep++, addr += PAGE_SIZE)
                         __ptep_set_access_flags(vma, addr, ptep, entry, 0);

LGTM:

Quoted 2 lines
Signature · 3 lines
Cheers,

David / dhildenb