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

RE: [PATCH] xen/arm: Harden setup_frametable_mappings


  • To: Michal Orzel <michal.orzel@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Henry Wang <Henry.Wang@xxxxxxx>
  • Date: Tue, 17 Jan 2023 02:29:58 +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=Cz0CZqL3S/ce4G+/I/Tj9WtuJq7K7FSPIMrz63rOQyg=; b=lKy2rxY8n78uiNbr7ePiUw1y0RRJLNlA265tUu2Wl7tvWuHzKj9X2TNWGDNyftPi4nd7aNq7xjO7ZHCPiv2gvqmB0oPotCPGaKFLYwZNwe2AuS8KBD/JN66i6GkVlYv0Kk9WuO4KFnvbMG5twhJtrpCxd41xd6zX8qMzTTlxRPvAkHzyLc1MJdNu+M2a4fgSsLCGoXAx6YyVjwFfoH5Bb/FULaU9ymKW3Fv7y7OtJJUrQWU5R8Nn+kQQSaDm9knT4p8R6cT8wFMkmoL+e2Dokx4G/M56bElLZvce3LAwsKi/QelLSIrg8HVu18l1A1F+X3ROOK+gAbvkTSAXBQW35g==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=a6tE+CyJJDtYXTjTf24d+xy/Ohn22Qr6NAbYgSFBYcyc6s+OZvAuTUIaO5vnhvM8GEvjUN1KdpYNzpY0z1AFBmXhetVm17xxM75NCxSm/KQMzgdWs93DBgn1CeWib9xj8PGVf2YtPPjcS8kU2VMLK72JQ9n4ITs2DKGBoNsNT6QYsIoWUvseZ4TuzC+rzm1OHxtgGEhZBFU8EHiVD1v9hv46GzsXU+IJmh0/jwA9pH5HOtWYprMILRxHMCU7GpA6sbKAGL+42BAj/dFU7u2RAHjhfmllzTVMbpAyKd6Vz54QHEUCuBHOA+QidMwHk0KJ+iqqa92d0q0f3mNzW+EMTw==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Tue, 17 Jan 2023 02:30:33 +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: AQHZKbkxN5rEygeNfEqj+XfEFX++Ha6h0GPg
  • Thread-topic: [PATCH] xen/arm: Harden setup_frametable_mappings

Hi Michal,

> -----Original Message-----
> Subject: [PATCH] xen/arm: Harden setup_frametable_mappings
> 
> The amount of supported physical memory depends on the frametable size
> and the number of struct page_info entries that can fit into it. Define
> a macro PAGE_INFO_SIZE to store the current size of the struct page_info
> (i.e. 56B for arm64 and 32B for arm32) and add a sanity check in
> setup_frametable_mappings to be notified whenever the size of the
> structure changes. Also call a panic if the calculated frametable_size
> exceeds the limit defined by FRAMETABLE_SIZE macro.
> 
> Update the comments regarding the frametable in asm/config.h and take
> the opportunity to remove unused macro FRAMETABLE_VIRT_END on arm32.
> 
> Signed-off-by: Michal Orzel <michal.orzel@xxxxxxx>

Reviewed-by: Henry Wang <Henry.Wang@xxxxxxx>

I've also used XTP to test this patch on FVP in both arm32 and arm64 execution
mode, and this patch is good, so:

Tested-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®.