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:   Fri, 6 Dec 2019 11:27:46 +0100
From:   Peter Zijlstra <peterz@...radead.org>
To:     Wei Yang <richardw.yang@...ux.intel.com>
Cc:     x86@...nel.org, linux-kernel@...r.kernel.org,
        richard.weiyang@...il.com, dave.hansen@...ux.intel.com,
        luto@...nel.org, peterz@...radead.or, tglx@...utronix.de
Subject: Re: [Patch v2 4/6] x86/mm: Refine debug print string retrieval
 function

On Fri, Dec 06, 2019 at 09:51:26AM +0800, Wei Yang wrote:

> >> +#if defined(CONFIG_X86_32) && !defined(CONFIG_X86_PAE)
> >> +	static const char *sz[2] = { "4K", "4M" };
> >> +#else
> >> +	static const char *sz[4] = { "4K", "2M", "1G", "" };
> >> +#endif
> >> +	unsigned int idx, s;
> >>  
> >> +	for (idx = 0; idx < maxidx; idx++, mr++) {
> >> +		s = (mr->page_size_mask >> PG_LEVEL_2M) & (ARRAY_SIZE(sz) - 1);
> >
> >Is it at all possible for !PAE to have 1G here, if you use the sz[4]
> >definition unconditionally?
> >
> 
> You mean remove the ifdef and use sz[4] for both condition?
> 
> Then how to differentiate 4M and 2M?

Argh, I'm blind.. I failed to spot that. N/m then.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ