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: <alpine.DEB.2.20.1611071658310.3709@nanos>
Date:   Mon, 7 Nov 2016 17:00:25 +0100 (CET)
From:   Thomas Gleixner <tglx@...utronix.de>
To:     Jon Hunter <jonathanh@...dia.com>
cc:     Mika Westerberg <mika.westerberg@...ux.intel.com>,
        Marc Zyngier <marc.zyngier@....com>,
        linux-kernel@...r.kernel.org
Subject: Re: BUG? genirq: irq 14 uses trigger mode 8; requested 0

On Mon, 7 Nov 2016, Jon Hunter wrote:
> On 07/11/16 14:59, Mika Westerberg wrote:
> > On Mon, Nov 07, 2016 at 02:40:47PM +0000, Marc Zyngier wrote:
> >> Sorry, missed this discussion entirely, as I was on the other side of
> >> the world. Not having a irq_set_type definitely seems odd (and 
> >> configuring the trigger outside of the IRQ framework is quite ugly).
> >>
> >> Mika, can you please try the following (which is fully untested)?
> >>
> >> diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
> >> index 48e6d84..822a6b8 100644
> >> --- a/arch/x86/kernel/apic/io_apic.c
> >> +++ b/arch/x86/kernel/apic/io_apic.c
> >> @@ -1868,6 +1868,15 @@ static int ioapic_set_affinity(struct irq_data *irq_data,
> >>  	return ret;
> >>  }
> >>  
> >> +static int ioapic_set_type(struct irq_data *data, unsigned int flow_type)
> >> +{
> >> +	/*
> >> +	 * The IOAPIC has already been programmed behind our back,
> >> +	 * just pretend it all went OK, and too bad if it didn't.
> >> +	 */
> >> +	return 0;
> >> +}
> >> +
> >>  static struct irq_chip ioapic_chip __read_mostly = {
> >>  	.name			= "IO-APIC",
> >>  	.irq_startup		= startup_ioapic_irq,
> >> @@ -1876,6 +1885,7 @@ static struct irq_chip ioapic_chip __read_mostly = {
> >>  	.irq_ack		= irq_chip_ack_parent,
> >>  	.irq_eoi		= ioapic_ack_level,
> >>  	.irq_set_affinity	= ioapic_set_affinity,
> >> +	.irq_set_type		= ioapic_set_type,
> >>  	.flags			= IRQCHIP_SKIP_SET_WAKE,
> >>  };
> > 
> > Thanks! This fixes the problem for me.
> 
> Good to know. The more I think about this, the more I wonder if we
> should have a dummy 'set_type' as this is just hiding the issue. If the
> original warning does not impact the overall behaviour (ie. interrupts
> still working) then may be it is legitimate as far as gen-irq is concerned?

No. We don't want a dummy set_type to paper over the issue. As Mika
correctly figured out that the ioapic is already configured, but it does
not propagate it to the irq descriptor. That wants to be fixed. I'll have a
look.

Thanks,

	tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ