Re: [PATCH] riscv: Support RANDOMIZE_KSTACK_OFFSET

2023-11-08 Thread Palmer Dabbelt
On Wed, 08 Nov 2023 15:52:34 PST (-0800), keesc...@chromium.org wrote: On Wed, Nov 01, 2023 at 02:44:23PM +0800, Song Shuai wrote: Inspired from arm64's implement -- commit 70918779aec9 ("arm64: entry: Enable random_kstack_offset support") Add support of kernel stack offset randomization while

Re: [PATCH] riscv: Support RANDOMIZE_KSTACK_OFFSET

2023-11-08 Thread Kees Cook
On Wed, Nov 01, 2023 at 02:44:23PM +0800, Song Shuai wrote: > Inspired from arm64's implement -- commit 70918779aec9 > ("arm64: entry: Enable random_kstack_offset support") > > Add support of kernel stack offset randomization while handling syscall, > the offset is defaultly limited by KSTACK_OFFS

Re: [PATCH] riscv: Support RANDOMIZE_KSTACK_OFFSET

2023-11-01 Thread Damien Le Moal
On 11/1/23 15:44, Song Shuai wrote: > Inspired from arm64's implement -- commit 70918779aec9 > ("arm64: entry: Enable random_kstack_offset support") > > Add support of kernel stack offset randomization while handling syscall, > the offset is defaultly limited by KSTACK_OFFSET_MAX() (i.e. 10 bits).

[PATCH] riscv: Support RANDOMIZE_KSTACK_OFFSET

2023-10-31 Thread Song Shuai
Inspired from arm64's implement -- commit 70918779aec9 ("arm64: entry: Enable random_kstack_offset support") Add support of kernel stack offset randomization while handling syscall, the offset is defaultly limited by KSTACK_OFFSET_MAX() (i.e. 10 bits). In order to avoid trigger stack canaries (du