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

Re: [PATCH v2 3/5] xen/version: Introduce non-truncating XENVER_* subops


  • To: Jason Andryuk <jandryuk@xxxxxxxxx>
  • From: Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>
  • Date: Tue, 17 Jan 2023 17:39:44 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=sfxrSXwUC/Cos2GlMWRMpJO2QKp7dFdBTczRZEQ43S8=; b=RV9LaoKh4AGlnDO+ELyc6+qQz4X+wlnzY4tJmzSJaSmFNX1St9zqqfmEkOesjdLs9P7DiAU0KhGp9VGMFYkHYLCVbD+wX9omKAmQLkHgdVO8hAMex3bKI0mPzXvqOBhFLrj9xeXSU+2ls6HE36U/OwsYehJBKxqJVb5NKRN/7e4VkNdlmmjv4anMqSA5xGnbIn6OUTfvnK6B2qhL/RGgJ9pSwQxefXU2NrY1RPhAAQ7VdUI29ovtOddIO8AKDxYg/mbFzJLmeL6qqhA+3ifuZu8Kp15lo0ZdObad9CHMTLMRNZk/6DxIH4mNOpIvU38+JiFzJDI1+YEHTgL8B/Om8w==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fbQXjBvVTlfEaWi2PmDyS/G1vlhRCm2lUz98z5QZBwpsR9sHxIqgkcd3nk7d2zxu3lxKM4V2dp6wnbvoZvsBYVY//tijReXzi3gChlsKNeMTzSPnV9O8lHGKUBCm2nar5kejKVc8djb/ooRB8iW4HzRZgWjxvEKNlDUOxRrsaoLd7XjDW32uh4EPIjCbLQPIv1WAChobSV3pT9cTnpNKMEh6ygDE6XTWRrYrsIS9wKjZ3pfJTA3KYKh8PSK43c8h6jZrDX0pyHrHxiTa2vslGn7QCiv5kTDMBbENiarZytco+lvd6so9fPCkueoXDMcBAzc2rQrSz8WZ31lJddWTFw==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, George Dunlap <George.Dunlap@xxxxxxxxxx>, Jan Beulich <JBeulich@xxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Julien Grall <julien@xxxxxxx>, Daniel De Graaf <dgdegra@xxxxxxxxxxxxx>, Daniel Smith <dpsmith@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Tue, 17 Jan 2023 17:40:30 +0000
  • Ironport-data: A9a23:TaeSfaKxeoTolQY4FE+RTJQlxSXFcZb7ZxGr2PjKsXjdYENS3jNUx zcaUWiHafyMMTD1eowga4q3pBwC7ZPWmIJmSAJlqX01Q3x08seUXt7xwmUcnc+xBpaaEB84t ZV2hv3odp1coqr0/0/1WlTZhSAgk/rOHv+kUrWs1hlZHWdMUD0mhQ9oh9k3i4tphcnRKw6Ws Jb5rta31GWNglaYCUpJrfPcwP9TlK6q4mhA5wVhPaojUGL2zBH5MrpOfcldEFOgKmVkNrbSb /rOyri/4lTY838FYj9yuu+mGqGiaue60Tmm0hK6aYD76vRxjnVaPpIAHOgdcS9qZwChxLid/ jnvWauYEm/FNoWU8AgUvoIx/ytWZcWq85efSZSzXFD6I+QrvBIAzt03ZHzaM7H09c5HPWJi9 aI8Fwwpbw++3r6X6ruDdbhj05FLwMnDZOvzu1lG5BSBUbMDfsqGRK/Ho9hFwD03m8ZCW+7EY NYUYiZuaxKGZABTPlAQC9Q1m+LAanvXKmUE7g7K4/VspTGMlWSd05C0WDbRUvWMSd9YgQCzo WXe8n6iKhobKMae2XyO9XfEaurnzHmnCNxISOfQGvhCjwGJ7U8oGkUscVK9qNe0m0q0UehEN BlBksYphe1onKCxdfH/Vhu0um+ZvTYTXtNRF6sx7wTl4rrZ5UOVC3YJShZFacc6r4kmSDoyz FiLktj1Qzt1v9W9a1iQ67OVpjOaIjUOICkJYipsZRAe/9DprYU3jxTOZtVuCqi4ipvyAz6Y6 y+OhDgzgfMUl8Fj/6em+VHKhRq8q56PSRQ6ji3bUW6o4RlwTJK0bIyvr17A5LBPK5jxZlWZp 30Fh8i25fgDF42QjzeKRPgRHbav/LCONzi0vLJ0N5wo9jDo/mH5e4lVuG16PB0wbZ9CfiL1a kjOvw8X/IVUIHahca5wZcS2Ftguyq/jU9/iU5g4c+ZzX3S4TyfflAkGWKJa9zmFfJQE+U3nB aqmTA==
  • Ironport-hdrordr: A9a23:cP4zVaCVqggjygrlHelo55DYdb4zR+YMi2TDt3oddfU1SL38qy nKpp4mPHDP5wr5NEtPpTniAtjjfZq/z/5ICOAqVN/PYOCPggCVxepZnOjfKlPbehEX9oRmpN 1dm6oVMqyMMbCt5/yKnDVRELwbsaa6GLjDv5a785/0JzsaE52J6W1Ce2GmO3wzfiZqL7wjGq GR48JWzgDQAkj+PqyAdx84t/GonayzqK7b
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHZJ6P9s5HCoeqlF020fKh7orvbwa6i0F2AgAAVuQA=
  • Thread-topic: [PATCH v2 3/5] xen/version: Introduce non-truncating XENVER_* subops

On 17/01/2023 4:21 pm, Jason Andryuk wrote:
> On Fri, Jan 13, 2023 at 6:08 PM Andrew Cooper <andrew.cooper3@xxxxxxxxxx> 
> wrote:
>> Recently in XenServer, we have encountered problems caused by both
>> XENVER_extraversion and XENVER_commandline having fixed bounds.
>>
>> More than just the invariant size, the APIs/ABIs also broken by typedef-ing 
>> an
>> array, and using an unqualified 'char' which has implementation-specific
>> signed-ness
>>
>> Provide brand new ops, which are capable of expressing variable length
>> strings, and mark the older ops as broken.
>>
>> This fixes all issues around XENVER_extraversion being longer than 15 chars.
>> More work is required to remove other assumptions about XENVER_commandline
>> being 1023 chars long.
>>
>> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
>> ---
>> CC: George Dunlap <George.Dunlap@xxxxxxxxxxxxx>
>> CC: Jan Beulich <JBeulich@xxxxxxxx>
>> CC: Stefano Stabellini <sstabellini@xxxxxxxxxx>
>> CC: Wei Liu <wl@xxxxxxx>
>> CC: Julien Grall <julien@xxxxxxx>
>> CC: Daniel De Graaf <dgdegra@xxxxxxxxxxxxx>
>> CC: Daniel Smith <dpsmith@xxxxxxxxxxxxxxxxxxxx>
>> CC: Jason Andryuk <jandryuk@xxxxxxxxx>
>>
>> v2:
>>  * Remove xen_capabilities_info_t from the stack now that arch_get_xen_caps()
>>    has gone.
>>  * Use an arbitrary limit check much lower than INT_MAX.
>>  * Use "buf" rather than "string" terminology.
>>  * Expand the API comment.
>>
>> Tested by forcing XENVER_extraversion to be 20 chars long, and confirming 
>> that
>> an untruncated version can be obtained.
>> ---
>>  xen/common/kernel.c          | 62 
>> +++++++++++++++++++++++++++++++++++++++++++
>>  xen/include/public/version.h | 63 
>> ++++++++++++++++++++++++++++++++++++++++++--
>>  xen/include/xlat.lst         |  1 +
>>  xen/xsm/flask/hooks.c        |  4 +++
> The Flask change looks good, so that part is:
> Reviewed-by: Jason Andryuk <jandryuk@xxxxxxxxx> # Flask

Thanks.

>
> Looking at include/xsm/dummy.h, these new subops would fall under the
> default case and require XSM_PRIV.  Is that the desired permission,
> and guests would just have to handle EPERM?

I noticed that during further testing.  I made a modification to dummy
in the same manner as flask.

Given that it's the same piece of information (just with a less broken
API), permission handling for the two ops should be the same.

~Andrew

 


Rackspace

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