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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 7 Jan 2021 11:17:54 +0100
From:   Linus Walleij <linus.walleij@...aro.org>
To:     Srinivas Neeli <srinivas.neeli@...inx.com>
Cc:     Bartosz Golaszewski <bgolaszewski@...libre.com>,
        Michal Simek <michal.simek@...inx.com>,
        Shubhrajyoti Datta <shubhrajyoti.datta@...inx.com>,
        sgoud@...inx.com, Robert Hancock <hancock@...systems.ca>,
        William Breathitt Gray <vilhelm.gray@...il.com>,
        Syed Nayyar Waris <syednwaris@...il.com>,
        "open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>,
        Linux ARM <linux-arm-kernel@...ts.infradead.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        git@...inx.com
Subject: Re: [PATCH V4 5/5] gpio: gpio-xilinx: Add check if width exceeds 32

On Wed, Jan 6, 2021 at 1:27 PM Srinivas Neeli <srinivas.neeli@...inx.com> wrote:

> Add check to see if gpio-width property does not exceed 32.
> If it exceeds then return -EINVAL.
>
> Signed-off-by: Srinivas Neeli <srinivas.neeli@...inx.com>

Aha

> @@ -591,6 +591,9 @@ static int xgpio_probe(struct platform_device *pdev)
>         if (of_property_read_u32(np, "xlnx,gpio-width", &chip->gpio_width[0]))
>                 chip->gpio_width[0] = 32;

This xlnx,gpio-width seems very much like the standard ngpios property
from Documentation/devicetree/bindings/gpio/gpio.txt
but I guess not much to do about that now. :/

Do you think you can add support for both?

> +       if (chip->gpio_width[0] > 32)
> +               return -EINVAL;

This looks OK.

Yours,
Linus Walleij

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ