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>] [day] [month] [year] [list]
Message-Id: <20121114092645.95fce74b.akpm@linux-foundation.org>
Date:	Wed, 14 Nov 2012 09:26:45 -0800
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	linux-kernel@...r.kernel.org, mingo@...nel.org, hpa@...or.com,
	a.p.zijlstra@...llo.nl, torvalds@...ux-foundation.org,
	riel@...hat.com, akpm@...ux-foundation.org, aarcange@...hat.com,
	mgorman@...e.de, tglx@...utronix.de
Cc:	tip-bot for Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	linux-tip-commits@...r.kernel.org, hpa@...or.com, mingo@...nel.org,
	torvalds@...ux-foundation.org, riel@...hat.com,
	aarcange@...hat.com, mgorman@...e.de, tglx@...utronix.de
Subject: Re: [tip:numa/core] mm: Count the number of pages affected in
 change_protection()

On Wed, 14 Nov 2012 06:25:56 -0800 tip-bot for Peter Zijlstra <a.p.zijlstra@...llo.nl> wrote:

> mm: Count the number of pages affected in change_protection()
> 
> This will be used by three kinds of purposes:
> 
>  - to optimize mprotect()
> 
>  - to speed up working set scanning for working set areas that
>    have not been touched
> 
>  - to more accurately scan per real working set
> 
> No change in functionality from this patch.

Seems simple, cheap and useful.

A bit lacking in interface comments though.  In particular, does the
return value (which is in units of PAGE_SIZE pages) represent the
number of pages which were inspected, or the number of pages which
actually had their permissions modified?

>From a quick look, it seems the answer is both.  Or neither.  If a
page's protection was written to but unaltered, that counts as a "1". 
But if a pmd couldn't be locked via __pmd_trans_huge_lock(), that
counts as a "0".

Anyway, please have a think about it, and describe exactly what these
return values mean?

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ