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: <86802c440806201250g706bb062t2d472ee0637cac4e@mail.gmail.com>
Date:	Fri, 20 Jun 2008 12:50:33 -0700
From:	"Yinghai Lu" <yhlu.kernel@...il.com>
To:	akataria@...are.com
Cc:	"Ingo Molnar" <mingo@...e.hu>, "Brown, Len" <len.brown@...el.com>,
	"Andrew Morton" <akpm@...ux-foundation.org>,
	"linux-acpi@...r.kernel.org" <linux-acpi@...r.kernel.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/2] cleanup e820_setup_gap

On Fri, Jun 20, 2008 at 12:38 PM, Alok Kataria <akataria@...are.com> wrote:
> Here is the patch based on tip/master
>
> Please have a look
>
> --
>
> This is a preparatory patch for the next patch in series.
> Moves some code from e820_setup_gap to a new function e820_search_gap.
> This patch is a part of a bug fix where we walk the ACPI table to calculate
> a gap for PCI optional devices.
>
> Signed-off-by: Alok N Kataria <akataria@...are.com>
>
> Index: linux-trees.git/arch/x86/kernel/e820.c
> ===================================================================
> --- linux-trees.git.orig/arch/x86/kernel/e820.c 2008-06-20 10:32:44.000000000 -0700
> +++ linux-trees.git/arch/x86/kernel/e820.c      2008-06-20 12:27:58.000000000 -0700
> @@ -442,26 +442,22 @@
>  }
>
>  /*
> - * Search for the biggest gap in the low 32 bits of the e820
> - * memory space.  We pass this space to PCI to assign MMIO resources
> - * for hotplug or unconfigured devices in.
> - * Hopefully the BIOS let enough space left.
> + * Search for a gap in the e820 memory space from start_addr to 2^32.
>  */
> -__init void e820_setup_gap(void)
> +__init int e820_search_gap(unsigned long *gapstart, unsigned long *gapsize,
> +               unsigned long start_addr)
>  {
> -       unsigned long gapstart, gapsize, round;
> -       unsigned long long last;
> -       int i;
> +       unsigned long last = 0x100000000ull;

why changing "unsigned long long" to "unsigned long" ?
it will overflow on 32bit

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