lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 3 Mar 2021 08:39:59 +0800
From:   Baoquan He <bhe@...hat.com>
To:     Mike Rapoport <rppt@...nel.org>
Cc:     x86@...nel.org, Andrew Morton <akpm@...ux-foundation.org>,
        Andrea Arcangeli <aarcange@...hat.com>,
        Borislav Petkov <bp@...en8.de>,
        David Hildenbrand <david@...hat.com>,
        "H. Peter Anvin" <hpa@...or.com>, Ingo Molnar <mingo@...hat.com>,
        Mel Gorman <mgorman@...e.de>, Michal Hocko <mhocko@...nel.org>,
        Mike Rapoport <rppt@...ux.ibm.com>, Qian Cai <cai@....pw>,
        Thomas Gleixner <tglx@...utronix.de>,
        Vlastimil Babka <vbabka@...e.cz>, linux-kernel@...r.kernel.org,
        linux-mm@...ck.org, Borislav Petkov <bp@...e.de>
Subject: Re: [PATCH v3 1/2] x86/setup: consolidate early memory reservations

On 03/02/21 at 05:17pm, Mike Rapoport wrote:
> On Tue, Mar 02, 2021 at 09:04:09PM +0800, Baoquan He wrote:
...
> > > +static void __init early_reserve_memory(void)
> > > +{
> > > +	/*
> > > +	 * Reserve the memory occupied by the kernel between _text and
> > > +	 * __end_of_kernel_reserve symbols. Any kernel sections after the
> > > +	 * __end_of_kernel_reserve symbol must be explicitly reserved with a
> > > +	 * separate memblock_reserve() or they will be discarded.
> > > +	 */
> > > +	memblock_reserve(__pa_symbol(_text),
> > > +			 (unsigned long)__end_of_kernel_reserve - (unsigned long)_text);
> > > +
> > > +	/*
> > > +	 * Make sure page 0 is always reserved because on systems with
> > > +	 * L1TF its contents can be leaked to user processes.
> > > +	 */
> > > +	memblock_reserve(0, PAGE_SIZE);
> > > +
> > > +	early_reserve_initrd();
> > > +
> > > +	if (efi_enabled(EFI_BOOT))
> > > +		efi_memblock_x86_reserve_range();
> > > +
> > > +	memblock_x86_reserve_range_setup_data();
> > 
> > This patch looks good to me, thanks for the effort.
> > 
> > While at it, wondering if we can rename the above function to
> > memblock_reserve_setup_data() just as its e820 counterpart
> > e820__reserve_setup_data(), adding 'x86' to a function under arch/x86
> > seems redundant.
> 
> I'd rather keep these names for now. First, it's easier to dig to them in the git
> history and second, I'm planning more changes in this area and these names
> are as good as FIXME: to remind what still needs to be checked :)

I see, thanks for explanation.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ