[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4ACE364E.8090000@zytor.com>
Date: Thu, 08 Oct 2009 11:58:22 -0700
From: "H. Peter Anvin" <hpa@...or.com>
To: Pavel Machek <pavel@....cz>
CC: Jan Beulich <JBeulich@...ell.com>, mingo@...e.hu,
tglx@...utronix.de, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] x86-64: don't leak kernel register values to 32-bit processes
On 10/07/2009 02:44 AM, Pavel Machek wrote:
> Hi!
>
>> While 32-bit processes can't directly access R8...R15, they can gain
>> access to these registers by temporarily switching themselves into
>> 64-bit mode. Therefore, registers not preserved anyway by called C
>> functions (i.e. R8...R11) must be cleared prior to returning to user
>> mode.
>
> How can userspace "temporarily switch itself" to 64bit mode?
>
> Such ability would lead to very interesting behaviour on 32-bit
> kernel, I'd say...
You can only do so with a 64-bit kernel, but on a 64-bit kernel you can
do it by executing a far jump to segment USER_CS (0x33).
-hpa
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists