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: <20251007081657.30422-1-wbg@kernel.org>
Date: Tue,  7 Oct 2025 17:16:55 +0900
From: William Breathitt Gray <wbg@...nel.org>
To: Mark Cave-Ayland <mark.caveayland@...anix.com>,
	mwalle@...nel.org
Cc: William Breathitt Gray <wbg@...nel.org>,
	linus.walleij@...aro.org,
	brgl@...ev.pl,
	andriy.shevchenko@...ux.intel.com,
	broonie@...nel.org,
	linux-gpio@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: gpio: gpio-pci-idio-16 regression after LTS upgrade

On Mon, Oct 06, 2025 at 09:37:14AM +0100, Mark Cave-Ayland wrote:
> root@...ian12:~# gpioget 0 0
> gpioget: error reading GPIO values: Input/output error
> 
> which also output:
> 
> [  329.529321] gpio-512 (gpioget): gpiod_direction_input: missing
> direction_input() operation and line is output
> 
> My guess is that this is because
> drivers/gpio/gpio-regmap.c::gpio_regmap_get_direction() isn't able to
> can't handle the situation where lines 0-15 are outputs and lines 16-31
> are inputs, compared with the old idio_16_gpio_get_direction() function
> it replaced.
> 
> What would be the best way forward? Possibly add the .get_direction
> callback to the gpio_regmap_config? Or is there another way to have
> mixed inputs and outputs with the gpio_regmap API?

So the intention I had with gpio-idio-16 was to provide reg_dat_base and
reg_set_base to define the input and output bases, and then
reg_mask_xlate would do the translation between input and outputs. I
think this design is allowed by gpio-regmap, is it not Michael?

In theory, gpio_regmap_get_direction should call gpio->reg_mask_xlate()
which is mapped to idio_16_reg_mask_xlate(), and thus set reg and mask
which then is evaluated at the end of gpio_regmap_get_direction() to
determine which direction to return.

Is it possible idio_16_reg_mask_xlate() is returning the wrong values
for reg and mask?

William Breathitt Gray

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ