"Magnus Damm" <magnus.damm@xxxxxxxxx> writes:
> On 8/22/06, Eric W. Biederman <ebiederm@xxxxxxxxxxxx> wrote:
>> In long mode the %cs is largely a relic. However there are a few cases
>> like lret 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: Eric W. Biederman <ebiederm@xxxxxxxxxxxx>
> While at it, could you please fix up the purgatory code in kexec-tools
> to include this fix so we can boot older versions of the kernel too?
I guess I'm not opposed to a patch but I have some serious reservations
about a solution that limits my address to 32bits in 64bit mode, and
appears to break the gdt used for entering the 32bit kernel.
I'm up way to late tonight. I just wanted to resolve the situation
when it was clear what was going on.