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: <87bl6m3enh.ffs@nanos.tec.linutronix.de>
Date:   Wed, 28 Jul 2021 12:40:18 +0200
From:   Thomas Gleixner <tglx@...utronix.de>
To:     Marc Zyngier <maz@...nel.org>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        Alex Williamson <alex.williamson@...hat.com>,
        "Raj\, Ashok" <ashok.raj@...el.com>,
        Ingo Molnar <mingo@...nel.org>,
        "David S. Miller" <davem@...emloft.net>,
        Bjorn Helgaas <bhelgaas@...gle.com>, linux-pci@...r.kernel.org,
        Kevin Tian <kevin.tian@...el.com>, x86@...nel.org
Subject: Re: [patch 6/8] genirq: Provide IRQCHIP_AFFINITY_PRE_STARTUP

On Thu, Jul 22 2021 at 16:12, Marc Zyngier wrote:
> On Wed, 21 Jul 2021 20:11:32 +0100,
> Thomas Gleixner <tglx@...utronix.de> wrote:
>>  #include <linux/irqdesc.h>
>> --- a/kernel/irq/chip.c
>> +++ b/kernel/irq/chip.c
>> @@ -265,8 +265,11 @@ int irq_startup(struct irq_desc *desc, b
>>  	} else {
>>  		switch (__irq_startup_managed(desc, aff, force)) {
>>  		case IRQ_STARTUP_NORMAL:
>> +			if (d->chip->flags & IRQCHIP_AFFINITY_PRE_STARTUP)
>> +				irq_setup_affinity(desc);
>
> How about moving this to activate instead? We already special-case the
> activation of MSIs for PCI (MSI_FLAG_ACTIVATE_EARLY), and this
> wouldn't look completely out of place. The startup mode could be an
> issue though...

Yes, I thought about that, but the ordering here is:

setup()
  early_activate()

early activation just needs to program a valid message. Now later we
have request_irq() invoking:

     activate()
     startup()

So, yes. We could do that in activate, but then we still have the post
startup variant in irq_startup() which makes the code hard to follow.

There is another practical issue. Assume the irq is requested with
IRQF_NOAUTOEN, then irq_startup() will be invoked when the driver calls
enable_irq(), which might be way later and then the affinity setting
might be completely different already. So I rather keep it there.

Thanks,

        tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ