[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v4 11/11] xsm: remove alternate xsm hook interface


  • To: "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Mon, 6 Sep 2021 20:18:03 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=gvTsw0FNSL5+s3kxRMn/xBfkLyPZHLX0DVmJG321wyA=; b=h+3P0OgDMcsGTxgrTvp/Voz8nDws28mFvKLPVHWnO7p7vhvzSiBHDLESIMSvkh23N1KC11txf1gHgJw/vXAYOxnBbs/LgouUXi7kNhakVOiuKJ7Jn93OEsABa4CZJfUE5sy0nyUKPbszs4ItUvblH+mULCJt/msdV/Yk1/81vCIXyQSMgvlvAAeXHv3sx+t81ZykqW2X6SBI314gg0DlBTmGz/x5BBCS43UNcAuIIaU+g6+ENFqjy6+WMpaWNsLDdeYT7YxUH8J0qnNcBf0TnnEc1z5KbOL/RWimqxJXa6RXLFf3N1l0D5MPzw919rfPsqDeGXnXALUD/GHLb6jk4w==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dTSxZ79Nmu07vS74qNVRDIamhRusfk2uBEp3y7QnxeCqKXozhxHMDTDxAu708Y7ys4+LTEcEfE7obviTOAoSoo9FGmf8+0E3/WxIHKdHgg/bcBfp9GgF5V6rWzNeTkwJtQGwYD9pXMwsnwS0XLOkkrlBIpFHA/rRILcfv5MvBomBZ6sX4vaTYdKkmFOEud/RCzPhtpAD8qS44a1L93pCTKXWTtTrKPPdrzz/t0h1lUOFD+lGp5gCjiR1SzSjLqkmBTIBEDLIWrQbJRcoCbfVMbBdTNQT9sJi/ZB7XRIKiTHHZoLUgdhCIYcc7LDwJFFgvQLUyMNeiKRYd3JB2UDblg==
  • Authentication-results: esa1.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: Daniel De Graaf <dgdegra@xxxxxxxxxxxxx>
  • Delivery-date: Mon, 06 Sep 2021 19:18:31 +0000
  • Ironport-hdrordr: A9a23:XV9dIqHKGLcyP+ESpLqFeJHXdLJyesId70hD6qkvc3Nom52j+/ xGws536faVslcssHFJo6HkBEDyewKiyXcT2/hsAV7CZniahILMFu9fBOTZskXd8kHFh4lgPO JbAtJD4b7LfChHZKTBkXCF+r8bqbHtmsDY5pas854ud3APV0gJ1XYJNu/xKDwReOApP+taKH PR3Ls9m9L2Ek5nEPhTS0N1EtTrlpnurtbLcBQGDxko5E2nii6p0qfzF1y90g0FWz1C7L8++S yd+jaJqZmLgrWe8FvxxmXT55NZlJ/IzcZCPtWFjowwJi/3ggilSYx9U/mpvSwzosuo9FE2+e O87ysIDoBW0Tf8b2u1qRzi103J1ysv0WbrzRuijX7qsaXCNXoHIvsEobgcXgrS6kImst05+r lMxXilu51eCg6FtDjh5vDTPisa1nackD4Hq6o+nnZfWYwRZPt6tooE5n5YF58GAWbT9J0nKu 9zF8vRjcwmMG9yV0qp/FWH/ebcG0jaRny9Mww/U42uonZrdUlCvgglLJd1pAZGyHo/I6M0rt gsfJ4Y0o2mdfVmGJ6VMt1xN/dfOla9My4kD1jiVWgPNJt3cE4l+KSHqonc2omRCes1Jd0J6c 38bG8=
  • Ironport-sdr: 6B/Tzs0QA46+CNAFqe01cQ9nVn+/Aqt6rO72D7+txkl0ZpJ94XpmeO1Ff8SGxJ2jmDgmhez3AX RZY0EVxnC3G6dHZ56ffxWBATfgDJkqOuZL1DOZwA7yOWHBx1kVMKapM6bMjfVV3uuCHrX73Rqh 4uSu9m0ljuK8n1dv2gs0ENCwQ8CMZfj/hBPgPWLa+fyJomvrHW5on32MwEywbSmjK8NcJKSERD TGwkfUYuqtCji1rAJ0XXRiYtnZqija+1RtPqLADRDDHSq6qAaaAuA9t/lPuhygjy8RNssmp4OX 8JzKtLu3LWwQq9LZDn37bw8I
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 03/09/2021 20:06, Daniel P. Smith wrote:
> -static inline int xsm_memtype(xsm_default_t def, uint32_t access)
> +#if 0
> +/* Could not find any usages */
> +static inline int xsm_memtype(xsm_default_t action, uint32_t access)
>  {
>      return alternative_call(xsm_ops.memtype, access);
>  }
> +#endif

There wants to be an earlier patch deleting dead code.  We don't want to
retain this if-0'd out.

> diff --git a/xen/xsm/dummy.h b/xen/xsm/dummy.h
> new file mode 100644
> index 0000000000..b9a7e8c40f
> --- /dev/null
> +++ b/xen/xsm/dummy.h
> @@ -0,0 +1,739 @@
> +/*
> + *  Default XSM hooks - IS_PRIV and IS_PRIV_FOR checks
> + *
> + *  Author: Daniel De Graaf <dgdegra@xxxxxxxxxxxxx>
> + *
> + *  This program is free software; you can redistribute it and/or modify
> + *  it under the terms of the GNU General Public License version 2,
> + *  as published by the Free Software Foundation.
> + *
> + *
> + *  Dummy XSM hooks implementing the default access check. Each hook should
> + *  have as its first line XSM_DEFAULT_ACTION declaring the privilege level
> + *  required for this access.
> + */
> +
> +#ifndef __XSM_DUMMY_H__
> +#define __XSM_DUMMY_H__
> +
> +#include <xen/sched.h>
> +#include <xsm/xsm-core.h>
> +#include <public/hvm/params.h>
> +
> +#define XSM_DEFAULT_ACTION(def) xsm_default_t action = def; (void)action
> +
> +static always_inline int xsm_default_action(
> +    xsm_default_t action, struct domain *src, struct domain *target)
> +{
> +    switch ( action ) {

Either here (because you're moving code), or in the style fix, the brace
wants to be on the next line.

~Andrew




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.