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]
Date:   Mon, 22 May 2017 17:07:11 +0200
From:   Linus Walleij <linus.walleij@...aro.org>
To:     Nikita Yushchenko <nikita.yoush@...entembedded.com>
Cc:     Tony Lindgren <tony@...mide.com>,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Jon Hunter <jonathanh@...dia.com>,
        Masahiro Yamada <yamada.masahiro@...ionext.com>,
        Bjorn Andersson <bjorn.andersson@...aro.org>,
        Mika Westerberg <mika.westerberg@...ux.intel.com>,
        "linux-gpio@...r.kernel.org" <linux-gpio@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Chris Healy <Chris.Healy@....aero>,
        Jeff White <Jeff.White@....aero>
Subject: Re: [PATCH] pinctrl: when claiming hog, skip maps not served by same device

On Thu, May 11, 2017 at 10:02 PM, Nikita Yushchenko
<nikita.yoush@...entembedded.com> wrote:

> When pinctrl device registers, it automatically claims hogs, that is,
> maps that pinctrl device serves for itself.
>
> It is possible that in addition to SoC's pinctrl device, other pinctrl
> devices get registered. E.g. some gpio expander devies are registered
> as pinctrl devices. For such devices, pinctrl maps could be defined
> that set up SoC's pins (e.g. interrupt pin for gpio expander). Such
> a map will have target device set to gpio expander.
>
> Here is device tree snippet that causes this scenario:
>
> &i2c0 {
>         sx1503@20 {
>                 compatible = "semtech,sx1503q";
>                 pinctrl-names = "default";
>                 pinctrl-0 = <&pinctrl_sx1503_20>;
>                 ...
>         };
> };
> ...
> &iomuxc {
>         pinctrl_sx1503_20: pinctrl-sx1503-20 {
>                 fsl,pins = <
>                         VF610_PAD_PTB1__GPIO_23         0x219d
>                 >;
>         };
> };
>
> Such a map will have target device set to gpio expander. However is not
> a hog, it is a regular map that is claimed by core before gpio expander
> device is probed.
>
> Thus when looking for hogs, it is not enough to check that map's target
> device is set to pinctrl device being registered. Need also check that
> map's control device is also set to the same.
>
> Signed-off-by: Nikita Yushchenko <nikita.yoush@...entembedded.com>

Oh that looks logically correct, good find.

I guess I tested multiple pin control devices on a system but
not with also using hogs on them...

Patch applied with Tony's ACK.

Yours,
Linus Walleij

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ