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: <20250821095634.t6hfkmfkzjwsy4se@vireshk-i7>
Date: Thu, 21 Aug 2025 15:26:34 +0530
From: Viresh Kumar <viresh.kumar@...aro.org>
To: Zihuan Zhang <zhangzihuan@...inos.cn>
Cc: "rafael J . wysocki" <rafael@...nel.org>,
	zhenglifeng <zhenglifeng1@...wei.com>, linux-pm@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 2/2] cpufreq: simplify setpolicy/target check in
 driver verification

On 21-08-25, 17:45, Zihuan Zhang wrote:
> Do you have any suggestions on how to better test or handle the cases where
> driver registration could fail?

That's what I suggested earlier.

> > I would rather do:
> > 
> > 	(!!driver_data->setpolicy == (driver_data->target_index || driver_data->target))
> 
> The current version of the code is much better and safer.

You can actually do this.. This first converts
`driver_data->setpolicy` to bool and then compares both of them, and
both can't be true or false.

-- 
viresh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ