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]
Date:	Thu, 7 Jul 2011 12:24:54 -0400
From:	Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
To:	Raghavendra D Prabhu <rprabhu@...hang.net>
Cc:	xen-devel@...ts.xensource.com, jeremy.fitzhardinge@...rix.com,
	virtualization@...ts.linux-foundation.org,
	linux-kernel@...r.kernel.org, Ian Campbell <ijc@...lion.org.uk>
Subject: Re: [Xen-devel] Re: [PATCH] Modpost section mismatch fix

> Tested it. Works now.

Ok, Stuck Tested-by on the patch. Hopefully Linus hasn't pulled it yet.

> Reviewed-by: Raghavendra Prabhu <rprabhu@...hang.net>
> 
> Also,
> The condition for acpi_gsi_to_irq can be removed since it always returns zero.

The function might in the future return something that is non-zero
and we should guard for it. Also you make 'irq' be unsigned which is not
good as the IRQ 0 is a valid value - and with making it unsigned if it is
set to -1 (the -1 is the invalid IRQ value) the check for 'irq != gsi'
will be true and and we will pass in -1 casted to unsigned. That is a
large value and not the right thing we want to pass to xen_register_gsi.


> ============================================
>  diff --git a/arch/x86/pci/xen.c b/arch/x86/pci/xen.c
>  index f567965..3faa55b 100644
>  --- a/arch/x86/pci/xen.c
>  +++ b/arch/x86/pci/xen.c
>  @@ -405,7 +405,7 @@ static __init void xen_setup_acpi_sci(void)
>          int rc;
>          int trigger, polarity;
>          int gsi = acpi_sci_override_gsi;
>  -       int irq = -1;
>  +       unsigned int irq = 0u;
>          int gsi_override = -1;
> 
>          if (!gsi)
>  @@ -435,11 +435,10 @@ static __init void xen_setup_acpi_sci(void)
>           * setup as we had setup IRQ 20 for it).
>           */
>          /* Check whether the GSI != IRQ */
>  -       if (acpi_gsi_to_irq(gsi, &irq) == 0) {
>  -               if (irq >= 0 && irq != gsi)
>  -                       /* Bugger, we MUST have that IRQ. */
>  -                       gsi_override = irq;
>  -       }
>  +       acpi_gsi_to_irq(gsi, &irq);
>  +       if (irq != gsi)
>  +               /* Bugger, we MUST have that IRQ. */
>  +               gsi_override = irq;
> 
>          gsi = xen_register_gsi(gsi, gsi_override, trigger, polarity);
>          printk(KERN_INFO "xen: acpi sci %d\n", gsi);
> 
> 
> --------------------------
> Raghavendra Prabhu
> GPG Id : 0xD72BE977
> Fingerprint: B93F EBCB 8E05 7039 CD3C A4B8 A616 DCA1 D72B E977
> www: wnohang.net



> _______________________________________________
> Xen-devel mailing list
> Xen-devel@...ts.xensource.com
> http://lists.xensource.com/xen-devel

--
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