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]
Date:   Mon, 30 May 2022 14:00:35 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     Frederic Weisbecker <frederic@...nel.org>
Cc:     paulmck@...nel.org, rjw@...ysocki.net, x86@...nel.org,
        linux-kernel@...r.kernel.org, jpoimboe@...nel.org
Subject: Re: [RFC][PATCH 3/9] cpuidle: Move IRQ state validation

On Mon, May 30, 2022 at 01:36:40PM +0200, Frederic Weisbecker wrote:
> On Thu, May 19, 2022 at 11:27:53PM +0200, Peter Zijlstra wrote:
> > Make cpuidle_enter_state() consistent with the s2idle variant and
> > verify ->enter() always returns with interrupts disabled.
> > 
> > Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
> > ---
> >  drivers/cpuidle/cpuidle.c |   10 +++++-----
> >  1 file changed, 5 insertions(+), 5 deletions(-)
> > 
> > --- a/drivers/cpuidle/cpuidle.c
> > +++ b/drivers/cpuidle/cpuidle.c
> > @@ -234,7 +234,11 @@ int cpuidle_enter_state(struct cpuidle_d
> >  	stop_critical_timings();
> >  	if (!(target_state->flags & CPUIDLE_FLAG_RCU_IDLE))
> >  		rcu_idle_enter();
> > +
> >  	entered_state = target_state->enter(dev, drv, index);
> > +	if (WARN_ON_ONCE(!irqs_disabled()))
> > +		raw_local_irq_disable();
> 
> So it means that idle functions are supposed to return with IRQs disabled
> without tracing, right? I can see that at least acpi_safe_halt() is using
> the non-raw local_irq_disable().

Yeah, I might need to re-order this. 0day also complained about that.
I'll need to find a moment to re-audit this and put it in the right
place.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ