| e6644c96 | 11-Mar-2025 |
Michael Jeanson <[email protected]> |
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 <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> Reviewed-by: Mathieu Desnoyers <[email protected]> Link: https://lore.kernel.org/r/[email protected]
show more ...
|
| 2b2fe605 | 27-Jun-2023 |
Mathieu Desnoyers <[email protected]> |
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 <[email protected]> Cc: Peter Zijlstra <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
show more ...
|
| d6aaa23a | 27-Jun-2023 |
Mathieu Desnoyers <[email protected]> |
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 <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
show more ...
|
| ee31fff0 | 22-Nov-2022 |
Mathieu Desnoyers <[email protected]> |
selftests/rseq: Implement parametrized mm_cid test
Adapt to the rseq.h API changes introduced by commits "selftests/rseq: <arch>: Template memory ordering and percpu access mode".
Build a new param
selftests/rseq: Implement parametrized mm_cid test
Adapt to the rseq.h API changes introduced by commits "selftests/rseq: <arch>: Template memory ordering and percpu access mode".
Build a new param_test_mm_cid, param_test_mm_cid_benchmark, and param_test_mm_cid_compare_twice executables to test the new "mm_cid" rseq field.
Signed-off-by: Mathieu Desnoyers <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Link: https://lore.kernel.org/r/[email protected]
show more ...
|
| 171586a6 | 22-Nov-2022 |
Mathieu Desnoyers <[email protected]> |
selftests/rseq: riscv: Template memory ordering and percpu access mode
Introduce a rseq-riscv-bits.h template header which is internally included to generate the static inline functions covering:
-
selftests/rseq: riscv: Template memory ordering and percpu access mode
Introduce a rseq-riscv-bits.h template header which is internally included to generate the static inline functions covering:
- relaxed and release memory ordering, - per-cpu-id and per-mm-cid per-cpu data access.
Signed-off-by: Mathieu Desnoyers <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Link: https://lore.kernel.org/r/[email protected]
show more ...
|
| a94af3c5 | 22-Nov-2022 |
Mathieu Desnoyers <[email protected]> |
selftests/rseq: s390: Template memory ordering and percpu access mode
Introduce a rseq-s390-bits.h template header which is internally included to generate the static inline functions covering:
- r
selftests/rseq: s390: Template memory ordering and percpu access mode
Introduce a rseq-s390-bits.h template header which is internally included to generate the static inline functions covering:
- relaxed and release memory ordering, - per-cpu-id and per-mm-cid per-cpu data access.
Signed-off-by: Mathieu Desnoyers <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Link: https://lore.kernel.org/r/[email protected]
show more ...
|
| e61bd94c | 22-Nov-2022 |
Mathieu Desnoyers <[email protected]> |
selftests/rseq: ppc: Template memory ordering and percpu access mode
Introduce a rseq-ppc-bits.h template header which is internally included to generate the static inline functions covering:
- rel
selftests/rseq: ppc: Template memory ordering and percpu access mode
Introduce a rseq-ppc-bits.h template header which is internally included to generate the static inline functions covering:
- relaxed and release memory ordering, - per-cpu-id and per-mm-cid per-cpu data access.
Signed-off-by: Mathieu Desnoyers <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Link: https://lore.kernel.org/r/[email protected]
show more ...
|
| 431b6328 | 22-Nov-2022 |
Mathieu Desnoyers <[email protected]> |
selftests/rseq: mips: Template memory ordering and percpu access mode
Introduce a rseq-mips-bits.h template header which is internally included to generate the static inline functions covering:
- r
selftests/rseq: mips: Template memory ordering and percpu access mode
Introduce a rseq-mips-bits.h template header which is internally included to generate the static inline functions covering:
- relaxed and release memory ordering, - per-cpu-id and per-mm-cid per-cpu data access.
Signed-off-by: Mathieu Desnoyers <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Link: https://lore.kernel.org/r/[email protected]
show more ...
|