arm64: Always load shadow stack pointer directly from the task struct
stable inclusion from stable-v5.10.180 commit 9134b5a4647e46a76dbedb3604f0dd1870e19169 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I8FC2O Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=9134b5a4647e46a76dbedb3604f0dd1870e19169 -------------------------------- commit 2198d07c upstream. All occurrences of the scs_load macro load the value of the shadow call stack pointer from the task which is current at that point. So instead of taking a task struct register argument in the scs_load macro to specify the task struct to load from, let's always reference the current task directly. This should make it much harder to exploit any instruction sequences reloading the shadow call stack pointer register from memory. Signed-off-by:Ard Biesheuvel <ardb@kernel.org> Acked-by:
Mark Rutland <mark.rutland@arm.com> Reviewed-by:
Kees Cook <keescook@chromium.org> Link: https://lore.kernel.org/r/20230109174800.3286265-2-ardb@kernel.org Signed-off-by:
Catalin Marinas <catalin.marinas@arm.com> Signed-off-by:
Ard Biesheuvel <ardb@kernel.org> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by:
sanglipeng <sanglipeng1@jd.com>
Loading
Please sign in to comment