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]
Message-ID: <20080430092500.GA31644@uranus.ravnborg.org>
Date:	Wed, 30 Apr 2008 11:25:00 +0200
From:	Sam Ravnborg <sam@...nborg.org>
To:	Ingo Molnar <mingo@...e.hu>
Cc:	David Miller <davem@...emloft.net>, mchehab@...radead.org,
	torvalds@...ux-foundation.org, akpm@...ux-foundation.org,
	linux-dvb-maintainer@...uxtv.org, video4linux-list@...hat.com,
	linux-kernel@...r.kernel.org, sfr@...b.auug.org.au
Subject: Re: [patch, -git] drivers/media build fix for modular builds

On Wed, Apr 30, 2008 at 10:13:45AM +0200, Ingo Molnar wrote:
> 
> * David Miller <davem@...emloft.net> wrote:
> 
> > From: Ingo Molnar <mingo@...e.hu>
> > Date: Wed, 30 Apr 2008 09:48:07 +0200
> > 
> > > 
> > > fix allmodconfig build bug introduced in latest -git by commit 
> > > 7c91f0624a9 ("V4L/DVB(7767): Move tuners to common/tuners"):
> > > 
> > >   LD      kernel/built-in.o
> > >   LD      drivers/built-in.o
> > >   ld: drivers/media/built-in.o: No such file: No such file or directory
> > > 
> > > which happens if all media drivers are modular:
> > 
> > I was seeing this too, as I think was Stephen Rothwell.
> 
> i think any build which has the media drivers only as modules will 
> trigger it, so it's rather widespread. My fix has held up fine for 10 
> randconfigs so far so it should do the trick.
> 
> i'm wondering though why similar problems are not more common. A quick 
> look at drivers/Makefile suggests that there are many obj-y rules there 
> for driver sub-trees that can be all-modular, not just video:
> 
>  obj-y                           += video/
>  obj-y                           += char/
>  obj-y                           += serial/
>  obj-y                           += base/ block/ misc/ mfd/ net/ media/
>  obj-y                           += macintosh/
>  obj-y                           += ieee1394/
>  obj-y                           += cdrom/
>  obj-y                           += auxdisplay/
>  obj-y                           += i2c/
>  obj-y                           += lguest/
>  obj-y                           += firmware/
> 
> drivers/net/ obj-y is kept alive by the "obj-y wireless/" rule i think, 
> but what makes other sub-trees link, like drivers/macintosh/ ?

drivers/media is special because it does not contain any files.
Kbuild will generate a built-in.o file only if there is
a chance for a .o file in the directory.

When all media is modules kbuild does not know enough
to say that a built-in.o is needed in drivers/media/
and the workaround to do a obj-y := common/
is the best way to do so.

We had a similar issue in driver/video once I think.
But here we solved it with the kconfig dependency.
If we only say obj-m += media/ then
kbuild will not try to link a built-in.o.
But if we say obj-y += media/ then kbuild will
expect to find a built-in.o in media/

	Sam
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ