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

Re: [PATCH 01/16] x86/shadow: fix and improve sh_page_has_multiple_shadows()


  • To: Jan Beulich <jbeulich@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Thu, 23 Mar 2023 11:55:31 +0000
  • 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=LarZHhDJBy+j0liB3i/zSGFxPLdpVdKqkI2bdyo9//Q=; b=ocYyD7GLsIR2xlJzpNoiP8JN0jzA+EQERCG1tookuJAT3Dv3fhZhx56LXDvNoQdAriOxkaXwT53tCaQrxP2pWeSOakJSH31MG4VlLWsSYyloeE7ax+iHkfF9liLSk38Bxy1GTD/2o08aWn6rJwd4BYiKg4CrPd1DA+TbGDAhsvJ8POO+/ZzCbiJT4dMHfy1BCb8eZ7Rx/Ibf5jlzpiK62nNRDbIAO+3Gv/alU75RXDow6x04cHULIyfMpAHBhbnLD6Yz3eHJxv6PURz2cFoHSpbdrTY3RIHLoj6DT+1O/dYZ9R0AqzO/dvZIX5vO/G5n84U8BZiCiUzl57ESrrq6Sw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EL5FBNA+ds/TEKL95lRULkII93VOeShXP3ei6Om71BYZss44qOgfCln7eaGZoB46+d4wYYhhPbtbtM2yCuwINIZtfNC25eddgpeo7f2IKWhhYzzDrQfYXNpu0Cy9Em6OIaFNokSVbsWOArPFUSJwSL0pNe3Vd0bHHWGZDCjl1Zx+vMw1o0FbSACwROS7DM23xnkhQXU6vmlO6jpkj+aTJaBbIq4RIz3W94sx/Y62CQh4frid9t64g/cDNrX1GPC1k9YpuDTGNRaieADwutneR0Seskj7QcSmIXVj27z9BmoiYm/Ym9C0202RP5FXlklrYBiVxssyYJicwnRY08cHjw==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: Wei Liu <wl@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Tim Deegan <tim@xxxxxxx>
  • Delivery-date: Thu, 23 Mar 2023 11:56:01 +0000
  • Ironport-data: A9a23:YT2MbagXt1YwhPF1mGbKQe8YX161UREKZh0ujC45NGQN5FlHY01je htvDG2EaK7eNzP9LowlaYSzoBsGvcTSzdNlT1E+pH1jEnsb9cadCdqndUqhZCn6wu8v7q5Ex 55HNoSfdpBcolv0/ErF3m3J9CEkvU2wbuOgTrWCYmYpHlUMpB4J0XpLg/Q+jpNjne+3CgaMv cKai8DEMRqu1iUc3lg8sspvkzsy+qWi0N8klgZmP6sT5wWFzyB94K83fsldEVOpGuG4IcbiL wrz5OnR1n/U+R4rFuSknt7TGqHdauePVeQmoiM+t5mK2nCulARrukoIHKN0hXNsoyeIh7hMJ OBl7vRcf+uL0prkw4zxWzEAe8130DYvFLXveRBTuuTLp6HKnueFL1yDwyjaMKVBktubD12i+ tRAGAwmYBzTidi8ye21YbBKnYMiF87kadZ3VnFIlVk1DN4AaLWaGeDv2oUd2z09wMdTAfzZe swVLyJ1awjNaAFOPVFRD48imOCvhT/0dDgwRFC9/PJrpTSMilIvluSwWDbWUoXiqcF9t0CUv G/ZuU/+BQkXLoe3wjuZ6HO8wOTImEsXXapLTOXorq812AP7Kmo7JkAZRUOHvqiCtkPuS80AA EETwXQyov1nnKCsZpynN/Gim1aGtBMBX9tbE8Uh9RqAjKHT5m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GsjMq8O2sScb5pjn353D3/J
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 22/03/2023 9:29 am, Jan Beulich wrote:
> While no caller currently invokes the function without first making sure
> there is at least one shadow [1], we'd better eliminate UB here:
> find_first_set_bit() requires input to be non-zero to return a well-
> defined result.
>
> Further, using find_first_set_bit() isn't very efficient in the first
> place for the intended purpose.
>
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>

Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>



 


Rackspace

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