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: <CAJZ5v0gHPxw2Ne3HFoqQiSs+AvSJdh_rMmVXbV7sBvJSTaM5qw@mail.gmail.com>
Date:   Mon, 25 Jun 2018 12:00:10 +0200
From:   "Rafael J. Wysocki" <rafael@...nel.org>
To:     Viresh Kumar <viresh.kumar@...aro.org>
Cc:     "Rafael J. Wysocki" <rafael@...nel.org>,
        Daniel Lezcano <daniel.lezcano@...aro.org>,
        "Rafael J. Wysocki" <rjw@...ysocki.net>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Eduardo Valentin <edubezval@...il.com>,
        Javi Merino <javi.merino@...nel.org>,
        Leo Yan <leo.yan@...aro.org>,
        Kevin Wangtao <kevin.wangtao@...aro.org>,
        Vincent Guittot <vincent.guittot@...aro.org>,
        Rui Zhang <rui.zhang@...el.com>,
        Daniel Thompson <daniel.thompson@...aro.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Andrea Parri <andrea.parri@...rulasolutions.com>,
        "open list:POWER MANAGEMENT CORE" <linux-pm@...r.kernel.org>
Subject: Re: [PATCH V9] powercap/drivers/idle_injection: Add an idle injection framework

On Mon, Jun 25, 2018 at 11:44 AM, Viresh Kumar <viresh.kumar@...aro.org> wrote:
> On 25-06-18, 10:23, Rafael J. Wysocki wrote:
>> On Tue, Jun 19, 2018 at 3:23 PM, Daniel Lezcano
>> > +void idle_injection_get_duration(struct idle_injection_device *ii_dev,
>> > +                                unsigned int *run_duration_ms,
>> > +                                unsigned int *idle_duration_ms)
>> > +{
>> > +       *run_duration_ms = READ_ONCE(ii_dev->run_duration_ms);
>> > +       *idle_duration_ms = READ_ONCE(ii_dev->idle_duration_ms);
>>
>> Should you check the arguments against NULL before attempting to
>> dereference them?  If not, then why not?
>
> I would vote with a NO. This is a mandatory parameter and not filling it in with
> a valid pointer is a BUG really. I don't see a reason why we should prevent the
> kernel from crashing if such a mistake happens :)

Well, fair enough.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ