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]
Date:   Tue, 8 Aug 2023 08:49:03 -0500
From:   Nishanth Menon <nm@...com>
To:     Dhruva Gole <d-gole@...com>
CC:     Tero Kristo <kristo@...nel.org>,
        Santosh Shilimkar <ssantosh@...nel.org>,
        <linux-pm@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <linux-arm-kernel@...ts.infradead.org>,
        <linux-omap@...r.kernel.org>,
        "Kevin Hilman" <khilman@...libre.com>, Vignesh R <vigneshr@...com>,
        Georgi Vlaev <g-vlaev@...com>
Subject: Re: [PATCH V7 2/4] firmware: ti_sci: Add support for querying the
 firmware caps

On 17:20-20230804, Dhruva Gole wrote:
> From: Georgi Vlaev <g-vlaev@...com>
> 
[...]

> +	/*
> +	 * fw_caps 1st bit is used to check Generic capability. Other than
> +	 * that the 1:4 bits are used for various LPM capabilities.
> +	 * The API is buggy on SYSFW 9.00 and below, on some devices.
> +	 * Hence, to avoid any sort of bugs arising due to garbage values
> +	 * Let's allow the fw_caps to be set to whatever the firmware
> +	 * says only on devices listed under has_lpm. These devices should
> +	 * have lpm features tested and implemented in the firmware
> +	 * and only then should they be added to has_lpm struct.
> +	 * Otherwise, set the value to 1 that is the default.
> +	 */
> +	if (fw_caps && soc_device_match(has_lpm))
> +		*fw_caps = resp->fw_caps;
> +	else
> +		*fw_caps = resp->fw_caps & MSG_FLAG_CAPS_GENERIC;

Fix your firmware please. drop the has_lpm stuff.. that is what caps is
for.

As part of ti_sci_setup_ops you get info where you can check ABI version
where this is valid and which is not, ti_sci_msg_cmd_query_fw_caps can
be populated based on that check. That is the reason info is passed to
setup_ops and why we have ABI IDs in the first place.

[...]

-- 
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ