Skip to contentSkip to conversation

information leaking between domains via granted pages?

DISCUSSION James Harper 3 participants 8 messages Mar 4, 2008

lore
Share & tools
lore
#0 lore raw

Is there a statement anywhere regarding information that could be leaked or modified between domains when pages are granted?

Eg, Dom0 sends a network packet to DomU. The network data only uses 64 bytes in the page, but DomU (via a specially crafted netfront driver) can access and record all the other data in the page...

James

#1 lore raw
Quoted 11 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of James Harper
Sent: Monday, March 03, 2008 7:35 PM
To: [email protected]
Subject: [Xen-devel] information leaking between domains via granted pages?

Quoted 8 lines

Is there a statement anywhere regarding information that could be leaked or modified between domains when pages are granted?

Eg, Dom0 sends a network packet to DomU. The network data only uses 64 bytes in the page, but DomU (via a specially crafted netfront driver) can access and record all the other data in the page...

This is not a problem today as DomU is not granted access to any Dom0 page. DomU is the one which grants access to dom0 both for TX and RX. On the other hand dom0 can access any data in granted domU pages but this is OK as we trust dom0.
Renato

Quoted 8 lines

James

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#2 lore raw
Quoted 1 line

This is not a problem today as DomU is not granted access to any

Dom0

Quoted 3 lines

page. DomU is the one which grants access to dom0 both for TX and RX.
On the other hand dom0 can access any data in granted domU pages but
this is OK as we trust dom0.

Maybe I'm mistaken about the way 'page flipping' on the rx path works then... care to enlighten me?

James

#3 lore raw
Quoted 8 lines · James Harper
Quoted 1 line

This is not a problem today as DomU is not granted access to any

Dom0

Quoted 3 lines

page. DomU is the one which grants access to dom0 both for TX and RX.
On the other hand dom0 can access any data in granted domU pages but
this is OK as we trust dom0.

Maybe I'm mistaken about the way 'page flipping' on the rx path works then... care to enlighten me?

The flipping path is not high performance these days as we expect only very old domUs to use it. All skbuffs destined for a flipping interface are laundered through netbk_copy_skb(). Note its judicious use of __GFP_ZERO.

-- Keir

#4 lore raw
Quoted 1 line
Quoted 1 line

Maybe I'm mistaken about the way 'page flipping' on the rx path

works

Quoted 4 lines
Quoted 1 line

then... care to enlighten me?

The flipping path is not high performance these days as we expect only very old domUs to use it. All skbuffs destined for a flipping

interface

Quoted 2 lines

are laundered through netbk_copy_skb(). Note its judicious use of __GFP_ZERO.

Hmmm... I thought that flipping would be a high performance path?

So if we use rx-copy, does this mean that data is received from a physical interface (or another domain) via DMA, and then actually copied into the buffers for DomU? Do we consider the performance implications of this too low to be worrying about?

Thanks

James

#5 lore raw
Quoted 6 lines · James Harper
Quoted 2 lines

The flipping path is not high performance these days as we expect only very old domUs to use it. All skbuffs destined for a flipping

interface

Quoted 2 lines

are laundered through netbk_copy_skb(). Note its judicious use of __GFP_ZERO.

Quoted 6 lines

Hmmm... I thought that flipping would be a high performance path?

So if we use rx-copy, does this mean that data is received from a physical interface (or another domain) via DMA, and then actually copied into the buffers for DomU? Do we consider the performance implications of this too low to be worrying about?

Yes, it's a little surprising, but experiments showed that, even with lareg datagrams, the performance of copying versus flipping was pretty comparable. With normal Ethernet MTU copying was significantly faster. Also copying gives us more flexibility wrt where we place the data in the domU page. So flipping is now deprecated.

-- Keir

#6 lore raw

RE: RE: information leaking between domains viagranted pages?

Quoted 5 lines

Yes, it's a little surprising, but experiments showed that, even with lareg
datagrams, the performance of copying versus flipping was pretty comparable.
With normal Ethernet MTU copying was significantly faster. Also

copying

Quoted 1 line

gives us more flexibility wrt where we place the data in the domU

page. So

Quoted 2 lines

flipping is now deprecated.

Even with large send offload?

Thanks for the explanation.

James

#7 lore raw

Re: RE: information leaking between domains viagranted pages?

Quoted 5 lines · James Harper
Quoted 5 lines

Yes, it's a little surprising, but experiments showed that, even with lareg
datagrams, the performance of copying versus flipping was pretty comparable.
With normal Ethernet MTU copying was significantly faster. Also

Quoted 7 lines

copying

Quoted 1 line

gives us more flexibility wrt where we place the data in the domU

page. So

Quoted 2 lines

flipping is now deprecated.

Even with large send offload?

Up to a page of data, yes, and that's all that matters (since flipping overhead is per-page).

-- Keir