Re: [PATCH 06/11] x86-64: Fix %cs value in convert_from_fxsr()

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Brian Gerst
Date: Sunday, August 29, 2010 - 5:25 pm

On Sun, Aug 29, 2010 at 2:41 PM, Pekka Enberg <penberg@kernel.org> wrote:

The %cs segment being reported to a compat task is flat out wrong.  It
is getting KERNEL_CS when it should be some userspace segment.  The
code segment may still be wrong, because the %cs in pt_regs may not
have been the segment where the instruction that flagged the exception
executed from.  That could be fixed by using fxsave without a REX.W
prefix when saving the state of compat tasks, which would save the
segment and 32-bit offset instead of the 64-bit offset for the code
and data pointers.  This is such a corner case that it probably isn't
worth putting much effort into fixing unless someone demonstrates a
real need for it.

--
Brian Gerst
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH 06/11] x86-64: Fix %cs value in convert_from_fxsr(), Brian Gerst, (Sun Aug 29, 5:25 pm)