]> git.baikalelectronics.ru Git - kernel.git/commit
RISC-V: Align the shadow stack
authorPalmer Dabbelt <palmer@rivosinc.com>
Wed, 30 Nov 2022 02:35:14 +0000 (18:35 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 31 Dec 2022 12:32:38 +0000 (13:32 +0100)
commit58193fcd962e3c7bc323885740edaa3ec52355f3
tree228178b043d9348af1275f07249775c71d99ffd7
parent1c6807d07f1dea1c825cada2d6b5ab01ea94fdb4
RISC-V: Align the shadow stack

[ Upstream commit 00522403cd5527fb7890a24c4d7e94e20defb60c ]

The standard RISC-V ABIs all require 16-byte stack alignment.  We're
only calling that one function on the shadow stack so I doubt it'd
result in a real issue, but might as well keep this lined up.

Fixes: 0ed3552f259f ("riscv: add VMAP_STACK overflow detection")
Reviewed-by: Jisheng Zhang <jszhang@kernel.org>
Link: https://lore.kernel.org/r/20221130023515.20217-1-palmer@rivosinc.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/riscv/kernel/traps.c