Re: [PATCH v2 2/2] x86/KASLR/64: Determine kernel text mapping size at runtime

2016-12-11 Thread Baoquan He
On 12/11/16 at 01:06pm, Borislav Petkov wrote: > On Sun, Dec 11, 2016 at 06:58:29PM +0800, Baoquan He wrote: > > For arguing and defending myself, I couldn't be very objective. > > Yeah, it is mind-boggling the amount of bullshit you would come up with > instead of simply saying, "no, I don't have

Re: [PATCH v2 2/2] x86/KASLR/64: Determine kernel text mapping size at runtime

2016-12-11 Thread Borislav Petkov
On Sun, Dec 11, 2016 at 06:58:29PM +0800, Baoquan He wrote: > For arguing and defending myself, I couldn't be very objective. Yeah, it is mind-boggling the amount of bullshit you would come up with instead of simply saying, "no, I don't have a good reason and use case for my patch". It made me lau

Re: [PATCH v2 2/2] x86/KASLR/64: Determine kernel text mapping size at runtime

2016-12-11 Thread Baoquan He
On 12/10/16 at 05:28pm, Borislav Petkov wrote: > On Sat, Dec 10, 2016 at 09:41:56PM +0800, Baoquan He wrote: > > 1) Fedora 25 defaults to enable CONFIG_RANDOMIZE_BASE. And this worries > > maintainers of several Fedora component. People ever asked me how to > > judge whether it's a kaslr kernel. I

Re: [PATCH v2 2/2] x86/KASLR/64: Determine kernel text mapping size at runtime

2016-12-10 Thread Borislav Petkov
On Sat, Dec 10, 2016 at 09:41:56PM +0800, Baoquan He wrote: > 1) Fedora 25 defaults to enable CONFIG_RANDOMIZE_BASE. And this worries > maintainers of several Fedora component. People ever asked me how to > judge whether it's a kaslr kernel. I told them I usually read elf header > of kcore - "reade

Re: [PATCH v2 2/2] x86/KASLR/64: Determine kernel text mapping size at runtime

2016-12-10 Thread Baoquan He
On 12/10/16 at 01:33pm, Borislav Petkov wrote: > On Sat, Dec 10, 2016 at 08:27:57PM +0800, Baoquan He wrote: > > Whether CONFIG_RANDOMIZE_BASE is yes or not, with 'nokaslr' specified, > > Kernel text mapping size should be 512M, just the same as no kaslr code > > compiled in. > > "should be" still

Re: [PATCH v2 2/2] x86/KASLR/64: Determine kernel text mapping size at runtime

2016-12-10 Thread Borislav Petkov
On Sat, Dec 10, 2016 at 08:27:57PM +0800, Baoquan He wrote: > Whether CONFIG_RANDOMIZE_BASE is yes or not, with 'nokaslr' specified, > Kernel text mapping size should be 512M, just the same as no kaslr code > compiled in. "should be" still doesn't really explain what the problem is. What's wrong w

Re: [PATCH v2 2/2] x86/KASLR/64: Determine kernel text mapping size at runtime

2016-12-10 Thread Baoquan He
On 12/10/16 at 11:31am, Borislav Petkov wrote: > On Fri, Dec 09, 2016 at 10:41:58PM +0800, Baoquan He wrote: > > X86 64 kernel takes KERNEL_IMAGE_SIZE as the kernel text mapping size, > > and it's fixed as compiling time, changing from 512M to 1G as long as > > CONFIG_RANDOMIZE_BASE is enabled, tho

Re: [PATCH v2 2/2] x86/KASLR/64: Determine kernel text mapping size at runtime

2016-12-10 Thread Borislav Petkov
On Fri, Dec 09, 2016 at 10:41:58PM +0800, Baoquan He wrote: > X86 64 kernel takes KERNEL_IMAGE_SIZE as the kernel text mapping size, > and it's fixed as compiling time, changing from 512M to 1G as long as > CONFIG_RANDOMIZE_BASE is enabled, though people specify kernel option > "nokaslr" explicitly

[PATCH v2 2/2] x86/KASLR/64: Determine kernel text mapping size at runtime

2016-12-09 Thread Baoquan He
X86 64 kernel takes KERNEL_IMAGE_SIZE as the kernel text mapping size, and it's fixed as compiling time, changing from 512M to 1G as long as CONFIG_RANDOMIZE_BASE is enabled, though people specify kernel option "nokaslr" explicitly. This could be a wrong behaviour. CONFIG_RANDOMIZE_BASE should onl