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

Re: [PATCH] x86/paging: Delete update_cr3()'s do_locking parameter


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Henry Wang <Henry.Wang@xxxxxxx>
  • Date: Fri, 22 Sep 2023 01:31:03 +0000
  • Accept-language: zh-CN, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.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=HeO28K0ZBDxilTzshX43k428o5Wi/4fmScCfSOk6Phw=; b=MWtpvqbb3/2zpmKSIvXFHBRnANK4S//2PBauf2rKQ8ye3fk4G8+TRLfJ3wqYh4FM1YJ3VaaaFNx1HTRZfGP1Z9IyAYAs/L8qWls9Wj6GLYw/RS/O2gZ/y3UtYYmHXs3Y0Cu5ftiGKX4Mb3cQ3x12Ov8uOoGmSH+D4JtO3FoYBfUrflK/XVCXkIACP7w8xXBLtWJ1d57NYesf1pM8WefsQ6ltObQpyGnNuiPDQ+BBLS6h4zdYbxD4fkut/sLndEZwUfhbfZX20ozLyf+i190ufA85tvE1IhNUZPfsvdgIWnIGwQwJgfA7gudijhVa7ZgxAEJ03JRCMPn1UcGL9jz0uQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hNcZnbxLpOZ/tpMlZTSHAo03f34RuFUlYVKp/osNGwSxhZ2MfxX0LBAUOr8T23CfEf4N3YjeoK/rcdcwCdTkwcpgTMl6ms0ZrDbKkjrGj8w4u7WT24dANtxHrHf/oyBA1tdGCNSMr8uI9zFPimMxu/kiIDo7ePe6g3nnm7Wb5dbsFvVV1NETVnqIqr/dTQ0QwRm32nZIPtN1fz8XQPA9wPL2OmfKiEi8ISnGSxo84QrtxJS+a8Yi3NN9Ta1OkV4j/09A0aLkPI9UZj3n7tVrRMMxCc4nSPQ6IdaHbtdV6Yxg5eT0ReEfNOqNWZBMFseUx+W2dWUAjdFOMCxGqRXx0A==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxxxxx>, Tim Deegan <tim@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Fri, 22 Sep 2023 01:31:46 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHZ6/fUOR6sHl/nsk2xhF9PyzBzTLAlOT2AgADXrAA=
  • Thread-topic: [PATCH] x86/paging: Delete update_cr3()'s do_locking parameter

Hi,

> On Sep 21, 2023, at 20:38, Jan Beulich <jbeulich@xxxxxxxx> wrote:
> On 20.09.2023 21:21, Andrew Cooper wrote:
>> Nicola reports that the XSA-438 fix introduced new MISRA violations because 
>> of
>> some incidental tidying it tried to do.  The parameter is useless, so resolve
>> the MISRA regression by removing it.
>> 
>> hap_update_cr3() discards the parameter entirely, while sh_update_cr3() uses
>> it to distinguish internal and external callers and therefore whether the
>> paging lock should be taken.
>> 
>> However, we have paging_lock_recursive() for this purpose, which also avoids
>> the ability for the shadow internal callers to accidentally not hold the 
>> lock.
>> 
>> Fixes: fb0ff49fe9f7 ("x86/shadow: defer releasing of PV's top-level shadow 
>> reference")
>> Reported-by: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>
>> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
>> ---
>> CC: Jan Beulich <JBeulich@xxxxxxxx>
>> CC: Roger Pau Monné <roger.pau@xxxxxxxxxx>
>> CC: Wei Liu <wl@xxxxxxx>
>> CC: George Dunlap <george.dunlap@xxxxxxxxxxxxx>
>> CC: Tim Deegan <tim@xxxxxxx>
>> CC: Stefano Stabellini <sstabellini@xxxxxxxxxx>
>> CC: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>
>> 
>> Slightly RFC.  Only compile tested so far.
> 
> With shadow/none.c also suitably edited
> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>

Release-acked-by: Henry Wang <Henry.Wang@xxxxxxx>

Kind regards,
Henry

 


Rackspace

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