public inbox for glibc-cvs@sourceware.org help / color / mirror / Atom feed
From: Joseph Myers <jsm28@sourceware.org> To: glibc-cvs@sourceware.org Subject: [glibc] Add PTRACE_SET_SYSCALL_USER_DISPATCH_CONFIG etc. from Linux 6.4 to sys/ptrace.h Date: Tue, 8 Aug 2023 14:38:37 +0000 (GMT) [thread overview] Message-ID: <20230808143837.2FA9F3858D20@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=b163fca6c399808f6c447be98d09cd1165e78e07 commit b163fca6c399808f6c447be98d09cd1165e78e07 Author: Joseph Myers <joseph@codesourcery.com> Date: Tue Aug 8 14:38:22 2023 +0000 Add PTRACE_SET_SYSCALL_USER_DISPATCH_CONFIG etc. from Linux 6.4 to sys/ptrace.h Linux 6.4 adds new constants PTRACE_SET_SYSCALL_USER_DISPATCH_CONFIG and PTRACE_GET_SYSCALL_USER_DISPATCH_CONFIG. Add those to all relevant sys/ptrace.h headers, along with adding the associated argument structure to bits/ptrace-shared.h (named struct __ptrace_sud_config there following the usual convention for such structures). Tested for x86_64 and with build-many-glibcs.py. Diff: --- sysdeps/unix/sysv/linux/aarch64/sys/ptrace.h | 14 +++++++++++++- sysdeps/unix/sysv/linux/arm/sys/ptrace.h | 12 +++++++++++- sysdeps/unix/sysv/linux/bits/ptrace-shared.h | 10 ++++++++++ sysdeps/unix/sysv/linux/ia64/sys/ptrace.h | 12 +++++++++++- sysdeps/unix/sysv/linux/powerpc/sys/ptrace.h | 14 +++++++++++++- sysdeps/unix/sysv/linux/s390/sys/ptrace.h | 12 ++++++++++++ sysdeps/unix/sysv/linux/sparc/sys/ptrace.h | 12 +++++++++++- sysdeps/unix/sysv/linux/sys/ptrace.h | 12 +++++++++++- sysdeps/unix/sysv/linux/x86/sys/ptrace.h | 12 +++++++++++- 9 files changed, 103 insertions(+), 7 deletions(-) diff --git a/sysdeps/unix/sysv/linux/aarch64/sys/ptrace.h b/sysdeps/unix/sysv/linux/aarch64/sys/ptrace.h index 2bbbedc597..c4dc6f9d02 100644 --- a/sysdeps/unix/sysv/linux/aarch64/sys/ptrace.h +++ b/sysdeps/unix/sysv/linux/aarch64/sys/ptrace.h @@ -59,6 +59,8 @@ __BEGIN_DECLS #undef PTRACE_SECCOMP_GET_METADATA #undef PTRACE_GET_SYSCALL_INFO #undef PTRACE_GET_RSEQ_CONFIGURATION +#undef PTRACE_SET_SYSCALL_USER_DISPATCH_CONFIG +#undef PTRACE_GET_SYSCALL_USER_DISPATCH_CONFIG /* Type of the REQUEST argument to `ptrace.' */ enum __ptrace_request @@ -195,8 +197,18 @@ enum __ptrace_request #define PTRACE_GET_SYSCALL_INFO PTRACE_GET_SYSCALL_INFO /* Get rseq configuration information. */ - PTRACE_GET_RSEQ_CONFIGURATION = 0x420f + PTRACE_GET_RSEQ_CONFIGURATION = 0x420f, #define PTRACE_GET_RSEQ_CONFIGURATION PTRACE_GET_RSEQ_CONFIGURATION + + /* Set configuration for syscall user dispatch. */ + PTRACE_SET_SYSCALL_USER_DISPATCH_CONFIG = 0x4210, +#define PTRACE_SET_SYSCALL_USER_DISPATCH_CONFIG \ + PTRACE_SET_SYSCALL_USER_DISPATCH_CONFIG + + /* Get configuration for syscall user dispatch. */ + PTRACE_GET_SYSCALL_USER_DISPATCH_CONFIG = 0x4211 +#define PTRACE_GET_SYSCALL_USER_DISPATCH_CONFIG \ + PTRACE_GET_SYSCALL_USER_DISPATCH_CONFIG }; diff --git a/sysdeps/unix/sysv/linux/arm/sys/ptrace.h b/sysdeps/unix/sysv/linux/arm/sys/ptrace.h index e6c7eb60e0..a31bc6b2ee 100644 --- a/sysdeps/unix/sysv/linux/arm/sys/ptrace.h +++ b/sysdeps/unix/sysv/linux/arm/sys/ptrace.h @@ -204,8 +204,18 @@ enum __ptrace_request #define PTRACE_GET_SYSCALL_INFO PTRACE_GET_SYSCALL_INFO /* Get rseq configuration information. */ - PTRACE_GET_RSEQ_CONFIGURATION = 0x420f + PTRACE_GET_RSEQ_CONFIGURATION = 0x420f, #define PTRACE_GET_RSEQ_CONFIGURATION PTRACE_GET_RSEQ_CONFIGURATION + + /* Set configuration for syscall user dispatch. */ + PTRACE_SET_SYSCALL_USER_DISPATCH_CONFIG = 0x4210, +#define PTRACE_SET_SYSCALL_USER_DISPATCH_CONFIG \ + PTRACE_SET_SYSCALL_USER_DISPATCH_CONFIG + + /* Get configuration for syscall user dispatch. */ + PTRACE_GET_SYSCALL_USER_DISPATCH_CONFIG = 0x4211 +#define PTRACE_GET_SYSCALL_USER_DISPATCH_CONFIG \ + PTRACE_GET_SYSCALL_USER_DISPATCH_CONFIG }; diff --git a/sysdeps/unix/sysv/linux/bits/ptrace-shared.h b/sysdeps/unix/sysv/linux/bits/ptrace-shared.h index 2737937dea..96a656217d 100644 --- a/sysdeps/unix/sysv/linux/bits/ptrace-shared.h +++ b/sysdeps/unix/sysv/linux/bits/ptrace-shared.h @@ -130,6 +130,16 @@ struct __ptrace_rseq_configuration __uint32_t pad; }; +/* Argument of PTRACE_SET_SYSCALL_USER_DISPATCH_CONFIG and + PTRACE_GET_SYSCALL_USER_DISPATCH_CONFIG. */ +struct __ptrace_sud_config +{ + __uint64_t mode; + __uint64_t selector; + __uint64_t offset; + __uint64_t len; +}; + /* Perform process tracing functions. REQUEST is one of the values above, and determines the action to be taken. For all requests except PTRACE_TRACEME, PID specifies the process to be diff --git a/sysdeps/unix/sysv/linux/ia64/sys/ptrace.h b/sysdeps/unix/sysv/linux/ia64/sys/ptrace.h index c4e4e76c56..27a4291b7b 100644 --- a/sysdeps/unix/sysv/linux/ia64/sys/ptrace.h +++ b/sysdeps/unix/sysv/linux/ia64/sys/ptrace.h @@ -157,8 +157,18 @@ enum __ptrace_request #define PTRACE_GET_SYSCALL_INFO PTRACE_GET_SYSCALL_INFO /* Get rseq configuration information. */ - PTRACE_GET_RSEQ_CONFIGURATION = 0x420f + PTRACE_GET_RSEQ_CONFIGURATION = 0x420f, #define PTRACE_GET_RSEQ_CONFIGURATION PTRACE_GET_RSEQ_CONFIGURATION + + /* Set configuration for syscall user dispatch. */ + PTRACE_SET_SYSCALL_USER_DISPATCH_CONFIG = 0x4210, +#define PTRACE_SET_SYSCALL_USER_DISPATCH_CONFIG \ + PTRACE_SET_SYSCALL_USER_DISPATCH_CONFIG + + /* Get configuration for syscall user dispatch. */ + PTRACE_GET_SYSCALL_USER_DISPATCH_CONFIG = 0x4211 +#define PTRACE_GET_SYSCALL_USER_DISPATCH_CONFIG \ + PTRACE_GET_SYSCALL_USER_DISPATCH_CONFIG }; diff --git a/sysdeps/unix/sysv/linux/powerpc/sys/ptrace.h b/sysdeps/unix/sysv/linux/powerpc/sys/ptrace.h index 744f0f727e..2fbd29455c 100644 --- a/sysdeps/unix/sysv/linux/powerpc/sys/ptrace.h +++ b/sysdeps/unix/sysv/linux/powerpc/sys/ptrace.h @@ -40,6 +40,7 @@ __BEGIN_DECLS # undef PTRACE_GETSIGINFO # undef PTRACE_GETSIGMASK # undef PTRACE_GET_SYSCALL_INFO +# undef PTRACE_GET_SYSCALL_USER_DISPATCH_CONFIG # undef PTRACE_GETVRREGS # undef PTRACE_GETVSRREGS # undef PTRACE_INTERRUPT @@ -62,6 +63,7 @@ __BEGIN_DECLS # undef PTRACE_SETREGSET # undef PTRACE_SETSIGINFO # undef PTRACE_SETSIGMASK +# undef PTRACE_SET_SYSCALL_USER_DISPATCH_CONFIG # undef PTRACE_SETVRREGS # undef PTRACE_SETVSRREGS # undef PTRACE_SINGLEBLOCK @@ -265,8 +267,18 @@ enum __ptrace_request #define PTRACE_GET_SYSCALL_INFO PTRACE_GET_SYSCALL_INFO /* Get rseq configuration information. */ - PTRACE_GET_RSEQ_CONFIGURATION = 0x420f + PTRACE_GET_RSEQ_CONFIGURATION = 0x420f, #define PTRACE_GET_RSEQ_CONFIGURATION PTRACE_GET_RSEQ_CONFIGURATION + + /* Set configuration for syscall user dispatch. */ + PTRACE_SET_SYSCALL_USER_DISPATCH_CONFIG = 0x4210, +#define PTRACE_SET_SYSCALL_USER_DISPATCH_CONFIG \ + PTRACE_SET_SYSCALL_USER_DISPATCH_CONFIG + + /* Get configuration for syscall user dispatch. */ + PTRACE_GET_SYSCALL_USER_DISPATCH_CONFIG = 0x4211 +#define PTRACE_GET_SYSCALL_USER_DISPATCH_CONFIG \ + PTRACE_GET_SYSCALL_USER_DISPATCH_CONFIG }; diff --git a/sysdeps/unix/sysv/linux/s390/sys/ptrace.h b/sysdeps/unix/sysv/linux/s390/sys/ptrace.h index 948c1165a6..c1adc3d515 100644 --- a/sysdeps/unix/sysv/linux/s390/sys/ptrace.h +++ b/sysdeps/unix/sysv/linux/s390/sys/ptrace.h @@ -86,6 +86,8 @@ __BEGIN_DECLS # undef PTRACE_SYSCALL_INFO_EXIT # undef PTRACE_SYSCALL_INFO_SECCOMP # undef PTRACE_GET_RSEQ_CONFIGURATION +# undef PTRACE_SET_SYSCALL_USER_DISPATCH_CONFIG +# undef PTRACE_GET_SYSCALL_USER_DISPATCH_CONFIG #endif /* Type of the REQUEST argument to `ptrace.' */ enum __ptrace_request @@ -221,6 +223,16 @@ enum __ptrace_request PTRACE_GET_RSEQ_CONFIGURATION = 0x420f, #define PTRACE_GET_RSEQ_CONFIGURATION PTRACE_GET_RSEQ_CONFIGURATION + /* Set configuration for syscall user dispatch. */ + PTRACE_SET_SYSCALL_USER_DISPATCH_CONFIG = 0x4210, +#define PTRACE_SET_SYSCALL_USER_DISPATCH_CONFIG \ + PTRACE_SET_SYSCALL_USER_DISPATCH_CONFIG + + /* Get configuration for syscall user dispatch. */ + PTRACE_GET_SYSCALL_USER_DISPATCH_CONFIG = 0x4211, +#define PTRACE_GET_SYSCALL_USER_DISPATCH_CONFIG \ + PTRACE_GET_SYSCALL_USER_DISPATCH_CONFIG + PTRACE_PEEKUSR_AREA = 0x5000, #define PTRACE_PEEKUSR_AREA PTRACE_PEEKUSR_AREA diff --git a/sysdeps/unix/sysv/linux/sparc/sys/ptrace.h b/sysdeps/unix/sysv/linux/sparc/sys/ptrace.h index bcbc9013b7..56ce00c72a 100644 --- a/sysdeps/unix/sysv/linux/sparc/sys/ptrace.h +++ b/sysdeps/unix/sysv/linux/sparc/sys/ptrace.h @@ -225,8 +225,18 @@ enum __ptrace_request #define PTRACE_GET_SYSCALL_INFO PTRACE_GET_SYSCALL_INFO /* Get rseq configuration information. */ - PTRACE_GET_RSEQ_CONFIGURATION = 0x420f + PTRACE_GET_RSEQ_CONFIGURATION = 0x420f, #define PTRACE_GET_RSEQ_CONFIGURATION PTRACE_GET_RSEQ_CONFIGURATION + + /* Set configuration for syscall user dispatch. */ + PTRACE_SET_SYSCALL_USER_DISPATCH_CONFIG = 0x4210, +#define PTRACE_SET_SYSCALL_USER_DISPATCH_CONFIG \ + PTRACE_SET_SYSCALL_USER_DISPATCH_CONFIG + + /* Get configuration for syscall user dispatch. */ + PTRACE_GET_SYSCALL_USER_DISPATCH_CONFIG = 0x4211 +#define PTRACE_GET_SYSCALL_USER_DISPATCH_CONFIG \ + PTRACE_GET_SYSCALL_USER_DISPATCH_CONFIG }; diff --git a/sysdeps/unix/sysv/linux/sys/ptrace.h b/sysdeps/unix/sysv/linux/sys/ptrace.h index 075c5e126d..c57575cf7a 100644 --- a/sysdeps/unix/sysv/linux/sys/ptrace.h +++ b/sysdeps/unix/sysv/linux/sys/ptrace.h @@ -174,8 +174,18 @@ enum __ptrace_request #define PTRACE_GET_SYSCALL_INFO PTRACE_GET_SYSCALL_INFO /* Get rseq configuration information. */ - PTRACE_GET_RSEQ_CONFIGURATION = 0x420f + PTRACE_GET_RSEQ_CONFIGURATION = 0x420f, #define PTRACE_GET_RSEQ_CONFIGURATION PTRACE_GET_RSEQ_CONFIGURATION + + /* Set configuration for syscall user dispatch. */ + PTRACE_SET_SYSCALL_USER_DISPATCH_CONFIG = 0x4210, +#define PTRACE_SET_SYSCALL_USER_DISPATCH_CONFIG \ + PTRACE_SET_SYSCALL_USER_DISPATCH_CONFIG + + /* Get configuration for syscall user dispatch. */ + PTRACE_GET_SYSCALL_USER_DISPATCH_CONFIG = 0x4211 +#define PTRACE_GET_SYSCALL_USER_DISPATCH_CONFIG \ + PTRACE_GET_SYSCALL_USER_DISPATCH_CONFIG }; diff --git a/sysdeps/unix/sysv/linux/x86/sys/ptrace.h b/sysdeps/unix/sysv/linux/x86/sys/ptrace.h index 9319f4735a..547aa83c55 100644 --- a/sysdeps/unix/sysv/linux/x86/sys/ptrace.h +++ b/sysdeps/unix/sysv/linux/x86/sys/ptrace.h @@ -194,8 +194,18 @@ enum __ptrace_request #define PTRACE_GET_SYSCALL_INFO PTRACE_GET_SYSCALL_INFO /* Get rseq configuration information. */ - PTRACE_GET_RSEQ_CONFIGURATION = 0x420f + PTRACE_GET_RSEQ_CONFIGURATION = 0x420f, #define PTRACE_GET_RSEQ_CONFIGURATION PTRACE_GET_RSEQ_CONFIGURATION + + /* Set configuration for syscall user dispatch. */ + PTRACE_SET_SYSCALL_USER_DISPATCH_CONFIG = 0x4210, +#define PTRACE_SET_SYSCALL_USER_DISPATCH_CONFIG \ + PTRACE_SET_SYSCALL_USER_DISPATCH_CONFIG + + /* Get configuration for syscall user dispatch. */ + PTRACE_GET_SYSCALL_USER_DISPATCH_CONFIG = 0x4211 +#define PTRACE_GET_SYSCALL_USER_DISPATCH_CONFIG \ + PTRACE_GET_SYSCALL_USER_DISPATCH_CONFIG };
reply other threads:[~2023-08-08 14:38 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20230808143837.2FA9F3858D20@sourceware.org \ --to=jsm28@sourceware.org \ --cc=glibc-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).