| e6644c96 | 11-Mar-2025 |
Michael Jeanson <mjeanson@efficios.com> |
rseq/selftests: Ensure the rseq ABI TLS is actually 1024 bytes
Adding the aligned(1024) attribute to the definition of __rseq_abi did not increase its size to 1024, for this attribute to impact the
rseq/selftests: Ensure the rseq ABI TLS is actually 1024 bytes
Adding the aligned(1024) attribute to the definition of __rseq_abi did not increase its size to 1024, for this attribute to impact the size of __rseq_abi it would need to be added to the declaration of 'struct rseq_abi'. We only want to increase the size of the TLS allocation to ensure registration will succeed with future extended ABI. Use a union with a dummy member to ensure we allocate 1024 bytes.
Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Signed-off-by: Ingo Molnar <mingo@kernel.org> Reviewed-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Link: https://lore.kernel.org/r/20250311192222.323453-1-mjeanson@efficios.com
show more ...
|
| 2b2fe605 | 27-Jun-2023 |
Mathieu Desnoyers <mathieu.desnoyers@efficios.com> |
selftests/rseq: Use rseq_unqual_scalar_typeof in macros
Use rseq_unqual_scalar_typeof() rather than typeof() in macros to remove the volatile qualifier (if there is one in the input argument), thus
selftests/rseq: Use rseq_unqual_scalar_typeof in macros
Use rseq_unqual_scalar_typeof() rather than typeof() in macros to remove the volatile qualifier (if there is one in the input argument), thus generating better assembly code in those scenarios.
Also add extra brackets around the "p" parameter in RSEQ_READ_ONCE(), RSEQ_WRITE_ONCE(), and rseq_unqual_scalar_typeof() across architectures to preserve expectations of operator priority. Here is an example that shows how operator priority may be an issue with missing parentheses:
#define m(p) \ do { \ __typeof__(*p) v = 0; \ } while (0)
void fct(unsigned long long *p1) { m(p1 + 1); /* works */ m(1 + p1); /* broken */ }
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Cc: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
show more ...
|
| 0fbbf07c | 27-Jun-2023 |
Mathieu Desnoyers <mathieu.desnoyers@efficios.com> |
selftests/rseq: Fix arm64 buggy load-acquire/store-release macros
The arm64 load-acquire/store-release macros from the Linux kernel rseq selftests are buggy. Remplace them by a working implementatio
selftests/rseq: Fix arm64 buggy load-acquire/store-release macros
The arm64 load-acquire/store-release macros from the Linux kernel rseq selftests are buggy. Remplace them by a working implementation.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Will Deacon <will@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
show more ...
|
| d6aaa23a | 27-Jun-2023 |
Mathieu Desnoyers <mathieu.desnoyers@efficios.com> |
selftests/rseq: Implement rseq_unqual_scalar_typeof
Allow defining variables and perform cast with a typeof which removes the volatile and const qualifiers.
This prevents declaring a stack variable
selftests/rseq: Implement rseq_unqual_scalar_typeof
Allow defining variables and perform cast with a typeof which removes the volatile and const qualifiers.
This prevents declaring a stack variable with a volatile qualifier within a macro, which would generate sub-optimal assembler.
This is imported from the "librseq" project.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
show more ...
|