[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v6 1/2] xsm: create idle domain privileged and demote after setup
- To: Luca Fancellu <Luca.Fancellu@xxxxxxx>, "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>
- From: Julien Grall <julien@xxxxxxx>
- Date: Mon, 9 May 2022 19:33:54 +0100
- Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Wei Liu <wl@xxxxxxx>, Scott Davis <scott.davis@xxxxxxxxxx>, "jandryuk@xxxxxxxxx" <jandryuk@xxxxxxxxx>, "christopher.clark@xxxxxxxxxx" <christopher.clark@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Dario Faggioli <dfaggioli@xxxxxxxx>, Daniel De Graaf <dgdegra@xxxxxxxxxxxxx>
- Delivery-date: Mon, 09 May 2022 18:34:04 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 03/05/2022 14:17, Luca Fancellu wrote:
diff --git a/xen/xsm/flask/hooks.c b/xen/xsm/flask/hooks.c
index 0bf63ffa84..b93101191e 100644
--- a/xen/xsm/flask/hooks.c
+++ b/xen/xsm/flask/hooks.c
@@ -186,6 +186,28 @@ static int cf_check flask_domain_alloc_security(struct
domain *d)
return 0;
}
+static int cf_check flask_set_system_active(void)
+{
+ struct domain *d = current->domain;
+
+ ASSERT(d->is_privileged);
+
+ if ( d->domain_id != DOMID_IDLE )
+ {
+ printk("xsm_set_system_active should only be called by idle domain\n");
Sorry I spotted that now, here in the printk probably you mean
“flask_set_system_active”
instead of “xsm_set_system_active”, you can keep my R-by after this change.
I tend to use "%s: ...", __func__ so the name always name the function.
Cheers,
--
Julien Grall
|