Re: [PATCH] x86: use the right protections for split-up pagetables

H. Peter Anvin
2009-02-20T18:38:21Z

Linus Torvalds wrote:
>
> The confusion? When it moves the 'ref_prot' bits from the upper level, it
> doesn't do the right thing for the PAT bit. That bit is special, and moves
> around depending on level. In the upper levels, it's bit#12, and in the
> final 4k pte level it's bit#7.
>

... and in the second level of two-level page tables, it doesn't exist
at all.

Worse, there are errata on some processors (not sure if there are any we
currently don't blacklist) where the PATx bit logic basically gets fed
random data. Setting up the PAT so that the lower and upper half alias
works around this.

-hpa

--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.