x86-64: Implement/use load_cbne_load_add_load_add_store
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 5 Mar 2024 15:06:51 +0000 (10:06 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 5 Mar 2024 16:12:55 +0000 (11:12 -0500)
commitd87b0cd222a1c11751be7f8b655fc0dc45b7dc12
tree3fbfad3a310e267056392b3d4efdeee283755c9b
parent0f963443529cf64515af5f9ec90dec7b754880dc
x86-64: Implement/use load_cbne_load_add_load_add_store

Change the current load_add_load_load_add_store for a
load_cbne_load_add_load_add_store, which allows validating that the
percpu pointer did not change since it was loaded from C.

This allows precomputing the address of the percpu memory area in C and
provide it as a second pointer argument.

The comparison approach is prefered to the offset-from-pointer approach
because it does not leak implementation details of the percpu allocator.

Add missing rseq_after_asm_goto() in the static inline function.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I3fe9d57d13f7507d5af95ef37391ad36fe2221fe
include/rseq/arch/x86/bits.h
include/rseq/pseudocode.h
include/rseq/rseq.h
tests/param_test.c
This page took 0.023723 seconds and 4 git commands to generate.