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] [day] [month] [year] [list]
Message-ID: <CAJZ5v0i1UqdQBvXm1cozOQeQ8YRdTxOAQPP9=RyZHHnsmuGHTw@mail.gmail.com>
Date:   Wed, 20 Nov 2019 10:08:50 +0100
From:   "Rafael J. Wysocki" <rafael@...nel.org>
To:     Doug Smythies <dsmythies@...us.net>
Cc:     "Rafael J. Wysocki" <rjw@...ysocki.net>,
        "Rafael J. Wysocki" <rafael@...nel.org>,
        Linux PM <linux-pm@...r.kernel.org>,
        Linux ACPI <linux-acpi@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Viresh Kumar <viresh.kumar@...aro.org>,
        Sudeep Holla <sudeep.holla@....com>,
        Dmitry Osipenko <digetx@...il.com>
Subject: Re: [RFT][PATCH 1/3] PM: QoS: Introduce frequency QoS

On Wed, Nov 20, 2019 at 7:55 AM Doug Smythies <dsmythies@...us.net> wrote:
>
> On 2019.11.19 14:14 Rafael J. Wysocki wrote:
> > On Tuesday, November 19, 2019 8:17:05 PM CET Rafael J. Wysocki wrote:
>
> ...
>
> >> However, I now also see that freq_qos_remove_request() doesn't clear
> >> the qos field in req which is should do, so freq_qos_add_request()
> >> will complain and fail if the object pointed to by req is passed to it
> >> again.
> >>
> >> I'll send a patch to test for this later today.
> >>
> >
> > The patch is appended.  Please test it (on top of 5.4-rc8) and report back.
> >
> > ---
> > kernel/power/qos.c |    8 +++++++-
> > 1 file changed, 7 insertions(+), 1 deletion(-)
> >
> > Index: linux-pm/kernel/power/qos.c
> > ===================================================================
> > --- linux-pm.orig/kernel/power/qos.c
> > +++ linux-pm/kernel/power/qos.c
> > @@ -814,6 +814,8 @@ EXPORT_SYMBOL_GPL(freq_qos_update_reques
> >  */
> > int freq_qos_remove_request(struct freq_qos_request *req)
> > {
> > +     int ret;
> > +
> >       if (!req)
> >               return -EINVAL;
> >
> > @@ -821,7 +823,11 @@ int freq_qos_remove_request(struct freq_
> >                "%s() called for unknown object\n", __func__))
> >               return -EINVAL;
> >
> > -     return freq_qos_apply(req, PM_QOS_REMOVE_REQ, PM_QOS_DEFAULT_VALUE);
> > +     ret = freq_qos_apply(req, PM_QOS_REMOVE_REQ, PM_QOS_DEFAULT_VALUE);
> > +     req->qos = NULL;
> > +     req->type = 0;
> > +
> > +     return ret;
> >  }
> >  EXPORT_SYMBOL_GPL(freq_qos_remove_request);
>
> Yes the patch fixes the problem. Thanks.
>
> I tested several hundred times switching between
> passive and active modes with the intel_pstate driver,
> including with various CPUs disabled and re-enabled.

Thanks a lot!

Let me resend the patch with a changelog and tags.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ