[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250626081220.71ac3ab6@gandalf.local.home>
Date: Thu, 26 Jun 2025 08:12:20 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Ingo Molnar <mingo@...nel.org>
Cc: linux-kernel@...r.kernel.org, linux-trace-kernel@...r.kernel.org,
bpf@...r.kernel.org, x86@...nel.org, Masami Hiramatsu
<mhiramat@...nel.org>, Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
Josh Poimboeuf <jpoimboe@...nel.org>, Peter Zijlstra
<peterz@...radead.org>, Jiri Olsa <jolsa@...nel.org>, Namhyung Kim
<namhyung@...nel.org>, Thomas Gleixner <tglx@...utronix.de>, Andrii
Nakryiko <andrii@...nel.org>, Indu Bhagat <indu.bhagat@...cle.com>, "Jose
E. Marchesi" <jemarch@....org>, Beau Belgrave <beaub@...ux.microsoft.com>,
Jens Remus <jremus@...ux.ibm.com>, Linus Torvalds
<torvalds@...ux-foundation.org>, Andrew Morton <akpm@...ux-foundation.org>,
Jens Axboe <axboe@...nel.dk>
Subject: Re: [PATCH v11 14/14] unwind_user/x86: Enable compat mode frame
pointer unwinding on x86
On Thu, 26 Jun 2025 10:33:05 +0200
Ingo Molnar <mingo@...nel.org> wrote:
> * Steven Rostedt <rostedt@...dmis.org> wrote:
>
> > diff --git a/arch/x86/include/asm/unwind_user_types.h b/arch/x86/include/asm/unwind_user_types.h
> > new file mode 100644
> > index 000000000000..d7074dc5f0ce
> > --- /dev/null
> > +++ b/arch/x86/include/asm/unwind_user_types.h
> > @@ -0,0 +1,17 @@
> > +/* SPDX-License-Identifier: GPL-2.0 */
> > +#ifndef _ASM_UNWIND_USER_TYPES_H
> > +#define _ASM_UNWIND_USER_TYPES_H
>
> This is not the standard x86 header guard pattern ...
Should it be:
#ifndef _ASM_X86_UNWIND_USER_TYPES_H
?
>
> > +
> > +#ifdef CONFIG_IA32_EMULATION
> > +
> > +struct arch_unwind_user_state {
> > + unsigned long ss_base;
> > + unsigned long cs_base;
> > +};
> > +#define arch_unwind_user_state arch_unwind_user_state
>
> Ran out of newlines? ;-)
I believe Josh purposely kept the #define and the structure together
without a newline as one defines itself to be used in the generic code.
Do you prefer them to be separated by a newline?
>
> > +/*
> > + * If an architecture needs to initialize the state for a specific
> > + * reason, for example, it may need to do something different
> > + * in compat mode, it can define arch_unwind_user_init to a
> > + * function that will perform this initialization.
>
> Please use 'func()' when referring to functions in comments.
You mean to use "arch_unwind_user_init()"?
>
> > +/*
> > + * If an architecture requires some more updates to the state between
> > + * stack frames, it can define arch_unwind_user_next to a function
> > + * that will update the state between reading stack frames during
> > + * the user space stack walk.
>
> Ditto.
And this to have arch_unwind_user_next()?
I'll update.
Thanks for the review.
-- Steve
Powered by blists - more mailing lists