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