#include <linux/types.h>
#include <asm/ptrace.h>
+#define CREATE_TRACE_POINTS
+#include <trace/events/rseq.h>
+
/*
* The restartable sequences mechanism is the overlap of two distinct
* restart mechanisms: a sequence counter tracking preemption and signal
u.e.event_counter = ++t->rseq_event_counter;
if (__put_user(u.v, &t->rseq->u.v))
return false;
+ trace_rseq_update(t);
return true;
}
void __user *start_ip = NULL;
void __user *post_commit_ip = NULL;
void __user *abort_ip = NULL;
+ bool ret;
- if (!rseq_get_rseq_cs(t, &start_ip, &post_commit_ip, &abort_ip))
+ ret = rseq_get_rseq_cs(t, &start_ip, &post_commit_ip, &abort_ip);
+ trace_rseq_ip_fixup((void __user *)instruction_pointer(regs),
+ start_ip, post_commit_ip, abort_ip, t->rseq_event_counter,
+ ret);
+ if (!ret)
return false;
/* Handle potentially not being within a critical section. */