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: <1226747692.3687.285.camel@macbook.infradead.org>
Date:	Sat, 15 Nov 2008 11:14:52 +0000
From:	David Woodhouse <dwmw2@...radead.org>
To:	Alexey Dobriyan <adobriyan@...il.com>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: drivers/video/backlight/mbp_nvidia_bl.c:114: error: storage
	size of '__mod_dmi_device_table' isn't known

On Sat, 2008-11-15 at 02:41 +0300, Alexey Dobriyan wrote:
> How can this work, given that MODULE_DEVICE_TABLE line expands into
> 
>         extern const struct dmi_device_id __mod_dmi_device_table
> __attribute__ ((unused, alias("mbp_device_table")));
>                                 ^^^^^^
> but there is no struct dmi_device_id, there is struct dmi_system_id?

Interesting question ;)

It actually looks like this...

static struct dmi_system_id __initdata mbp_device_table[] = {
	...
};

extern const struct dmi_device_id __mod_dmi_device_table \
		__attribute__ ((unused, alias("mbp_device_table")));

So 'struct dmi_device_id' isn't ever really used -- it's just like a
forward declaration of a struct, and the compiler doesn't care because
it never needs to know anything more about that struct.

Not ideal though -- we should probably see if we can fix it. I suspect
it's not worth a global change of dmi_system_id to dmi_device_id
though... got any better ideas?

Maybe we could change MODULE_GENERIC_TABLE to be more agnostic about the
datatype -- just call it and 'extern char'. After all, it's only for the
linker.

-- 
David Woodhouse                            Open Source Technology Centre
David.Woodhouse@...el.com                              Intel Corporation

--
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