From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DC794C433EF for ; Wed, 11 May 2022 11:07:03 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.326708.549309 (Exim 4.92) (envelope-from ) id 1nokB9-0001gA-PT; Wed, 11 May 2022 11:06:51 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 326708.549309; Wed, 11 May 2022 11:06:51 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nokB9-0001g3-Li; Wed, 11 May 2022 11:06:51 +0000 Received: by outflank-mailman (input) for mailman id 326708; Wed, 11 May 2022 11:06:50 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nokB8-0001Bc-Aa for xen-devel@lists.xenproject.org; Wed, 11 May 2022 11:06:50 +0000 Received: from sender4-of-o51.zoho.com (sender4-of-o51.zoho.com [136.143.188.51]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 73972aab-d11a-11ec-a406-831a346695d4; Wed, 11 May 2022 13:06:49 +0200 (CEST) Received: from [10.10.1.138] (static-72-81-132-2.bltmmd.fios.verizon.net [72.81.132.2]) by mx.zohomail.com with SMTPS id 1652267204266268.65022183172607; Wed, 11 May 2022 04:06:44 -0700 (PDT) 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: 73972aab-d11a-11ec-a406-831a346695d4 ARC-Seal: i=1; a=rsa-sha256; t=1652267206; cv=none; d=zohomail.com; s=zohoarc; b=Lhb2nJ+kynrJR6BzzaA6jSc5Yoz7+1OTWG4TH1uSUcWP/6JlK5i7oXan4SnOK1TN6nXvGpEPjuoO9yiCN5YMWsPMnbXzJQ50XpOcOtTNh0/DtbSC0+3bz6K4P3buZGM4HaZSIXJ6sx59wpSRSMl69gka8hYOpYY99YvbX6A+lhQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1652267206; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=9n/aS6rL2TlLAqR5rCBnVob92xkCeuTrUzwXok9Ctks=; b=by+2gTOE1eg0PsTupT+jukoWl7HczTMyNFcOAJ1bch4CiyMXgr69XEjaPTHEXNb8zWJFDoA+cBQ7/Du1HFM/MPbrOOgwwUloVFrLxT/DHSmrJZPaLIiv91uwaVrFktgy9yApjMPzpXo8tdG4dXTkRfeiaRPGWHuiv1vBoNlQj94= 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=1652267206; s=zoho; d=apertussolutions.com; i=dpsmith@apertussolutions.com; h=Message-ID:Date:Date:MIME-Version:Subject:Subject:To:To:Cc:Cc:References:From:From:In-Reply-To:Content-Type:Content-Transfer-Encoding:Message-Id:Reply-To; bh=9n/aS6rL2TlLAqR5rCBnVob92xkCeuTrUzwXok9Ctks=; b=YrnYlOdqz1ZsE/0Tn/CjmhjFxZqSD3mmmikZ4xyyCI6EmwIDTm15+FzBakPpkNZ0 yEkV8e21aR+A8DBIoyewBKsgys0bnJoJ911g+PzeiDAscQsSF3PTCnZO71XaB28Qlyw 9pDj8uuuRfTTjKwXsWT2cbg0KOqcXLVIsv/rKqDw= Message-ID: Date: Wed, 11 May 2022 07:05:37 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 Subject: Re: [PATCH v6 1/2] xsm: create idle domain privileged and demote after setup Content-Language: en-US To: Julien Grall , Luca Fancellu Cc: xen-devel , Volodymyr Babchuk , Wei Liu , Scott Davis , "jandryuk@gmail.com" , "christopher.clark@starlab.io" , Stefano Stabellini , Bertrand Marquis , Jan Beulich , Andrew Cooper , =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= , George Dunlap , Dario Faggioli , Daniel De Graaf References: <20220503111731.12642-1-dpsmith@apertussolutions.com> <20220503111731.12642-2-dpsmith@apertussolutions.com> <08C4B263-D905-42A2-BBFF-75D7F78E20A1@arm.com> From: "Daniel P. Smith" In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ZohoMailClient: External On 5/9/22 14:33, Julien Grall wrote: > > > 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. Ack. v/r, dps