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

Re: [PATCH v2 08/10] xsm: remove xsm_default_t from hook definitions

  • To: "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Fri, 16 Jul 2021 09:23:55 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.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:X-MS-Exchange-SenderADCheck; bh=Z2jCdfmfREg/XBvRgtwrhr25pvXR9ieoT0/twXDdzb0=; b=D5ZCQLB2XFpvKyxqLYtG8IT6ztmZKUPnQVNG1VWQpU0bxgmknbwBdKA8wZgildSDOuH92WVN0KN26HlwpGHR8qG6Vk3IzeW4LAENBpOJSbmlm7rwbhJPpe/87c4uelp0JO1ryt9FCOpRKmwL3aVF2GVe/BfPs3Ijd7pggtw1Ke4FAMbIlbHlgmQDPmyfjZbXmL2SdUzfim7pt1Mi7/aDdvLGDMzFhEv/6NZi6DNFSXjbSrRvRWmMi6iQBpj4g+4Fyji1Km5nSBHw6gOBI5l0vK7QIQUB1U1qqUdO8ivJr0Um/YQkZMM5WjZMYcgCBamiJg9sekwU9gd9JSeBV1fuBw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ApLVNvPlMmLuOyRrwl5moJt/4yYU8lLXHQwSBnoDa/j8H4bBrynSRoquZCxu5vtr4uoiEIMQHilP59lO4G5qOYMRtctcGxuqDXW+k86fnogDpYs3PSJvsOGlRCG3Kn1yKQzfQExEnsZV94YyVi4+nh54rX0tCl4hyi7bYzMfoBhNf3ZdEl+NCYo2UWfkUCZsz14cyYrwbegsIlAILD1agCYpgQRXooAaKSYdIGWPRNLWvK+krqgQlkjP/jNIFG2RKk1nwOFICypoWeQw+Ub3QxT6mUqfAy48ItXf8kOvYDrxzIxgmUR4qCyP+sdv/lWDuNf6Exa+Ncks4dGfUSsmeg==
  • Authentication-results: citrix.com; dkim=none (message not signed) header.d=none;citrix.com; dmarc=none action=none header.from=suse.com;
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Tamas K Lengyel <tamas@xxxxxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Dario Faggioli <dfaggioli@xxxxxxxx>, Petre Pircalabu <ppircalabu@xxxxxxxxxxxxxxx>, Paul Durrant <paul@xxxxxxx>, Daniel De Graaf <dgdegra@xxxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx, Tim Deegan <tim@xxxxxxx>, Alexandru Isaila <aisaila@xxxxxxxxxxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Wei Liu <wl@xxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>
  • Delivery-date: Fri, 16 Jul 2021 07:24:23 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 12.07.2021 22:32, Daniel P. Smith wrote:
> The passing of an xsm_default_t at each of the xsm hook call sites
> served different functions depending on whether XSM was enabled or not.
> When XSM was not enabled it attempted to function as a link-time check
> that declared default action at the call site matched the default
> declared action for that hook in the dummy policy. When XSM was enabled,
> it would just drop the  parameter.
> The removal of these values is two fold. They are a redundancy that
> provides little context, especially when the value is XSM_OTHER.

For XSM_OTHER I may agree, but in general I find the call-site uses
helpful to know at least the rough level of intended restriction.
E.g. ...

> --- a/xen/arch/x86/cpu/mcheck/mce.c
> +++ b/xen/arch/x86/cpu/mcheck/mce.c
> @@ -1376,7 +1376,7 @@ long do_mca(XEN_GUEST_HANDLE_PARAM(xen_mc_t) u_xen_mc)
>      struct xen_mc_msrinject *mc_msrinject;
>      struct xen_mc_mceinject *mc_mceinject;
> -    ret = xsm_do_mca(XSM_PRIV);
> +    ret = xsm_do_mca();

... to now understand what this enforces (or not) I have to go to
the actual implementation, even if I only want to know the trivial
dummy incarnation of it. This effectively extends the "provides
little context" from XSM_OTHER to all hooks.




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