lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250618111046.793870b8@gandalf.local.home>
Date: Wed, 18 Jun 2025 11:10:46 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Peter Zijlstra <peterz@...radead.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>, Ingo Molnar <mingo@...nel.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>
Subject: Re: [PATCH v10 03/14] unwind_user: Add compat mode frame pointer
 support

On Wed, 18 Jun 2025 15:46:41 +0200
Peter Zijlstra <peterz@...radead.org> wrote:

> On Tue, Jun 10, 2025 at 08:54:24PM -0400, Steven Rostedt wrote:
> > diff --git a/kernel/unwind/user.c b/kernel/unwind/user.c
> > index 4fc550356b33..29e1f497a26e 100644
> > --- a/kernel/unwind/user.c
> > +++ b/kernel/unwind/user.c
> > @@ -12,12 +12,32 @@ static struct unwind_user_frame fp_frame = {
> >  	ARCH_INIT_USER_FP_FRAME
> >  };
> >  
> > +static struct unwind_user_frame compat_fp_frame = {
> > +	ARCH_INIT_USER_COMPAT_FP_FRAME
> > +};
> > +
> >  static inline bool fp_state(struct unwind_user_state *state)
> >  {
> >  	return IS_ENABLED(CONFIG_HAVE_UNWIND_USER_FP) &&
> >  	       state->type == UNWIND_USER_TYPE_FP;
> >  }
> >  
> > +static inline bool compat_state(struct unwind_user_state *state)  
> 
> Consistency would mandate this thing be called: compat_fp_state().

Sure. Will update it.

> 
> > +{
> > +	return IS_ENABLED(CONFIG_HAVE_UNWIND_USER_COMPAT_FP) &&
> > +	       state->type == UNWIND_USER_TYPE_COMPAT_FP;
> > +}
> > +
> > +#define UNWIND_GET_USER_LONG(to, from, state)				\  
> 
> Do we have to shout this?

Don't we usually shout macros?

-- Steve

> 
> > +({									\
> > +	int __ret;							\
> > +	if (compat_state(state))					\
> > +		__ret = get_user(to, (u32 __user *)(from));		\
> > +	else								\
> > +		__ret = get_user(to, (unsigned long __user *)(from));	\
> > +	__ret;								\
> > +})
> > +
> >  int unwind_user_next(struct unwind_user_state *state)
> >  {
> >  	struct unwind_user_frame *frame;  


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ