linux/arch
Baoquan He b892cb873c x86/boot/KASLR: Add checking for the offset of kernel virtual address randomization
For kernel text KASLR, the virtual address is confined to area of 1G,
[0xffffffff80000000, 0xffffffffc0000000). For the implemenataion of
virtual address randomization, we only randomize to get an offset
between 16M and 1G, then add this offset to the starting address,
0xffffffff80000000. Here 16M is the offset which is decided at linking
stage. So the amount of the local variable 'virt_addr' which respresents
the offset plus the kernel output size can not exceed KERNEL_IMAGE_SIZE.

Add a debug check for the offset. If out of bounds, print error
message and hang there.

Suggested-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Baoquan He <bhe@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1498567146-11990-2-git-send-email-bhe@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2017-06-30 08:53:14 +02:00
..
alpha osf_wait4(): fix infoleak 2017-05-21 13:10:07 -04:00
arc mm: larger stack guard gap, between vmas 2017-06-19 21:50:20 +08:00
arm mm: larger stack guard gap, between vmas 2017-06-19 21:50:20 +08:00
arm64 arm64/vdso: Fix nsec handling for CLOCK_MONOTONIC_RAW 2017-06-20 10:41:51 +02:00
blackfin uapi: export all headers under uapi directories 2017-05-11 00:21:54 +09:00
c6x uapi: export all headers under uapi directories 2017-05-11 00:21:54 +09:00
cris devicetree: Move include prefixes from arch to separate directory 2017-05-18 23:55:48 -07:00
frv mm: larger stack guard gap, between vmas 2017-06-19 21:50:20 +08:00
h8300 uapi: export all headers under uapi directories 2017-05-11 00:21:54 +09:00
hexagon hexagon: Use raw_copy_to_user 2017-06-10 19:10:31 -07:00
ia64 Kbuild UAPI header export updates for v4.12 2017-05-10 20:45:36 -07:00
m32r uapi: export all headers under uapi directories 2017-05-11 00:21:54 +09:00
m68k uapi: export all headers under uapi directories 2017-05-11 00:21:54 +09:00
metag devicetree: Move include prefixes from arch to separate directory 2017-05-18 23:55:48 -07:00
microblaze uapi: export all headers under uapi directories 2017-05-11 00:21:54 +09:00
mips KVM: MIPS: Fix maybe-uninitialized build failure 2017-06-20 17:02:48 +02:00
mn10300 uapi: export all headers under uapi directories 2017-05-11 00:21:54 +09:00
nios2 nios2 update for v4.12-rc1 2017-05-12 09:53:16 -07:00
openrisc kthread: fix boot hang (regression) on MIPS/OpenRISC 2017-05-29 09:40:54 -07:00
parisc mm: larger stack guard gap, between vmas 2017-06-19 21:50:20 +08:00
powerpc powerpc fixes for 4.12 #7 2017-06-23 17:53:16 -07:00
s390 KVM: s390: fix shadow table handling for nested guests 2017-06-22 16:13:06 +02:00
score uapi: export all headers under uapi directories 2017-05-11 00:21:54 +09:00
sh mm: larger stack guard gap, between vmas 2017-06-19 21:50:20 +08:00
sparc mm: larger stack guard gap, between vmas 2017-06-19 21:50:20 +08:00
tile mm: larger stack guard gap, between vmas 2017-06-19 21:50:20 +08:00
um Merge branch 'for-linus-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml 2017-05-13 10:20:02 -07:00
unicore32 Kbuild UAPI header export updates for v4.12 2017-05-10 20:45:36 -07:00
x86 x86/boot/KASLR: Add checking for the offset of kernel virtual address randomization 2017-06-30 08:53:14 +02:00
xtensa mm: larger stack guard gap, between vmas 2017-06-19 21:50:20 +08:00
.gitignore
Kconfig Merge branch 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-05-10 10:30:46 -07:00