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: <CAJZ5v0grJZyOX7fFx_nNjtOLT1NGyu1L10H3TY+e0HR3+T8JZA@mail.gmail.com>
Date:   Mon, 22 Jun 2020 21:45:35 +0200
From:   "Rafael J. Wysocki" <rafael@...nel.org>
To:     Chen Yu <yu.c.chen@...el.com>
Cc:     "Rafael J. Wysocki" <rafael@...nel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Len Brown <lenb@...nel.org>,
        Daniel Lezcano <daniel.lezcano@...aro.org>,
        Ingo Molnar <mingo@...nel.org>,
        Linux PM <linux-pm@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Rui Zhang <rui.zhang@...el.com>
Subject: Re: [PATCH][v2] PM / s2idle: Clear _TIF_POLLING_NRFLAG before suspend
 to idle

On Mon, Jun 22, 2020 at 7:16 PM Chen Yu <yu.c.chen@...el.com> wrote:
>
> Hi Rafael,
> On Mon, Jun 22, 2020 at 06:19:35PM +0200, Rafael J. Wysocki wrote:
> [cut]
> > > +{
> > > +       if (!current_clr_polling_and_test())
> > > +               s2idle_enter(drv, dev, index);
> > > +
> > > +       return index;
> >
> > Is the value returned here used at all?
> >
> It is not used for now IMO.
> > >          */
> > >         index = find_deepest_state(drv, dev, U64_MAX, 0, true);
> > >         if (index > 0)
> > > -               enter_s2idle_proper(drv, dev, index);
> > > +               call_s2idle(drv, dev, index);
> >
> > I'm wondering why this can't be
> >
> >     if (index > 0 && !current_clr_polling_and_test())
> >             enter_s2idle_proper(drv, dev, index);
> >
> Yes, it should be simpler, but I guess Peter was trying to
> make call_s2idle() consistent with call_cpuidle(),
> and also s2idle_enter() is analogous to cpuidle_enter().

So IMO it would be better to do the simplest fix first and then do the
cleanup on top of it.

Thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ