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: <gpwvogg4yeabxmqf2djv6qynvkxgvlsqxjfzebntsozfhks2al@jmmu2bfflfgt>
Date: Mon, 31 Mar 2025 10:30:40 -0400
From: Seyediman Seyedarab <imandevel@...il.com>
To: hmh@....eng.br, hdegoede@...hat.com, ilpo.jarvinen@...ux.intel.com
Cc: ibm-acpi-devel@...ts.sourceforge.net, 
	platform-driver-x86@...r.kernel.org, linux-kernel@...r.kernel.org, 
	Vlastimil Holer <vlastimil.holer@...il.com>, stable@...r.kernel.org, 
	Alireza Elikahi <scr0lll0ck1s4b0v3h0m3k3y@...il.com>, Kurt Borja <kuurtb@...il.com>, 
	Eduard Christian Dumitrescu <eduard.c.dumitrescu@...il.com>
Subject: Re: [PATCH v3] platform/x86: thinkpad_acpi: disable ACPI fan access
 for T495* and E560

On 25/03/24 11:24AM, Seyediman Seyedarab wrote:
> From: Eduard Christian Dumitrescu <eduard.c.dumitrescu@...il.com>
> 
> T495, T495s, and E560 laptops have the FANG+FANW ACPI methods (therefore
> fang_handle and fanw_handle are not NULL) but they do not actually work,
> which results in a "No such device or address" error. The DSDT table code
> for the FANG+FANW methods doesn't seem to do anything special regarding
> the fan being secondary. Fan access and control is restored after forcing
> the legacy non-ACPI fan control method by setting both fang_handle and
> fanw_handle to NULL. The bug was introduced in commit 57d0557dfa49
> ("platform/x86: thinkpad_acpi: Add Thinkpad Edge E531 fan support"),
> which added a new fan control method via the FANG+FANW ACPI methods.
> 
> Add a quirk for T495, T495s, and E560 to avoid the FANG+FANW methods.
> 
> Reported-by: Vlastimil Holer <vlastimil.holer@...il.com>
> Fixes: 57d0557dfa49 ("platform/x86: thinkpad_acpi: Add Thinkpad Edge E531 fan support")
> Closes: https://bugzilla.kernel.org/show_bug.cgi?id=219643
> Cc: stable@...r.kernel.org
> Tested-by: Alireza Elikahi <scr0lll0ck1s4b0v3h0m3k3y@...il.com>
> Reviewed-by: Kurt Borja <kuurtb@...il.com>
> Signed-off-by: Eduard Christian Dumitrescu <eduard.c.dumitrescu@...il.com>
> Co-developed-by: Seyediman Seyedarab <ImanDevel@...il.com>
> Signed-off-by: Seyediman Seyedarab <ImanDevel@...il.com>
> ---
> Changes in v3:
> - Reordered paragraphs in the changelog and made minor adjusments
> - Reorded tags
> - Added Kurt Borja as a reviewer
> - Removed Tested-by: crok <crok.bic@...il.com> as crok didn't test
>   the patch
> 
> Kindest Regards,
> Seyediman
> 
>  drivers/platform/x86/thinkpad_acpi.c | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
> index d8df1405edfa..27fd67a2f2d1 100644
> --- a/drivers/platform/x86/thinkpad_acpi.c
> +++ b/drivers/platform/x86/thinkpad_acpi.c
> @@ -8793,6 +8793,7 @@ static const struct attribute_group fan_driver_attr_group = {
>  #define TPACPI_FAN_NS		0x0010		/* For EC with non-Standard register addresses */
>  #define TPACPI_FAN_DECRPM	0x0020		/* For ECFW's with RPM in register as decimal */
>  #define TPACPI_FAN_TPR		0x0040		/* Fan speed is in Ticks Per Revolution */
> +#define TPACPI_FAN_NOACPI	0x0080		/* Don't use ACPI methods even if detected */
>  
>  static const struct tpacpi_quirk fan_quirk_table[] __initconst = {
>  	TPACPI_QEC_IBM('1', 'Y', TPACPI_FAN_Q1),
> @@ -8823,6 +8824,9 @@ static const struct tpacpi_quirk fan_quirk_table[] __initconst = {
>  	TPACPI_Q_LNV3('N', '1', 'O', TPACPI_FAN_NOFAN),	/* X1 Tablet (2nd gen) */
>  	TPACPI_Q_LNV3('R', '0', 'Q', TPACPI_FAN_DECRPM),/* L480 */
>  	TPACPI_Q_LNV('8', 'F', TPACPI_FAN_TPR),		/* ThinkPad x120e */
> +	TPACPI_Q_LNV3('R', '0', '0', TPACPI_FAN_NOACPI),/* E560 */
> +	TPACPI_Q_LNV3('R', '1', '2', TPACPI_FAN_NOACPI),/* T495 */
> +	TPACPI_Q_LNV3('R', '1', '3', TPACPI_FAN_NOACPI),/* T495s */
>  };
>  
>  static int __init fan_init(struct ibm_init_struct *iibm)
> @@ -8874,6 +8878,13 @@ static int __init fan_init(struct ibm_init_struct *iibm)
>  		tp_features.fan_ctrl_status_undef = 1;
>  	}
>  
> +	if (quirks & TPACPI_FAN_NOACPI) {
> +		/* E560, T495, T495s */
> +		pr_info("Ignoring buggy ACPI fan access method\n");
> +		fang_handle = NULL;
> +		fanw_handle = NULL;
> +	}
> +
>  	if (gfan_handle) {
>  		/* 570, 600e/x, 770e, 770x */
>  		fan_status_access_mode = TPACPI_FAN_RD_ACPI_GFAN;
> -- 
> 2.48.1
> 
Hi,
Just following up on PATCH v3. Let me know if any changes
are needed, thanks!

Kindest Regards,
Seyediman

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ