Skip to content

Commit 8ac915d

Browse files
authored
Merge pull request #6 from stephensmalley/stable-6-oxt666
xsm-policy: Define and allow v4v use permission where appropriate
2 parents 8e11090 + 537a7ad commit 8ac915d

7 files changed

Lines changed: 10 additions & 20 deletions

File tree

policy/flask/access_vectors

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -458,4 +458,5 @@ class security
458458
class v4v
459459
{
460460
send
461+
use
461462
}

policy/modules/xen/dom0.if

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ interface(`dom0_send_v4v',`
104104
type dom0_t;
105105
')
106106

107+
allow $1 self:v4v use;
107108
allow $1 dom0_t:v4v send;
108109
')
109110
########################################
@@ -122,6 +123,7 @@ interface(`dom0_recv_v4v',`
122123
type dom0_t;
123124
')
124125

126+
allow dom0_t self:v4v use;
125127
allow dom0_t $1:v4v send;
126128
')
127129
########################################

policy/modules/xen/dom0.te

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ allow dom0_t self:domain2 { setscheduler iommu_map_batch iommu_x_mapping apertur
4545

4646
allow dom0_t self:event { bind create };
4747
allow dom0_t self:resource { add remove setup };
48-
allow dom0_t self:v4v send;
48+
dom0_send_v4v(dom0_t)
4949

5050
allow dom0_t evchn0-0_t:event send;
5151

policy/modules/xen/guesthvm.te

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ nilfvm_use(hvm_guest_t)
8080
dom0_copy_grant(hvm_guest_t)
8181
dom0_map_write_grant_guest(hvm_guest_t)
8282
dom0_pt_guest(hvm_guest_t)
83-
dom0_send_v4v(hvm_guest_t)
84-
dom0_recv_v4v(hvm_guest_t)
83+
# Uncomment these if you wish to allow guests to use v4v.
84+
#dom0_send_v4v(hvm_guest_t)
85+
#dom0_recv_v4v(hvm_guest_t)
8586
stubdom_ioemu(hvm_guest_t)

policy/modules/xen/ndvm.if

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ interface(`ndvm_send_v4v',`
8888
type ndvm_t;
8989
')
9090

91+
allow $1 self:v4v use;
9192
allow $1 ndvm_t:v4v send;
9293
')
9394
########################################

policy/modules/xen/stubdom.if

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ interface(`stubdom_send_v4v',`
129129
type stubdom_t;
130130
')
131131

132+
allow $1 self:v4v use;
132133
allow $1 stubdom_t:v4v send;
133134
')
134135
########################################

policy/modules/xen/uivm.if

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -34,26 +34,10 @@ interface(`uivm_send_v4v',`
3434
type uivm_t;
3535
')
3636

37+
allow $1 self:v4v use;
3738
allow $1 uivm_t:v4v send;
3839
')
39-
########################################
40-
## <summary>
41-
## Allow the specified domain to
42-
## send data to the UIVM via v4v.
43-
## </summary>
44-
## <param name="type">
45-
## <summary>
46-
## Type of the domain allowe access.
47-
## </summary>
48-
## </param>
49-
#
50-
interface(`uivm_send_v4v',`
51-
gen_require(`
52-
type uivm_t;
53-
')
5440

55-
allow $1 uivm_t:v4v send;
56-
')
5741
########################################
5842
## <summary>
5943
## Allow the specified type to map write uivm grants.

0 commit comments

Comments
 (0)