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]
Message-ID: <539612A8.8080303@intel.com>
Date:	Mon, 09 Jun 2014 13:01:44 -0700
From:	Dave Hansen <dave.hansen@...el.com>
To:	Naoya Horiguchi <n-horiguchi@...jp.nec.com>, linux-mm@...ck.org
CC:	Andrew Morton <akpm@...ux-foundation.org>,
	Hugh Dickins <hughd@...gle.com>,
	"Kirill A. Shutemov" <kirill@...temov.name>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/7] mm/pagewalk: replace mm_walk->skip with more general
 mm_walk->control

On 06/06/2014 03:58 PM, Naoya Horiguchi wrote:
> +enum mm_walk_control {
> +	PTWALK_NEXT = 0,	/* Go to the next entry in the same level or
> +				 * the next vma. This is default behavior. */
> +	PTWALK_DOWN,		/* Go down to lower level */
> +	PTWALK_BREAK,		/* Break current loop and continue from the
> +				 * next loop */
> +};

I think this is a bad idea.

The page walker should be for the common cases of walking page tables,
and it should be simple.  It *HAS* to be better (shorter/faster) than if
someone was to just open-code a page table walk, or it's not really useful.

The only place this is used is in the ppc walker, and it saves a single
line of code, but requires some comments to explain what is going on:

 arch/powerpc/mm/subpage-prot.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

So, it adds infrastructure, but saves a single line of code.  Seems like
a bad trade off to me. :(
--
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