From: Norbert Manthey <nmanthey@amazon.de>
To: Jan Beulich <JBeulich@suse.com>
Cc: Juergen Gross <jgross@suse.com>, Tim Deegan <tim@xen.org>,
Stefano Stabellini <sstabellini@kernel.org>,
Wei Liu <wei.liu2@citrix.com>,
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
George Dunlap <George.Dunlap@eu.citrix.com>,
Andrew Cooper <andrew.cooper3@citrix.com>,
Ian Jackson <Ian.Jackson@eu.citrix.com>,
Dario Faggioli <dfaggioli@suse.com>,
Martin Pohlack <mpohlack@amazon.de>,
wipawel@amazon.de, Julien Grall <julien.grall@arm.com>,
David Woodhouse <dwmw@amazon.co.uk>,
"Martin Mazein(amazein)" <amazein@amazon.de>,
xen-devel <xen-devel@lists.xenproject.org>,
Bjoern Doebel <doebel@amazon.de>
Subject: Re: [PATCH L1TF v10 2/8] nospec: introduce evaluate_nospec
Date: Thu, 14 Mar 2019 14:21:55 +0100 [thread overview]
Message-ID: <8ad4d1a8-cd32-dbc9-e21f-234ec25dcaa1@amazon.de> (raw)
In-Reply-To: <5C8A54DD020000780021E9DC@prv1-mh.provo.novell.com>
On 3/14/19 14:19, Jan Beulich wrote:
>>>> On 14.03.19 at 13:50, <nmanthey@amazon.de> wrote:
>> Since the L1TF vulnerability of Intel CPUs, loading hypervisor data into
>> L1 cache is problematic, because when hyperthreading is used as well, a
>> guest running on the sibling core can leak this potentially secret data.
>>
>> To prevent these speculative accesses, we block speculation after
>> accessing the domain property field by adding lfence instructions. This
>> way, the CPU continues executing and loading data only once the condition
>> is actually evaluated.
>>
>> As this protection is typically used in if statements, the lfence has to
>> come in a compatible way. Therefore, a function that returns true after an
>> lfence instruction is introduced. To protect both branches after a
>> conditional, an lfence instruction has to be added for the two branches.
>> To be able to block speculation after several evaluations, the generic
>> barrier macro block_speculation is also introduced.
>>
>> As the L1TF vulnerability is only present on the x86 architecture, there is
>> no need to add protection for other architectures. Hence, the introduced
>> functions are defined but empty.
>>
>> On the x86 architecture, by default, the lfence instruction is not present
>> either. Only when a L1TF vulnerable platform is detected, the lfence
>> instruction is patched in via alternative patching. Similarly, PV guests
>> are protected wrt L1TF by default, so that the protection is furthermore
>> disabled in case HVM is exclueded via the build configuration.
>>
>> Introducing the lfence instructions catches a lot of potential leaks with
>> a simple unintrusive code change. During performance testing, we did not
>> notice performance effects.
>>
>> This is part of the speculative hardening effort.
>>
>> Signed-off-by: Norbert Manthey <nmanthey@amazon.de>
>> Acked-by: Julien Grall <julien.grall@arm.com>
> I did give my ack on v9, and I see no indication of changes which
> may have invalidated it.
That is a miss on my side.
Norbert
>
> Jan
>
>
Amazon Development Center Germany GmbH
Krausenstr. 38
10117 Berlin
Geschaeftsfuehrer: Christian Schlaeger, Ralf Herbrich
Ust-ID: DE 289 237 879
Eingetragen am Amtsgericht Charlottenburg HRB 149173 B
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
next prev parent reply other threads:[~2019-03-14 13:22 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-14 12:50 L1TF Patch Series v10 Norbert Manthey
2019-03-14 12:50 ` [PATCH L1TF v10 1/8] spec: add l1tf-barrier Norbert Manthey
2019-03-14 12:50 ` [PATCH L1TF v10 2/8] nospec: introduce evaluate_nospec Norbert Manthey
2019-03-14 13:19 ` Jan Beulich
2019-03-14 13:21 ` Norbert Manthey [this message]
2019-03-14 12:50 ` [PATCH L1TF v10 3/8] is_control_domain: block speculation Norbert Manthey
2019-03-14 12:50 ` [PATCH L1TF v10 4/8] is_hvm/pv_domain: " Norbert Manthey
2019-04-05 15:34 ` Andrew Cooper
2019-04-05 15:34 ` [Xen-devel] " Andrew Cooper
2019-04-05 18:29 ` Norbert Manthey
2019-04-05 18:29 ` [Xen-devel] " Norbert Manthey
2019-04-05 18:38 ` Andrew Cooper
2019-04-05 18:38 ` [Xen-devel] " Andrew Cooper
2019-04-08 9:19 ` Jan Beulich
2019-04-08 9:19 ` [Xen-devel] " Jan Beulich
2019-03-14 12:50 ` [PATCH L1TF v10 5/8] common/memory: block speculative out-of-bound accesses Norbert Manthey
2019-03-14 12:50 ` [PATCH L1TF v10 6/8] x86/hvm: add nospec to hvmop param Norbert Manthey
2019-03-14 12:50 ` [PATCH L1TF v10 7/8] common/grant_table: block speculative out-of-bound accesses Norbert Manthey
2019-03-29 17:11 ` Jan Beulich
2019-05-20 14:27 ` Norbert Manthey
2019-05-20 14:27 ` [Xen-devel] " Norbert Manthey
2019-05-21 9:41 ` Jan Beulich
2019-05-21 9:41 ` [Xen-devel] " Jan Beulich
2019-03-14 12:50 ` [PATCH L1TF v10 8/8] common/domain: " Norbert Manthey
2019-03-14 13:20 ` Jan Beulich
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=8ad4d1a8-cd32-dbc9-e21f-234ec25dcaa1@amazon.de \
--to=nmanthey@amazon.de \
--cc=George.Dunlap@eu.citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=JBeulich@suse.com \
--cc=amazein@amazon.de \
--cc=andrew.cooper3@citrix.com \
--cc=dfaggioli@suse.com \
--cc=doebel@amazon.de \
--cc=dwmw@amazon.co.uk \
--cc=jgross@suse.com \
--cc=julien.grall@arm.com \
--cc=konrad.wilk@oracle.com \
--cc=mpohlack@amazon.de \
--cc=sstabellini@kernel.org \
--cc=tim@xen.org \
--cc=wei.liu2@citrix.com \
--cc=wipawel@amazon.de \
--cc=xen-devel@lists.xenproject.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 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 NNTP newsgroup(s).