Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rseq/selftests: Clarify rseq_prepare_unload() helper requirements
The rseq.h UAPI now documents that the rseq_cs field must be cleared before reclaiming memory that contains the targeted struct rseq_cs, but also that the rseq_cs field must be cleared before reclaiming memory of the code pointed to by the rseq_cs start_ip and post_commit_offset fields. While we can expect that use of dlclose(3) will typically unmap both struct rseq_cs and its associated code at once, nothing would theoretically prevent a JIT from reclaiming the code without reclaiming the struct rseq_cs, which would erroneously allow the kernel to consider new code which is not a rseq critical section as a rseq critical section following a code reclaim. Suggested-by: Florian Weimer <[email protected]> Signed-off-by: Mathieu Desnoyers <[email protected]> Cc: Shuah Khan <[email protected]> Cc: Florian Weimer <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Peter Zijlstra (Intel) <[email protected]> Cc: "Paul E. McKenney" <[email protected]> Cc: Boqun Feng <[email protected]> Cc: "H . Peter Anvin" <[email protected]> Cc: Paul Turner <[email protected]> Cc: Dmitry Vyukov <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
- Loading branch information