Skip to content
Commit 26374c7b authored by Eric W. Biederman's avatar Eric W. Biederman Committed by Andi Kleen
Browse files

[PATCH] Reload CS when startup_64 is used.



In long mode the %cs is largely a relic.  However there are a few cases
like iret where it matters that we have a valid value.  Without this
patch it is possible to enter the kernel in startup_64 without setting
%cs to a valid value.  With this patch we don't care what %cs value
we enter the kernel with, so long as the cs shadow register indicates
it is a privileged code segment.

Thanks to Magnus Damm for finding this problem and posting the
first workable patch.  I have moved the jump to set %cs down a
few instructions so we don't need to take an extra jump.  Which
keeps the code simpler.

Signed-of-by: default avatarEric W. Biederman <ebiederm@xmission.com>
Signed-off-by: default avatarAndi Kleen <ak@suse.de>
parent 0136611c
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment