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: <87bk5hrkht.ffs@tglx>
Date: Tue, 07 May 2024 12:20:46 +0200
From: Thomas Gleixner <tglx@...utronix.de>
To: Jinjie Ruan <ruanjinjie@...wei.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] genirq: Simplify the check for __irq_get_desc_lock()

On Tue, May 07 2024 at 09:16, Jinjie Ruan wrote:
> On 2024/5/7 1:55, Thomas Gleixner wrote:
>>>  	if (desc) {
>>>  		if (check & _IRQ_DESC_CHECK) {
>>> -			if ((check & _IRQ_DESC_PERCPU) &&
>>> -			    !irq_settings_is_per_cpu_devid(desc))
>>> -				return NULL;
>>> -
>>> -			if (!(check & _IRQ_DESC_PERCPU) &&
>>> +			if (!!(check & _IRQ_DESC_PERCPU) !=
>>>  			    irq_settings_is_per_cpu_devid(desc))
>>>  				return NULL;
>> 
>> The existing code is readable and obvious. This is not.
>
> Thank you for your review. The existing code is indeed clear, but it
> seems that both judgments are checking whether the percpu flags are
> consistent.

The code checks whether the descriptor is marked as per CPU devid if and
only if the caller requested it.

As the code exactly doing that, what is the point of changing it to
something incomprehensible?

Thanks,

        tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ