]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/signal: Report minimum signal frame size to userspace via AT_MINSIGSTKSZ
authorNicholas Piggin <npiggin@gmail.com>
Mon, 7 Mar 2022 18:27:34 +0000 (04:27 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 19 May 2022 13:11:26 +0000 (23:11 +1000)
commit920545f5ae9df937f4aea14c6c56fec50d8428e6
tree854ce287fc7cb79a46ba739fb5981a5a67f2a003
parent233d31d4bde34de605209190712580554d8ed222
powerpc/signal: Report minimum signal frame size to userspace via AT_MINSIGSTKSZ

Implement the AT_MINSIGSTKSZ AUXV entry, allowing userspace to
dynamically size stack allocations in a manner forward-compatible with
new processor state saved in the signal frame

For now these statically find the maximum signal frame size rather than
doing any runtime testing of features to minimise the size.

glibc 2.34 will take advantage of this, as will applications that use
use _SC_MINSIGSTKSZ and _SC_SIGSTKSZ.

Reviewed-by: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
References: de4e40dbc366 ("arm64: signal: Report signal frame size to userspace via auxv")
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220307182734.289289-2-npiggin@gmail.com
arch/powerpc/include/asm/elf.h
arch/powerpc/include/asm/signal.h
arch/powerpc/include/uapi/asm/auxvec.h
arch/powerpc/kernel/signal.c
arch/powerpc/kernel/signal_32.c
arch/powerpc/kernel/signal_64.c