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)
commit652b2cdb3007be0fbfc0b9c6bab912ea81bc2b5e
tree228178b043d9348af1275f07249775c71d99ffd7
parentee0e9b2c4b9c35837553124b4912230a7e7c7212
RISC-V: Align the shadow stack

[ Upstream commit b003b3b77d65133a0011ae3b7b255347438c12f6 ]

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: 31da94c25aea ("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