Include <sys/ptrace.h> early
Include "ptrace.h" before any header that can include <signal.h> because on some architectures the latter may include <asm/sigcontext.h> which in turn may include <asm/ptrace.h> with potentially devastating effect on <sys/ptrace.h>. * process.c: Include "ptrace.h" before "regs.h". * rt_sigframe.c: Likewise. * sigreturn.c: Include "ptrace.h" before "nsig.h". * syscall.c: Likewise. * wait.c: Include "ptrace.h" before <sys/wait.h>. * strace.c: Include "ptrace.h" before <signal.h>. * tests/ptrace.c: Likewise. * tests/test_ucopy.c: Include <sys/ptrace.h> before <signal.h>.
This commit is contained in:
parent
f2bb704a92
commit
5a6dff3fe8
@ -41,10 +41,10 @@
|
||||
# include <elf.h>
|
||||
#endif
|
||||
|
||||
#include "xlat/nt_descriptor_types.h"
|
||||
|
||||
#include "regs.h"
|
||||
#include "ptrace.h"
|
||||
#include "regs.h"
|
||||
|
||||
#include "xlat/nt_descriptor_types.h"
|
||||
#include "xlat/ptrace_cmds.h"
|
||||
#include "xlat/ptrace_setoptions_flags.h"
|
||||
#include "xlat/ptrace_peeksiginfo_flags.h"
|
||||
|
@ -26,8 +26,8 @@
|
||||
*/
|
||||
|
||||
#include "defs.h"
|
||||
#include "regs.h"
|
||||
#include "ptrace.h"
|
||||
#include "regs.h"
|
||||
|
||||
#define DEF_FUNC_GET_RT_SIGFRAME_ADDR \
|
||||
kernel_ulong_t get_rt_sigframe_addr(struct tcb *tcp)
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include "defs.h"
|
||||
#include "ptrace.h"
|
||||
#include "nsig.h"
|
||||
#include "regs.h"
|
||||
#include "ptrace.h"
|
||||
|
||||
#if defined HAVE_ASM_SIGCONTEXT_H && !defined HAVE_STRUCT_SIGCONTEXT
|
||||
# include <asm/sigcontext.h>
|
||||
|
2
strace.c
2
strace.c
@ -33,6 +33,7 @@
|
||||
#include <stdarg.h>
|
||||
#include <limits.h>
|
||||
#include <fcntl.h>
|
||||
#include "ptrace.h"
|
||||
#include <signal.h>
|
||||
#include <sys/resource.h>
|
||||
#include <sys/wait.h>
|
||||
@ -52,7 +53,6 @@
|
||||
#include "largefile_wrappers.h"
|
||||
#include "number_set.h"
|
||||
#include "scno.h"
|
||||
#include "ptrace.h"
|
||||
#include "printsiginfo.h"
|
||||
#include "trace_event.h"
|
||||
#include "xstring.h"
|
||||
|
@ -34,6 +34,7 @@
|
||||
|
||||
#include "defs.h"
|
||||
#include "native_defs.h"
|
||||
#include "ptrace.h"
|
||||
#include "nsig.h"
|
||||
#include "number_set.h"
|
||||
#include <limits.h>
|
||||
@ -45,7 +46,6 @@
|
||||
#include <asm/unistd.h>
|
||||
|
||||
#include "regs.h"
|
||||
#include "ptrace.h"
|
||||
|
||||
#if defined(SPARC64)
|
||||
# undef PTRACE_GETREGS
|
||||
|
@ -32,12 +32,12 @@
|
||||
#include <asm/unistd.h>
|
||||
|
||||
#include <errno.h>
|
||||
#include "ptrace.h"
|
||||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <sys/wait.h>
|
||||
#include <unistd.h>
|
||||
#include "ptrace.h"
|
||||
#include <linux/audit.h>
|
||||
|
||||
static const char *errstr;
|
||||
|
@ -30,10 +30,10 @@
|
||||
#include "tests.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <sys/ptrace.h>
|
||||
#include <signal.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/ptrace.h>
|
||||
#include <sys/uio.h>
|
||||
#include <sys/wait.h>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user