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: <20251022143140.2ed517e1@gandalf.local.home>
Date: Wed, 22 Oct 2025 14:31:40 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Peter Zijlstra <peterz@...radead.org>
Cc: jpoimboe@...nel.org, rostedt@...nel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 11/12] unwind: Implement compat fp unwind

On Wed, 24 Sep 2025 09:59:59 +0200
Peter Zijlstra <peterz@...radead.org> wrote:

> @@ -100,6 +115,7 @@ static int unwind_user_start(struct unwi
>  	state->ip = instruction_pointer(regs);
>  	state->sp = user_stack_pointer(regs);
>  	state->fp = frame_pointer(regs);
> +	state->ws = compat_user_mode(regs) ? sizeof(int) : sizeof(long);

compat_user_mode() is an architecture function (only defined in arm64 and now x86).

s390 doesn't implement it and regs can't be used to tell if it's compat or
not (although Jens tells me the task_struct can).

To do this properly in generic code, we should add a a:

	unwind_compat_mode(struct pt_regs *regs);

call in include/linux/unwind_user.h:

#ifndef unwind_compat_mode
static inline bool unwind_compat_mode(struct pt_regs *regs)
{
	return false;
}
#endif

And then in the x86 and arm64 asm/unwind_user.h:

static inline bool unwind_compat_mode(struct pt_regs *regs)
{
	return compat_user_mode(regs);
}
#define unwind_compat_mode unwind_compat_mode

-- Steve


>  
>  	return 0;
>  }
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ