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]
Date: Tue, 11 Jun 2024 08:50:44 +0000
From: Tzung-Bi Shih <tzungbi@...nel.org>
To: Uwe Kleine-König <ukleinek@...libre.com>
Cc: Benson Leung <bleung@...omium.org>, Guenter Roeck <groeck@...omium.org>,
	linux-pwm@...r.kernel.org, chrome-platform@...ts.linux.dev,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/3] pwm: cros-ec: Don't care about consumers in
 .get_state()

On Fri, Jun 07, 2024 at 10:44:15AM +0200, Uwe Kleine-König wrote:
> The get_state() callback is never called (in a visible way) after there
> is a consumer for a pwm device. The core handles loosing the information
> about duty_cycle just fine.

ChromeOS EC has no separated "enabled" state, it sees `duty == 0` as
"disabled"[1].  1db37f9561b2 ("pwm: cros-ec: Cache duty cycle value")
caches the value in kernel side so that it can retrieve the original duty
value even if (struct pwm_state *)->enabled is false.

To make sure I understand, did you mean the original duty value could be less
important because:
- We are less caring as it is in a debug context at [2]?
- At [3], the PWM device is still initializing.

[1]: https://crrev.com/0e16954460a08133b2557150e0897014ea2b9672/common/pwm.c#66
[2]: https://elixir.bootlin.com/linux/v6.10-rc3/source/drivers/pwm/core.c#L52
[3]: https://elixir.bootlin.com/linux/v6.10-rc3/source/drivers/pwm/core.c#L371

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ