Commit 5e0d364d authored by Quentin Perret's avatar Quentin Perret Committed by Todd Kjos
Browse files

ANDROID: arm64: gki_defconfig: Disable RANDOMIZE_MODULE_REGION_FULL



By default, enabling RANDOMIZE_BASE on arm64 randomizes not just the
kernel base address, but also the module region independently from the
kernel, over a 4GiB range. As a consequence, modules can be out of
reach for direct branches from/to the kernel, hence creating the need to
resolve function calls via veneers in the module PLT.

While this is good for security, this also introduces a non-negligible
overhead in some benchmarks when parts of the scheduler policy is
factored out in modules, as is the cases with GKI 2.0 on some devices.

To get the performance back, disable RANDOMIZE_MODULE_REGION_FULL, which
limits the range of randomization for the module area to remain within
reach of direct branches. This is clearly a security trade-off as the
module and kernel addresses have a stronger correlation, but this still
remains preferable over the alternative which is no-GKI and having all
drivers compiled into the kernel itself, as Android used to be in
previous generations.

Bug: 168521642
Signed-off-by: default avatarQuentin Perret <qperret@google.com>
Change-Id: I8f4e05fbd308f99f38a4a2b33802ef1e195666e3
parent 4358dcf4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment