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

Re: [PATCH v3 6/7] xsm: drop generic event channel labeling exclusion


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>
  • Date: Fri, 27 Aug 2021 10:16:00 -0400
  • Arc-authentication-results: i=1; mx.zohomail.com; dkim=pass header.i=apertussolutions.com; spf=pass smtp.mailfrom=dpsmith@xxxxxxxxxxxxxxxxxxxx; dmarc=pass header.from=<dpsmith@xxxxxxxxxxxxxxxxxxxx>
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1630073762; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=+EKNePXZlVUo6I7ze8oWmaX4VOQeBfDdkoZWb/2vp1s=; b=FsXfUza7ACrPZUGU//oW0RJVgxSQtMGvB8/GfVciAbq4Id/Iavhf96CJLv7D/6u7lc9pa/AoqH2UyP7c+lsIC9TzaAkUUrg9hxOwz5t0lS6LGkR2DazqQnMf2RjlCnTQl3dVjDwAzNhfsqIGomyKE+CHOivn4NJ2/jgK12xp7fk=
  • Arc-seal: i=1; a=rsa-sha256; t=1630073762; cv=none; d=zohomail.com; s=zohoarc; b=UygP6y+FA5u65E3633bEhPnB3eDTQ/Si8COC6nvQQJ/YneqhCeHcLUXuvlUYEOwzqxeOlLwZ43JRKUyvXCTz3J6fXxTaCttZAJR0VsusHxQVfiS8/8c1zNS9BesFJWqMxrCSaZ5wyDPcgP4w878jFp4+RbHW5iTxuae3cjE3sCM=
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Fri, 27 Aug 2021 14:16:13 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 8/25/21 11:44 AM, Jan Beulich wrote:
> On 05.08.2021 16:06, Daniel P. Smith wrote:
>> The internal define flag is not used by any XSM module, removing the #ifdef
>> leaving the generic event channel labeling as always present.
> 
> With this description ...
> 
>> --- a/xen/include/xen/sched.h
>> +++ b/xen/include/xen/sched.h
>> @@ -120,15 +120,12 @@ struct evtchn
>>      unsigned short notify_vcpu_id; /* VCPU for local delivery notification 
>> */
>>      uint32_t fifo_lastq;           /* Data for identifying last queue. */
>>  
>> -#ifdef CONFIG_XSM
>>      union {
>> -#ifdef XSM_NEED_GENERIC_EVTCHN_SSID
>>          /*
>>           * If an XSM module needs more space for its event channel context,
>>           * this pointer stores the necessary data for the security server.
>>           */
>>          void *generic;
>> -#endif
>>  #ifdef CONFIG_XSM_FLASK
>>          /*
>>           * Inlining the contents of the structure for FLASK avoids unneeded
>> @@ -138,7 +135,6 @@ struct evtchn
>>          uint32_t flask_sid;
>>  #endif
>>      } ssid;
>> -#endif
>>  } __attribute__((aligned(64)));
> 
> ... I can see the inner #ifdef go away, but not the outer one. While
> the (imo bogus) attribute means you don't alter the size of the
> struct, I'm afraid that's not obvious at all without counting bits
> and bytes, and hence this may also want saying explicitly in the
> description.

I can put the #ifdef CONFIG_XSM back and in the subsequent patch change
it to CONFIG_XSM_CONFIGURABLE, making this the only difference between
being able to select the XSM policy in effect or not.

v/r,
dps




 


Rackspace

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