Thread (161 messages) 161 messages, 8 authors, 2025-04-24

Re: [PATCH v4 11/39] unwind_user: Add user space unwinding API

From: Josh Poimboeuf <jpoimboe@kernel.org>
Date: 2025-01-24 22:05:27
Also in: linux-perf-users, linux-toolchains, lkml

On Fri, Jan 24, 2025 at 03:02:11PM -0500, Steven Rostedt wrote:
On Tue, 21 Jan 2025 18:31:03 -0800
Josh Poimboeuf [off-list ref] wrote:
quoted
+int unwind_user_start(struct unwind_user_state *state)
+{
+	struct pt_regs *regs = task_pt_regs(current);
+
+	memset(state, 0, sizeof(*state));
+
+	if (!current->mm || !user_mode(regs)) {
+		state->done = true;
+		return -EINVAL;
+	}
+
+	state->type = UNWIND_USER_TYPE_NONE;
+
+	state->ip = instruction_pointer(regs);
+	state->sp = user_stack_pointer(regs);
+	state->fp = frame_pointer(regs);
+
+	return 0;
+}
+
I know this is just an introductory of the interface, but this should
really have kerneldoc attached to it, as I have no idea what these are
supposed to be doing. This patch is meaningless without it. The change log
is useless too.
Yeah, sure.

-- 
Josh
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help