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] [day] [month] [year] [list]
Message-ID: <YwcWaO1Z5pSRRokc@dhcp22.suse.cz>
Date:   Thu, 25 Aug 2022 08:27:52 +0200
From:   Michal Hocko <mhocko@...e.com>
To:     lizhe.67@...edance.com
Cc:     Jason@...c4.com, akpm@...ux-foundation.org, corbet@....net,
        keescook@...omium.org, linux-doc@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-mm@...ck.org,
        lizefan.x@...edance.com, mark-pk.tsai@...iatek.com,
        mhiramat@...nel.org, rostedt@...dmis.org, vbabka@...e.cz,
        yuanzhu@...edance.com
Subject: Re: [PATCH v2] page_ext: introduce boot parameter 'early_page_ext'

On Thu 25-08-22 14:21:29, lizhe.67@...edance.com wrote:
> On 2022-08-24 8:09 UTC, mhocko@...e.com wrote:
[...]
> >> diff --git a/init/main.c b/init/main.c
> >> index 91642a4e69be..3760c0326525 100644
> >> --- a/init/main.c
> >> +++ b/init/main.c
> >> @@ -849,6 +849,8 @@ static void __init mm_init(void)
> >>  	pgtable_init();
> >>  	debug_objects_mem_init();
> >>  	vmalloc_init();
> >> +	/* Should be run after vmap initialization */
> >> +	page_ext_init(true);
> >
> >you can just 
> >	if (early_page_ext)
> >		page_ext_init();
> >
> >>  	/* Should be run before the first non-init thread is created */
> >>  	init_espfix_bsp();
> >>  	/* Should be run after espfix64 is set up. */
> >> @@ -1606,7 +1608,7 @@ static noinline void __init kernel_init_freeable(void)
> >>  	padata_init();
> >>  	page_alloc_init_late();
> >>  	/* Initialize page ext after all struct pages are initialized. */
> >> -	page_ext_init();
> >> +	page_ext_init(false);
> >
> >	if (!early_page_ext)
> >		page_ext_init();
> 
> I think we can use an inline function instead of 'early_page_ext' here. The
> reason is that if CONFIG_PAGE_EXTENSION=n, 'early_page_ext' is undefined.
> Thought we can #define early_page_ext as false, it is ugly.

Agreed!

-- 
Michal Hocko
SUSE Labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ