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>] [day] [month] [year] [list]
Message-Id: <200812050344.mB53i9BF034723@www262.sakura.ne.jp>
Date:	Fri, 05 Dec 2008 12:44:09 +0900
From:	Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>
To:	linux-kernel@...r.kernel.org
Cc:	mjg@...hat.com, nicolas@...chat.ch
Subject: [2.6.28-rc7] Define MODULE_SYSTEM_TABLE for mbp_nvidia_bl.o and applesmc.o

When compiling mbp_nvidia_bl.o and applesmc.o using gcc 3.3.5,
the below compilation error occurs.

  CC [M]  drivers/video/backlight/mbp_nvidia_bl.o
  drivers/video/backlight/mbp_nvidia_bl.c:114: error: storage size of `__mod_dmi_device_table' isn't known
  make[1]: *** [drivers/video/backlight/mbp_nvidia_bl.o] Error 1
  make: *** [drivers/video/backlight/mbp_nvidia_bl.o] Error 2

  CC [M]  drivers/hwmon/applesmc.o
  drivers/hwmon/applesmc.c:1567: error: storage size of `__mod_dmi_device_table' isn't known
  make[1]: *** [drivers/hwmon/applesmc.o] Error 1
  make: *** [drivers/hwmon/applesmc.o] Error 2

Diffs between 2.6.27.7 and 2.6.28-rc7 are shown below.

  # diff linux-2.6.27.7/drivers/video/backlight/mbp_nvidia_bl.c linux-2.6.28-rc7/drivers/video/backlight/mbp_nvidia_bl.c
  114,116c114
  < MODULE_ALIAS("svnAppleInc.:pnMacBookPro3,1");
  < MODULE_ALIAS("svnAppleInc.:pnMacBookPro3,2");
  < MODULE_ALIAS("svnAppleInc.:pnMacBookPro4,1");
  ---
  > MODULE_DEVICE_TABLE(dmi, mbp_device_table);

We can see that MODULE_ALIAS is replaced by MODULE_DEVICE_TABLE.

mbp_nvidia_bl.c and applesmc.c are using MODULE_DEVICE_TABLE(dmi, ...);
which will extracted to __mod_dmi_device_table, but it seems to me that
dmi does not define __mod_dmi_device_table.

I don't know why gcc 4.x doesn't trigger this compilation error.

I don't know whether mbp_nvidia_bl.o and applesmc.o compiled with this patch
work or not. Can somebody who has these hardwares try this patch?

Signed-off-by: Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>
---
 drivers/hwmon/applesmc.c                |    2 +-
 drivers/video/backlight/mbp_nvidia_bl.c |    2 +-
 include/linux/module.h                  |    2 ++
 3 files changed, 4 insertions(+), 2 deletions(-)

--- linux-2.6.28-rc7.orig/drivers/hwmon/applesmc.c
+++ linux-2.6.28-rc7/drivers/hwmon/applesmc.c
@@ -1564,4 +1564,4 @@ module_exit(applesmc_exit);
 MODULE_AUTHOR("Nicolas Boichat");
 MODULE_DESCRIPTION("Apple SMC");
 MODULE_LICENSE("GPL v2");
-MODULE_DEVICE_TABLE(dmi, applesmc_whitelist);
+MODULE_SYSTEM_TABLE(dmi, applesmc_whitelist);
--- linux-2.6.28-rc7.orig/drivers/video/backlight/mbp_nvidia_bl.c
+++ linux-2.6.28-rc7/drivers/video/backlight/mbp_nvidia_bl.c
@@ -111,4 +111,4 @@ module_exit(mbp_exit);
 MODULE_AUTHOR("Matthew Garrett <mjg@...hat.com>");
 MODULE_DESCRIPTION("Nvidia-based Macbook Pro Backlight Driver");
 MODULE_LICENSE("GPL");
-MODULE_DEVICE_TABLE(dmi, mbp_device_table);
+MODULE_SYSTEM_TABLE(dmi, mbp_device_table);
--- linux-2.6.28-rc7.orig/include/linux/module.h
+++ linux-2.6.28-rc7/include/linux/module.h
@@ -139,6 +139,8 @@ extern struct module __this_module;
 
 #define MODULE_DEVICE_TABLE(type,name)		\
   MODULE_GENERIC_TABLE(type##_device,name)
+#define MODULE_SYSTEM_TABLE(type,name)		\
+  MODULE_GENERIC_TABLE(type##_system,name)
 
 /* Version of form [<epoch>:]<version>[-<extra-version>].
    Or for CVS/RCS ID version, everything but the number is stripped.
--
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