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]
Message-ID: <CAMRc=MdsFpOC0mDRvFjeDa_FuhV=7Z-7Y5rHaERgqu305_u6VQ@mail.gmail.com>
Date:   Fri, 1 Sep 2023 11:10:59 +0200
From:   Bartosz Golaszewski <brgl@...ev.pl>
To:     "xingtong.wu" <xingtong_wu@....com>
Cc:     Linus Walleij <linus.walleij@...aro.org>,
        linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org,
        xingtong.wu@...mens.com, andy.shevchenko@...il.com,
        simon.guinot@...uanux.org,
        "Schaffner, Tobias" <tobias.schaffner@...mens.com>,
        "Haeussler, Gerd" <gerd.haeussler.ext@...mens.com>
Subject: Re: [PATCH v2 1/1] gpio-f7188x: fix base values conflicts with other
 gpio pins

On Thu, Aug 31, 2023 at 9:28 AM xingtong.wu <xingtong_wu@....com> wrote:
>
> On 2023/5/29 21:02, Linus Walleij wrote:
> > On Mon, May 29, 2023 at 4:55 AM <xingtong_wu@....com> wrote:
> >
> >> From: "xingtong.wu" <xingtong.wu@...mens.com>
> >>
> >> switch pin base from static to automatic allocation to
> >> avoid conflicts and align with other gpio chip drivers
> >>
> >> Signed-off-by: xingtong.wu <xingtong.wu@...mens.com>
> >
> > Reviewed-by: Linus Walleij <linus.walleij@...aro.org>
> >
> > If this platform does not have a ton of userspace using the obsolete
> > sysfs this should be fine to apply. I say let's apply and see what happens.
> >
> > Yours,
> > Linus Walleij
>
> Hi
>
> Seems the issue happened again, the module "gpio-f7188x" register
> gpio_chip failed because of the base value conflict. I hope the patch
> can be merged soon, I'm afraid that you forgot it...
>
> The log is below:
> [    6.872049] gpio-f7188x: Unsupported Fintek device 0x0303
> [    6.872137] gpio-f7188x: Found nct6126d at 0x4e
> [    6.899965] gpiochip_find_base: cannot find free range
> [    6.899967] gpiochip_add_data_with_key: GPIOs 0..7 (gpio-f7188x-6) failed to register, -28
> [    6.899970] gpio-f7188x gpio-f7188x: Failed to register gpiochip 6: -28
> [    6.903329] simatic_ipc_batt simatic_ipc_batt: cannot find GPIO chip gpio-f7188x-6, deferring
>
> There is a gpio_chip created by "pinctrl-tigerlake":
> /sys/class/gpio/gpiochip49# ls -l
> total 0
> -r--r--r--. 1 root root 4096 Aug 31 06:40 base
> lrwxrwxrwx. 1 root root    0 Aug 31 06:40 device -> ../../../INT34C6:00
> -r--r--r--. 1 root root 4096 Aug 31 06:40 label
> -r--r--r--. 1 root root 4096 Aug 31 06:40 ngpio
> drwxr-xr-x. 2 root root    0 Aug 31 06:40 power
> lrwxrwxrwx. 1 root root    0 Aug 31 06:38 subsystem -> ../../../../../class/gpio
> -rw-r--r--. 1 root root 4096 Aug 31 06:38 uevent
>
> The base value is 49, label = INT34C6:00, ngpio = 463
>
> The issue arose by chance, because the driver "pinctrl-tigerlake" apply gpio_chip->base
> randomly, this time it apply the base value 49, so it have conflict to here:
> https://github.com/torvalds/linux/blob/master/drivers/gpio/gpio-f7188x.c#L283
>
> But sometime it apply other base values, so the issue do not happen.
>
> BRs,
> Xing Tong Wu
>

Ah, it fell through the cracks. I will queue it right after the merge window.

Bart

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ