Thread (14 messages) 14 messages, 3 authors, 2021-02-10

Re: [PATCH 2/4] KVM: PPC: Book3S HV: Fix radix guest SLB side channel

From: Nicholas Piggin <npiggin@gmail.com>
Date: 2021-02-10 02:53:34

Excerpts from Paul Mackerras's message of February 10, 2021 11:28 am:
On Mon, Jan 18, 2021 at 04:28:07PM +1000, Nicholas Piggin wrote:
quoted
The slbmte instruction is legal in radix mode, including radix guest
mode. This means radix guests can load the SLB with arbitrary data.

KVM host does not clear the SLB when exiting a guest if it was a
radix guest, which would allow a rogue radix guest to use the SLB as
a side channel to communicate with other guests.
No, because the code currently clears the SLB when entering a radix
guest,
Not AFAIKS.
which you remove in the next patch.
The next patch avoids clearing host SLB entries when a hash guest is 
entered from a radix host, it doesn't apply to radix guests. Not sure
where the changelog for it went but it should have "HPT guests" in the
title at least, I guess.
I'm OK with moving the SLB
clearing from guest entry to guest exit, I guess, but I don't see that
you are in fact fixing anything by doing so.
I can set slb entries in a radix guest in simulator and observe they 
stay around over host<->guest transitions, and they don't after this
patch.

Thanks,
Nick
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help