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:   Wed, 20 Apr 2022 15:25:32 +0200
From:   Arnd Bergmann <arnd@...db.de>
To:     Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
Cc:     Arnd Bergmann <arnd@...db.de>,
        Alim Akhtar <alim.akhtar@...sung.com>,
        Tomasz Figa <tomasz.figa@...il.com>,
        Sylwester Nawrocki <s.nawrocki@...sung.com>,
        Linus Walleij <linus.walleij@...aro.org>,
        Linux ARM <linux-arm-kernel@...ts.infradead.org>,
        "moderated list:ARM/SAMSUNG EXYNOS ARM ARCHITECTURES" 
        <linux-samsung-soc@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        "open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>,
        Necip Fazil Yildiran <fazilyildiran@...il.com>,
        "# 3.4.x" <stable@...r.kernel.org>
Subject: Re: [PATCH] pinctrl: samsung: fix missing GPIOLIB on ARM64 Exynos config

On Wed, Apr 20, 2022 at 2:13 PM Krzysztof Kozlowski
<krzysztof.kozlowski@...aro.org> wrote:
> On 20/04/2022 14:10, Arnd Bergmann wrote:
> > On Wed, Apr 20, 2022 at 1:55 PM Krzysztof Kozlowski
> > <krzysztof.kozlowski@...aro.org> wrote:
> >>
> >> The Samsung pinctrl drivers depend on OF_GPIO, which is part of GPIOLIB.
> >> ARMv7 Exynos platform selects GPIOLIB and Samsung pinctrl drivers. ARMv8
> >> Exynos selects only the latter leading to possible wrong configuration
> >> on ARMv8 build:
> >>
> >>   WARNING: unmet direct dependencies detected for PINCTRL_EXYNOS
> >>     Depends on [n]: PINCTRL [=y] && OF_GPIO [=n] && (ARCH_EXYNOS [=y] || ARCH_S5PV210 || COMPILE_TEST [=y])
> >>     Selected by [y]:
> >>     - ARCH_EXYNOS [=y]
> >>
> >>  config PINCTRL_EXYNOS
> >>         bool "Pinctrl common driver part for Samsung Exynos SoCs"
> >> -       depends on OF_GPIO
> >>         depends on ARCH_EXYNOS || ARCH_S5PV210 || COMPILE_TEST
> >>         select PINCTRL_SAMSUNG
> >>         select PINCTRL_EXYNOS_ARM if ARM && (ARCH_EXYNOS || ARCH_S5PV210)
> >
> >
> > The problem here is that PINCTRL_EXYNOS and the others can be built for
> > compile-testing without CONFIG_OF on non-arm machines.
> >
> > I think the correct dependency line would be
> >
> >       depends on ARCH_EXYNOS || ARCH_S5PV210 || (COMPILE_TEST && OF)
> >
> > which guarantees that OF_GPIO is also enabled.
>
> I don't think OF is the problem here, because the error is in missing
> GPIOLIB.

You are correct that the added dependency is not the solution for the
original problem. What I meant is that by dropping the dependency on
OF_GPIO, you create a new problem for compile-testing without
CONFIG_OF. Adding back the OF dependency avoids the regression.

> The platform selects Samsung pinctrl but it does not select
> GPIOLIB. Possible fixes are:
> 1. Do not select Samsung pinctrl from the platform (but have some
> default), so on compile test build it might not work.
> 2. Select GPIOLIB from the platform (ARMv7 Exynos does it).
> 3. Select GPIOLIB from here - this is current proposal.

Agreed, either 2. or 3. is fine, as long as you keep the CONFIG_OF
dependency.

       Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ