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:	Wed, 4 Apr 2007 08:35:30 -0700 (PDT)
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	Nick Piggin <npiggin@...e.de>
cc:	Hugh Dickins <hugh@...itas.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Linux Memory Management List <linux-mm@...ck.org>,
	tee@....com, holt@....com, Andrea Arcangeli <andrea@...e.de>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [rfc] no ZERO_PAGE?



On Wed, 4 Apr 2007, Nick Piggin wrote:
> 
> Shall I do a more complete patchset and ask Andrew to give it a
> run in -mm?

Do this trivial one first. See how it fares.

Although I don't know how much -mm will do for it. There is certainly not 
going to be any correctness problems, afaik, just *performance* problems. 
Does anybody do any performance testing on -mm?

That said, talking about correctness/performance problems:

> +	page_table = pte_offset_map_lock(mm, pmd, address, &ptl);
> +	if (likely(!pte_none(*page_table))) {
>  		inc_mm_counter(mm, anon_rss);
>  		lru_cache_add_active(page);
>  		page_add_new_anon_rmap(page, vma, address);

Isn't that test the wrong way around?

Shouldn't it be

	if (likely(pte_none(*page_table))) {

without any logical negation? Was this patch tested?

Anyway, I'm not against this, but I can see somebody actually *wanting* 
the ZERO page in some cases. I've used the fact for TLB testing, for 
example, by just doing a big malloc(), and knowing that the kernel will 
re-use the ZERO_PAGE so that I don't get any cache effects (well, at least 
not any *physical* cache effects. Virtually indexed cached will still show 
effects of it, of course, but I haven't cared).

That's an example of an app that actually cares about the page allocation 
(or, in this case, the lack there-of). Not an important one, but maybe 
there are important ones that care?

			Linus
-
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