Re: [PATCH v4 2/2] x86/boot/KASLR: skip the specified crashkernel region

2019-05-06 Thread Pingfan Liu
On Thu, Apr 18, 2019 at 8:32 PM Borislav Petkov wrote: > > On Thu, Apr 18, 2019 at 03:56:09PM +0800, Pingfan Liu wrote: > > Then in my case, either no @offset or invalid argument will keep > > "*crash_base = 0", and KASLR does not care about either of them. > > Ok. > > > It is not elegant. Will

Re: [PATCH v4 2/2] x86/boot/KASLR: skip the specified crashkernel region

2019-04-18 Thread Borislav Petkov
On Thu, Apr 18, 2019 at 03:56:09PM +0800, Pingfan Liu wrote: > Then in my case, either no @offset or invalid argument will keep > "*crash_base = 0", and KASLR does not care about either of them. Ok. > It is not elegant. Will try a separate patch to fix it firstly. That's appreciated, thanks. It

Re: [PATCH v4 2/2] x86/boot/KASLR: skip the specified crashkernel region

2019-04-18 Thread Pingfan Liu
On Thu, Apr 18, 2019 at 12:06 AM Borislav Petkov wrote: > > On Wed, Apr 17, 2019 at 01:53:37PM +0800, Pingfan Liu wrote: > > Take __parse_crashkernel()->parse_crashkernel_simple() for example. If > > no offset given, then it still return 0, but crash_base is dangling. Sorry for misleading, I

Re: [PATCH v4 2/2] x86/boot/KASLR: skip the specified crashkernel region

2019-04-17 Thread Borislav Petkov
On Wed, Apr 17, 2019 at 01:53:37PM +0800, Pingfan Liu wrote: > Take __parse_crashkernel()->parse_crashkernel_simple() for example. If > no offset given, then it still return 0, but crash_base is dangling. Well, that is bad design. parse_crashkernel_simple() should return a *separate* distinct

Re: [PATCH v4 2/2] x86/boot/KASLR: skip the specified crashkernel region

2019-04-16 Thread Pingfan Liu
On Wed, Apr 17, 2019 at 3:01 AM Borislav Petkov wrote: > > On Mon, Apr 08, 2019 at 01:58:35PM +0800, Pingfan Liu wrote: > > crashkernel=x@y or or =range1:size1[,range2:size2,...]@offset option may > > fail to reserve the required memory region if KASLR puts kernel into the > > region. To avoid

Re: [PATCH v4 2/2] x86/boot/KASLR: skip the specified crashkernel region

2019-04-16 Thread Borislav Petkov
On Mon, Apr 08, 2019 at 01:58:35PM +0800, Pingfan Liu wrote: > crashkernel=x@y or or =range1:size1[,range2:size2,...]@offset option may > fail to reserve the required memory region if KASLR puts kernel into the > region. To avoid this uncertainty, asking KASLR to skip the required > region. > >

[PATCH v4 2/2] x86/boot/KASLR: skip the specified crashkernel region

2019-04-07 Thread Pingfan Liu
crashkernel=x@y or or =range1:size1[,range2:size2,...]@offset option may fail to reserve the required memory region if KASLR puts kernel into the region. To avoid this uncertainty, asking KASLR to skip the required region. Signed-off-by: Pingfan Liu Cc: Thomas Gleixner Cc: Ingo Molnar Cc: