All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: "Daniel P. Smith" <dpsmith@apertussolutions.com>,
	<xen-devel@lists.xenproject.org>
Cc: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Subject: Re: [PATCH v4 11/11] xsm: remove alternate xsm hook interface
Date: Mon, 6 Sep 2021 20:18:03 +0100	[thread overview]
Message-ID: <b35d8b3a-c398-a101-8893-6a3ca6906e94@citrix.com> (raw)
In-Reply-To: <20210903190629.11917-12-dpsmith@apertussolutions.com>

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@tyhco.nsa.gov>
> + *
> + *  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



  reply	other threads:[~2021-09-06 19:18 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-03 19:06 [PATCH v4 00/11] xsm: refactoring xsm hooks Daniel P. Smith
2021-09-03 19:06 ` [PATCH v4 01/11] xen: Implement xen/alternative-call.h for use in common code Daniel P. Smith
2021-09-06 15:52   ` Jan Beulich
2021-09-06 16:22     ` Andrew Cooper
2021-09-07  6:00       ` Jan Beulich
2021-09-07 13:07         ` Daniel P. Smith
2021-09-03 19:06 ` [PATCH v4 02/11] xsm: remove the ability to disable flask Daniel P. Smith
2021-09-06 17:56   ` Andrew Cooper
2021-09-03 19:06 ` [PATCH v4 03/11] xsm: drop dubious xsm_op_t type Daniel P. Smith
2021-09-06 18:00   ` Andrew Cooper
2021-09-03 19:06 ` [PATCH v4 04/11] xsm: apply coding style Daniel P. Smith
2021-09-06 18:17   ` Andrew Cooper
2021-09-07 13:41     ` Daniel P. Smith
2021-09-07 13:50       ` Jan Beulich
2021-09-07 14:09         ` Daniel P. Smith
2021-09-07 14:27           ` Jan Beulich
2021-09-07 14:55             ` Daniel P. Smith
2021-09-07 15:01               ` Jan Beulich
2021-09-03 19:06 ` [PATCH v4 05/11] xsm: refactor xsm_ops handling Daniel P. Smith
2021-09-06 18:31   ` Andrew Cooper
2021-09-07 13:44     ` Daniel P. Smith
2021-09-03 19:06 ` [PATCH v4 06/11] xsm: convert xsm_ops hook calls to alternative call Daniel P. Smith
2021-09-03 19:06 ` [PATCH v4 07/11] xsm: decouple xsm header inclusion selection Daniel P. Smith
2021-09-06 18:47   ` Andrew Cooper
2021-09-07 13:52     ` Daniel P. Smith
2021-09-03 19:06 ` [PATCH v4 08/11] xsm: drop generic event channel labeling exclusion Daniel P. Smith
2021-09-09 15:35   ` Jan Beulich
2021-09-09 16:44     ` Daniel P. Smith
2021-09-03 19:06 ` [PATCH v4 09/11] silo: remove circular xsm hook call Daniel P. Smith
2021-09-06 18:55   ` Andrew Cooper
2021-09-07 14:00     ` Daniel P. Smith
2021-09-09 15:45   ` Jan Beulich
2021-09-09 19:14     ` Daniel P. Smith
2021-09-03 19:06 ` [PATCH v4 10/11] kconfig: update xsm config to reflect reality Daniel P. Smith
2021-09-03 19:06 ` [PATCH v4 11/11] xsm: remove alternate xsm hook interface Daniel P. Smith
2021-09-06 19:18   ` Andrew Cooper [this message]
2021-09-07 14:03     ` Daniel P. Smith

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b35d8b3a-c398-a101-8893-6a3ca6906e94@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=dgdegra@tycho.nsa.gov \
    --cc=dpsmith@apertussolutions.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.