This is an automated email from the git hooks/post-receive script. sthibault pushed a commit to branch sid in repository glibc.
commit e3180c4a212e948741ae19ebad8fd8feea650a1a Author: Samuel Thibault <samuel.thiba...@ens-lyon.org> Date: Wed Nov 16 23:30:00 2016 +0100 hurd-i386/tg-hurdsig-SA_SIGINFO.diff: Update to upstream --- debian/changelog | 1 + .../patches/hurd-i386/tg-hurdsig-SA_SIGINFO.diff | 95 ++++++++++++++++++---- 2 files changed, 80 insertions(+), 16 deletions(-) diff --git a/debian/changelog b/debian/changelog index dc0ad3f..8fdb356 100644 --- a/debian/changelog +++ b/debian/changelog @@ -14,6 +14,7 @@ glibc (2.24-6) UNRELEASED; urgency=medium * hurd-i386/tg-extern_inline.diff: Update to upstream. - hurd-i386/tg-sigstate_thread_reference.diff: Refresh. - hurd-i386/tg-gsync-libc.diff: Refresh. + * hurd-i386/tg-hurdsig-SA_SIGINFO.diff: Update to upstream. [ Aurelien Jarno ] * debian/patches/git-updates.diff: update from upstream stable branch: diff --git a/debian/patches/hurd-i386/tg-hurdsig-SA_SIGINFO.diff b/debian/patches/hurd-i386/tg-hurdsig-SA_SIGINFO.diff index f002216..8cd10cb 100644 --- a/debian/patches/hurd-i386/tg-hurdsig-SA_SIGINFO.diff +++ b/debian/patches/hurd-i386/tg-hurdsig-SA_SIGINFO.diff @@ -6,21 +6,24 @@ Subject: [PATCH] implement SA_SIGINFO signal handlers. 1831cfe Hurd signals: Use POSIX sigcodes --- - hurd/hurd/signal.h | 5 + + hurd/hurd/signal.h | 5 ++ + hurd/hurd/sigpreempt.h | 4 +- hurd/hurdfault.c | 2 +- hurd/hurdinit.c | 2 +- hurd/hurdsig.c | 2 +- sysdeps/mach/hurd/bits/sigaction.h | 81 ++++++++++++++++++++ sysdeps/mach/hurd/i386/bits/sigcontext.h | 4 + - sysdeps/mach/hurd/i386/exc2signal.c | 123 +++++++++++++++++++------------ - sysdeps/mach/hurd/i386/trampoline.c | 113 ++++++++++++++++++++++++++-- - sysdeps/mach/hurd/kill.c | 2 - sysdeps/mach/hurd/setitimer.c | 2 - 8 files changed, 274 insertions(+), 58 deletions(-) + sysdeps/mach/hurd/i386/exc2signal.c | 123 +++++++++++++++++++----------- + sysdeps/mach/hurd/i386/trampoline.c | 126 ++++++++++++++++++++++++++++--- + sysdeps/mach/hurd/kill.c | 2 +- + sysdeps/mach/hurd/setitimer.c | 2 +- + 12 files changed, 316 insertions(+), 71 deletions(-) +diff --git a/hurd/hurd/signal.h b/hurd/hurd/signal.h +index 14955c4..206fd81 100644 --- a/hurd/hurd/signal.h +++ b/hurd/hurd/signal.h -@@ -274,6 +274,11 @@ extern void _hurd_raise_signal (struct h +@@ -261,6 +261,11 @@ extern int _hurd_raise_signal (struct hurd_sigstate *ss, int signo, extern void _hurd_exception2signal (struct hurd_signal_detail *detail, int *signo); @@ -32,6 +35,24 @@ Subject: [PATCH] implement SA_SIGINFO signal handlers. /* Make the thread described by SS take the signal described by SIGNO and DETAIL. If the process is traced, this will in fact stop with a SIGNO +diff --git a/hurd/hurd/sigpreempt.h b/hurd/hurd/sigpreempt.h +index 3a1eaf2..75dcd59 100644 +--- a/hurd/hurd/sigpreempt.h ++++ b/hurd/hurd/sigpreempt.h +@@ -46,9 +46,9 @@ struct hurd_signal_preemptor + struct hurd_signal_preemptor *next; /* List structure. */ + }; + +-#define HURD_PREEMPT_SIGNAL_P(preemptor, signo, sigcode) \ ++#define HURD_PREEMPT_SIGNAL_P(preemptor, signo, address) \ + (((preemptor)->signals & sigmask (signo)) && \ +- (sigcode) >= (preemptor)->first && (sigcode) <= (preemptor)->last) ++ (address) >= (preemptor)->first && (address) <= (preemptor)->last) + + + /* Signal preemptors applying to all threads; locked by _hurd_siglock. */ +diff --git a/hurd/hurdfault.c b/hurd/hurdfault.c +index 9016227..e2f6e5c 100644 --- a/hurd/hurdfault.c +++ b/hurd/hurdfault.c @@ -70,7 +70,7 @@ _hurdsig_fault_catch_exception_raise (mach_port_t port, @@ -43,6 +64,8 @@ Subject: [PATCH] implement SA_SIGINFO signal handlers. ? 0 : EGREGIOUS; } +diff --git a/hurd/hurdinit.c b/hurd/hurdinit.c +index 02d0134..a310404 100644 --- a/hurd/hurdinit.c +++ b/hurd/hurdinit.c @@ -174,7 +174,7 @@ _hurd_new_proc_init (char **argv, @@ -54,6 +77,8 @@ Subject: [PATCH] implement SA_SIGINFO signal handlers. } #include <shlib-compat.h> +diff --git a/hurd/hurdsig.c b/hurd/hurdsig.c +index fd04974..b03dad4 100644 --- a/hurd/hurdsig.c +++ b/hurd/hurdsig.c @@ -710,7 +710,7 @@ post_signal (struct hurd_sigstate *ss, @@ -65,10 +90,13 @@ Subject: [PATCH] implement SA_SIGINFO signal handlers. { if (pe->preemptor) { +diff --git a/sysdeps/mach/hurd/bits/sigaction.h b/sysdeps/mach/hurd/bits/sigaction.h +new file mode 100644 +index 0000000..7204fc6 --- /dev/null +++ b/sysdeps/mach/hurd/bits/sigaction.h @@ -0,0 +1,81 @@ -+/* Copyright (C) 1991,92,96,97,98,2001 Free Software Foundation, Inc. ++/* Copyright (C) 1991-2015 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or @@ -149,6 +177,8 @@ Subject: [PATCH] implement SA_SIGINFO signal handlers. +#define SIG_BLOCK 1 /* Block signals. */ +#define SIG_UNBLOCK 2 /* Unblock signals. */ +#define SIG_SETMASK 3 /* Set the set of blocked signals. */ +diff --git a/sysdeps/mach/hurd/i386/bits/sigcontext.h b/sysdeps/mach/hurd/i386/bits/sigcontext.h +index 6d15b03..8b8586a 100644 --- a/sysdeps/mach/hurd/i386/bits/sigcontext.h +++ b/sysdeps/mach/hurd/i386/bits/sigcontext.h @@ -95,6 +95,10 @@ struct sigcontext @@ -162,6 +192,8 @@ Subject: [PATCH] implement SA_SIGINFO signal handlers. /* Codes for SIGFPE. */ #define FPE_INTOVF_TRAP 0x1 /* integer overflow */ #define FPE_INTDIV_FAULT 0x2 /* integer divide by zero */ +diff --git a/sysdeps/mach/hurd/i386/exc2signal.c b/sysdeps/mach/hurd/i386/exc2signal.c +index bf0ca2e..b2606c4 100644 --- a/sysdeps/mach/hurd/i386/exc2signal.c +++ b/sysdeps/mach/hurd/i386/exc2signal.c @@ -23,8 +23,8 @@ @@ -175,7 +207,7 @@ Subject: [PATCH] implement SA_SIGINFO signal handlers. { detail->error = 0; -@@ -36,44 +36,62 @@ _hurd_exception2signal (struct hurd_sign +@@ -36,44 +36,62 @@ _hurd_exception2signal (struct hurd_signal_detail *detail, int *signo) break; case EXC_BAD_ACCESS: @@ -256,7 +288,7 @@ Subject: [PATCH] implement SA_SIGINFO signal handlers. detail->code = 0; break; -@@ -82,51 +100,43 @@ _hurd_exception2signal (struct hurd_sign +@@ -82,51 +100,43 @@ _hurd_exception2signal (struct hurd_signal_detail *detail, int *signo) Give an error code corresponding to the first bit set. */ if (detail->exc_subcode & FPS_IE) { @@ -319,7 +351,7 @@ Subject: [PATCH] implement SA_SIGINFO signal handlers. break; } break; -@@ -143,7 +153,7 @@ _hurd_exception2signal (struct hurd_sign +@@ -143,7 +153,7 @@ _hurd_exception2signal (struct hurd_signal_detail *detail, int *signo) if (detail->exc_code == EXC_I386_BOUND) { *signo = SIGFPE; @@ -328,7 +360,7 @@ Subject: [PATCH] implement SA_SIGINFO signal handlers. } else { -@@ -154,12 +164,33 @@ _hurd_exception2signal (struct hurd_sign +@@ -154,12 +164,33 @@ _hurd_exception2signal (struct hurd_signal_detail *detail, int *signo) case EXC_BREAKPOINT: *signo = SIGTRAP; @@ -368,6 +400,8 @@ Subject: [PATCH] implement SA_SIGINFO signal handlers. + exception2signal (detail, signo, 0); +} + +diff --git a/sysdeps/mach/hurd/i386/trampoline.c b/sysdeps/mach/hurd/i386/trampoline.c +index 20e4689..d694460 100644 --- a/sysdeps/mach/hurd/i386/trampoline.c +++ b/sysdeps/mach/hurd/i386/trampoline.c @@ -19,13 +19,66 @@ @@ -437,11 +471,11 @@ Subject: [PATCH] implement SA_SIGINFO signal handlers. struct sigcontext * _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler, int signo, struct hurd_signal_detail *detail, -@@ -37,18 +90,37 @@ _hurd_setup_sighandler (struct hurd_sigs +@@ -37,20 +90,44 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler, void firewall (void); extern const void _hurd_intr_rpc_msg_cx_sp; extern const void _hurd_intr_rpc_msg_sp_restored; -+ struct sigaction *action; ++ const struct sigaction *action; void *volatile sigsp; struct sigcontext *scp; struct @@ -476,8 +510,31 @@ Subject: [PATCH] implement SA_SIGINFO signal handlers. + siginfo_t siginfo; } *stackframe; ++ /* sigaction for preemptors */ ++ static const struct sigaction legacy_sigaction = { ++ .sa_flags = SA_RESTART ++ }; ++ if (ss->context) -@@ -140,15 +212,9 @@ _hurd_setup_sighandler (struct hurd_sigs + { + /* We have a previous sigcontext that sigreturn was about +@@ -74,9 +151,13 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler, + interrupted RPC frame. */ + state->basic.esp = state->basic.uesp; + +- /* XXX what if handler != action->handler (for instance, if a signal +- * preemptor took over) ? */ + action = & _hurd_sigstate_actions (ss) [signo]; ++ if ( (action->sa_flags & SA_SIGINFO) ++ && handler != (__sighandler_t) action->sa_sigaction ++ || !(action->sa_flags & SA_SIGINFO) ++ && handler != action->sa_handler) ++ /* A signal preemptor took over, use legacy semantic. */ ++ action = &legacy_sigaction; + + if ((action->sa_flags & SA_ONSTACK) && + !(ss->sigaltstack.ss_flags & (SS_DISABLE|SS_ONSTACK))) +@@ -140,15 +221,9 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler, = &stackframe->link.thread.next; ss->active_resources = &stackframe->link; @@ -494,7 +551,7 @@ Subject: [PATCH] implement SA_SIGINFO signal handlers. scp->sc_onstack = ss->sigaltstack.ss_flags & SS_ONSTACK ? 1 : 0; /* struct sigcontext is laid out so that starting at sc_gs mimics a -@@ -162,6 +228,35 @@ _hurd_setup_sighandler (struct hurd_sigs +@@ -162,6 +237,35 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler, &state->fpu, &scp->sc_i386_float_state, sizeof (state->fpu)); @@ -530,6 +587,8 @@ Subject: [PATCH] implement SA_SIGINFO signal handlers. _hurdsig_end_catch_fault (); if (! ok) +diff --git a/sysdeps/mach/hurd/kill.c b/sysdeps/mach/hurd/kill.c +index 3c5c0e5..b9a4e23 100644 --- a/sysdeps/mach/hurd/kill.c +++ b/sysdeps/mach/hurd/kill.c @@ -64,7 +64,7 @@ __kill (pid_t pid, int sig) @@ -541,6 +600,8 @@ Subject: [PATCH] implement SA_SIGINFO signal handlers. /* The process has no message port. Perhaps try direct frobnication of the task. */ +diff --git a/sysdeps/mach/hurd/setitimer.c b/sysdeps/mach/hurd/setitimer.c +index 803b981..170ab26 100644 --- a/sysdeps/mach/hurd/setitimer.c +++ b/sysdeps/mach/hurd/setitimer.c @@ -103,7 +103,7 @@ timer_thread (void) @@ -552,3 +613,5 @@ Subject: [PATCH] implement SA_SIGINFO signal handlers. break; case MACH_RCV_INTERRUPTED: +-- +tg: (ab5f521..) t/hurdsig-SA_SIGINFO (depends on: t/hurdsig-global-dispositions cvs/exc2signal-template) -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-glibc/glibc.git