Skip to contentSkip to conversation

xsm/flask: Fix build following "xsm: correct AVC lookups for two sysctls"

PATCH In review Andrew Cooper 2 participants 4 messages Aug 10, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xsm/flask: Fix build following "xsm: correct AVC lookups for two sysctls"

avc_current_has_perm() takes 4 arguments, not 3. Spotted by a Travis randconfig run which actually turned XSM on.

---
CC: Daniel De Graaf <[email protected]>

---
 xen/xsm/flask/hooks.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
xen/xsm/flask/hooks.c +2 -2
index 17560b1..9114627 100644
@@ -815,11 +815,11 @@ static int flask_sysctl(int cmd)
 
     case XEN_SYSCTL_get_cpu_levelling_caps:
         return avc_current_has_perm(SECINITSID_XEN, SECCLASS_XEN2,
-                                    XEN2__GET_CPU_LEVELLING_CAPS);
+                                    XEN2__GET_CPU_LEVELLING_CAPS, NULL);
 
     case XEN_SYSCTL_get_cpu_featureset:
         return avc_current_has_perm(SECINITSID_XEN, SECCLASS_XEN2,
-                                    XEN2__GET_CPU_FEATURESET);
+                                    XEN2__GET_CPU_FEATURESET, NULL);
 
     case XEN_SYSCTL_livepatch_op:
         return avc_current_has_perm(SECINITSID_XEN, SECCLASS_XEN2,
Signature · 7 lines
2.1.4


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
#1 lore raw
Quoted 2 lines · Andrew Cooper

avc_current_has_perm() takes 4 arguments, not 3. Spotted by a Travis randconfig run which actually turned XSM on.

Sorry - I intended to add this link to the commit message.

~Andrew

https://travis-ci.org/xen-project/xen/jobs/263063220

Quoted 16 lines

---
CC: Daniel De Graaf <[email protected]>

---
 xen/xsm/flask/hooks.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
xen/xsm/flask/hooks.c +0 -0
index 17560b1..9114627 100644
@@ -815,11 +815,11 @@ static int flask_sysctl(int cmd)
 
     case XEN_SYSCTL_get_cpu_levelling_caps:
         return avc_current_has_perm(SECINITSID_XEN, SECCLASS_XEN2,

xen/xsm/flask/hooks.c static int flask_sysctl(int cmd) · line 825

Quoted 10 lines
xen/xsm/flask/hooks.c +2 -2
-                                    XEN2__GET_CPU_LEVELLING_CAPS);
+                                    XEN2__GET_CPU_LEVELLING_CAPS, NULL);
 
     case XEN_SYSCTL_get_cpu_featureset:
         return avc_current_has_perm(SECINITSID_XEN, SECCLASS_XEN2,
-                                    XEN2__GET_CPU_FEATURESET);
+                                    XEN2__GET_CPU_FEATURESET, NULL);
 
     case XEN_SYSCTL_livepatch_op:
         return avc_current_has_perm(SECINITSID_XEN, SECCLASS_XEN2,

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

Acked-by on v1 1/1
#2 lore raw
In reply to Andrew Cooper
Quoted 4 lines · Andrew Cooper

avc_current_has_perm() takes 4 arguments, not 3. Spotted by a Travis randconfig run which actually turned XSM on.

Whoops, looks like I sent the non-build-tested patch by accident. Thanks for catching this!

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#3 lore raw
Quoted 10 lines · Daniel De Graaf
Quoted 4 lines · Andrew Cooper

avc_current_has_perm() takes 4 arguments, not 3. Spotted by a Travis randconfig run which actually turned XSM on.

Whoops, looks like I sent the non-build-tested patch by accident. Thanks for catching this!

Thanks.

While you are here, any input on
https://www.mail-archive.com/[email protected]/msg112930.html ?

~Andrew

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel