Even when the rseq syscall is unavailable, set the __rseq_offset to the
correct value as application or library code might try to check the
registration status by reading the cpu_id.
Change-Id: I8f579af236e17a45dfb71c3310bc41a9c17652fd
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
/* librseq owns the registration */
rseq_ownership = 1;
/* librseq owns the registration */
rseq_ownership = 1;
+ /* Calculate the offset of the rseq area from the thread pointer. */
+ rseq_offset = (uintptr_t)&__rseq_abi - (uintptr_t)rseq_thread_pointer();
+
+ /* rseq flags are deprecated, always set to 0. */
+ rseq_flags = 0;
+
/*
* Check if the rseq syscall is available, if not set the size and
* feature_size to 0.
/*
* Check if the rseq syscall is available, if not set the size and
* feature_size to 0.
- /* Calculate the offset of the rseq area from the thread pointer. */
- rseq_offset = (uintptr_t)&__rseq_abi - (uintptr_t)rseq_thread_pointer();
-
- /* rseq flags are deprecated, always set to 0. */
- rseq_flags = 0;
-
/*
* If the feature size matches the original ABI (20), set the size to
* match the original ABI allocation (32), otherwise use the allocated
/*
* If the feature size matches the original ABI (20), set the size to
* match the original ABI allocation (32), otherwise use the allocated