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:   Wed, 30 Nov 2016 06:18:42 +0100
From:   Juergen Gross <jgross@...e.com>
To:     Alex Thorlton <athorlton@....com>, linux-kernel@...r.kernel.org
Cc:     Russ Anderson <rja@....com>,
        David Vrabel <david.vrabel@...rix.com>,
        Ingo Molnar <mingo@...hat.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 2/2] xen/x86: Increase xen_e820_map to E820_X_MAX possible
 entries

On 30/11/16 04:24, Alex Thorlton wrote:
> On systems with sufficiently large e820 tables, and several IOAPICs, it
> is possible for the XENMEM_machine_memory_map callback (and its
> counterpart, XENMEM_memory_map) to attempt to return an e820 table with
> more than 128 entries.  This callback adds entries to the BIOS-provided
> e820 table to account for IOAPIC registers, which, on sufficiently large
> systems, can result in an e820 table that is too large to copy back into
> xen_e820_map.
> 
> This change simply increases the size of xen_e820_map to E820_X_MAX to
> ensure that there is enough room to store the entire e820 map returned
> from this callback.
> 
> Signed-off-by: Alex Thorlton <athorlton@....com>
> Suggested-by: Boris Ostrovsky <boris.ostrovsky@...cle.com>

Reviewed-by: Juergen Gross <jgross@...e.com>


Juergen

> 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/xen/setup.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/x86/xen/setup.c b/arch/x86/xen/setup.c
> index f8960fc..8c394e3 100644
> --- a/arch/x86/xen/setup.c
> +++ b/arch/x86/xen/setup.c
> @@ -41,7 +41,7 @@
>  unsigned long xen_released_pages;
>  
>  /* E820 map used during setting up memory. */
> -static struct e820entry xen_e820_map[E820MAX] __initdata;
> +static struct e820entry xen_e820_map[E820_X_MAX] __initdata;
>  static u32 xen_e820_map_entries __initdata;
>  
>  /*
> @@ -750,7 +750,7 @@ char * __init xen_memory_setup(void)
>  	max_pfn = min(max_pfn, xen_start_info->nr_pages);
>  	mem_end = PFN_PHYS(max_pfn);
>  
> -	memmap.nr_entries = E820MAX;
> +	memmap.nr_entries = ARRAY_SIZE(xen_e820_map);
>  	set_xen_guest_handle(memmap.buffer, xen_e820_map);
>  
>  	op = xen_initial_domain() ?
> @@ -923,7 +923,7 @@ char * __init xen_auto_xlated_memory_setup(void)
>  	int i;
>  	int rc;
>  
> -	memmap.nr_entries = E820MAX;
> +	memmap.nr_entries = ARRAY_SIZE(xen_e820_map);
>  	set_xen_guest_handle(memmap.buffer, xen_e820_map);
>  
>  	rc = HYPERVISOR_memory_op(XENMEM_memory_map, &memmap);
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ