mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-02-07 06:53:33 +00:00
Add PTRACE_SECCOMP_GET_METADATA
(#882)
see linux commit: 26500475ac1b499d8636ff281311d633909f5d20 ptrace, seccomp: add support for retrieving seccomp metadata
This commit is contained in:
parent
610e0d95cb
commit
4f517503e4
4 changed files with 55 additions and 49 deletions
|
@ -51,6 +51,7 @@ const char *(DescribePtrace)(char buf[12], int x) {
|
|||
if (x == PTRACE_ATTACH) return "PTRACE_ATTACH";
|
||||
if (x == PTRACE_SEIZE) return "PTRACE_SEIZE";
|
||||
if (x == PTRACE_SECCOMP_GET_FILTER) return "PTRACE_SECCOMP_GET_FILTER";
|
||||
if (x == PTRACE_SECCOMP_GET_METADATA) return "PTRACE_SECCOMP_GET_METADATA";
|
||||
if (x == PTRACE_DETACH) return "PTRACE_DETACH";
|
||||
FormatInt32(buf, x);
|
||||
return buf;
|
||||
|
|
|
@ -765,6 +765,7 @@ syscon ptrace PTRACE_INTERRUPT 0x4207 0x4207 -1 -1 -1 -1 -1 -1
|
|||
syscon ptrace PTRACE_LISTEN 0x4208 0x4208 -1 -1 -1 -1 -1 -1
|
||||
syscon ptrace PTRACE_PEEKSIGINFO 0x4209 0x4209 -1 -1 -1 -1 -1 -1
|
||||
syscon ptrace PTRACE_SECCOMP_GET_FILTER 0x420c 0x420c -1 -1 -1 -1 -1 -1
|
||||
syscon ptrace PTRACE_SECCOMP_GET_METADATA 0x420d 0x420d -1 -1 -1 -1 -1 -1
|
||||
syscon ptrace PTRACE_SEIZE 0x4206 0x4206 -1 -1 -1 -1 -1 -1
|
||||
syscon ptrace PTRACE_SETREGSET 0x4205 0x4205 -1 -1 -1 -1 -1 -1
|
||||
syscon ptrace PTRACE_SETSIGMASK 0x420b 0x420b -1 -1 -1 -1 -1 -1
|
||||
|
|
2
libc/sysv/consts/PTRACE_SECCOMP_GET_METADATA.S
Normal file
2
libc/sysv/consts/PTRACE_SECCOMP_GET_METADATA.S
Normal file
|
@ -0,0 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon ptrace,PTRACE_SECCOMP_GET_METADATA,0x420d,0x420d,-1,-1,-1,-1,-1,-1
|
|
@ -32,6 +32,7 @@ extern const int PTRACE_INTERRUPT;
|
|||
extern const int PTRACE_LISTEN;
|
||||
extern const int PTRACE_PEEKSIGINFO;
|
||||
extern const int PTRACE_SECCOMP_GET_FILTER;
|
||||
extern const int PTRACE_SECCOMP_GET_METADATA;
|
||||
extern const int PTRACE_SEIZE;
|
||||
extern const int PTRACE_SETREGSET;
|
||||
extern const int PTRACE_SETSIGMASK;
|
||||
|
@ -56,54 +57,55 @@ extern const int PTRACE_EVENT_SECCOMP;
|
|||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
|
||||
#define PTRACE_TRACEME PTRACE_TRACEME
|
||||
#define PTRACE_PEEKTEXT PTRACE_PEEKTEXT
|
||||
#define PTRACE_PEEKDATA PTRACE_PEEKDATA
|
||||
#define PTRACE_PEEKUSER PTRACE_PEEKUSER
|
||||
#define PTRACE_POKETEXT PTRACE_POKETEXT
|
||||
#define PTRACE_POKEDATA PTRACE_POKEDATA
|
||||
#define PTRACE_POKEUSER PTRACE_POKEUSER
|
||||
#define PTRACE_CONT PTRACE_CONT
|
||||
#define PTRACE_KILL PTRACE_KILL
|
||||
#define PTRACE_SINGLESTEP PTRACE_SINGLESTEP
|
||||
#define PTRACE_GETREGS PTRACE_GETREGS
|
||||
#define PTRACE_SETREGS PTRACE_SETREGS
|
||||
#define PTRACE_GETFPREGS PTRACE_GETFPREGS
|
||||
#define PTRACE_SETFPREGS PTRACE_SETFPREGS
|
||||
#define PTRACE_ATTACH PTRACE_ATTACH
|
||||
#define PTRACE_DETACH PTRACE_DETACH
|
||||
#define PTRACE_GETFPXREGS PTRACE_GETFPXREGS
|
||||
#define PTRACE_SETFPXREGS PTRACE_SETFPXREGS
|
||||
#define PTRACE_SYSCALL PTRACE_SYSCALL
|
||||
#define PTRACE_GETEVENTMSG PTRACE_GETEVENTMSG
|
||||
#define PTRACE_GETSIGINFO PTRACE_GETSIGINFO
|
||||
#define PTRACE_SETOPTIONS PTRACE_SETOPTIONS
|
||||
#define PTRACE_SETSIGINFO PTRACE_SETSIGINFO
|
||||
#define PTRACE_GETREGSET PTRACE_GETREGSET
|
||||
#define PTRACE_GETSIGMASK PTRACE_GETSIGMASK
|
||||
#define PTRACE_INTERRUPT PTRACE_INTERRUPT
|
||||
#define PTRACE_LISTEN PTRACE_LISTEN
|
||||
#define PTRACE_PEEKSIGINFO PTRACE_PEEKSIGINFO
|
||||
#define PTRACE_SECCOMP_GET_FILTER PTRACE_SECCOMP_GET_FILTER
|
||||
#define PTRACE_SEIZE PTRACE_SEIZE
|
||||
#define PTRACE_SETREGSET PTRACE_SETREGSET
|
||||
#define PTRACE_SETSIGMASK PTRACE_SETSIGMASK
|
||||
#define PTRACE_O_TRACESYSGOOD PTRACE_O_TRACESYSGOOD
|
||||
#define PTRACE_O_TRACEFORK PTRACE_O_TRACEFORK
|
||||
#define PTRACE_O_TRACEVFORK PTRACE_O_TRACEVFORK
|
||||
#define PTRACE_O_TRACECLONE PTRACE_O_TRACECLONE
|
||||
#define PTRACE_O_TRACEEXEC PTRACE_O_TRACEEXEC
|
||||
#define PTRACE_O_TRACEVFORKDONE PTRACE_O_TRACEVFORKDONE
|
||||
#define PTRACE_O_TRACEEXIT PTRACE_O_TRACEEXIT
|
||||
#define PTRACE_O_TRACESECCOMP PTRACE_O_TRACESECCOMP
|
||||
#define PTRACE_O_MASK PTRACE_O_MASK
|
||||
#define PTRACE_EVENT_FORK PTRACE_EVENT_FORK
|
||||
#define PTRACE_EVENT_VFORK PTRACE_EVENT_VFORK
|
||||
#define PTRACE_EVENT_CLONE PTRACE_EVENT_CLONE
|
||||
#define PTRACE_EVENT_EXEC PTRACE_EVENT_EXEC
|
||||
#define PTRACE_EVENT_VFORK_DONE PTRACE_EVENT_VFORK_DONE
|
||||
#define PTRACE_EVENT_EXIT PTRACE_EVENT_EXIT
|
||||
#define PTRACE_EVENT_STOP PTRACE_EVENT_STOP
|
||||
#define PTRACE_EVENT_SECCOMP PTRACE_EVENT_SECCOMP
|
||||
#define PTRACE_TRACEME PTRACE_TRACEME
|
||||
#define PTRACE_PEEKTEXT PTRACE_PEEKTEXT
|
||||
#define PTRACE_PEEKDATA PTRACE_PEEKDATA
|
||||
#define PTRACE_PEEKUSER PTRACE_PEEKUSER
|
||||
#define PTRACE_POKETEXT PTRACE_POKETEXT
|
||||
#define PTRACE_POKEDATA PTRACE_POKEDATA
|
||||
#define PTRACE_POKEUSER PTRACE_POKEUSER
|
||||
#define PTRACE_CONT PTRACE_CONT
|
||||
#define PTRACE_KILL PTRACE_KILL
|
||||
#define PTRACE_SINGLESTEP PTRACE_SINGLESTEP
|
||||
#define PTRACE_GETREGS PTRACE_GETREGS
|
||||
#define PTRACE_SETREGS PTRACE_SETREGS
|
||||
#define PTRACE_GETFPREGS PTRACE_GETFPREGS
|
||||
#define PTRACE_SETFPREGS PTRACE_SETFPREGS
|
||||
#define PTRACE_ATTACH PTRACE_ATTACH
|
||||
#define PTRACE_DETACH PTRACE_DETACH
|
||||
#define PTRACE_GETFPXREGS PTRACE_GETFPXREGS
|
||||
#define PTRACE_SETFPXREGS PTRACE_SETFPXREGS
|
||||
#define PTRACE_SYSCALL PTRACE_SYSCALL
|
||||
#define PTRACE_GETEVENTMSG PTRACE_GETEVENTMSG
|
||||
#define PTRACE_GETSIGINFO PTRACE_GETSIGINFO
|
||||
#define PTRACE_SETOPTIONS PTRACE_SETOPTIONS
|
||||
#define PTRACE_SETSIGINFO PTRACE_SETSIGINFO
|
||||
#define PTRACE_GETREGSET PTRACE_GETREGSET
|
||||
#define PTRACE_GETSIGMASK PTRACE_GETSIGMASK
|
||||
#define PTRACE_INTERRUPT PTRACE_INTERRUPT
|
||||
#define PTRACE_LISTEN PTRACE_LISTEN
|
||||
#define PTRACE_PEEKSIGINFO PTRACE_PEEKSIGINFO
|
||||
#define PTRACE_SECCOMP_GET_FILTER PTRACE_SECCOMP_GET_FILTER
|
||||
#define PTRACE_SECCOMP_GET_METADATA PTRACE_SECCOMP_GET_METADATA
|
||||
#define PTRACE_SEIZE PTRACE_SEIZE
|
||||
#define PTRACE_SETREGSET PTRACE_SETREGSET
|
||||
#define PTRACE_SETSIGMASK PTRACE_SETSIGMASK
|
||||
#define PTRACE_O_TRACESYSGOOD PTRACE_O_TRACESYSGOOD
|
||||
#define PTRACE_O_TRACEFORK PTRACE_O_TRACEFORK
|
||||
#define PTRACE_O_TRACEVFORK PTRACE_O_TRACEVFORK
|
||||
#define PTRACE_O_TRACECLONE PTRACE_O_TRACECLONE
|
||||
#define PTRACE_O_TRACEEXEC PTRACE_O_TRACEEXEC
|
||||
#define PTRACE_O_TRACEVFORKDONE PTRACE_O_TRACEVFORKDONE
|
||||
#define PTRACE_O_TRACEEXIT PTRACE_O_TRACEEXIT
|
||||
#define PTRACE_O_TRACESECCOMP PTRACE_O_TRACESECCOMP
|
||||
#define PTRACE_O_MASK PTRACE_O_MASK
|
||||
#define PTRACE_EVENT_FORK PTRACE_EVENT_FORK
|
||||
#define PTRACE_EVENT_VFORK PTRACE_EVENT_VFORK
|
||||
#define PTRACE_EVENT_CLONE PTRACE_EVENT_CLONE
|
||||
#define PTRACE_EVENT_EXEC PTRACE_EVENT_EXEC
|
||||
#define PTRACE_EVENT_VFORK_DONE PTRACE_EVENT_VFORK_DONE
|
||||
#define PTRACE_EVENT_EXIT PTRACE_EVENT_EXIT
|
||||
#define PTRACE_EVENT_STOP PTRACE_EVENT_STOP
|
||||
#define PTRACE_EVENT_SECCOMP PTRACE_EVENT_SECCOMP
|
||||
|
||||
#endif /* COSMOPOLITAN_LIBC_SYSV_CONSTS_PTRACE_H_ */
|
||||
|
|
Loading…
Reference in a new issue