linux-next: manual merge of the mm tree with the efi tree

From: Stephen Rothwell
Date: Tue Jul 26 2022 - 05:46:59 EST


Hi all,

Today's linux-next merge of the mm tree got a conflict in:

mm/internal.h

between commit:

902c2d91582c ("memblock: Disable mirror feature if kernelcore is not specified")

from the efi tree and commit:

9a4722162210 ("mm/mprotect: fix soft-dirty check in can_change_pte_writable()")

from the mm tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

--
Cheers,
Stephen Rothwell

diff --cc mm/internal.h
index b73385df867d,e2d442e3c0b2..000000000000
--- a/mm/internal.h
+++ b/mm/internal.h
@@@ -862,6 -860,22 +860,24 @@@ struct folio *try_grab_folio(struct pag

DECLARE_PER_CPU(struct per_cpu_nodestat, boot_nodestats);

+extern bool mirrored_kernelcore;
+
+ static inline bool vma_soft_dirty_enabled(struct vm_area_struct *vma)
+ {
+ /*
+ * NOTE: we must check this before VM_SOFTDIRTY on soft-dirty
+ * enablements, because when without soft-dirty being compiled in,
+ * VM_SOFTDIRTY is defined as 0x0, then !(vm_flags & VM_SOFTDIRTY)
+ * will be constantly true.
+ */
+ if (!IS_ENABLED(CONFIG_MEM_SOFT_DIRTY))
+ return false;
+
+ /*
+ * Soft-dirty is kind of special: its tracking is enabled when the
+ * vma flags not set.
+ */
+ return !(vma->vm_flags & VM_SOFTDIRTY);
+ }
+
#endif /* __MM_INTERNAL_H */

Attachment: pgp7jgczvjAnz.pgp
Description: OpenPGP digital signature