[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAFgQCTsZOeBb8dUaq5LLfwzTObK5tT47h5U_BkfgtPDYLW9CqA@mail.gmail.com>
Date: Tue, 15 Jan 2019 15:38:33 +0800
From: Pingfan Liu <kernelfans@...il.com>
To: Dave Hansen <dave.hansen@...el.com>
Cc: LKML <linux-kernel@...r.kernel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
"H. Peter Anvin" <hpa@...or.com>,
Dave Hansen <dave.hansen@...ux.intel.com>,
Andy Lutomirski <luto@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
"Rafael J. Wysocki" <rjw@...ysocki.net>,
Len Brown <lenb@...nel.org>, Yinghai Lu <yinghai@...nel.org>,
Tejun Heo <tj@...nel.org>, Chao Fan <fanc.fnst@...fujitsu.com>,
Baoquan He <bhe@...hat.com>, Juergen Gross <jgross@...e.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Mike Rapoport <rppt@...ux.vnet.ibm.com>,
Vlastimil Babka <vbabka@...e.cz>,
Michal Hocko <mhocko@...e.com>, x86@...nel.org,
linux-acpi@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [PATCHv2 6/7] x86/mm: remove bottom-up allocation style for x86_64
On Tue, Jan 15, 2019 at 7:27 AM Dave Hansen <dave.hansen@...el.com> wrote:
>
> On 1/10/19 9:12 PM, Pingfan Liu wrote:
> > Although kaslr-kernel can avoid to stain the movable node. [1]
>
> Can you explain what staining is, or perhaps try to use some more
> standard nomenclature? There are exactly 0 instances of the word
> "stain" in arch/x86/ or mm/.
>
I mean that KASLR may randomly choose some positions for base address,
which are located in movable node.
> > But the
> > pgtable can still stain the movable node. That is a probability problem,
> > although low, but exist. This patch tries to make it certainty by
> > allocating pgtable on unmovable node, instead of following kernel end.
>
> Anyway, can you read my suggested summary in the earlier patch and see
> if it fits or if I missed anything? This description is really hard to
> read.
>
Your summary in the reply to [PATCH 0/7] express the things clearly. I
will use them to update the commit log
> ...> +#ifdef CONFIG_X86_32
> > +
> > +static unsigned long min_pfn_mapped;
> > +
> > static unsigned long __init get_new_step_size(unsigned long step_size)
> > {
> > /*
> > @@ -653,6 +655,32 @@ static void __init memory_map_bottom_up(unsigned long map_start,
> > }
> > }
> >
> > +static unsigned long __init init_range_memory_mapping32(
> > + unsigned long r_start, unsigned long r_end)
> > +{
>
> Why is this returning a value which is not used?
>
> Did you compile this? Didn't you get a warning that you're not
> returning a value from a function returning non-void?
>
It should be void. I will fix it in next version
> Also, I'd much rather see something like this written:
>
> static __init
> unsigned long init_range_memory_mapping32(unsigned long r_start,
> unsigned long r_end)
>
> than what you have above. But, if you get rid of the 'unsigned long',
> it will look much more sane in the first place.
Yes. Thank for your kindly review.
Best Regards,
Pingfan
Powered by blists - more mailing lists