aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2023-08-08 14:38:22 +0000
committerJoseph Myers <joseph@codesourcery.com>2023-08-08 14:38:22 +0000
commitb163fca6c399808f6c447be98d09cd1165e78e07 (patch)
treea2da2dd57d89542b74d608bec13e97e60ced161b
parentc8c20039c7595677f9180b487c4424a5a08c572f (diff)
downloadglibc-b163fca6c399808f6c447be98d09cd1165e78e07.zip
glibc-b163fca6c399808f6c447be98d09cd1165e78e07.tar.gz
glibc-b163fca6c399808f6c447be98d09cd1165e78e07.tar.bz2
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.
-rw-r--r--sysdeps/unix/sysv/linux/aarch64/sys/ptrace.h14
-rw-r--r--sysdeps/unix/sysv/linux/arm/sys/ptrace.h12
-rw-r--r--sysdeps/unix/sysv/linux/bits/ptrace-shared.h10
-rw-r--r--sysdeps/unix/sysv/linux/ia64/sys/ptrace.h12
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/sys/ptrace.h14
-rw-r--r--sysdeps/unix/sysv/linux/s390/sys/ptrace.h12
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sys/ptrace.h12
-rw-r--r--sysdeps/unix/sysv/linux/sys/ptrace.h12
-rw-r--r--sysdeps/unix/sysv/linux/x86/sys/ptrace.h12
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 2bbbedc..c4dc6f9 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 e6c7eb6..a31bc6b 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 2737937..96a6562 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 c4e4e76..27a4291 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 744f0f7..2fbd294 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 948c116..c1adc3d 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 bcbc901..56ce00c 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 075c5e1..c57575c 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 9319f47..547aa83 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
};