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] [day] [month] [year] [list]
Message-ID: <CACRpkdZ00bkzWOad520398gNELPhN3zqwMke6bwH+Cwb5FS8JQ@mail.gmail.com>
Date:   Tue, 15 Nov 2016 10:10:53 +0100
From:   Linus Walleij <linus.walleij@...aro.org>
To:     Keno Fischer <keno@...iacomputing.com>
Cc:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Alexandre Courbot <gnurou@...il.com>,
        "linux-gpio@...r.kernel.org" <linux-gpio@...r.kernel.org>,
        jdike@...toit.com, Richard Weinberger <richard@....at>,
        user-mode-linux-devel@...ts.sourceforge.net
Subject: Re: [PATCH] gpio: Guard devm_* functions behind CONFIG_GPIO_DEVRES
 not CONFIG_GPIOLIB

On Thu, Nov 10, 2016 at 2:56 AM, Keno Fischer <keno@...iacomputing.com> wrote:

> These functions are defined in devres.c, which only gets compiled with
> CONFIG_GPIO_DEVRES (in addition to CONFIG_GPIOLIB). However, in the
> header files, the difference between the declaration and the inline
> stub was only guarded by CONFIG_GPIOLIB, not CONFIG_GPIO_DEVRES,
> causing undefined symbol problems in modpost.
>
> Signed-off-by: Keno Fischer <keno@...iacomputing.com>
> ---
>
> I encountered this while trying to build uml in an attempt to debug some kernel
> behavior I don't understand. To be as close to my actual kernel as possible,
> I used the same .config, which of course tried to build a bunch of drivers.
> Arguably I should just not build those, but this seems correct nonetheless
> and allows the build to go through.

Ha! Good point. But it's the wrong solution.

The culprit is this:

if GPIOLIB

config GPIO_DEVRES
        def_bool y
        depends on HAS_IOMEM

But devres has no dependency on HAS_IOMEM whatsoever.

And certainly UML should have access to the devres variants
of the calls.

The proper patch is to remove the Kconfig option GPIO_DEVRES
altogether, make it compulsory, and remove *all* ifdefs for
CONFIG_GPIO_DEVRES and alter the Makefile so that it
is compiled-in for CONFIG_GPIOLIB.

Do you wanna take a stab at patching this or should I do it?

Yours,
Linus Walleij

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ