Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
X86 64: fix a regression issue about kernel stack padding
The commit 48764a1 may cause a regression issue when the CONFIG_X86_FRED is not enabled, this is because the SIZE(fred_frame) will call the SIZE_verify() to determine if the fred_frame is valid, otherwise it will emit an error: crash> bt 1 bt: invalid structure size: fred_frame FILE: x86_64.c LINE: 4089 FUNCTION: x86_64_low_budget_back_trace_cmd() [/home/k-hagio/bin/crash] error trace: 588df3 => 5cbc72 => 5eb3e1 => 5eb366 PID: 1 TASK: ffff9f94c024b980 CPU: 2 COMMAND: "systemd" #0 [ffffade44001bca8] __schedule at ffffffffb948ebbb crash-utility#1 [ffffade44001bd10] schedule at ffffffffb948f04d crash-utility#2 [ffffade44001bd20] schedule_hrtimeout_range_clock at ffffffffb9494fef crash-utility#3 [ffffade44001bda8] ep_poll at ffffffffb8c91be8 crash-utility#4 [ffffade44001be48] do_epoll_wait at ffffffffb8c91d11 crash-utility#5 [ffffade44001be80] __x64_sys_epoll_wait at ffffffffb8c92590 crash-utility#6 [ffffade44001bed0] do_syscall_64 at ffffffffb947f459 crash-utility#7 [ffffade44001bf50] entry_SYSCALL_64_after_hwframe at ffffffffb96000ea 5eb366: SIZE_verify.part.42+70 5eb3e1: SIZE_verify+49 5cbc72: x86_64_low_budget_back_trace_cmd+3010 588df3: back_trace+1523 bt: invalid structure size: fred_frame FILE: x86_64.c LINE: 4089 FUNCTION: x86_64_low_budget_back_trace_cmd() Let's replace the SIZE(fred_frame) with the VALID_SIZE(fred_frame) to fix it. Fixes: 48764a1 ("x86_64: fix for adding top_of_kernel_stack_padding for kernel stack") Reported-by: Kazuhito Hagio <[email protected]> Signed-off-by: Lianbo Jiang <[email protected]>
- Loading branch information