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: <20250516132313.GF16434@noisy.programming.kicks-ass.net>
Date: Fri, 16 May 2025 15:23:13 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: André Almeida <andrealmeid@...lia.com>
Cc: Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
	linux-kernel@...r.kernel.org, Darren Hart <dvhart@...radead.org>,
	Davidlohr Bueso <dave@...olabs.net>, Ingo Molnar <mingo@...hat.com>,
	Juri Lelli <juri.lelli@...hat.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Valentin Schneider <vschneid@...hat.com>,
	Waiman Long <longman@...hat.com>
Subject: Re: [PATCH v12 05/21] futex: Create hb scopes

On Tue, May 06, 2025 at 08:45:06PM -0300, André Almeida wrote:
> Em 16/04/2025 13:29, Sebastian Andrzej Siewior escreveu:
> > From: Peter Zijlstra <peterz@...radead.org>
> > 
> > Create explicit scopes for hb variables; almost pure re-indent.
> > 
> > Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
> > Signed-off-by: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
> > ---
> >   kernel/futex/core.c     |  81 ++++----
> >   kernel/futex/pi.c       | 282 +++++++++++++-------------
> >   kernel/futex/requeue.c  | 433 ++++++++++++++++++++--------------------
> >   kernel/futex/waitwake.c | 193 +++++++++---------
> >   4 files changed, 504 insertions(+), 485 deletions(-)
> > 
> > diff --git a/kernel/futex/core.c b/kernel/futex/core.c
> > index 7adc914878933..e4cb5ce9785b1 100644
> > --- a/kernel/futex/core.c
> > +++ b/kernel/futex/core.c
> > @@ -944,7 +944,6 @@ static void exit_pi_state_list(struct task_struct *curr)
> >   {
> >   	struct list_head *next, *head = &curr->pi_state_list;
> >   	struct futex_pi_state *pi_state;
> > -	struct futex_hash_bucket *hb;
> >   	union futex_key key = FUTEX_KEY_INIT;
> >   	/*
> > @@ -957,50 +956,54 @@ static void exit_pi_state_list(struct task_struct *curr)
> >   		next = head->next;
> >   		pi_state = list_entry(next, struct futex_pi_state, list);
> >   		key = pi_state->key;
> > -		hb = futex_hash(&key);
> > +		if (1) {
> 
> Couldn't those explict scopes be achive without the if (1), just {}?

Yes, this is possible. I have some experience with people getting
confused with that style though. But yeah, whatever :-)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ