From: Keir Fraser <keir@xen.org>
To: Jan Beulich <JBeulich@suse.com>
Cc: xen-devel <xen-devel@lists.xen.org>
Subject: Re: [PATCH] x86/emul: only emulate possibly operand sizes for POPA
Date: Thu, 08 Nov 2012 09:08:34 +0000 [thread overview]
Message-ID: <CCC12712.51B0A%keir@xen.org> (raw)
In-Reply-To: <509B7C9C02000078000A725F@nat28.tlf.novell.com>
On 08/11/2012 08:34, "Jan Beulich" <JBeulich@suse.com> wrote:
>> I did wonder. The top halves of 64b registers are not used in compatibility
>> mode. Are their contents at all guaranteed to be
>> maintained/updated/preserved in any meaningful way across transitions into
>> and out of compatibility mode? I wasn't aware they were, and in that case
>> the cast and comment are indeed pointless.
>
> There's no architectural guarantee, but that's how CPUs work.
> The important aspect (from an information leak perspective) is
> that upper halves don't get zeroed explicitly when switching
> between compatibility and 64-bit modes.
>
> Now we can of course utilize that read_ulong() already does the
> zero extension (but if it didn't, we would leak stack contents here,
> so it may still be worth a comment), to the net effect of
The concern over information leak is fair. Just leave the code line as-is
then with the explicit cast and end-of-line comment.
K.
prev parent reply other threads:[~2012-11-08 9:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-07 16:08 [PATCH] x86/emul: only emulate possibly operand sizes for POPA Jan Beulich
2012-11-07 17:10 ` Keir Fraser
2012-11-08 7:34 ` Jan Beulich
2012-11-08 7:48 ` Keir Fraser
2012-11-08 8:34 ` Jan Beulich
2012-11-08 9:08 ` Keir Fraser [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=CCC12712.51B0A%keir@xen.org \
--to=keir@xen.org \
--cc=JBeulich@suse.com \
--cc=xen-devel@lists.xen.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.