Re: [PATCH v3] riscv: cif: reduce shadow stack size limit from 4GB to 2GB

From: David Laight

Date: Mon May 18 2026 - 06:31:22 EST


On Mon, 18 May 2026 10:57:25 +0100
David Laight <david.laight.linux@xxxxxxxxx> wrote:

..
> Actually would it be possible to initially just allocate one page?
> If you get an overflow fault on the shadow stack I think you can
> safely reallocate it at an entirely different user virtual address.
> That would remove all the problems over committing a lot of swap.
> Most threads will never do the 512 nested calls needed to blow the stack.

Forget that - probably breaks setjmp().

-- David