[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v5 6/6] xen: make config argument const
- To: Julian Vetter <julian.vetter@xxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: "Orzel, Michal" <michal.orzel@xxxxxxx>
- Date: Wed, 16 Sep 2026 16:39:23 +0200
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=vates.tech smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=pz4q6f7GLl8hC/23nld3wkkhJVaSL+69OiDtd5ESiow=; b=SVclmbPCVlA6BAI5yNHeHqhZhX1XQ0cL02g9uUDwmWokI10VZN1fPB5lCXBPBg2iyUXNPxYnq/WPociY8d/G5aUZP9CGgtS8Y7w3BEhaaXI4bEi3LN/vz2zEZGTwCumZf2u1qGLT/n8VVmpBgKZfLbSXCTK6RLwtnkoSSqFnK3HIvu09JbP67QmjYzd9HbxgBCd5GjSa4FNbdU84pCZs0bwe5rEBoevJHcdGLghtNfFqQ170/Z2ipTNBwTBrq9+SIxvLbhWH8DzE4TxuezU1urSLxPQnLprU+bvgcEQUGybqCzmgh2mDDRmG9cYmVD4OkpiZC75sq+nSboxYB7ID8g==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=QrPUxMuXi/RjFfxc/22QD4eaL+xRixWb1SILwOaaUi0H5gNeZM1Tk5Lk5kJNzlRSxRQ5bKWyhJNcZsKXKLfAn7se4D8LGfsKgmkK6lyNLXrhZe4mDS9clqxMOKUOpRw0rReX7Y5b7wQ/sMflKmlUA0l2PDQj2/ytFHmFEjPUMEhl9PIQhLQeQFwOCXui2NDdWSzbZ7J7TitXtVkE/JbDqsCr2Pt59sRiOqyxWNo3ADz1Bg7EXmJ8oW0xEYj3odLBeuEboR/C1LzLZUtMog2GXHjfojjHgQ00QufAnFexqU4J2xC9O/Jg7j8UC8QJTl7k/pINaW95uETrwLuscADR3g==
- Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=amd.com header.i="@amd.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"
- Cc: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>, Community Manager <community.manager@xxxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, "Jan Beulich" <jbeulich@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, Roger Pau Monné <roger@xxxxxxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Andrii Sultanov <andriy.sultanov@xxxxxxxxxx>, Guillaume Thouvenin <guillaume.thouvenin@xxxxxxxxxx>, Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Oleksii Moisieiev <oleksii_moisieiev@xxxxxxxx>, Timothy Pearson <tpearson@xxxxxxxxxxxxxxxxxxxxx>, Alistair Francis <alistair.francis@xxxxxxx>, Connor Davis <connojdavis@xxxxxxxxx>, Teddy Astie <teddy.astie@xxxxxxxxxx>
- Delivery-date: Wed, 16 Sep 2026 14:39:45 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 11-Sep-26 14:47, Julian Vetter wrote:
> arch_sanitise_domain_config() validates the configuration requested by
> the toolstack, and should not fill anything in. The config struct passed
> to createdomain is supposed to be pure input. ARM used to abuse this
> (GIC_NATIVE resolution, now removed) to smuggle output back to the
> toolstack. Making the parameter const stops that type of abuse from
> happening on any architecture.
>
> The x86 implementation turned out to have its own instance of the same
> issue. It set XEN_DOMCTL_CDF_oos_off into config->flags for non-HVM
> guests. Since The sanitisation runs before the function domain_create()
> copies config->flags into d->options, this relied on mutating the
> toolstack's config to take effect. Move the default onto d->options
> directly in arch_domain_create() (which runs after d->options is
> populated), where all the remaining domain options are resolved. This
> has the same effect and no mutation of the input config is required.
>
> ARM, PPC and RISC-V need no equivalent change, Their implementations
> were already read-only.
>
> Signed-off-by: Julian Vetter <julian.vetter@xxxxxxxxxx>
> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx> # x86
Reviewed-by: Michal Orzel <michal.orzel@xxxxxxx>
~Michal
|