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: <20120731134811.GH4789@phenom.dumpdata.com>
Date:	Tue, 31 Jul 2012 09:48:11 -0400
From:	Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
To:	linux-kernel@...r.kernel.org, xen-devel@...ts.xensource.com,
	Ian.Campbell@...rix.com, hpa@...or.com, x86@...nel.org
Subject: Re: [PATCH 1/3] xen/mmu/p2m: Check extend_brk for NULL

On Tue, Jul 31, 2012 at 06:42:54AM -0400, Konrad Rzeszutek Wilk wrote:
> Which allows us to be a bit smarter in case we exhaust the reserved
> virtual space.
> 
> [v1: Suggested by Ian Campbell]
> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
> ---
>  arch/x86/xen/enlighten.c |    2 ++
>  arch/x86/xen/mmu.c       |    5 ++++-
>  arch/x86/xen/p2m.c       |   35 ++++++++++++++++++++++++-----------
>  3 files changed, 30 insertions(+), 12 deletions(-)
> 
> diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
> index 993e2a5..923d98e 100644
> --- a/arch/x86/xen/enlighten.c
> +++ b/arch/x86/xen/enlighten.c
> @@ -1519,6 +1519,8 @@ void __ref xen_hvm_init_shared_info(void)
>  	if (!shared_info_page)
>  		shared_info_page = (struct shared_info *)
>  			extend_brk(PAGE_SIZE, PAGE_SIZE);
> +	if (!shared_info_page)
> +		return;
>  	xatp.domid = DOMID_SELF;
>  	xatp.idx = 0;
>  	xatp.space = XENMAPSPACE_shared_info;
> diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c
> index 993ba07..d7a2044 100644
> --- a/arch/x86/xen/mmu.c
> +++ b/arch/x86/xen/mmu.c
> @@ -1711,6 +1711,8 @@ static void __init xen_map_identity_early(pmd_t *pmd, unsigned long max_pfn)
>  
>  	level1_ident_pgt = extend_brk(sizeof(pte_t) * LEVEL1_IDENT_ENTRIES,
>  				      PAGE_SIZE);
> +	if (!level_ident_pgt)
> +		goto out;
>  

And this is what I get for posting patches in the wee mornings without coffee..
It obviously should have be level1_ident_pgt.
--
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