Date: Fri, 22 Jul 2016 22:11:05 +0200 From: Ingo Molnar <mingo@...nel.org> To: Andy Lutomirski <luto@...capital.net> Cc: Andy Lutomirski <luto@...nel.org>, Valdis Kletnieks <Valdis.Kletnieks@...edu>, "kernel-hardening@...ts.openwall.com" <kernel-hardening@...ts.openwall.com>, X86 ML <x86@...nel.org>, "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>, linux-arch <linux-arch@...r.kernel.org>, Borislav Petkov <bp@...en8.de>, Nadav Amit <nadav.amit@...il.com>, Kees Cook <keescook@...omium.org>, Brian Gerst <brgerst@...il.com>, Linus Torvalds <torvalds@...ux-foundation.org>, Josh Poimboeuf <jpoimboe@...hat.com>, Jann Horn <jann@...jh.net>, Heiko Carstens <heiko.carstens@...ibm.com>, Thomas Gleixner <tglx@...utronix.de>, "H. Peter Anvin" <hpa@...or.com> Subject: Re: [PATCH v5 03/32] x86/cpa: In populate_pgd, don't set the pgd entry until it's populated * Andy Lutomirski <luto@...capital.net> wrote: > This garbage (as evidenced by my bug and my failed attempt to fix it) > only works if you never have a low-level page table that isn't linked > into a higher-level page table, and it mostly requires you to do > everything exactly the way it was originally done so all the horrible > inline helpers don't get confused. > > And AFAICT all of this was done to manually unroll a loop, and I bet > it never sped anything up measurably even on 386 or PPro. > > Whenever some vendor releases a 5 level page table CPU, can we > *please* clean this up first? We should have a type that points to a > table, a different type that points to an entry (or maybe not have > pointers to entries at all), and the levels should be referred to by > *number*. When you need to traverse all the way down, you write a > *loop* instead of four bloody helper functions, some of which are > incomprehensibly no-ops on some kernels. And if this means that, on > Intel, we have a silly branch in the inner loop because the bottom > level entry format is special, who cares? > </rant> I'd welcome (and help out!) any effort to clean it up gradually. Thanks, Ingo
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.