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: <CACRpkdYNCk9SdK+H4rTqdchvTZ+xyzMVVhpJJyD95iboSwaxEg@mail.gmail.com>
Date:   Fri, 28 Apr 2017 09:51:05 +0200
From:   Linus Walleij <linus.walleij@...aro.org>
To:     David Rivshin <drivshin@...rd.com>
Cc:     "linux-gpio@...r.kernel.org" <linux-gpio@...r.kernel.org>,
        Linux-OMAP <linux-omap@...r.kernel.org>,
        Grygorii Strashko <grygorii.strashko@...com>,
        Santosh Shilimkar <ssantosh@...nel.org>,
        Kevin Hilman <khilman@...nel.org>,
        Alexandre Courbot <gnurou@...il.com>,
        linux-arm@...r.kernel.org,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        stable <stable@...r.kernel.org>
Subject: Re: [PATCH v2] gpio: omap: return error if requested debounce time is
 not possible

On Tue, Apr 25, 2017 at 12:56 AM, David Rivshin <drivshin@...rd.com> wrote:

> From: David Rivshin <DRivshin@...worx.com>
>
> omap_gpio_debounce() does not validate that the requested debounce
> is within a range it can handle. Instead it lets the register value
> wrap silently, and always returns success.
>
> This can lead to all sorts of unexpected behavior, such as gpio_keys
> asking for a too-long debounce, but getting a very short debounce in
> practice.
>
> Fix this by returning -EINVAL if the requested value does not fit into
> the register field. If there is no debounce clock available at all,
> return -ENOTSUPP.
>
> Fixes: e85ec6c3047b ("gpio: omap: fix omap2_set_gpio_debounce")
> Cc: <stable@...r.kernel.org> # 4.3+
> Signed-off-by: David Rivshin <drivshin@...worx.com>
> ---
> Changes since v1 (https://lkml.org/lkml/2017/3/16/1094):
> - Added dev_info() in omap_gpio_debounce() on error.

Patch applied with Grygorii's ACK.

Yours,
Linus Walleij

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ