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:   Sat, 8 Jun 2019 00:04:15 +0200
From:   Linus Walleij <linus.walleij@...aro.org>
To:     "H. Nikolaus Schaller" <hns@...delico.com>
Cc:     Bartosz Golaszewski <bgolaszewski@...libre.com>,
        "open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Discussions about the Letux Kernel 
        <letux-kernel@...nphoenux.org>, kernel@...a-handheld.com
Subject: Re: [PATCH] gpio: pca953x: hack to fix 24 bit gpio expanders

On Tue, Jun 4, 2019 at 2:36 PM H. Nikolaus Schaller <hns@...delico.com> wrote:

> 24 bit expanders use REG_ADDR_AI in combination with register addressing. This
> conflicts with regmap which takes this bit as part of the register number,
> i.e. a second cache entry is defined for accessed with REG_ADDR_AI being
> set although on the chip it is the same register as with REG_ADDR_AI being
> cleared.
>
> The problem was introduced by
>
>         commit b32cecb46bdc ("gpio: pca953x: Extract the register address mangling to single function")
>
> but only became visible by
>
>         commit 8b9f9d4dc511 ("regmap: verify if register is writeable before writing operations")
>
> because before, the regmap size was effectively ignored and
> pca953x_writeable_register() did know to ignore REG_ADDR_AI. Still, there
> were two separate cache entries created.
>
> Since the use of REG_ADDR_AI seems to be static we can work around this
> issue by simply increasing the size of the regmap to cover the "virtual"
> registers with REG_ADDR_AI being set. This only means that half of the
> regmap buffer will be unused.
>
> Reported-by: H. Nikolaus Schaller <hns@...delico.com>
> Suggested-by: Linus Walleij <linus.walleij@...aro.org>
> Signed-off-by: H. Nikolaus Schaller <hns@...delico.com>

Patch queued for fixes, let's think about better solutions going
forward.

Yours,
Linus Walleij

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ