https://github.com/torvalds/linux
Revision 8ea235932314311f15ea6cf65c1393ed7e31af70 authored by Ard Biesheuvel on 27 January 2019, 08:29:42 UTC, committed by Will Deacon on 01 February 2019, 14:07:23 UTC
Commit 1598ecda7b23 ("arm64: kaslr: ensure randomized quantities are
clean to the PoC") added cache maintenance to ensure that global
variables set by the kaslr init routine are not wiped clean due to
cache invalidation occurring during the second round of page table
creation.

However, if kaslr_early_init() exits early with no randomization
being applied (either due to the lack of a seed, or because the user
has disabled kaslr explicitly), no cache maintenance is performed,
leading to the same issue we attempted to fix earlier, as far as the
module_alloc_base variable is concerned.

Note that module_alloc_base cannot be initialized statically, because
that would cause it to be subject to a R_AARCH64_RELATIVE relocation,
causing it to be overwritten by the second round of KASLR relocation
processing.

Fixes: f80fb3a3d508 ("arm64: add support for kernel ASLR")
Cc: <stable@vger.kernel.org> # v4.6+
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
1 parent 132fdc3
History
Tip revision: 8ea235932314311f15ea6cf65c1393ed7e31af70 authored by Ard Biesheuvel on 27 January 2019, 08:29:42 UTC
arm64: kaslr: ensure randomized quantities are clean also when kaslr is off
Tip revision: 8ea2359
File Mode Size
partitions
Kconfig -rw-r--r-- 6.5 KB
Kconfig.iosched -rw-r--r-- 1.1 KB
Makefile -rw-r--r-- 1.5 KB
badblocks.c -rw-r--r-- 14.5 KB
bfq-cgroup.c -rw-r--r-- 33.5 KB
bfq-iosched.c -rw-r--r-- 193.2 KB
bfq-iosched.h -rw-r--r-- 34.8 KB
bfq-wf2q.c -rw-r--r-- 52.3 KB
bio-integrity.c -rw-r--r-- 12.9 KB
bio.c -rw-r--r-- 52.3 KB
blk-cgroup.c -rw-r--r-- 46.6 KB
blk-core.c -rw-r--r-- 48.5 KB
blk-exec.c -rw-r--r-- 2.5 KB
blk-flush.c -rw-r--r-- 14.4 KB
blk-integrity.c -rw-r--r-- 12.0 KB
blk-ioc.c -rw-r--r-- 10.2 KB
blk-iolatency.c -rw-r--r-- 27.3 KB
blk-lib.c -rw-r--r-- 10.2 KB
blk-map.c -rw-r--r-- 5.9 KB
blk-merge.c -rw-r--r-- 21.8 KB
blk-mq-cpumap.c -rw-r--r-- 1.7 KB
blk-mq-debugfs-zoned.c -rw-r--r-- 435 bytes
blk-mq-debugfs.c -rw-r--r-- 26.3 KB
blk-mq-debugfs.h -rw-r--r-- 2.7 KB
blk-mq-pci.c -rw-r--r-- 1.7 KB
blk-mq-rdma.c -rw-r--r-- 1.7 KB
blk-mq-sched.c -rw-r--r-- 13.2 KB
blk-mq-sched.h -rw-r--r-- 2.6 KB
blk-mq-sysfs.c -rw-r--r-- 8.4 KB
blk-mq-tag.c -rw-r--r-- 14.5 KB
blk-mq-tag.h -rw-r--r-- 2.3 KB
blk-mq-virtio.c -rw-r--r-- 1.7 KB
blk-mq.c -rw-r--r-- 83.9 KB
blk-mq.h -rw-r--r-- 6.8 KB
blk-pm.c -rw-r--r-- 6.6 KB
blk-pm.h -rw-r--r-- 1.4 KB
blk-rq-qos.c -rw-r--r-- 6.3 KB
blk-rq-qos.h -rw-r--r-- 4.4 KB
blk-settings.c -rw-r--r-- 27.0 KB
blk-softirq.c -rw-r--r-- 3.7 KB
blk-stat.c -rw-r--r-- 4.6 KB
blk-stat.h -rw-r--r-- 4.6 KB
blk-sysfs.c -rw-r--r-- 25.2 KB
blk-throttle.c -rw-r--r-- 67.9 KB
blk-timeout.c -rw-r--r-- 3.7 KB
blk-wbt.c -rw-r--r-- 19.9 KB
blk-wbt.h -rw-r--r-- 3.0 KB
blk-zoned.c -rw-r--r-- 11.7 KB
blk.h -rw-r--r-- 10.1 KB
bounce.c -rw-r--r-- 9.1 KB
bsg-lib.c -rw-r--r-- 9.8 KB
bsg.c -rw-r--r-- 12.5 KB
cmdline-parser.c -rw-r--r-- 4.9 KB
compat_ioctl.c -rw-r--r-- 10.9 KB
elevator.c -rw-r--r-- 16.4 KB
genhd.c -rw-r--r-- 49.5 KB
ioctl.c -rw-r--r-- 15.3 KB
ioprio.c -rw-r--r-- 5.1 KB
kyber-iosched.c -rw-r--r-- 28.3 KB
mq-deadline.c -rw-r--r-- 20.6 KB
opal_proto.h -rw-r--r-- 9.3 KB
partition-generic.c -rw-r--r-- 17.1 KB
scsi_ioctl.c -rw-r--r-- 19.1 KB
sed-opal.c -rw-r--r-- 58.8 KB
t10-pi.c -rw-r--r-- 7.9 KB

back to top