diff options
author | Xin Li (Intel) <[email protected]> | 2024-03-04 00:33:33 -0800 |
---|---|---|
committer | Thomas Gleixner <[email protected]> | 2024-03-07 11:55:36 +0100 |
commit | c416b5bac6ad6ffe21e36225553b82ff2ec1558c (patch) | |
tree | 46827e73fce51e923a6015cd74b7fe1904f91577 /lib/test_fortify/write_overflow-strncpy-src.c | |
parent | e13841907b8fda0ae0ce1ec03684665f578416a8 (diff) |
x86/fred: Fix init_task thread stack pointer initialization
As TOP_OF_KERNEL_STACK_PADDING was defined as 0 on x86_64, it went
unnoticed that the initialization of the .sp field in INIT_THREAD and some
calculations in the low level startup code do not take the padding into
account.
FRED enabled kernels require a 16 byte padding, which means that the init
task initialization and the low level startup code use the wrong stack
offset.
Subtract TOP_OF_KERNEL_STACK_PADDING in all affected places to adjust for
this.
Fixes: 65c9cc9e2c14 ("x86/fred: Reserve space for the FRED stack frame")
Fixes: 3adee777ad0d ("x86/smpboot: Remove initial_stack on 64-bit")
Reported-by: kernel test robot <[email protected]>
Signed-off-by: Xin Li (Intel) <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Closes: https://lore.kernel.org/oe-lkp/[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