lkml.org 
[lkml]   [2012]   [Sep]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC PATCH] x86-32: Start out eflags and cr4 clean
From
Date
On Tue, 2012-09-25 at 00:27 +0100, H. Peter Anvin wrote:
> From: "H. Peter Anvin" <hpa@linux.intel.com>
>
> %cr4 is supposed to reflect a set of features into which the operating
> system is opting in. If the BIOS or bootloader leaks bits here, this
> is not desirable. Consider a bootloader passing in %cr4.pae set to a
> legacy paging kernel, for example -- it will not have any immediate
> effect, but the kernel would crash when turning paging on.
>
> A similar argument applies to %eflags, and since we have to look for
> %eflags.id being settable we can use a sequence which clears %eflags
> as a side effect.
>
> Note that we already do this for x86-64.
>
> I would like opinions on this especially from the PV crowd

Xen PV guests don't pass through this code path so there is no danger
there AFAICT, so from that PoV:

Acked-by: Ian Campbell <ian.campbell@citrix.com>

FWIW it looks correct to me from the native PoV too, but you probably
already knew that ;-)

Ian.




\
 
 \ /
  Last update: 2012-09-25 17:41    [W:0.152 / U:0.208 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site