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]
Date:	Tue, 8 May 2012 13:16:08 -0700
From:	Yinghai Lu <yinghai@...nel.org>
To:	Russ Anderson <rja@....com>
Cc:	linux-kernel@...r.kernel.org, linux-mm@...ck.org,
	David Miller <davem@...emloft.net>
Subject: Re: [patch] mm: nobootmem: fix sign extend problem in __free_pages_memory()

On Mon, May 7, 2012 at 12:32 PM, Russ Anderson <rja@....com> wrote:
> Systems with 8 TBytes of memory or greater can hit a problem
> where only the the first 8 TB of memory shows up.  This is
> due to "int i" being smaller than "unsigned long start_aligned",
> causing the high bits to be dropped.

when you have 8T installed, you should get [0,2g), [4g, 8T+2g)

if you have more than that. [2g, 4g) could be added as ram together
with MMIO....

>
> The fix is to change i to unsigned long to match start_aligned
> and end_aligned.
>
> Thanks to Jack Steiner (steiner@....com) for assistance tracking
> this down.
>
> Signed-off-by: Russ Anderson <rja@....com>
>
> ---
>  mm/nobootmem.c |    3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> Index: linux/mm/nobootmem.c
> ===================================================================
> --- linux.orig/mm/nobootmem.c   2012-05-05 08:39:39.470845187 -0500
> +++ linux/mm/nobootmem.c        2012-05-05 08:39:42.714784530 -0500
> @@ -82,8 +82,7 @@ void __init free_bootmem_late(unsigned l
>
>  static void __init __free_pages_memory(unsigned long start, unsigned long end)
>  {
> -       int i;
> -       unsigned long start_aligned, end_aligned;
> +       unsigned long i, start_aligned, end_aligned;
>        int order = ilog2(BITS_PER_LONG);
>
>        start_aligned = (start + (BITS_PER_LONG - 1)) & ~(BITS_PER_LONG - 1);

Acked-by: Yinghai Lu <yinghai@...nel.org>
--
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