riscv: signal: Report signal frame size to userspace via auxv
The vector register belongs to the signal context. They need to be stored and restored as entering and leaving the signal handler. According to the V-extension specification, the maximum length of the vector registers can be 2^(XLEN-1). Hence, if userspace refers to the MINSIGSTKSZ to create a sigframe, it may not be enough. To resolve this problem, this patch refers to the commit 94b07c1f ("arm64: signal: Report signal frame size to userspace via auxv") to enable userspace to know the minimum required sigframe size through the auxiliary vector and use it to allocate enough memory for signal context. Signed-off-by:Greentime Hu <greentime.hu@sifive.com> Signed-off-by:
Vincent Chen <vincent.chen@sifive.com> Signed-off-by:
Andy Chiu <andy.chiu@sifive.com>
Loading
Please register or sign in to comment