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

Josh Poimboeuf <[email protected]>
Newsgroups org.kernel.vger.linux-toolchains,org.kernel.vger.linux-kernel,org.kernel.vger.linux-perf-users,org.kernel.vger.linux-trace-kernel
Message-ID <20250124220519.xglhqzmce4tb5hm5@jpoimboe>
On Fri, Jan 24, 2025 at 03:02:11PM -0500, Steven Rostedt wrote:
> On Tue, 21 Jan 2025 18:31:03 -0800
> Josh Poimboeuf <[email protected]> wrote:
> > +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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.