+2017-06-05 Joseph Myers <joseph@codesourcery.com>
+
+ [BZ #21517]
+ * bits/types/stack_t.h (stack_t): Remove struct tag.
+ * sysdeps/unix/sysv/linux/bits/types/stack_t.h (stack_t):
+ Likewise.
+ * sysdeps/unix/sysv/linux/mips/bits/types/stack_t.h (stack_t):
+ Likewise.
+ * debug/segfault.c (install_handler): Use stack_t instead of
+ struct sigaltstack.
+ * hurd/hurd/signal.h (struct hurd_sigstate): Likewise.
+ * hurd/trampoline.c (_hurd_setup_sighandler): Likewise.
+ * include/signal.h (__sigaltstack): Likwise.
+ * signal/sigaltstack.c (__sigaltstack): Likewise.
+ * signal/signal.h (sigaltstack): Likewise.
+ * sysdeps/mach/hurd/i386/signal-defines.sym
+ (SIGALTSTACK__SS_SP__OFFSET): Likewise.
+ (SIGALTSTACK__SS_SIZE__OFFSET): Likewise.
+ (SIGALTSTACK__SS_FLAGS__OFFSET): Likewise.
+ * sysdeps/mach/hurd/sigaltstack.c (__sigaltstack): Likewise.
+ * sysdeps/mach/hurd/sigstack.c (sigstack): Likewise.
+ * sysdeps/unix/sysv/linux/alpha/sys/procfs.h (struct
+ elf_prstatus): Likewise.
+ * sysdeps/unix/sysv/linux/hppa/____longjmp_chk.c (CHECK_SP):
+ Likewise.
+ * sysdeps/unix/sysv/linux/ia64/sys/procfs.h (struct elf_prstatus):
+ Likewise.
+ * sysdeps/unix/sysv/linux/m68k/____longjmp_chk.c (CHECK_SP):
+ Likewise.
+ * sysdeps/unix/sysv/linux/powerpc/sys/procfs.h (struct
+ elf_prstatus): Likewise.
+ * sysdeps/unix/sysv/linux/sh/sys/procfs.h (struct elf_prstatus):
+ Likewise.
+ * sysdeps/unix/sysv/linux/sys/procfs.h (struct elf_prstatus):
+ Likewise.
+
2017-06-04 Zack Weinberg <zackw@panix.com>
* sysdeps/gnu/errlist.c: Regenerate.
compat implementation will be used (which refuses all flags and routes it
to preadv or pwritev).
+* The stack_t type no longer has the name struct sigaltstack. This changes
+ the C++ name mangling for interfaces involving this type.
+
Security related changes:
* The DNS stub resolver limits the advertised UDP buffer size to 1200 bytes,
#include <stddef.h>
/* Structure describing a signal stack. */
-typedef struct sigaltstack
+typedef struct
{
void *ss_sp;
size_t ss_size;
if (getenv ("SEGFAULT_USE_ALTSTACK") != 0)
{
void *stack_mem = malloc (2 * SIGSTKSZ);
- struct sigaltstack ss;
+ stack_t ss;
if (stack_mem != NULL)
{
sigset_t blocked; /* What signals are blocked. */
sigset_t pending; /* Pending signals, possibly blocked. */
struct sigaction actions[NSIG];
- struct sigaltstack sigaltstack;
+ stack_t sigaltstack;
/* Chain of thread-local signal preemptors; see <hurd/sigpreempt.h>.
Each element of this chain is in local stack storage, and the chain
struct sigcontext *
_hurd_setup_sighandler (int flags,
__sighandler_t handler,
- struct sigaltstack *sigaltstack,
+ stack_t *sigaltstack,
int signo, int sigcode,
void *state)
{
#ifdef __USE_MISC
extern int __sigreturn (struct sigcontext *__scp);
#endif
-extern int __sigaltstack (const struct sigaltstack *__ss,
- struct sigaltstack *__oss);
+extern int __sigaltstack (const stack_t *__ss,
+ stack_t *__oss);
extern int __libc_sigaction (int sig, const struct sigaction *act,
struct sigaction *oact);
libc_hidden_proto (__libc_sigaction)
/* Run signals handlers on the stack specified by SS (if not NULL).
If OSS is not NULL, it is filled in with the old signal stack status. */
int
-sigaltstack (const struct sigaltstack *ss, struct sigaltstack *oss)
+sigaltstack (const stack_t *ss, stack_t *oss)
{
__set_errno (ENOSYS);
return -1;
/* Alternate signal handler stack interface.
This interface should always be preferred over `sigstack'. */
-extern int sigaltstack (const struct sigaltstack *__restrict __ss,
- struct sigaltstack *__restrict __oss) __THROW;
+extern int sigaltstack (const stack_t *__restrict __ss,
+ stack_t *__restrict __oss) __THROW;
#endif /* Use POSIX.1-2008 or X/Open Unix. */
HURD_SIGSTATE__SIGALTSTACK__OFFSET offsetof(struct hurd_sigstate, sigaltstack)
-SIGALTSTACK__SS_SP__OFFSET offsetof(struct sigaltstack, ss_sp)
-SIGALTSTACK__SS_SIZE__OFFSET offsetof(struct sigaltstack, ss_size)
-SIGALTSTACK__SS_FLAGS__OFFSET offsetof(struct sigaltstack, ss_flags)
+SIGALTSTACK__SS_SP__OFFSET offsetof(stack_t, ss_sp)
+SIGALTSTACK__SS_SIZE__OFFSET offsetof(stack_t, ss_size)
+SIGALTSTACK__SS_FLAGS__OFFSET offsetof(stack_t, ss_flags)
/* Run signals handlers on the stack specified by SS (if not NULL).
If OSS is not NULL, it is filled in with the old signal stack status. */
int
-__sigaltstack (const struct sigaltstack *argss, struct sigaltstack *oss)
+__sigaltstack (const stack_t *argss, stack_t *oss)
{
struct hurd_sigstate *s;
- struct sigaltstack ss, old;
+ stack_t ss, old;
/* Fault before taking any locks. */
if (argss != NULL)
ss = *argss;
if (oss != NULL)
- *(volatile struct sigaltstack *) oss = *oss;
+ *(volatile stack_t *) oss = *oss;
s = _hurd_self_sigstate ();
__spin_lock (&s->lock);
int
sigstack (struct sigstack *ss, struct sigstack *oss)
{
- struct sigaltstack as, oas;
+ stack_t as, oas;
as.ss_sp = ss->ss_sp;
as.ss_size = 0;
unsigned long int pr_sigpend; /* Set of pending signals. */
unsigned long int pr_sighold; /* Set of held signals. */
#if 0
- struct sigaltstack pr_altstack; /* Alternate stack info. */
+ stack_t pr_altstack; /* Alternate stack info. */
struct sigaction pr_action; /* Signal action for current sig. */
#endif
__pid_t pr_pid;
#include <stddef.h>
/* Structure describing a signal stack. */
-typedef struct sigaltstack
+typedef struct
{
void *ss_sp;
int ss_flags;
destroyed must all have stack values higher than ours. */ \
if ((unsigned long) (sp) > this_sp) \
{ \
- struct sigaltstack oss; \
+ stack_t oss; \
INTERNAL_SYSCALL_DECL (err); \
int result = INTERNAL_SYSCALL (sigaltstack, err, 2, NULL, &oss);\
/* If we aren't using an alternate stack then we have already \
unsigned long int pr_sigpend; /* Set of pending signals. */
unsigned long int pr_sighold; /* Set of held signals. */
#if 0
- struct sigaltstack pr_altstack; /* Alternate stack info. */
+ stack_t pr_altstack; /* Alternate stack info. */
struct sigaction pr_action; /* Signal action for current sig. */
#endif
__pid_t pr_pid;
register unsigned long this_sp asm ("sp"); \
if ((unsigned long) (sp) < this_sp) \
{ \
- struct sigaltstack oss; \
+ stack_t oss; \
INTERNAL_SYSCALL_DECL (err); \
int result = INTERNAL_SYSCALL (sigaltstack, err, 2, NULL, &oss); \
if (!INTERNAL_SYSCALL_ERROR_P (result, err) \
#include <stddef.h>
/* Structure describing a signal stack. */
-typedef struct sigaltstack
+typedef struct
{
void *ss_sp;
size_t ss_size;
unsigned long int pr_sigpend; /* Set of pending signals. */
unsigned long int pr_sighold; /* Set of held signals. */
#if 0
- struct sigaltstack pr_altstack; /* Alternate stack info. */
+ stack_t pr_altstack; /* Alternate stack info. */
struct sigaction pr_action; /* Signal action for current sig. */
#endif
__pid_t pr_pid;
unsigned long int pr_sigpend; /* Set of pending signals. */
unsigned long int pr_sighold; /* Set of held signals. */
#if 0
- struct sigaltstack pr_altstack; /* Alternate stack info. */
+ stack_t pr_altstack; /* Alternate stack info. */
struct sigaction pr_action; /* Signal action for current sig. */
#endif
__pid_t pr_pid;
unsigned long int pr_sigpend; /* Set of pending signals. */
unsigned long int pr_sighold; /* Set of held signals. */
#if 0
- struct sigaltstack pr_altstack; /* Alternate stack info. */
+ stack_t pr_altstack; /* Alternate stack info. */
struct sigaction pr_action; /* Signal action for current sig. */
#endif
__pid_t pr_pid;