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] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 30 May 2023 14:10:19 +0300
From:   andy.shevchenko@...il.com
To:     andy.shevchenko@...il.com
Cc:     "xingtong.wu" <xingtong_wu@....com>, simon.guinot@...uanux.org,
        Linus Walleij <linus.walleij@...aro.org>, brgl@...ev.pl,
        linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org,
        henning.schild@...mens.com, xingtong.wu@...mens.com
Subject: Re: [PATCH v2 1/1] gpio-f7188x: fix base values conflicts with other
 gpio pins

Tue, May 30, 2023 at 01:53:47PM +0300, andy.shevchenko@...il.com kirjoitti:
> Tue, May 30, 2023 at 02:27:09PM +0800, xingtong.wu kirjoitti:
> > On 2023/5/30 06:24, andy.shevchenko@...il.com wrote:
> > > Mon, May 29, 2023 at 03:54:36PM +0200, simon.guinot@...uanux.org kirjoitti:
> > >> On Mon, May 29, 2023 at 03:03:28PM +0200, Linus Walleij wrote:
> > >>> On Mon, May 29, 2023 at 2:27 PM <simon.guinot@...uanux.org> wrote:
> > >>>
> > >>>> It would be nice if a pin number found in the device datasheet could
> > >>>> still be converted into a Linux GPIO number by adding the base of the
> > >>>> first bank.
> > >>>
> > >>> We actively discourage this kind of mapping because of reasons stated
> > >>> in drivers/gpio/TODO: we want dynamic number allocation to be the
> > >>> norm.
> > >>
> > >> Sure but it would be nice to have a dynamic base applied to a controller
> > >> (and not to each chip of this controller), and to respect the interval
> > >> between the chips (as stated in the controllers datasheets).
> > > 
> > > What you want is against the architecture. To fix this, you might change
> > > the architecture of the driver to have one chip for the controller, but
> > > it's quite questionable change. Also how can you guarantee ordering of
> > > the enumeration? You probably need to *disable* SMP on the boot time.
> > > This will still be fragile as long as GPIO chip can be unbound at run
> > > time. Order can be changed.
> > > 
> > > So, the patch is good and the correct way to go.
> > > 
> > > P.S. The root cause is that hardware engineers and documentation writers
> > > do not consider their hardware in the multi-tasking, multi-user general
> > > purpose operating system, such as Linux. I believe the ideal fix is to fix the
> > > documentation (datasheet).
> > 
> > Thanks for your review.
> > 
> > The direct reason of this patch

Oh, It seems I misread this as the cause of the patch, please ignore my
previous reply.

> > is that when "modprobe gpio-f7188x",
> > it conflicts with INT34C6. I met this issue on an older kernel, but
> > could not remember which version exactly.
> 
> This is interesting. But what I have noticed the v6.3.2 missing this
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/gpio/gpiolib.c?id=7dd3d9bd873f138675cb727eaa51a498d99f0e89
> change. Can you apply and retest?
> 
> If this does not help, please share more details, exact steps of reproducing
> the issue, including respective `dmesg` output, etc. (maybe via creating a
> kernel bugzilla report).
> 
> > The error message is as the link below:
> > https://elixir.bootlin.com/linux/v6.3.2/source/drivers/gpio/gpiolib.c#L798

-- 
With Best Regards,
Andy Shevchenko


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ