Subject: linux-next: manual merge of the arm64 tree with Linus' tree

From: Stephen Rothwell <[email-masked]>
Date: Tue, 25 Jun 2019 09:31:50 +1000

Hi all,

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

  mm/vmalloc.c

between commit:

  8e41f8726dcf ("mm/vmalloc: Fix calculation of direct map addr range")

from Linus' tree and commit:

  4739d53fcd1d ("arm64/mm: wire up CONFIG_ARCH_HAS_SET_DIRECT_MAP")

from the arm64 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/vmalloc.c
index 4c9e150e5ad3,6bd7b515995c..000000000000
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@@ -2123,22 -2123,11 +2123,11 @@@ static inline void set_area_direct_map(
  /* Handle removing and resetting vm mappings related to the vm_struct. */
  static void vm_remove_mappings(struct vm_struct *area, int deallocate_pages)
  {
 -	unsigned long addr = (unsigned long)area->addr;
  	unsigned long start = ULONG_MAX, end = 0;
  	int flush_reset = area->flags & VM_FLUSH_RESET_PERMS;
 +	int flush_dmap = 0;
  	int i;
  
- 	/*
- 	 * The below block can be removed when all architectures that have
- 	 * direct map permissions also have set_direct_map_() implementations.
- 	 * This is concerned with resetting the direct map any an vm alias with
- 	 * execute permissions, without leaving a RW+X window.
- 	 */
- 	if (flush_reset && !IS_ENABLED(CONFIG_ARCH_HAS_SET_DIRECT_MAP)) {
- 		set_memory_nx((unsigned long)area->addr, area->nr_pages);
- 		set_memory_rw((unsigned long)area->addr, area->nr_pages);
- 	}
- 
  	remove_vm_area(area->addr);
  
  	/* If this is not VM_FLUSH_RESET_PERMS memory, no need for the below. */