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: <de96585f-9b8d-4536-a9d5-32a718e3eb4d@cn.fujitsu.com>
Date:   Wed, 6 Jun 2018 11:48:55 +0800
From:   Dou Liyang <douly.fnst@...fujitsu.com>
To:     Thomas Gleixner <tglx@...utronix.de>
CC:     LKML <linux-kernel@...r.kernel.org>,
        Ingo Molnar <mingo@...nel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Borislav Petkov <bp@...en8.de>,
        Dmitry Safonov <0x7f454c46@...il.com>,
        Tariq Toukan <tariqt@...lanox.com>,
        Song Liu <liu.song.a23@...il.com>,
        Joerg Roedel <jroedel@...e.de>,
        Mike Travis <mike.travis@....com>, <stable@...r.kernel.org>
Subject: Re: [patch 3/8] x86/apic: Provide apic_ack_irq()

Hi Thomas,

At 06/05/2018 07:41 PM, Thomas Gleixner wrote:
> On Tue, 5 Jun 2018, Dou Liyang wrote:
>>> +{
>>> +	if (unlikely(irqd_is_setaffinity_pending(irqd)))
>>
>> Affinity pending is also judged in
>>
>>> +		irq_move_irq(irqd);
>>
>> If we can remove the if(...) statement here
> 
> That requires to fix all call sites in ia64 and that's why I didn't.  But

I didn't express clearly, I meant remove the if(...) statement from
apic_ack_irq(), it doesn't require to fix the call sites in ia64.

+void apic_ack_irq(struct irq_data *irqd)
+{
+	irq_move_irq(irqd);
+	ack_APIC_irq();
+}

BTW, If apic_ack_irq() can accept _any_ irq_data when hierarchical
irqdomains are enabled[1]? If it is true, If there is a situation in
the original code that we should avoid:

   If the top-level irq_data has the IRQD_SETAFFINITY_PENDING state, but
   non-top-level irq_data state not, when using non-top-level irq_data in
   apic_ack_irq(), we may skip the irq_move_irq() which we should call.

[1] commit 77ed42f18edd("genirq: Prevent crash in irq_move_irq()")

> we can make irq_move_irq() an inline function and have the check in the
> inline.
> 

I don't know why do we need to make irq_move_irq() an inline function.

And, yes, irq_move_irq() has already had the check

         ...
   	if (likely(!irqd_is_setaffinity_pending(idata)))
		return;
         ...

Thanks,
	dou


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ