Export the rseq feature size supported by the kernel as well as the required allocation alignment for the rseq per-thread area to user-space through ELF auxiliary vector entries. This is part of the extensible rseq ABI.
Showing the changes to include/uapi (2 of 3 files). Show all
Unified · Split
| @@ -30,6 +30,8 @@ · 29 unmodified lines | |||
| 30 | * differ from AT_PLATFORM. */ | 30 | * differ from AT_PLATFORM. */ |
| 31 | #define AT_RANDOM 25 /* address of 16 random bytes */ | 31 | #define AT_RANDOM 25 /* address of 16 random bytes */ |
| 32 | #define AT_HWCAP2 26 /* extension of AT_HWCAP */ | 32 | #define AT_HWCAP2 26 /* extension of AT_HWCAP */ |
| 33 | #define AT_RSEQ_FEATURE_SIZE 27 /* rseq supported feature size */ | ||
| 34 | #define AT_RSEQ_ALIGN 28 /* rseq allocation alignment */ | ||
| 33 | 35 | ||
| 34 | #define AT_EXECFN 31 /* filename of program */ | 36 | #define AT_EXECFN 31 /* filename of program */ |
| 35 | 37 | ||
| @@ -130,6 +130,11 @@ struct rseq { · 129 unmodified lines | |||
| 130 | * this thread. | 130 | * this thread. |
| 131 | */ | 131 | */ |
| 132 | __u32 flags; | 132 | __u32 flags; |
| 133 | |||
| 134 | /* | ||
| 135 | * Flexible array member at end of structure, after last feature field. | ||
| 136 | */ | ||
| 137 | char end[]; | ||
| 133 | } __attribute__((aligned(4 * sizeof(__u64)))); | 138 | } __attribute__((aligned(4 * sizeof(__u64)))); |
| 134 | 139 | ||
| 135 | #endif /* _UAPI_LINUX_RSEQ_H */ | 140 | #endif /* _UAPI_LINUX_RSEQ_H */ |