Re: [PATCH 1/2] x86/boot/KASLR: Add two functions for 1GB huge pages handling

2018-06-24 Thread Ingo Molnar
* Baoquan He wrote: > On 06/21/18 at 05:01pm, Ingo Molnar wrote: > > > > * Baoquan He wrote: > > > > > +/* Store the number of 1GB huge pages which user specified.*/ > > > +static unsigned long max_gb_huge_pages; > > > + > > > +static int parse_gb_huge_pages(char *param, char* val) > > > +{

Re: [PATCH 1/2] x86/boot/KASLR: Add two functions for 1GB huge pages handling

2018-06-22 Thread Baoquan He
On 06/21/18 at 05:01pm, Ingo Molnar wrote: > > * Baoquan He wrote: > > > +/* Store the number of 1GB huge pages which user specified.*/ > > +static unsigned long max_gb_huge_pages; > > + > > +static int parse_gb_huge_pages(char *param, char* val) > > +{ > > + char *p; > > + u64 mem_size; > >

Re: [PATCH 1/2] x86/boot/KASLR: Add two functions for 1GB huge pages handling

2018-06-21 Thread Ingo Molnar
* Baoquan He wrote: > +/* Store the number of 1GB huge pages which user specified.*/ > +static unsigned long max_gb_huge_pages; > + > +static int parse_gb_huge_pages(char *param, char* val) > +{ > + char *p; > + u64 mem_size; > + static bool gbpage_sz = false; > + > + if (!strcm

Re: [PATCH 1/2] x86/boot/KASLR: Add two functions for 1GB huge pages handling

2018-05-16 Thread Baoquan He
On 05/17/18 at 01:53pm, Chao Fan wrote: > On Thu, May 17, 2018 at 12:03:43PM +0800, Baoquan He wrote: > >Hi Chao, > > > >On 05/17/18 at 11:27am, Chao Fan wrote: > >> >+/* Store the number of 1GB huge pages which user specified.*/ > >> >+static unsigned long max_gb_huge_pages; > >> >+ > >> >+static

Re: [PATCH 1/2] x86/boot/KASLR: Add two functions for 1GB huge pages handling

2018-05-16 Thread Chao Fan
On Thu, May 17, 2018 at 12:03:43PM +0800, Baoquan He wrote: >Hi Chao, > >On 05/17/18 at 11:27am, Chao Fan wrote: >> >+/* Store the number of 1GB huge pages which user specified.*/ >> >+static unsigned long max_gb_huge_pages; >> >+ >> >+static int parse_gb_huge_pages(char *param, char* val) >> >+{ >

Re: [PATCH 1/2] x86/boot/KASLR: Add two functions for 1GB huge pages handling

2018-05-16 Thread Baoquan He
On 05/17/18 at 07:12am, damian wrote: > On Wed, 16. May 18:05, Baoquan He wrote: > > Functions parse_gb_huge_pages() and process_gb_huge_page() are introduced to > > handle conflict between KASLR and huge pages, will be used in the next > > patch. > > > > Function parse_gb_huge_pages() is used to

Re: [PATCH 1/2] x86/boot/KASLR: Add two functions for 1GB huge pages handling

2018-05-16 Thread damian
On Wed, 16. May 18:05, Baoquan He wrote: > Functions parse_gb_huge_pages() and process_gb_huge_page() are introduced to > handle conflict between KASLR and huge pages, will be used in the next patch. > > Function parse_gb_huge_pages() is used to parse kernel command-line to get > how many 1GB huge

Re: [PATCH 1/2] x86/boot/KASLR: Add two functions for 1GB huge pages handling

2018-05-16 Thread Baoquan He
Hi Chao, On 05/17/18 at 11:27am, Chao Fan wrote: > >+/* Store the number of 1GB huge pages which user specified.*/ > >+static unsigned long max_gb_huge_pages; > >+ > >+static int parse_gb_huge_pages(char *param, char* val) > >+{ > >+char *p; > >+u64 mem_size; > >+static bool gbpage_sz

Re: [PATCH 1/2] x86/boot/KASLR: Add two functions for 1GB huge pages handling

2018-05-16 Thread Chao Fan
Hi Baoquan, I have reviewed the patch, I think the caculation of address has no problem. But maybe I miss something, so I have several questions. On Wed, May 16, 2018 at 06:05:31PM +0800, Baoquan He wrote: >Functions parse_gb_huge_pages() and process_gb_huge_page() are introduced to >handle confl

[PATCH 1/2] x86/boot/KASLR: Add two functions for 1GB huge pages handling

2018-05-16 Thread Baoquan He
Functions parse_gb_huge_pages() and process_gb_huge_page() are introduced to handle conflict between KASLR and huge pages, will be used in the next patch. Function parse_gb_huge_pages() is used to parse kernel command-line to get how many 1GB huge pages have been specified. A static global variabl