From 8c948a9a6f0e7c6d310d696dec8670f8e08b2da2 Mon Sep 17 00:00:00 2001 From: Russ Allbery Date: Thu, 19 Apr 2007 18:27:01 +0000 Subject: [PATCH] * Enable ucontext for all Linux builds with glibc 2.4 or later, not just with i386 and amd64. Newer versions of glibc change internal structures in ways that cause the old LWP code to have stack overflows. (Closes: #419903) --- debian/changelog | 4 + debian/patches/glibc-ucontext | 144 +++++++++++++++++++++++++++++ src/config/param.alpha_linux_26.h | 5 + src/config/param.ia64_linux26.h | 5 + src/config/param.parisc_linux24.h | 5 + src/config/param.ppc64_linux26.h | 5 + src/config/param.ppc_linux26.h | 5 + src/config/param.s390_linux26.h | 5 + src/config/param.s390x_linux26.h | 5 + src/config/param.sparc64_linux26.h | 5 + src/config/param.sparc_linux24.h | 5 + 11 files changed, 193 insertions(+) create mode 100644 debian/patches/glibc-ucontext diff --git a/debian/changelog b/debian/changelog index f89399307..7ea44ad84 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,9 @@ openafs (1.4.4.dfsg1-2) unstable; urgency=low + * Enable ucontext for all Linux builds with glibc 2.4 or later, not just + with i386 and amd64. Newer versions of glibc change internal + structures in ways that cause the old LWP code to have stack + overflows. (Closes: #419903) * When determining the AFS sysname for kernel module builds, add explicit cases for 2.6 kernels for all architectures that support them (everything except non-64-bit sparc_linux). Fixes build problems with diff --git a/debian/patches/glibc-ucontext b/debian/patches/glibc-ucontext new file mode 100644 index 000000000..8967b12b1 --- /dev/null +++ b/debian/patches/glibc-ucontext @@ -0,0 +1,144 @@ +=== src/config/param.alpha_linux_26.h +================================================================== +--- src/config/param.alpha_linux_26.h (revision 2485) ++++ src/config/param.alpha_linux_26.h (local) +@@ -81,6 +81,11 @@ + #define SYS_NAME_ID SYS_NAME_ID_alpha_linux_26 + + ++#ifdef __GLIBC__ ++#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 3) ++#define USE_UCONTEXT ++#endif ++#endif + #endif /* AFS_PARAM_H */ + + #else /* !defined(UKERNEL) */ +=== src/config/param.ia64_linux26.h +================================================================== +--- src/config/param.ia64_linux26.h (revision 2485) ++++ src/config/param.ia64_linux26.h (local) +@@ -97,6 +97,11 @@ + #endif /* KERNEL */ + + ++#ifdef __GLIBC__ ++#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 3) ++#define USE_UCONTEXT ++#endif ++#endif + #endif /* _PARAM_IA64_LINUX20_H_ */ + + #else /* !defined(UKERNEL) */ +=== src/config/param.parisc_linux24.h +================================================================== +--- src/config/param.parisc_linux24.h (revision 2485) ++++ src/config/param.parisc_linux24.h (local) +@@ -70,6 +70,11 @@ + #endif + #endif /* KERNEL */ + ++#ifdef __GLIBC__ ++#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 3) ++#define USE_UCONTEXT ++#endif ++#endif + #endif /* AFS_PARAM_H */ + + #else /* !defined(UKERNEL) */ +=== src/config/param.ppc64_linux26.h +================================================================== +--- src/config/param.ppc64_linux26.h (revision 2485) ++++ src/config/param.ppc64_linux26.h (local) +@@ -76,6 +76,11 @@ + #endif + #endif /* KERNEL */ + ++#ifdef __GLIBC__ ++#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 3) ++#define USE_UCONTEXT ++#endif ++#endif + #endif /* _PARAM_PPC64_LINUX20_H_ */ + + #else /* !defined(UKERNEL) */ +=== src/config/param.ppc_linux26.h +================================================================== +--- src/config/param.ppc_linux26.h (revision 2485) ++++ src/config/param.ppc_linux26.h (local) +@@ -74,6 +74,11 @@ + #endif + #endif /* KERNEL */ + ++#ifdef __GLIBC__ ++#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 3) ++#define USE_UCONTEXT ++#endif ++#endif + #endif /* AFS_PARAM_H */ + + #else /* !defined(UKERNEL) */ +=== src/config/param.s390_linux26.h +================================================================== +--- src/config/param.s390_linux26.h (revision 2485) ++++ src/config/param.s390_linux26.h (local) +@@ -86,6 +86,11 @@ + #endif + #endif /* KERNEL */ + ++#ifdef __GLIBC__ ++#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 3) ++#define USE_UCONTEXT ++#endif ++#endif + #endif /* AFS_PARAM_H */ + + #else /* !defined(UKERNEL) */ +=== src/config/param.s390x_linux26.h +================================================================== +--- src/config/param.s390x_linux26.h (revision 2485) ++++ src/config/param.s390x_linux26.h (local) +@@ -89,6 +89,11 @@ + #endif + #endif /* KERNEL */ + ++#ifdef __GLIBC__ ++#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 3) ++#define USE_UCONTEXT ++#endif ++#endif + #endif /* AFS_PARAM_H */ + + #else /* !defined(UKERNEL) */ +=== src/config/param.sparc64_linux26.h +================================================================== +--- src/config/param.sparc64_linux26.h (revision 2485) ++++ src/config/param.sparc64_linux26.h (local) +@@ -95,6 +95,11 @@ + #endif + #endif + ++#ifdef __GLIBC__ ++#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 3) ++#define USE_UCONTEXT ++#endif ++#endif + #endif /* _PARAM_SPARC64_LINUX26_H_ */ + + #else /* !defined(UKERNEL) */ +=== src/config/param.sparc_linux24.h +================================================================== +--- src/config/param.sparc_linux24.h (revision 2485) ++++ src/config/param.sparc_linux24.h (local) +@@ -98,6 +98,11 @@ + #endif + #endif + ++#ifdef __GLIBC__ ++#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 3) ++#define USE_UCONTEXT ++#endif ++#endif + #endif /* AFS_PARAM_H */ + + #else /* !defined(UKERNEL) */ diff --git a/src/config/param.alpha_linux_26.h b/src/config/param.alpha_linux_26.h index 1d44da6d7..2ec3ba147 100644 --- a/src/config/param.alpha_linux_26.h +++ b/src/config/param.alpha_linux_26.h @@ -81,6 +81,11 @@ #define SYS_NAME_ID SYS_NAME_ID_alpha_linux_26 +#ifdef __GLIBC__ +#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 3) +#define USE_UCONTEXT +#endif +#endif #endif /* AFS_PARAM_H */ #else /* !defined(UKERNEL) */ diff --git a/src/config/param.ia64_linux26.h b/src/config/param.ia64_linux26.h index 5f28d47a3..cca359e7f 100644 --- a/src/config/param.ia64_linux26.h +++ b/src/config/param.ia64_linux26.h @@ -97,6 +97,11 @@ #endif /* KERNEL */ +#ifdef __GLIBC__ +#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 3) +#define USE_UCONTEXT +#endif +#endif #endif /* _PARAM_IA64_LINUX20_H_ */ #else /* !defined(UKERNEL) */ diff --git a/src/config/param.parisc_linux24.h b/src/config/param.parisc_linux24.h index ad7506f5e..e70234abb 100644 --- a/src/config/param.parisc_linux24.h +++ b/src/config/param.parisc_linux24.h @@ -70,6 +70,11 @@ #endif #endif /* KERNEL */ +#ifdef __GLIBC__ +#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 3) +#define USE_UCONTEXT +#endif +#endif #endif /* AFS_PARAM_H */ #else /* !defined(UKERNEL) */ diff --git a/src/config/param.ppc64_linux26.h b/src/config/param.ppc64_linux26.h index 730caf37c..11f7557bd 100644 --- a/src/config/param.ppc64_linux26.h +++ b/src/config/param.ppc64_linux26.h @@ -76,6 +76,11 @@ #endif #endif /* KERNEL */ +#ifdef __GLIBC__ +#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 3) +#define USE_UCONTEXT +#endif +#endif #endif /* _PARAM_PPC64_LINUX20_H_ */ #else /* !defined(UKERNEL) */ diff --git a/src/config/param.ppc_linux26.h b/src/config/param.ppc_linux26.h index 37abeacb9..d9dd4d8f9 100644 --- a/src/config/param.ppc_linux26.h +++ b/src/config/param.ppc_linux26.h @@ -74,6 +74,11 @@ #endif #endif /* KERNEL */ +#ifdef __GLIBC__ +#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 3) +#define USE_UCONTEXT +#endif +#endif #endif /* AFS_PARAM_H */ #else /* !defined(UKERNEL) */ diff --git a/src/config/param.s390_linux26.h b/src/config/param.s390_linux26.h index a941c28c3..cf3ebf7e1 100644 --- a/src/config/param.s390_linux26.h +++ b/src/config/param.s390_linux26.h @@ -86,6 +86,11 @@ #endif #endif /* KERNEL */ +#ifdef __GLIBC__ +#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 3) +#define USE_UCONTEXT +#endif +#endif #endif /* AFS_PARAM_H */ #else /* !defined(UKERNEL) */ diff --git a/src/config/param.s390x_linux26.h b/src/config/param.s390x_linux26.h index 5ad1806f4..bb3bc8515 100644 --- a/src/config/param.s390x_linux26.h +++ b/src/config/param.s390x_linux26.h @@ -89,6 +89,11 @@ #endif #endif /* KERNEL */ +#ifdef __GLIBC__ +#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 3) +#define USE_UCONTEXT +#endif +#endif #endif /* AFS_PARAM_H */ #else /* !defined(UKERNEL) */ diff --git a/src/config/param.sparc64_linux26.h b/src/config/param.sparc64_linux26.h index 68bd28a24..30550e2cf 100644 --- a/src/config/param.sparc64_linux26.h +++ b/src/config/param.sparc64_linux26.h @@ -95,6 +95,11 @@ #endif #endif +#ifdef __GLIBC__ +#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 3) +#define USE_UCONTEXT +#endif +#endif #endif /* _PARAM_SPARC64_LINUX26_H_ */ #else /* !defined(UKERNEL) */ diff --git a/src/config/param.sparc_linux24.h b/src/config/param.sparc_linux24.h index 3082a524e..7373559e2 100644 --- a/src/config/param.sparc_linux24.h +++ b/src/config/param.sparc_linux24.h @@ -98,6 +98,11 @@ #endif #endif +#ifdef __GLIBC__ +#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 3) +#define USE_UCONTEXT +#endif +#endif #endif /* AFS_PARAM_H */ #else /* !defined(UKERNEL) */ -- 2.39.5