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: <m1bp9k2xsg.fsf@fess.ebiederm.org>
Date:	Mon, 02 Aug 2010 20:13:51 -0700
From:	ebiederm@...ssion.com (Eric W. Biederman)
To:	Yinghai Lu <yinghai@...nel.org>
Cc:	Dave Airlie <airlied@...il.com>,
	LKML <linux-kernel@...r.kernel.org>, Ingo Molnar <mingo@...e.hu>
Subject: Re: oops in ioapic_write_entry

Yinghai Lu <yinghai@...nel.org> writes:

> On 08/02/2010 06:32 PM, Yinghai Lu wrote:
>> On 08/02/2010 04:17 PM, Dave Airlie wrote:
>>>>
>>>> the kernel is using mptable, and the  system have mcp55, so how come
>>>> with irq 35?
>>>> assume we should only have ioapic irq 0 - 23 ...
>>>>
>>>> Can you send out boot log with "debug apic=debug pci=routeirq" with
>>>> 2.6.32 and 2.6.35?
>>>
>>> Okay el6log is from a RHEL6 2.6.32 kernel, but it should give a good
>>> baseline, the 2.6.35 oops even earlier with all those options and is
>>> in the second attachment.
>> 
>

This patch is wrong and there is no reason to even suspect it will
affect this problem.  At best this patch will trade one set of bugs
for another because at least on some platforms we always did something
like this.  Having an irq 35 is odd and certainly a result of recent
changes, but in this case it doesn't look like it has anything to do
with the problem.

Nacked-by: "Eric W. Biederman" <ebiederm@...ssion.com>

> please use this one instead..., forget to run quilt refresh before sending it.
>
> [PATCH -v2] x86: fix pin_2_irq mapping
>
> We should not twist gsi to irq mapping if acpi is not used.
>
> -v2 remove not used irq_to_gsi()
>
> Signed-off-by: Yinghai Lu <yinghai@...nel.org>
>
> ---
>  arch/x86/include/asm/io_apic.h |   10 ++++++++++
>  arch/x86/kernel/acpi/boot.c    |    4 ++--
>  arch/x86/kernel/apic/io_apic.c |    5 +----
>  3 files changed, 13 insertions(+), 6 deletions(-)
>
> Index: linux-2.6/arch/x86/include/asm/io_apic.h
> ===================================================================
> --- linux-2.6.orig/arch/x86/include/asm/io_apic.h
> +++ linux-2.6/arch/x86/include/asm/io_apic.h
> @@ -185,6 +185,16 @@ int mp_find_ioapic_pin(int ioapic, u32 g
>  void __init mp_register_ioapic(int id, u32 address, u32 gsi_base);
>  extern void __init pre_init_apic_IRQ0(void);
>  
> +#ifdef CONFIG_ACPI
> +unsigned int gsi_to_irq(unsigned int gsi);
> +u32 irq_to_gsi(int irq);
> +#else
> +static inline unsigned int gsi_to_irq(unsigned int gsi)
> +{
> +	return gsi;
> +}
> +#endif
> +
>  #else  /* !CONFIG_X86_IO_APIC */
>  
>  #define io_apic_assign_pci_irqs 0
> Index: linux-2.6/arch/x86/kernel/acpi/boot.c
> ===================================================================
> --- linux-2.6.orig/arch/x86/kernel/acpi/boot.c
> +++ linux-2.6/arch/x86/kernel/acpi/boot.c
> @@ -100,7 +100,7 @@ static u32 isa_irq_to_gsi[NR_IRQS_LEGACY
>  	0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
>  };
>  
> -static unsigned int gsi_to_irq(unsigned int gsi)
> +unsigned int gsi_to_irq(unsigned int gsi)
>  {
>  	unsigned int irq = gsi + NR_IRQS_LEGACY;
>  	unsigned int i;
> @@ -123,7 +123,7 @@ static unsigned int gsi_to_irq(unsigned
>  	return irq;
>  }
>  
> -static u32 irq_to_gsi(int irq)
> +u32 irq_to_gsi(int irq)
>  {
>  	unsigned int gsi;
>  
> Index: linux-2.6/arch/x86/kernel/apic/io_apic.c
> ===================================================================
> --- linux-2.6.orig/arch/x86/kernel/apic/io_apic.c
> +++ linux-2.6/arch/x86/kernel/apic/io_apic.c
> @@ -1029,10 +1029,7 @@ static int pin_2_irq(int idx, int apic,
>  	} else {
>  		u32 gsi = mp_gsi_routing[apic].gsi_base + pin;
>  
> -		if (gsi >= NR_IRQS_LEGACY)
> -			irq = gsi;
> -		else
> -			irq = gsi_top + gsi;
> +		irq = gsi_to_irq(gsi);
>  	}
>  
>  #ifdef CONFIG_X86_32
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ