From nobody Mon Feb 9 02:27:47 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass header.i=dpsmith@apertussolutions.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=1 dmarc=pass fromdomain=apertussolutions.com) ARC-Seal: i=2; a=rsa-sha256; t=1630681717; cv=pass; d=zohomail.com; s=zohoarc; b=iXrjfdRAHHIa+krgNI915ANLbHkVXx3L4cZXmtHTAJIHbfeP9n1X/sjLU5jEKflj8zv/J8ii/2csZsCu9asHj55VqjjCBt/AiJjbw5WtREQh+9IMCtI1ph/hMipgpQQalaz1+vKdPLOKsxPdnQeFj0StMXf/xL/1+MQHZJfFVaI= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1630681717; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=DHYiPbkr+NbOPJst4/lduNG0E/MNzNsNVs5R1f5AFDk=; b=FVIjiw4XJy15DYRwByw6VHTmL/xif8GJ7kinrp4J//+jFADR94VWxx5xLWzwl8jV5sOvdA/+LykGBgE+1IprBuYiy2kndYLVa0Hp/P0znuB9fuzyYMRMRZvqRV6C8uPaGP9kB5fRkSb7OCul8ivqIuaBLkv9/vTUZDiDGCq/kBw= ARC-Authentication-Results: i=2; mx.zohomail.com; dkim=pass header.i=dpsmith@apertussolutions.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=1 dmarc=pass fromdomain=apertussolutions.com) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1630681717647894.7383877565625; Fri, 3 Sep 2021 08:08:37 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.178172.324093 (Exim 4.92) (envelope-from ) id 1mMAnn-0002Gp-1L; Fri, 03 Sep 2021 15:08:23 +0000 Received: by outflank-mailman (output) from mailman id 178172.324093; Fri, 03 Sep 2021 15:08:22 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mMAnm-0002Ge-Tm; Fri, 03 Sep 2021 15:08:22 +0000 Received: by outflank-mailman (input) for mailman id 178172; Fri, 03 Sep 2021 15:08:22 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mMAnm-00020o-6O for xen-devel@lists.xenproject.org; Fri, 03 Sep 2021 15:08:22 +0000 Received: from sender4-of-o51.zoho.com (unknown [136.143.188.51]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id c49e68bc-0cc8-11ec-af2e-12813bfff9fa; Fri, 03 Sep 2021 15:08:18 +0000 (UTC) Received: from sisyou.hme. (static-72-81-132-2.bltmmd.fios.verizon.net [72.81.132.2]) by mx.zohomail.com with SMTPS id 1630681607871996.5359561303381; Fri, 3 Sep 2021 08:06:47 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: c49e68bc-0cc8-11ec-af2e-12813bfff9fa ARC-Seal: i=1; a=rsa-sha256; t=1630681613; cv=none; d=zohomail.com; s=zohoarc; b=AmnjgUxavzvlOgQThsUztE6rwLA9AR1eB9LLbjf1gN6C9YJEpPb01RiYrBLPwTDUqvUcyfBoETtfz+FrM9lGAzjdji/RjUI86EsOCH/2SMRu3MhhtE63l7MfRGbo/gF7Zp82gneuAiP36Etp/u0NPTQH9LMmKPgvOh3kSCJaViA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1630681613; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=DHYiPbkr+NbOPJst4/lduNG0E/MNzNsNVs5R1f5AFDk=; b=J0EIGjS1XMflXx/TZjog1zNaIfzg8OscC2cCqd50CL4ka5IynK+OIcQvt+Hv0dVFHiDFt2riVKSHWXyRDjEJJ2YsX3lTD4xGa+tnHLgH9Y7wJsHTC9JmpZcvfnlvqFLzT001Liu2eUURuPzN3pDcVXc6FpXq3Tfme/8GwKafWMQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=apertussolutions.com; spf=pass smtp.mailfrom=dpsmith@apertussolutions.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1630681613; s=zoho; d=apertussolutions.com; i=dpsmith@apertussolutions.com; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:MIME-Version:Content-Transfer-Encoding; bh=DHYiPbkr+NbOPJst4/lduNG0E/MNzNsNVs5R1f5AFDk=; b=Brrsy+5tS9Yt7RWJtCGbyKNNj4+oiAse7W5CsQOOu0cqWs+vJD/flMRPYzEEF45K CxCT7RaTtN8LPe06fEy/6YHMs8elfUoHwWS0CCI0qM4VAYIBlc+QAlZtM598UcKZpi5 wKa6SJJi+0qdf8SdhusQ8iixemr3TFZBa8eLMnHE= From: "Daniel P. Smith" To: "Daniel P. Smith" , xen-devel@lists.xenproject.org Cc: Daniel De Graaf Subject: [PATCH v4 09/11] silo: remove circular xsm hook call Date: Fri, 3 Sep 2021 15:06:27 -0400 Message-Id: <20210903190629.11917-10-dpsmith@apertussolutions.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210903190629.11917-1-dpsmith@apertussolutions.com> References: <20210903190629.11917-1-dpsmith@apertussolutions.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External X-ZohoMail-DKIM: pass (identity dpsmith@apertussolutions.com) X-ZM-MESSAGEID: 1630681718821100003 Content-Type: text/plain; charset="utf-8" SILO implements a few XSM hooks to extended the decision logic beyond what is defined in the dummy/default policy. For each of the hooks, it falls back to the dummy/default policy. The fall back is done a slight round-about way. This commit makes the direct call to the default policy's logic, xsm_default_action(). Signed-off-by: Daniel P. Smith --- xen/xsm/silo.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/xen/xsm/silo.c b/xen/xsm/silo.c index 6db793f35c..56a330a831 100644 --- a/xen/xsm/silo.c +++ b/xen/xsm/silo.c @@ -17,6 +17,7 @@ * You should have received a copy of the GNU General Public License along= with * this program; If not, see . */ +#include #include =20 /* @@ -43,7 +44,7 @@ static int silo_evtchn_unbound(struct domain *d1, struct = evtchn *chn, else { if ( silo_mode_dom_check(d1, d2) ) - rc =3D xsm_evtchn_unbound(d1, chn, id2); + rc =3D xsm_default_action(XSM_TARGET, current->domain, d1); rcu_unlock_domain(d2); } =20 @@ -54,7 +55,7 @@ static int silo_evtchn_interdomain(struct domain *d1, str= uct evtchn *chan1, struct domain *d2, struct evtchn *chan2) { if ( silo_mode_dom_check(d1, d2) ) - return xsm_evtchn_interdomain(d1, chan1, d2, chan2); + return xsm_default_action(XSM_HOOK, d1, d2); return -EPERM; } =20 @@ -62,21 +63,21 @@ static int silo_grant_mapref(struct domain *d1, struct = domain *d2, uint32_t flags) { if ( silo_mode_dom_check(d1, d2) ) - return xsm_grant_mapref(d1, d2, flags); + return xsm_default_action(XSM_HOOK, d1, d2); return -EPERM; } =20 static int silo_grant_transfer(struct domain *d1, struct domain *d2) { if ( silo_mode_dom_check(d1, d2) ) - return xsm_grant_transfer(d1, d2); + return xsm_default_action(XSM_HOOK, d1, d2); return -EPERM; } =20 static int silo_grant_copy(struct domain *d1, struct domain *d2) { if ( silo_mode_dom_check(d1, d2) ) - return xsm_grant_copy(d1, d2); + return xsm_default_action(XSM_HOOK, d1, d2); return -EPERM; } =20 @@ -86,14 +87,14 @@ static int silo_argo_register_single_source(const struc= t domain *d1, const struct domain *d2) { if ( silo_mode_dom_check(d1, d2) ) - return xsm_argo_register_single_source(d1, d2); + return 0; return -EPERM; } =20 static int silo_argo_send(const struct domain *d1, const struct domain *d2) { if ( silo_mode_dom_check(d1, d2) ) - return xsm_argo_send(d1, d2); + return 0; return -EPERM; } =20 --=20 2.20.1