[PATCH v2] kexec: fix mmap return code handling

2015-11-26 Thread Michael Holzheu
Hi Simon again, After a bit more thinking: In theory mmap() could also return NULL. Therefore the following fix is probably the better one ... --- Subject: [PATCH] kexec: fix mmap return code handling When mmap fails, MAP_FAILED (that is, (void *) -1) is returned. Currently we assume that NULL

Re: [PATCH v2] kexec: fix mmap return code handling

2015-11-26 Thread Petr Tesarik
On Thu, 26 Nov 2015 18:32:31 +0100 Michael Holzheu wrote: > Hi Simon again, > > After a bit more thinking: In theory mmap() could also return NULL. > Therefore the following fix is probably the better one ... No, if you let the kernel choose the address (i.e. call

Re: [PATCH v2] kexec: fix mmap return code handling

2015-11-26 Thread Michael Holzheu
On Thu, 26 Nov 2015 19:02:28 +0100 Petr Tesarik wrote: > On Thu, 26 Nov 2015 18:32:31 +0100 > Michael Holzheu wrote: > > > Hi Simon again, > > > > After a bit more thinking: In theory mmap() could also return NULL. > > Therefore the following fix

[PATCH] x86: Make sure E820_PM[AE]M are defined if needed

2015-11-26 Thread Simon Horman
It appears that (older?) revisions of xenctl.h define all of the E820_* values used in kexec-x86-common.c except E820_PMAM and E820_PMEM. This results in a build failure when building against libxenctl. Avoid this problem by providing local definitions of those values. It seems reasonable to do

Re: [PATCH v2] kexec: fix mmap return code handling

2015-11-26 Thread Simon Horman
On Thu, Nov 26, 2015 at 08:02:35PM +0100, Michael Holzheu wrote: > On Thu, 26 Nov 2015 19:02:28 +0100 > Petr Tesarik wrote: > > > On Thu, 26 Nov 2015 18:32:31 +0100 > > Michael Holzheu wrote: > > > > > Hi Simon again, > > > > > > After a bit more

Re: [PATCH] x86: Make sure E820_PM[AE]M are defined if needed

2015-11-26 Thread Baoquan He
On 11/27/15 at 09:36am, Simon Horman wrote: > It appears that (older?) revisions of xenctl.h define > all of the E820_* values used in kexec-x86-common.c except > E820_PMAM and E820_PMEM. This results in a build failure when > building against libxenctl. > > Avoid this problem by providing local