Skip to contentSkip to conversation

linux-next: Build failure after merge of the tip tree

PATCH [email protected] 2 participants 2 messages Apr 19, 2023

Subsystems (4)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

Hi all,

After merging the rcu tree, today's linux-next build (arm64 defconfig) failed like this:

/tmp/next/build/mm/migrate.c: In function 'remove_migration_pte':
/tmp/next/build/mm/migrate.c:222:31: error: too few arguments to function 'pte_mkwrite'

  222 |                         pte = pte_mkwrite(pte);
      |                               ^~~~~~~~~~~
In file included from /tmp/next/build/include/linux/pgtable.h:6,
                 from /tmp/next/build/include/linux/mm.h:29,
                 from /tmp/next/build/include/linux/migrate.h:5,
                 from /tmp/next/build/mm/migrate.c:16:
/tmp/next/build/arch/arm64/include/asm/pgtable.h:190:21: note: declared here
  190 | static inline pte_t pte_mkwrite(pte_t pte, struct vm_area_struct *vma)
      |                     ^~~~~~~~~~~

Caused by commit

717f95b494ac36 ("mm: don't check VMA write permissions if the PTE/PMD indicates write permissions")

from the mm tree interacting with

74fd30bd28e4c7 ("mm: Make pte_mkwrite() take a VMA")

from the tip tree. I've applied the fixup below

mm/huge_memory.c +2 -2
index 1cc86d0a669e8..c3cc20c1b26cb 100644
@@ -2235,7 +2235,7 @@ static void __split_huge_pmd_locked(struct vm_area_struct *vma, pmd_t *pmd,
 		} else {
 			entry = mk_pte(page + i, READ_ONCE(vma->vm_page_prot));
 			if (write)
-				entry = pte_mkwrite(entry);
+				entry = pte_mkwrite(entry, vma);
 			if (anon_exclusive)
 				SetPageAnonExclusive(page + i);
 			if (!young)
@@ -3272,7 +3272,7 @@ void remove_migration_pmd(struct page_vma_mapped_walk *pvmw, struct page *new)
 	if (pmd_swp_soft_dirty(*pvmw->pmd))
 		pmde = pmd_mksoft_dirty(pmde);
 	if (is_writable_migration_entry(entry))
-		pmde = pmd_mkwrite(pmde);
+		pmde = pmd_mkwrite(pmde, vma);
 	if (pmd_swp_uffd_wp(*pvmw->pmd))
 		pmde = pmd_mkuffd_wp(pmde);
 	if (!is_migration_entry_young(entry))
mm/migrate.c +1 -1
index 01cac26a31279..8b46b722f1a44 100644
@@ -219,7 +219,7 @@ static bool remove_migration_pte(struct folio *folio,
 		if (folio_test_dirty(folio) && is_migration_entry_dirty(entry))
 			pte = pte_mkdirty(pte);
 		if (is_writable_migration_entry(entry))
-			pte = pte_mkwrite(pte);
+			pte = pte_mkwrite(pte, vma);
 		else if (pte_swp_uffd_wp(*pvmw.pte))
 			pte = pte_mkuffd_wp(pte);
 
Signature · 1 line
2.30.2
#1 lore raw
Quoted 19 lines · On Wed, Apr 19, 2023 at 07:21:36PM +0100, [email protected] wrote:

Hi all,

After merging the rcu tree, today's linux-next build (arm64 defconfig) failed like this:

/tmp/next/build/mm/migrate.c: In function 'remove_migration_pte':
/tmp/next/build/mm/migrate.c:222:31: error: too few arguments to function 'pte_mkwrite'

  222 |                         pte = pte_mkwrite(pte);
      |                               ^~~~~~~~~~~
In file included from /tmp/next/build/include/linux/pgtable.h:6,
                 from /tmp/next/build/include/linux/mm.h:29,
                 from /tmp/next/build/include/linux/migrate.h:5,
                 from /tmp/next/build/mm/migrate.c:16:
/tmp/next/build/arch/arm64/include/asm/pgtable.h:190:21: note: declared here
  190 | static inline pte_t pte_mkwrite(pte_t pte, struct vm_area_struct *vma)
      |                     ^~~~~~~~~~~

Caused by commit

Quoted 7 lines

717f95b494ac36 ("mm: don't check VMA write permissions if the PTE/PMD indicates write permissions")

from the mm tree interacting with

74fd30bd28e4c7 ("mm: Make pte_mkwrite() take a VMA")

from the tip tree. I've applied the fixup below

Thanks for letting us know - we'll keep this in mind when sending the piles of patches to Linus next week.

Signature · 4 lines
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette