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:   Thu, 1 Mar 2018 10:19:08 +0100
From:   Maxime Ripard <maxime.ripard@...tlin.com>
To:     Chen-Yu Tsai <wens@...e.org>
Cc:     Arnd Bergmann <arnd@...db.de>, David Airlie <airlied@...ux.ie>,
        Jernej Skrabec <jernej.skrabec@...l.net>,
        Icenowy Zheng <icenowy@...c.io>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Jonathan Liu <net147@...il.com>,
        dri-devel <dri-devel@...ts.freedesktop.org>,
        Linux ARM <linux-arm-kernel@...ts.infradead.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] drm/sun4i: link in front-end code if needed

On Mon, Feb 26, 2018 at 06:55:49PM +0800, Chen-Yu Tsai wrote:
> On Mon, Feb 26, 2018 at 6:53 PM, Maxime Ripard
> <maxime.ripard@...tlin.com> wrote:
> > On Mon, Feb 26, 2018 at 10:31:51AM +0100, Arnd Bergmann wrote:
> >> On Mon, Feb 26, 2018 at 10:21 AM, Maxime Ripard
> >> <maxime.ripard@...tlin.com> wrote:
> >> > Hi,
> >> >
> >> > On Fri, Feb 23, 2018 at 02:06:52PM +0100, Arnd Bergmann wrote:
> >> >> When the base sun4i DRM driver is built-in but the back-end is
> >> >> a loadable module, we run into a link error:
> >> >>
> >> >> drivers/gpu/drm/sun4i/sun4i_drv.o: In function `sun4i_drv_probe':
> >> >> sun4i_drv.c:(.text+0x60c): undefined reference to `sun4i_frontend_of_table'
> >> >>
> >> >> The dependency is a bit tricky, the best workaround I have come up
> >> >> with is to use a Makefile hack to to interpret both
> >> >> CONFIG_DRM_SUN4I_BACKEND=m and CONFIG_DRM_SUN4I_BACKEND=y
> >> >> as a directive to build the front-end the same way as the main module.
> >> >>
> >> >> Fixes: dd0421f47505 ("drm/sun4i: Add a driver for the display frontend")
> >> >> Signed-off-by: Arnd Bergmann <arnd@...db.de>
> >> >> ---
> >> >>  drivers/gpu/drm/sun4i/Makefile | 5 ++++-
> >> >>  1 file changed, 4 insertions(+), 1 deletion(-)
> >> >>
> >> >> diff --git a/drivers/gpu/drm/sun4i/Makefile b/drivers/gpu/drm/sun4i/Makefile
> >> >> index 582607c0c488..db14e023256b 100644
> >> >> --- a/drivers/gpu/drm/sun4i/Makefile
> >> >> +++ b/drivers/gpu/drm/sun4i/Makefile
> >> >> @@ -25,6 +25,9 @@ obj-$(CONFIG_DRM_SUN4I)             += sun4i-tcon.o
> >> >>  obj-$(CONFIG_DRM_SUN4I)              += sun4i_tv.o
> >> >>  obj-$(CONFIG_DRM_SUN4I)              += sun6i_drc.o
> >> >>
> >> >> -obj-$(CONFIG_DRM_SUN4I_BACKEND)      += sun4i-backend.o sun4i-frontend.o
> >> >> +obj-$(CONFIG_DRM_SUN4I_BACKEND)      += sun4i-backend.o
> >> >> +ifdef CONFIG_DRM_SUN4I_BACKEND
> >> >> +obj-$(CONFIG_DRM_SUN4I)              += sun4i-frontend.o
> >> >> +endif
> >> >
> >> > Can we just create a Kconfig symbol, selected by DRM_SUN4I_BACKEND,
> >> > and we would export the symbol?
> >>
> >> Yes, I think that would work just as well. Something like
> >>
> >> config DRM_SUN4I_FRONTEND
> >>       tristate
> >>       default DRM_SUN4I if CONFIG_DRM_SUN4I_BACKEND != n
> >>
> >> should do the trick.
> >
> > I had more something like this in mind:
> > https://pastebin.com/raw/XydvzAtz
> 
> This doesn't solve the issue at hand, which is sun4i-drv (CONFIG_DRM_SUN4I)
> requires something in sun4i-backend (CONFIG_DRM_SUN4I_BACKEND), and if
> sun4i-drv is built-in, then anything it uses must also be built-in.

Ah, right. Then I guess Arnd's suggestion is the best we can
have. Arnd, can you resubmit that patch?

Thanks!
Maxime

-- 
Maxime Ripard, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ