|
|
708e55 |
commit 4b527650e0d559a5f693275c598667e06cd6455c
|
|
|
708e55 |
Author: Florian Weimer <fweimer@redhat.com>
|
|
|
708e55 |
Date: Thu Jun 2 16:29:55 2022 +0200
|
|
|
708e55 |
|
|
|
708e55 |
Linux: Adjust struct rseq definition to current kernel version
|
|
|
708e55 |
|
|
|
708e55 |
This definition is only used as a fallback with old kernel headers.
|
|
|
708e55 |
The change follows kernel commit bfdf4e6208051ed7165b2e92035b4bf11
|
|
|
708e55 |
("rseq: Remove broken uapi field layout on 32-bit little endian").
|
|
|
708e55 |
|
|
|
708e55 |
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
|
|
|
708e55 |
|
|
|
708e55 |
diff --git a/sysdeps/unix/sysv/linux/sys/rseq.h b/sysdeps/unix/sysv/linux/sys/rseq.h
|
|
|
708e55 |
index 791ed83176b61fe4..56550329db962cc8 100644
|
|
|
708e55 |
--- a/sysdeps/unix/sysv/linux/sys/rseq.h
|
|
|
708e55 |
+++ b/sysdeps/unix/sysv/linux/sys/rseq.h
|
|
|
708e55 |
@@ -24,7 +24,6 @@
|
|
|
708e55 |
#include <stddef.h>
|
|
|
708e55 |
#include <stdint.h>
|
|
|
708e55 |
#include <sys/cdefs.h>
|
|
|
708e55 |
-#include <bits/endian.h>
|
|
|
708e55 |
|
|
|
708e55 |
#ifdef __has_include
|
|
|
708e55 |
# if __has_include ("linux/rseq.h")
|
|
|
708e55 |
@@ -129,28 +128,13 @@ struct rseq
|
|
|
708e55 |
targeted by the rseq_cs. Also needs to be set to NULL by user-space
|
|
|
708e55 |
before reclaiming memory that contains the targeted struct rseq_cs.
|
|
|
708e55 |
|
|
|
708e55 |
- Read and set by the kernel. Set by user-space with single-copy
|
|
|
708e55 |
- atomicity semantics. This field should only be updated by the
|
|
|
708e55 |
- thread which registered this data structure. Aligned on 64-bit. */
|
|
|
708e55 |
- union
|
|
|
708e55 |
- {
|
|
|
708e55 |
- uint64_t ptr64;
|
|
|
708e55 |
-# ifdef __LP64__
|
|
|
708e55 |
- uint64_t ptr;
|
|
|
708e55 |
-# else /* __LP64__ */
|
|
|
708e55 |
- struct
|
|
|
708e55 |
- {
|
|
|
708e55 |
-#if __BYTE_ORDER == __BIG_ENDIAN
|
|
|
708e55 |
- uint32_t padding; /* Initialized to zero. */
|
|
|
708e55 |
- uint32_t ptr32;
|
|
|
708e55 |
-# else /* LITTLE */
|
|
|
708e55 |
- uint32_t ptr32;
|
|
|
708e55 |
- uint32_t padding; /* Initialized to zero. */
|
|
|
708e55 |
-# endif /* ENDIAN */
|
|
|
708e55 |
- } ptr;
|
|
|
708e55 |
-# endif /* __LP64__ */
|
|
|
708e55 |
- } rseq_cs;
|
|
|
708e55 |
+ Read and set by the kernel. Set by user-space with single-copy
|
|
|
708e55 |
+ atomicity semantics. This field should only be updated by the
|
|
|
708e55 |
+ thread which registered this data structure. Aligned on 64-bit.
|
|
|
708e55 |
|
|
|
708e55 |
+ 32-bit architectures should update the low order bits of the
|
|
|
708e55 |
+ rseq_cs field, leaving the high order bits initialized to 0. */
|
|
|
708e55 |
+ uint64_t rseq_cs;
|
|
|
708e55 |
/* Restartable sequences flags field.
|
|
|
708e55 |
|
|
|
708e55 |
This field should only be updated by the thread which
|