Commit 36220f62 authored by Yang Yingliang's avatar Yang Yingliang Committed by Zheng Zengkai
Browse files

Revert "efi/libstub: arm64: Relax 2M alignment again for relocatable kernels"

hulk inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I4VSGH


CVE: NA

--------------------------------

This reverts commit c6d2a109.

I got the following messages when booting kernel:

  EFI stub: Booting Linux Kernel...
  EFI stub: EFI_RNG_PROTOCOL unavailable, KASLR will be disabled
  EFI stub: Using DTB from configuration table
  EFI stub: Exiting boot services and installing virtual address map...

  ...

  [ 0.000000] CPU features: kernel page table isolation forced ON by KASLR
  [ 0.000000] CPU features: detected: Kernel page table isolation (KPTI)
  [ 3.393380] KASLR disabled due to lack of seed

KPTI is forced on by KASLR, but in fact KASLR is not enabled, it's
because kaslr_offset() returns non-zero in kaslr_requires_kpti().

To avoid this problem, when efi kaslr is disabled, make image
MIN_KIMG_ALIGN align which is used to get KASLR offset in
primary_entry(), so kaslr_offset() will returns 0.

Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
Reviewed-by: default avatarXie XiuQi <xiexiuqi@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent 1ec13b62
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment