diff mbox

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

Message ID 1502371056-11384-1-git-send-email-andrew.cooper3@citrix.com (mailing list archive)
State New, archived
Headers show

Commit Message

Andrew Cooper Aug. 10, 2017, 1:17 p.m. UTC
avc_current_has_perm() takes 4 arguments, not 3.  Spotted by a Travis
randconfig run which actually turned XSM on.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
CC: Daniel De Graaf <dgdegra@tycho.nsa.gov>
---
 xen/xsm/flask/hooks.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Andrew Cooper Aug. 10, 2017, 1:19 p.m. UTC | #1
On 10/08/17 14:17, Andrew Cooper wrote:
> 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

>
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
> ---
> CC: Daniel De Graaf <dgdegra@tycho.nsa.gov>
> ---
>  xen/xsm/flask/hooks.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/xen/xsm/flask/hooks.c b/xen/xsm/flask/hooks.c
> index 17560b1..9114627 100644
> --- a/xen/xsm/flask/hooks.c
> +++ b/xen/xsm/flask/hooks.c
> @@ -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,
Daniel De Graaf Aug. 10, 2017, 2:09 p.m. UTC | #2
On 08/10/2017 09:17 AM, Andrew Cooper wrote:
> avc_current_has_perm() takes 4 arguments, not 3.  Spotted by a Travis
> randconfig run which actually turned XSM on.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>

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

Acked-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Andrew Cooper Aug. 10, 2017, 2:11 p.m. UTC | #3
On 10/08/17 15:09, Daniel De Graaf wrote:
> On 08/10/2017 09:17 AM, Andrew Cooper wrote:
>> avc_current_has_perm() takes 4 arguments, not 3.  Spotted by a Travis
>> randconfig run which actually turned XSM on.
>>
>> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
>
> Whoops, looks like I sent the non-build-tested patch by accident.
> Thanks for catching this!
>
> Acked-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>

Thanks.

While you are here, any input on
https://www.mail-archive.com/xen-devel@lists.xen.org/msg112930.html ?

~Andrew
diff mbox

Patch

diff --git a/xen/xsm/flask/hooks.c b/xen/xsm/flask/hooks.c
index 17560b1..9114627 100644
--- a/xen/xsm/flask/hooks.c
+++ b/xen/xsm/flask/hooks.c
@@ -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,