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: <CA+55aFzg+xbDGBgOrF5wiqU5OmZAd8GvmQ5r6cegi2EjUend8Q@mail.gmail.com>
Date:	Sat, 23 Jul 2016 17:32:03 +0900
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	Peter Zijlstra <peterz@...radead.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Denys Vlasenko <dvlasenk@...hat.com>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Borislav Petkov <bp@...en8.de>, Toshi Kani <toshi.kani@...com>,
	Josh Poimboeuf <jpoimboe@...hat.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Brian Gerst <brgerst@...il.com>,
	"Luis R. Rodriguez" <mcgrof@...e.com>, krinkin.m.u@...il.com,
	Peter Anvin <hpa@...or.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...nel.org>,
	Andrew Lutomirski <luto@...nel.org>,
	Valdis Kletnieks <Valdis.Kletnieks@...edu>
Cc:	"linux-tip-commits@...r.kernel.org" 
	<linux-tip-commits@...r.kernel.org>
Subject: Re: [tip:x86/mm] x86/mm/cpa: Fix populate_pgd(): Stop trying to
 deallocate failed PUDs

On Sat, Jul 23, 2016 at 4:46 PM, tip-bot for Andy Lutomirski
<tipbot@...or.com> wrote:
>
> Fixing this directly is difficult or impossible because of the awful
> state of Linux's page table accessors.

Quite frankly, this part of the message is misleading and wrong.

The "awful state" is purely "Andy didn't understand the folding".
There is nothing awful about it, quite the reverse. It is what allows
the generic code to mostly not have to care whether a particular level
actually exists or not, or is just folded into the next-higher level.
No, we don't alway have

I do agree that our *naming* is not great, and that when we get
five-level page tables we should strive to start having numbers
instead of the magic letters. The magic letters made sense with three
levels that had fairly well-known names (pgd/pmd/pte is not a Linux
invention), but with four levels it's already fairly questionable.

But the fact that a pud may not even exist, and in fact is just
another nested version of the pgd, is definitely *not* awful. And Andy
not understanding it and getting it wrong *still* doesn't make it
awful.

Yes, a folded level can be subtle. The level above the folded level
has no actual storage of its own, it just contains the folded level
directly. We've had confusion about it, and the naming really doesn't
help. But looking through include/asm-generic/pgtable-nopmd.h can
actually be instructive.

Calling something "awful" just because it's clever and you didn't
understand it is not right.

It would be *truly* awful if we forced everybody to actually have all
the levels, and then had to follow idiotic single-entry pointers at
the upper end that doesn't actually exist in reality, and we'd just
have these silly "software-only" levels to make everything be four
levels even if the hardware only does two.

That would be awful, because it would be *stupid*.

             Linus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ