kaiser: stack map PAGE_SIZE at THREAD_SIZE-PAGE_SIZE
authorHugh Dickins <hughd@google.com>
Mon, 4 Sep 2017 01:57:03 +0000 (18:57 -0700)
committerYves-Alexis Perez <corsac@debian.org>
Thu, 4 Jan 2018 11:12:40 +0000 (11:12 +0000)
commited4c9cbdf7fa30c98fbcd3b210d38be5ba29979b
tree0e647dfc5b1d33a5c99c90dd4941da113de78464
parente8d14509f0d7c1583ee25795adfc2a23a8f11002
kaiser: stack map PAGE_SIZE at THREAD_SIZE-PAGE_SIZE

Kaiser only needs to map one page of the stack; and
kernel/fork.c did not build on powerpc (no __PAGE_KERNEL).
It's all cleaner if linux/kaiser.h provides kaiser_map_thread_stack()
and kaiser_unmap_thread_stack() wrappers around asm/kaiser.h's
kaiser_add_mapping() and kaiser_remove_mapping().  And use
linux/kaiser.h in init/main.c to avoid the #ifdefs there.

Signed-off-by: Hugh Dickins <hughd@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Gbp-Pq: Topic features/all/kpti
Gbp-Pq: Name kaiser-stack-map-page_size-at-thread_size-page_size.patch
include/linux/kaiser.h
init/main.c
kernel/fork.c