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: <CAJZ5v0g1C7EDoQ7687p9AqiPDEEfPjh+5NuOO+PjaRmGKMcfBw@mail.gmail.com>
Date: Mon, 25 Nov 2024 15:19:20 +0100
From: "Rafael J. Wysocki" <rafael@...nel.org>
To: Peter Zijlstra <peterz@...radead.org>
Cc: "Rafael J. Wysocki" <rafael@...nel.org>, Patryk Wlazlyn <patryk.wlazlyn@...ux.intel.com>, x86@...nel.org, 
	linux-kernel@...r.kernel.org, linux-pm@...r.kernel.org, 
	rafael.j.wysocki@...el.com, len.brown@...el.com, 
	artem.bityutskiy@...ux.intel.com, dave.hansen@...ux.intel.com, 
	tglx@...utronix.de, gautham.shenoy@....com
Subject: Re: [RFC PATCH v4 6/8] intel_idle: Provide enter_dead() handler for SRF

On Mon, Nov 25, 2024 at 3:12 PM Peter Zijlstra <peterz@...radead.org> wrote:
>
> On Mon, Nov 25, 2024 at 02:58:50PM +0100, Rafael J. Wysocki wrote:
>
> > > @@ -2143,10 +2143,15 @@ static void __init intel_idle_init_cstates_icpu(struct cpuidle_driver *drv)
> > >                 if (intel_idle_max_cstate_reached(cstate))
> > >                         break;
> > >
> > > -               if (!cpuidle_state_table[cstate].enter &&
> > > -                   !cpuidle_state_table[cstate].enter_s2idle)
> > > +               if (!cpuidle_state_table[cstate].enter)
> > >                         break;
> > >
> > > +               if (!cpuidle_state_table[cstate].enter_dead)
> > > +                       cpuidle_state_table[cstate].enter_dead = intel_idle_enter_dead;
> > > +
> > > +               if (!cpuidle_state_table[cstate].enter_s2idle)
> > > +                       cpuidle_state_table[cstate].enter_s2idle = intel_idle_s2idle;
> > > +
> > >                 /* If marked as unusable, skip this state. */
> > >                 if (cpuidle_state_table[cstate].flags & CPUIDLE_FLAG_UNUSABLE) {
> > >                         pr_debug("state %s is disabled\n",
> >
> > You can do the same thing with :enter() I think?  And it doesn't need
> > to be in one go.
>
> !enter is used as a terminator.

Ah, OK

Something like (!name && !desc) might be used for this purpose though.

> And it's harder to not do everything in one go; regex ftw :-)

Yeah, whatever.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ