From: "H. Peter Anvin" <hpa@zytor.com>
To: Pavel Machek <pavel@ucw.cz>
Cc: Jan Beulich <JBeulich@novell.com>,
mingo@elte.hu, tglx@linutronix.de, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86-64: don't leak kernel register values to 32-bit processes
Date: Thu, 08 Oct 2009 11:58:22 -0700 [thread overview]
Message-ID: <4ACE364E.8090000@zytor.com> (raw)
In-Reply-To: <20091007094248.GA1425@ucw.cz>
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
prev parent reply other threads:[~2009-10-08 18:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-30 10:22 [PATCH] x86-64: don't leak kernel register values to 32-bit processes Jan Beulich
2009-10-01 9:59 ` [tip:x86/urgent] x86: Don't leak 64-bit " tip-bot for Jan Beulich
2009-10-07 9:44 ` [PATCH] x86-64: don't leak " Pavel Machek
2009-10-08 11:41 ` Jan Beulich
2009-10-10 13:27 ` Pavel Machek
2009-10-08 18:58 ` H. Peter Anvin [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4ACE364E.8090000@zytor.com \
--to=hpa@zytor.com \
--cc=JBeulich@novell.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=pavel@ucw.cz \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).