Merge 4.4.110 into android-4.4
authorGreg Kroah-Hartman <gregkh@google.com>
Sat, 6 Jan 2018 09:53:18 +0000 (10:53 +0100)
committerGreg Kroah-Hartman <gregkh@google.com>
Sat, 6 Jan 2018 09:53:18 +0000 (10:53 +0100)
Changes in 4.4.110
x86/boot: Add early cmdline parsing for options with arguments
KAISER: Kernel Address Isolation
kaiser: merged update
kaiser: do not set _PAGE_NX on pgd_none
kaiser: stack map PAGE_SIZE at THREAD_SIZE-PAGE_SIZE
kaiser: fix build and FIXME in alloc_ldt_struct()
kaiser: KAISER depends on SMP
kaiser: fix regs to do_nmi() ifndef CONFIG_KAISER
kaiser: fix perf crashes
kaiser: ENOMEM if kaiser_pagetable_walk() NULL
kaiser: tidied up asm/kaiser.h somewhat
kaiser: tidied up kaiser_add/remove_mapping slightly
kaiser: kaiser_remove_mapping() move along the pgd
kaiser: cleanups while trying for gold link
kaiser: name that 0x1000 KAISER_SHADOW_PGD_OFFSET
kaiser: delete KAISER_REAL_SWITCH option
kaiser: vmstat show NR_KAISERTABLE as nr_overhead
kaiser: enhanced by kernel and user PCIDs
kaiser: load_new_mm_cr3() let SWITCH_USER_CR3 flush user
kaiser: PCID 0 for kernel and 128 for user
kaiser: x86_cr3_pcid_noflush and x86_cr3_pcid_user
kaiser: paranoid_entry pass cr3 need to paranoid_exit
kaiser: _pgd_alloc() without __GFP_REPEAT to avoid stalls
kaiser: fix unlikely error in alloc_ldt_struct()
kaiser: add "nokaiser" boot option, using ALTERNATIVE
x86/kaiser: Rename and simplify X86_FEATURE_KAISER handling
x86/kaiser: Check boottime cmdline params
kaiser: use ALTERNATIVE instead of x86_cr3_pcid_noflush
kaiser: drop is_atomic arg to kaiser_pagetable_walk()
kaiser: asm/tlbflush.h handle noPGE at lower level
kaiser: kaiser_flush_tlb_on_return_to_user() check PCID
x86/paravirt: Dont patch flush_tlb_single
x86/kaiser: Reenable PARAVIRT
kaiser: disabled on Xen PV
x86/kaiser: Move feature detection up
KPTI: Rename to PAGE_TABLE_ISOLATION
KPTI: Report when enabled
x86, vdso, pvclock: Simplify and speed up the vdso pvclock reader
x86/vdso: Get pvclock data from the vvar VMA instead of the fixmap
x86/kasan: Clear kasan_zero_page after TLB flush
kaiser: Set _PAGE_NX only if supported
Linux 4.4.110

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
13 files changed:
1  2 
Documentation/kernel-parameters.txt
Makefile
arch/x86/entry/entry_64.S
arch/x86/kernel/process.c
arch/x86/mm/Makefile
arch/x86/mm/init_64.c
arch/x86/mm/pageattr.c
include/asm-generic/vmlinux.lds.h
include/linux/mmzone.h
init/main.c
kernel/fork.c
mm/vmstat.c
security/Kconfig

Simple merge
diff --cc Makefile
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc init/main.c
Simple merge
diff --cc kernel/fork.c
index 7b6941926728d94f9dbabf121ea43fd1f1ed34cc,ac00f14208b795739aae97141f19d0c1522757a2..a24b96015538ff6913805deb68dd38c1245c0f1d
@@@ -168,31 -168,30 +169,32 @@@ static unsigned long *alloc_thread_stac
        return page ? page_address(page) : NULL;
  }
  
 -static inline void free_thread_info(struct thread_info *ti)
 +static inline void free_thread_stack(unsigned long *stack)
  {
 -      kaiser_unmap_thread_stack(ti);
 -      free_kmem_pages((unsigned long)ti, THREAD_SIZE_ORDER);
 +      struct page *page = virt_to_page(stack);
 +
++      kaiser_unmap_thread_stack(stack);
 +      __free_kmem_pages(page, THREAD_SIZE_ORDER);
  }
  # else
 -static struct kmem_cache *thread_info_cache;
 +static struct kmem_cache *thread_stack_cache;
  
 -static struct thread_info *alloc_thread_info_node(struct task_struct *tsk,
 +static unsigned long *alloc_thread_stack_node(struct task_struct *tsk,
                                                  int node)
  {
 -      return kmem_cache_alloc_node(thread_info_cache, THREADINFO_GFP, node);
 +      return kmem_cache_alloc_node(thread_stack_cache, THREADINFO_GFP, node);
  }
  
 -static void free_thread_info(struct thread_info *ti)
 +static void free_thread_stack(unsigned long *stack)
  {
 -      kmem_cache_free(thread_info_cache, ti);
 +      kmem_cache_free(thread_stack_cache, stack);
  }
  
 -void thread_info_cache_init(void)
 +void thread_stack_cache_init(void)
  {
 -      thread_info_cache = kmem_cache_create("thread_info", THREAD_SIZE,
 +      thread_stack_cache = kmem_cache_create("thread_stack", THREAD_SIZE,
                                              THREAD_SIZE, 0, NULL);
 -      BUG_ON(thread_info_cache == NULL);
 +      BUG_ON(thread_stack_cache == NULL);
  }
  # endif
  #endif
@@@ -352,9 -351,13 +354,13 @@@ static struct task_struct *dup_task_str
  
        err = arch_dup_task_struct(tsk, orig);
        if (err)
 -              goto free_ti;
 +              goto free_stack;
  
 -      tsk->stack = ti;
 +      tsk->stack = stack;
+       err = kaiser_map_thread_stack(tsk->stack);
+       if (err)
 -              goto free_ti;
++              goto free_stack;
  #ifdef CONFIG_SECCOMP
        /*
         * We must handle setting up seccomp filters once we're under
diff --cc mm/vmstat.c
Simple merge
Simple merge