All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Smith" <dpsmith@apertussolutions.com>
To: Luca Fancellu <Luca.Fancellu@arm.com>
Cc: xen-devel <xen-devel@lists.xenproject.org>,
	"Volodymyr Babchuk" <Volodymyr_Babchuk@epam.com>,
	"Wei Liu" <wl@xen.org>, "Scott Davis" <scott.davis@starlab.io>,
	"jandryuk@gmail.com" <jandryuk@gmail.com>,
	"christopher.clark@starlab.io" <christopher.clark@starlab.io>,
	"Stefano Stabellini" <sstabellini@kernel.org>,
	"Julien Grall" <julien@xen.org>,
	"Bertrand Marquis" <Bertrand.Marquis@arm.com>,
	"Jan Beulich" <jbeulich@suse.com>,
	"Andrew Cooper" <andrew.cooper3@citrix.com>,
	"Roger Pau Monné" <roger.pau@citrix.com>,
	"George Dunlap" <george.dunlap@citrix.com>,
	"Dario Faggioli" <dfaggioli@suse.com>,
	"Daniel De Graaf" <dgdegra@tycho.nsa.gov>
Subject: Re: [PATCH v6 1/2] xsm: create idle domain privileged and demote after setup
Date: Wed, 11 May 2022 07:05:00 -0400	[thread overview]
Message-ID: <97fc4e45-ebd5-d686-a3d0-01d0d524659c@apertussolutions.com> (raw)
In-Reply-To: <08C4B263-D905-42A2-BBFF-75D7F78E20A1@arm.com>

On 5/3/22 09:17, Luca Fancellu wrote:
> Hi Daniel,
> 
>> 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.

That was intentional as that was the hook it came in as, but after you
pointed it out I realized this may cause confusion since the default
policy function name is the same as the hook. Though changing it I would
do as Julien suggested and use __func__.

v/r,
dps


  parent reply	other threads:[~2022-05-11 11:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-03 11:17 [PATCH v6 0/2] Adds starting the idle domain privileged Daniel P. Smith
2022-05-03 11:17 ` [PATCH v6 1/2] xsm: create idle domain privileged and demote after setup Daniel P. Smith
2022-05-03 12:27   ` Luca Fancellu
2022-05-03 13:17   ` Luca Fancellu
2022-05-09 18:33     ` Julien Grall
2022-05-11 11:05       ` Daniel P. Smith
2022-05-11 11:05     ` Daniel P. Smith [this message]
2022-05-09 18:38   ` Julien Grall
2022-05-11 11:06     ` Daniel P. Smith
2022-05-03 11:17 ` [PATCH v6 2/2] flask: implement xsm_set_system_active Daniel P. Smith
2022-05-03 13:23   ` Luca Fancellu

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=97fc4e45-ebd5-d686-a3d0-01d0d524659c@apertussolutions.com \
    --to=dpsmith@apertussolutions.com \
    --cc=Bertrand.Marquis@arm.com \
    --cc=Luca.Fancellu@arm.com \
    --cc=Volodymyr_Babchuk@epam.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=christopher.clark@starlab.io \
    --cc=dfaggioli@suse.com \
    --cc=dgdegra@tycho.nsa.gov \
    --cc=george.dunlap@citrix.com \
    --cc=jandryuk@gmail.com \
    --cc=jbeulich@suse.com \
    --cc=julien@xen.org \
    --cc=roger.pau@citrix.com \
    --cc=scott.davis@starlab.io \
    --cc=sstabellini@kernel.org \
    --cc=wl@xen.org \
    --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.