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, 1 Dec 2016 12:37:03 -0600
From:   Alex Thorlton <athorlton@....com>
To:     Ingo Molnar <mingo@...nel.org>
Cc:     Alex Thorlton <athorlton@....com>, linux-kernel@...r.kernel.org,
        Russ Anderson <rja@....com>,
        David Vrabel <david.vrabel@...rix.com>,
        Ingo Molnar <mingo@...hat.com>,
        Juergen Gross <jgross@...e.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        "H. Peter Anvin" <hpa@...or.com>,
        Denys Vlasenko <dvlasenk@...hat.com>,
        Boris Ostrovsky <boris.ostrovsky@...cle.com>, x86@...nel.org,
        xen-devel@...ts.xenproject.org
Subject: Re: [PATCH 1/2] x86: Make E820_X_MAX unconditionally larger than
 E820MAX

On Wed, Nov 30, 2016 at 07:21:48AM +0100, Ingo Molnar wrote:
> 
> * Alex Thorlton <athorlton@....com> wrote:
> 
> > It's really not necessary to limit E820_X_MAX to 128 in the non-EFI
> > case.  This commit drops E820_X_MAX's dependency on CONFIG_EFI, so that
> > E820_X_MAX is always at least slightly larger than E820MAX.
> > 
> > The real motivation behind this is actually to prevent some issues in
> > the Xen kernel, where the XENMEM_machine_memory_map hypercall can
> > produce an e820 map larger than 128 entries, even on systems where the
> > original e820 table was quite a bit smaller than that, depending on how
> > many IOAPICs are installed on the system.
> > 
> > Signed-off-by: Alex Thorlton <athorlton@....com>
> > Suggested-by: Ingo Molnar <mingo@...hat.com>
> > Cc: Russ Anderson <rja@....com>
> > Cc: David Vrabel <david.vrabel@...rix.com>
> > Cc: Ingo Molnar <mingo@...hat.com>
> > Cc: Juergen Gross <jgross@...e.com>
> > Cc: Thomas Gleixner <tglx@...utronix.de>
> > Cc: "H. Peter Anvin" <hpa@...or.com>
> > Cc: Denys Vlasenko <dvlasenk@...hat.com>
> > Cc: Boris Ostrovsky <boris.ostrovsky@...cle.com>
> > Cc: x86@...nel.org
> > Cc: xen-devel@...ts.xenproject.org
> > ---
> >  arch/x86/include/asm/e820.h | 10 ++++++----
> >  1 file changed, 6 insertions(+), 4 deletions(-)
> > 
> > diff --git a/arch/x86/include/asm/e820.h b/arch/x86/include/asm/e820.h
> > index 476b574..aa00d33 100644
> > --- a/arch/x86/include/asm/e820.h
> > +++ b/arch/x86/include/asm/e820.h
> > @@ -1,13 +1,15 @@
> >  #ifndef _ASM_X86_E820_H
> >  #define _ASM_X86_E820_H
> >  
> > -#ifdef CONFIG_EFI
> > +/*
> > + * We need to make sure that E820_X_MAX is defined
> > + * before we include uapi/asm/e820.h
> > + */
> >  #include <linux/numa.h>
> >  #define E820_X_MAX (E820MAX + 3 * MAX_NUMNODES)
> 
> What we need an explanation for in the comment is what does this stand for (what 
> does the 'X' mean?), and what is the magic 3*MAX_NUMNODES about?

I'm not actually certain why 3*MAX_NUMNODES was chosen as the max size
for this table, but it was written by somebody here at SGI, so I'm sure
I can find out :)

As for the 'X,' I'm assuming that's meant to imply that this is the
maxmimum size for the 'eXtended' table, but that could be made more
clear in the comment as well.

I'll come up with a better comment for this and submit a v3.

Thanks, Ingo!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ