lkml.org 
[lkml]   [2016]   [Jul]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [kernel-hardening] [PATCH v5 03/32] x86/cpa: In populate_pgd, don't set the pgd entry until it's populated

* Andy Lutomirski <luto@amacapital.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

\
 
 \ /
  Last update: 2016-07-22 23:01    [W:0.093 / U:0.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site