|
|
2e9afc |
#
|
|
|
2e9afc |
# Upstream power patch to increase MINSIGSTKSZ and SIGSTKSZ to
|
|
|
2e9afc |
# account for the kernel signal frame size increase.
|
|
|
2e9afc |
#
|
|
|
5de29b |
# commit f7c399cff5bd04ee9dc117fb6b0f39597dc047c6
|
|
|
5de29b |
# Author: Alan Modra <amodra@gmail.com>
|
|
|
5de29b |
# Date: Sat Aug 17 18:37:18 2013 +0930
|
|
|
5de29b |
#
|
|
|
5de29b |
# PowerPC SIGSTKSZ
|
|
|
5de29b |
# http://sourceware.org/ml/libc-alpha/2013-08/msg00093.html
|
|
|
5de29b |
#
|
|
|
5de29b |
# This copies the sparc version of sigstack.h, which gives powerpc
|
|
|
5de29b |
# #define MINSIGSTKSZ 4096
|
|
|
5de29b |
# #define SIGSTKSZ 16384
|
|
|
5de29b |
#
|
|
|
5de29b |
# Before the VSX changes, struct rt_sigframe size was 1920 plus 128 for
|
|
|
5de29b |
# __SIGNAL_FRAMESIZE giving ppc64 exactly the default MINSIGSTKSZ of
|
|
|
5de29b |
# 2048.
|
|
|
5de29b |
#
|
|
|
5de29b |
# After VSX, ucontext increased by 256 bytes. Oops, we're over
|
|
|
5de29b |
# MINSIGSTKSZ, so powerpc has been using the wrong value for quite a
|
|
|
5de29b |
# while. Add another ucontext for TM and rt_sigframe is now at 3872,
|
|
|
5de29b |
# giving actual MINSIGSTKSZ of 4000.
|
|
|
5de29b |
#
|
|
|
5de29b |
# The glibc testcase that I was looking at was tst-cancel21, which
|
|
|
5de29b |
# allocates 2*SIGSTKSZ (not because the test is trying to be
|
|
|
5de29b |
# conservative, but because the test actually has nested signal stack
|
|
|
5de29b |
# frames). We blew the allocation by 48 bytes when using current
|
|
|
5de29b |
# mainline gcc to compile glibc (le ppc64).
|
|
|
5de29b |
#
|
|
|
5de29b |
# The required stack depth in _dl_lookup_symbol_x from the top of the
|
|
|
5de29b |
# next signal frame was 10944 bytes. I guess you'd want to add 288 to
|
|
|
5de29b |
# that, implying an actual SIGSTKSZ of 11232.
|
|
|
5de29b |
#
|
|
|
5de29b |
# * sysdeps/unix/sysv/linux/powerpc/bits/sigstack.h: New file.
|
|
|
5de29b |
#
|
|
|
12745e |
diff --git glibc-2.17-c758a686/sysdeps/unix/sysv/linux/powerpc/bits/sigstack.h glibc-2.17-c758a686/sysdeps/unix/sysv/linux/powerpc/bits/sigstack.h
|
|
|
2e9afc |
new file mode 100644
|
|
|
2e9afc |
index 0000000..33be9e8
|
|
|
2e9afc |
--- /dev/null
|
|
|
12745e |
+++ glibc-2.17-c758a686/sysdeps/unix/sysv/linux/powerpc/bits/sigstack.h
|
|
|
2e9afc |
@@ -0,0 +1,54 @@
|
|
|
2e9afc |
+/* sigstack, sigaltstack definitions.
|
|
|
2e9afc |
+ Copyright (C) 1998-2013 Free Software Foundation, Inc.
|
|
|
2e9afc |
+ This file is part of the GNU C Library.
|
|
|
2e9afc |
+
|
|
|
2e9afc |
+ The GNU C Library is free software; you can redistribute it and/or
|
|
|
2e9afc |
+ modify it under the terms of the GNU Lesser General Public
|
|
|
2e9afc |
+ License as published by the Free Software Foundation; either
|
|
|
2e9afc |
+ version 2.1 of the License, or (at your option) any later version.
|
|
|
2e9afc |
+
|
|
|
2e9afc |
+ The GNU C Library is distributed in the hope that it will be useful,
|
|
|
2e9afc |
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
2e9afc |
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
2e9afc |
+ Lesser General Public License for more details.
|
|
|
2e9afc |
+
|
|
|
2e9afc |
+ You should have received a copy of the GNU Lesser General Public
|
|
|
2e9afc |
+ License along with the GNU C Library; if not, see
|
|
|
2e9afc |
+ <http://www.gnu.org/licenses/>. */
|
|
|
2e9afc |
+
|
|
|
2e9afc |
+#ifndef _SIGNAL_H
|
|
|
2e9afc |
+# error "Never include this file directly. Use <signal.h> instead"
|
|
|
2e9afc |
+#endif
|
|
|
2e9afc |
+
|
|
|
2e9afc |
+
|
|
|
2e9afc |
+/* Structure describing a signal stack (obsolete). */
|
|
|
2e9afc |
+struct sigstack
|
|
|
2e9afc |
+ {
|
|
|
2e9afc |
+ void *ss_sp; /* Signal stack pointer. */
|
|
|
2e9afc |
+ int ss_onstack; /* Nonzero if executing on this stack. */
|
|
|
2e9afc |
+ };
|
|
|
2e9afc |
+
|
|
|
2e9afc |
+
|
|
|
2e9afc |
+/* Possible values for `ss_flags.'. */
|
|
|
2e9afc |
+enum
|
|
|
2e9afc |
+{
|
|
|
2e9afc |
+ SS_ONSTACK = 1,
|
|
|
2e9afc |
+#define SS_ONSTACK SS_ONSTACK
|
|
|
2e9afc |
+ SS_DISABLE
|
|
|
2e9afc |
+#define SS_DISABLE SS_DISABLE
|
|
|
2e9afc |
+};
|
|
|
2e9afc |
+
|
|
|
2e9afc |
+/* Minimum stack size for a signal handler. */
|
|
|
2e9afc |
+#define MINSIGSTKSZ 4096
|
|
|
2e9afc |
+
|
|
|
2e9afc |
+/* System default stack size. */
|
|
|
2e9afc |
+#define SIGSTKSZ 16384
|
|
|
2e9afc |
+
|
|
|
2e9afc |
+
|
|
|
2e9afc |
+/* Alternate, preferred interface. */
|
|
|
2e9afc |
+typedef struct sigaltstack
|
|
|
2e9afc |
+ {
|
|
|
2e9afc |
+ void *ss_sp;
|
|
|
2e9afc |
+ int ss_flags;
|
|
|
2e9afc |
+ size_t ss_size;
|
|
|
2e9afc |
+ } stack_t;
|