]> 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)
commitec129b06a69b88dff715116f6934e16360ffd24f
tree854ce287fc7cb79a46ba739fb5981a5a67f2a003
parent1a5ea20ac385f180b428267631317fb778096f96
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: 9c59c095080b ("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