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: <152166234504.91116.14942145962035607739@swboyd.mtv.corp.google.com>
Date:   Wed, 21 Mar 2018 12:59:05 -0700
From:   Stephen Boyd <swboyd@...omium.org>
To:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Linus Walleij <linus.walleij@...aro.org>
Cc:     devicetree@...r.kernel.org, linux-arm-msm@...r.kernel.org,
        Timur Tabi <timur@...eaurora.org>,
        Stephen Boyd <sboyd@...eaurora.org>,
        linux-kernel@...r.kernel.org,
        Bjorn Andersson <bjorn.andersson@...aro.org>,
        Grant Likely <grant.likely@...retlab.ca>,
        linux-gpio@...r.kernel.org, linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH v3 2/3] gpiolib: Support 'gpio-reserved-ranges' property

Quoting Andy Shevchenko (2018-03-21 10:59:10)
> On Wed, 2018-03-21 at 09:58 -0700, Stephen Boyd wrote:
> > From: Stephen Boyd <sboyd@...eaurora.org>
> > 
> > Some qcom platforms make some GPIOs or pins unavailable for use by
> > non-secure operating systems, and thus reading or writing the
> > registers
> > for those pins will cause access control issues. Add support for a DT
> > property to describe the set of GPIOs that are available for use so
> > that
> > higher level OSes are able to know what pins to avoid reading/writing.
> > Non-DT platforms can add support by directly updating the
> > chip->valid_mask.
> 
> > Signed-off-by: Stephen Boyd <sboyd@...eaurora.org>
> > Signed-off-by: Stephen Boyd <swboyd@...omium.org>
> 
> Hmm...

Don't look closely! :P

> 
> > +     gpiochip->valid_mask = kcalloc(BITS_TO_LONGS(gpiochip-
> > >ngpio),
> > +                                    sizeof(long), GFP_KERNEL);
> 
> Just noticed that kcalloc is superfluous here.
> kmalloc_array() would be enough.
> 

Ok. I was copying the irqchip style. Should I fold them together into a
helper function and also update to kmalloc_array?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ