Re: [PATCH v13 07/14] unwind_user/deferred: Make unwind deferral requests NMI-safe

From
Steven Rostedt <rostedt@goodmis.org>
Date
2025-07-14 14:19:22
Also in
bpf, lkml
Reply to
Peter Zijlstra, 2025-07-14
On Mon, 14 Jul 2025 15:29:36 +0200
Peter Zijlstra [off-list ref] wrote:
quoted hunk ↗ jump to hunk
+#ifdef CONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG
+#define UNWIND_NMI_SAFE 1
+static inline bool try_assign_cnt(struct unwind_task_info *info, u32 cnt)
+{
+	u32 zero = 0;
+	return try_cmpxchg(&info->id.cnt, &zero, cnt);
+}
+static inline bool test_and_set_pending(struct unwind_task_info *info)
+{
+	return info->pending || cmpxchg_local(&info->pending, 0, 1);
+}
+#el
Patch 10 moves the pending bit into the unwind_mask as it needs to be
in sync with the different tracer requests. I'm not sure how this
change will interact with that.

-- Steve
Thread (45 messages) 45 messages, 5 authors, last reply 2025-07-16
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help