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]
Message-ID: <48D960FE.7000409@euromail.se>
Date:	Tue, 23 Sep 2008 23:34:54 +0200
From:	Henrik Rydberg <rydberg@...omail.se>
To:	Andrew Morton <akpm@...ux-foundation.org>
CC:	nicolas@...chat.ch, lm-sensors@...sensors.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] hwmon: applesmc: Add support for Macbook Pro 3

Andrew Morton wrote:
> On Tue, 23 Sep 2008 19:30:27 +0200
> Henrik Rydberg <rydberg@...omail.se> wrote:
> 
>> This patch adds temperature sensor support for Macbook Pro 3.
> 
> For some reason I keep on having to fix rejects in
> applesmc_whitelist[].
> 

I have also experienced that problem. Odd. Please see my comment below.

Thanks,
Henrik

-----

> Here's what I now have:
> 
> /* Note that DMI_MATCH(...,"MacBook") will match "MacBookPro1,1".
>  * So we need to put "Apple MacBook Pro" before "Apple MacBook". */
> static __initdata struct dmi_system_id applesmc_whitelist[] = {
> 	{ applesmc_dmi_match, "Apple MacBook Air", {
> 	  DMI_MATCH(DMI_BOARD_VENDOR, "Apple"),
> 	  DMI_MATCH(DMI_PRODUCT_NAME, "MacBookAir") },
> 		&applesmc_dmi_data[7]},
> 	{ applesmc_dmi_match, "Apple MacBook Pro 4", {
> 	  DMI_MATCH(DMI_BOARD_VENDOR, "Apple"),
> 	  DMI_MATCH(DMI_PRODUCT_NAME, "MacBookPro4") },
> 		&applesmc_dmi_data[8]},
> 	{ applesmc_dmi_match, "Apple MacBook Pro 3", {
> 	  DMI_MATCH(DMI_BOARD_VENDOR, "Apple"),
> 	  DMI_MATCH(DMI_PRODUCT_NAME, "MacBookPro3") },
> 		&applesmc_dmi_data[9]},

The two entries above are in reversed order in my tree, but
as you say, it does not matter.

> 	{ applesmc_dmi_match, "Apple MacBook Pro", {
> 	  DMI_MATCH(DMI_BOARD_VENDOR,"Apple"),
> 	  DMI_MATCH(DMI_PRODUCT_NAME,"MacBookPro") },
> 		&applesmc_dmi_data[0]},
> 	{ applesmc_dmi_match, "Apple MacBook (v2)", {
> 	  DMI_MATCH(DMI_BOARD_VENDOR,"Apple"),
> 	  DMI_MATCH(DMI_PRODUCT_NAME,"MacBook2") },
> 		&applesmc_dmi_data[1]},
> 	{ applesmc_dmi_match, "Apple MacBook (v3)", {
> 	  DMI_MATCH(DMI_BOARD_VENDOR,"Apple"),
> 	  DMI_MATCH(DMI_PRODUCT_NAME,"MacBook3") },
> 		&applesmc_dmi_data[6]},
> 	{ applesmc_dmi_match, "Apple MacBook", {
> 	  DMI_MATCH(DMI_BOARD_VENDOR,"Apple"),
> 	  DMI_MATCH(DMI_PRODUCT_NAME,"MacBook") },
> 		&applesmc_dmi_data[2]},
> 	{ applesmc_dmi_match, "Apple Macmini", {
> 	  DMI_MATCH(DMI_BOARD_VENDOR,"Apple"),
> 	  DMI_MATCH(DMI_PRODUCT_NAME,"Macmini") },
> 		&applesmc_dmi_data[3]},
> 	{ applesmc_dmi_match, "Apple MacPro2", {
> 	  DMI_MATCH(DMI_BOARD_VENDOR,"Apple"),
> 	  DMI_MATCH(DMI_PRODUCT_NAME,"MacPro2") },
> 		&applesmc_dmi_data[4]},
> 	{ applesmc_dmi_match, "Apple iMac", {
> 	  DMI_MATCH(DMI_BOARD_VENDOR,"Apple"),
> 	  DMI_MATCH(DMI_PRODUCT_NAME,"iMac") },
> 		&applesmc_dmi_data[5]},
> 	{ .ident = NULL }
> };
> 
> From my reading, we're still OK wrt the prefix-based string matching. 
> But please do double-chck this.
> 

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