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:	Mon, 18 Mar 2013 14:19:57 -0700
From:	Yinghai Lu <yinghai@...nel.org>
To:	"H. Peter Anvin" <hpa@...or.com>
Cc:	Lin Feng <linfeng@...fujitsu.com>, akpm@...ux-foundation.org,
	linux-mm@...ck.org, x86@...nel.org, linux-kernel@...r.kernel.org,
	tglx@...utronix.de, mingo@...hat.com, penberg@...nel.org,
	jacob.shin@....com
Subject: Re: [PATCH] x86: mm: accurate the comments for STEP_SIZE_SHIFT macro

On Mon, Mar 18, 2013 at 12:14 PM, H. Peter Anvin <hpa@...or.com> wrote:

> Instead, try to explain why 5 is the correct value in the current code
> and how it is (or should be!) derived.

initial mapped size is PMD_SIZE, aka 2M.
if we use step_size to be PUD_SIZE aka 1G, as most worse case
that 1G is cross the 1G boundary, and PG_LEVEL_2M is not set,
we will need 1+1+512 pages (aka 2M + 8k) to map 1G range with PTE.
So i picked (30-21)/2 to get 5.

Please check attached patch.

Thanks

Yinghai

Download attachment "add_comment_for_step_size.patch" of type "application/octet-stream" (1551 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ