summaryrefslogtreecommitdiff
path: root/kernel/fork.c
diff options
context:
space:
mode:
authorSrinivasarao P <spathi@codeaurora.org>2018-01-09 16:30:10 +0530
committerSrinivasarao P <spathi@codeaurora.org>2018-01-18 12:50:51 +0530
commitde3efc405c531961da26b6b256389ca2f3350460 (patch)
tree644748430b32dea7d5d0178bde8e88007e2788bf /kernel/fork.c
parentfb9c0ae7a810d2724ee293d26462fcaaa33a4703 (diff)
parent5cc8c2ec619e3ce3439b3ae19b22d487e0e3a86b (diff)
Merge android-4.4.110 (5cc8c2e) into msm-4.4
* refs/heads/tmp-5cc8c2e Linux 4.4.110 kaiser: Set _PAGE_NX only if supported x86/kasan: Clear kasan_zero_page after TLB flush x86/vdso: Get pvclock data from the vvar VMA instead of the fixmap x86, vdso, pvclock: Simplify and speed up the vdso pvclock reader KPTI: Report when enabled KPTI: Rename to PAGE_TABLE_ISOLATION x86/kaiser: Move feature detection up kaiser: disabled on Xen PV x86/kaiser: Reenable PARAVIRT x86/paravirt: Dont patch flush_tlb_single kaiser: kaiser_flush_tlb_on_return_to_user() check PCID kaiser: asm/tlbflush.h handle noPGE at lower level kaiser: drop is_atomic arg to kaiser_pagetable_walk() kaiser: use ALTERNATIVE instead of x86_cr3_pcid_noflush x86/kaiser: Check boottime cmdline params x86/kaiser: Rename and simplify X86_FEATURE_KAISER handling kaiser: add "nokaiser" boot option, using ALTERNATIVE kaiser: fix unlikely error in alloc_ldt_struct() kaiser: _pgd_alloc() without __GFP_REPEAT to avoid stalls kaiser: paranoid_entry pass cr3 need to paranoid_exit kaiser: x86_cr3_pcid_noflush and x86_cr3_pcid_user kaiser: PCID 0 for kernel and 128 for user kaiser: load_new_mm_cr3() let SWITCH_USER_CR3 flush user kaiser: enhanced by kernel and user PCIDs kaiser: vmstat show NR_KAISERTABLE as nr_overhead kaiser: delete KAISER_REAL_SWITCH option kaiser: name that 0x1000 KAISER_SHADOW_PGD_OFFSET kaiser: cleanups while trying for gold link kaiser: kaiser_remove_mapping() move along the pgd kaiser: tidied up kaiser_add/remove_mapping slightly kaiser: tidied up asm/kaiser.h somewhat kaiser: ENOMEM if kaiser_pagetable_walk() NULL kaiser: fix perf crashes kaiser: fix regs to do_nmi() ifndef CONFIG_KAISER kaiser: KAISER depends on SMP kaiser: fix build and FIXME in alloc_ldt_struct() kaiser: stack map PAGE_SIZE at THREAD_SIZE-PAGE_SIZE kaiser: do not set _PAGE_NX on pgd_none kaiser: merged update KAISER: Kernel Address Isolation x86/boot: Add early cmdline parsing for options with arguments ANDROID: sdcardfs: Add default_normal option ANDROID: sdcardfs: notify lower file of opens Conflicts: kernel/fork.c Change-Id: I9c8c12e63321d79dc2c89fb470ca8de587366911 Signed-off-by: Srinivasarao P <spathi@codeaurora.org>
Diffstat (limited to 'kernel/fork.c')
-rw-r--r--kernel/fork.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/kernel/fork.c b/kernel/fork.c
index fd49017ad521..4251e3806640 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -59,6 +59,7 @@
#include <linux/tsacct_kern.h>
#include <linux/cn_proc.h>
#include <linux/freezer.h>
+#include <linux/kaiser.h>
#include <linux/delayacct.h>
#include <linux/taskstats_kern.h>
#include <linux/random.h>
@@ -174,6 +175,7 @@ static inline void free_thread_stack(unsigned long *stack)
struct page *page = virt_to_page(stack);
kasan_alloc_pages(page, THREAD_SIZE_ORDER);
+ kaiser_unmap_thread_stack(stack);
__free_kmem_pages(page, THREAD_SIZE_ORDER);
}
# else
@@ -357,6 +359,10 @@ static struct task_struct *dup_task_struct(struct task_struct *orig, int node)
goto free_stack;
tsk->stack = stack;
+
+ err = kaiser_map_thread_stack(tsk->stack);
+ if (err)
+ goto free_stack;
#ifdef CONFIG_SECCOMP
/*
* We must handle setting up seccomp filters once we're under