aboutsummaryrefslogtreecommitdiff
path: root/lib/test_fortify/write_overflow-strncpy-src.c
diff options
context:
space:
mode:
authorArd Biesheuvel <[email protected]>2024-02-27 16:19:11 +0100
committerBorislav Petkov (AMD) <[email protected]>2024-03-04 18:12:16 +0100
commitd6a41f184dcea0814260af2780e147022c11dca8 (patch)
tree9e031b5b8a82e03dc1a071cf138a3e8ba5e14c3c /lib/test_fortify/write_overflow-strncpy-src.c
parent63bed96604205fa0b23c91d268df5f1f1b26faf6 (diff)
x86/startup_64: Simplify calculation of initial page table address
Determining the address of the initial page table to program into CR3 involves: - taking the physical address - adding the SME encryption mask On the primary entry path, the code is mapped using a 1:1 virtual to physical translation, so the physical address can be taken directly using a RIP-relative LEA instruction. On the secondary entry path, the address can be obtained by taking the offset from the virtual kernel base (__START_kernel_map) and adding the physical kernel base. This is implemented in a slightly confusing way, so clean this up. Signed-off-by: Ard Biesheuvel <[email protected]> Signed-off-by: Borislav Petkov (AMD) <[email protected]> Tested-by: Tom Lendacky <[email protected]> Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'lib/test_fortify/write_overflow-strncpy-src.c')
0 files changed, 0 insertions, 0 deletions