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

Re: [PATCH 2/6] xen/memory: Remove tail padding from TRC_MEM_* records


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Fri, 17 Sep 2021 15:04:36 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.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; bh=7fLgZmeBSwiV+NTbSMwgYaCPjruwQAJUnYxmLKIu9ug=; b=A0Cvv3UU3w/fP1uzNYApHH4LtvG3Fj+Y4y9K4BtXNZOnlM4tOKWXOa9Kj7bHRHY8WqBl6m17FwiLCdpd8E6tBsm49wwbKWlmao3AVJvtj14uOsPKJL1IhthLNjyqlpLogaxGVQ3yEUxj/3qec8EdF5ppoQAjuUAhHkYudHeiF9N2M+tmMFuGmgO8U4QRMCEDNfoAxamRNYBHwGZbBotLYYjBgr+GExFeMJqFw+UHJu/qtSStPy6xMsFjHQMeaUNjIf+jkQ16amoKgtGtULs2geQcueAEkwD1/kcyc4Qt18qnv3q4GMOGh/tF7pAthNghU3SSp/Gx452whfoj5g0A0w==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nqN4ryCrainoNuzHqrMWFVqtHazMpMvMP0Od5Mir7XoVqqDnExWILcnoiWWqKuWFhjtPgyITyVY1pS8IoxvwF5/4iPoEK8IR2dpANPt7dtMQVFSJpAEy0IULNnoK+YgP6JeA4/AOjkQhOc8dZbNYdhVH6bBkLwnYFLfDB2Y+rhiTJdHqb8mrkcEv7nudq+HhtON0Zg2p5PVdIF5jq5WQOZu+r4YVdl1VcvrOi4DYm6RLgqetIiekgX7FKdKKWFuqEicroo6UiJfgTIXplpeE4w8ojOO4dEVV2fsDVCf05quqoDUiDZfPa5Jijv4DJYzUctdVxKPmeR9cpHiiNs2inA==
  • Authentication-results: lists.xenproject.org; dkim=none (message not signed) header.d=none;lists.xenproject.org; dmarc=none action=none header.from=suse.com;
  • Cc: George Dunlap <George.Dunlap@xxxxxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Julien Grall <julien@xxxxxxx>, Dario Faggioli <dfaggioli@xxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Fri, 17 Sep 2021 13:04:49 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 17.09.2021 10:45, Andrew Cooper wrote:
> Four TRC_MEM_* records supply custom structures with tail padding, leaking
> stack rubble into the trace buffer.  Three of the records were fine in 32-bit
> builds of Xen, due to the relaxed alignment of 64-bit integers, but
> POD_SUPERPAGE_SPLITER was broken right from the outset.
> 
> We could pack the datastructures to remove the padding, but xentrace_format
> has no way of rendering the upper half of a 16-bit field.  Instead, expand all
> 16-bit fields to 32-bit.
> 
> For POD_SUPERPAGE_SPLINTER, introduce an order field as it is relevant
> information, and to matche DECREASE_RESERVATION, and so it doesn't require a
> __packed attribute to drop tail padding.
> 
> Update xenalyze's structures to match, and introduce xentrace_format rendering
> which was absent previously.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>

Hypervisor part
Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>

Jan




 


Rackspace

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