Change MINSIGSTKSZ and SIGSTKSIZE
Alan Modra
amodra at gmail.com
Mon Apr 14 16:53:29 EST 2014
On Sat, Apr 12, 2014 at 02:59:55AM -0700, Haren Myneni wrote:
> Alan,
> LTP test (signalstack02) is failing.
Ignore the stupid test. Do *NOT* change the kernel value to match
glibc. The two sets of constants are independent.
The glibc constants are for user code, to allocate correctly sized
signal stacks for all known kernels. These constants are therefore
the maximum values needed for known kernels.
The kernel constants are to check that user code is setting up a large
enough signal stack *for that specific kernel, and user binary*. If
you make the kernel constants match current glibc, then old binaries
that don't use htm or vsx will fail when run on a newer kernel.
Ideally the kernel would detect whether a binary was going to use htm
or vsx and adjust the minimum sizes, but it's a wee bit difficult for
the kernel to know that ahead of time.
> This test expects -ENOMEM from
> kernel when passing less than stack size (passing 4095). MINSIGSTKSZ in
> signal.h (glibc) is changed to 4096 to support VSX changes
> (https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=f7c399cff5bd04ee9dc117fb6b0f39597dc047c6) We should also change these values in kernel to match with glibc. Any issues?
>
> diff --git a/arch/powerpc/include/uapi/asm/signal.h
> b/arch/powerpc/include/uapi/
> index 6c69ee9..18f498e 100644
> --- a/arch/powerpc/include/uapi/asm/signal.h
> +++ b/arch/powerpc/include/uapi/asm/signal.h
> @@ -85,8 +85,8 @@ typedef struct {
>
> #define SA_RESTORER 0x04000000U
>
> -#define MINSIGSTKSZ 2048
> -#define SIGSTKSZ 8192
> +#define MINSIGSTKSZ 4096
> +#define SIGSTKSZ 16384
>
> Thanks
> Haren
--
Alan Modra
Australia Development Lab, IBM
More information about the Linuxppc-dev
mailing list