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: <20251001114053.242997aa@gandalf.local.home>
Date: Wed, 1 Oct 2025 11:40:53 -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 08/12] unwind: Simplify unwind_user_faultable()

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

> Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
> ---
>  kernel/unwind/deferred.c |    6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> --- a/kernel/unwind/deferred.c
> +++ b/kernel/unwind/deferred.c
> @@ -128,17 +128,15 @@ int unwind_user_faultable(struct unwind_
>  
>  	cache = info->cache;
>  	trace->entries = cache->entries;
> -
> -	if (cache->nr_entries) {
> +	trace->nr = cache->nr_entries;
> +	if (trace->nr) {
>  		/*
>  		 * The user stack has already been previously unwound in this
>  		 * entry context.  Skip the unwind and use the cache.
>  		 */
> -		trace->nr = cache->nr_entries;
>  		return 0;
>  	}

Could we turn the above into:

	/*
	 * If the user stack has already been previously unwound in this
	 * entry context.  Skip the unwind and use the cache.
	 */
	if (trace->nr)
		return 0;

So we could remove the squiggly brackets?

-- Steve



>  
> -	trace->nr = 0;
>  	unwind_user(trace, UNWIND_MAX_ENTRIES);
>  
>  	cache->nr_entries = trace->nr;
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ