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

Re: [PATCH] x86/amd: Drop allow_unsafe parameter, tune down XSA-9 mitigations


  • To: Teddy Astie <teddy.astie@xxxxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Fri, 24 Apr 2026 11:05:56 +0200
  • 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=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=Ji1YEMzP233OD0vlz33sSjZWh80qoEbi1o+wqj7pvJA=; b=KBgbyHsT7OHyrWrt8jJPL+Y7MDhJOFQJJOoIGQxU9Yoq6CtuyVO/a/2rSmJyY188BleD4hE4R+YbbI6LE3pTkIxsj3RAW48G+zarbDqlDE5fyp8xl1UNtUKrj1gi4Sk6lXqBBufo6/oas4OrFSnxiOPHeUElvRUgx1Bhj+uc2+is/LctmBkMAAOAHg6CZNEEs0DgZ0nTEGrnhietpsRRS3C2DFNcbq9x8/FJFQLXdGJg9smtgVL3BZQ7Vunrp7jdv9nkA32XZ9KTCjJlmOWqzc82H7+ZCzMoV8hD0C/i/3QOuTlGWtg2jbaB4kk8NJKmi4zigPblntGAccC9mzhZbA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=KQ3L1jZ+PDTBouejRM/TChBS/XbKWhneAzw1g0o+SCXvIa4pBG0lOF2vYd6GAFBRhPF1WiMr+UdXeFBvdlIZ+hhLW9D+pAA+Ie+2UWGS/pGIJ6YZc+H8Xe84wgAuiye2QGDd9rLixmb2kDPhL2Gm5Dmfh1AulbYNvT+H5XWxvR6lQlwBPYgxyTStTxqX+Kza2Gc74THW8V+m3VhU0wB9/UjzbMm2IbEM9g6prEj4+SmeCFGgcg3AHrUF04k2nGU6opdXHRvRUjELfDHt/WbeV7Nq4URzBocOiM7MGERXPGjZRLUM9TKoaspGq9ZqqkFs0uL2mrurqCWgvPTq0GByQg==
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=citrix.com header.i="@citrix.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • Delivery-date: Fri, 24 Apr 2026 09:06:18 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Wed, Apr 22, 2026 at 06:58:06PM +0200, Teddy Astie wrote:
> XSA-9 mitigations prevents Xen from properly running if a affected CPU
> is detected. While the vulnerability has no mitigations (aside not running
> 64-bits PV guests), it's only outcome is a DoS.
> 
> There is no real point in preventing Xen from working here and it would
> be preferable to just log the vulnerability to the user so it can act
> appropriately.
> 
> Also reword the errata message regarding that it only affects PV64 guests.
> 
> Signed-off-by: Teddy Astie <teddy.astie@xxxxxxxxxx>
> ---
> It's hard to tell whether or not we would want to drop allow_unsafe, but
> currently, Xen is allowed to boot with XSA-304 mitigations disabled
> (intentionnaly) which has a similar outcome than this one.
> 
> From a user standpoint, preventing the system to boot or starting guests is
> too extreme and would be in practice seen as a bug, even if it's justified
> policy which can be overriden.
> 
>  docs/misc/xen-command-line.pandoc | 12 ------------
>  xen/arch/x86/cpu/amd.c            | 21 +++++----------------
>  xen/arch/x86/domain.c             | 14 --------------
>  xen/arch/x86/include/asm/amd.h    |  2 --
>  4 files changed, 5 insertions(+), 44 deletions(-)
> 
> diff --git a/docs/misc/xen-command-line.pandoc 
> b/docs/misc/xen-command-line.pandoc
> index 6c77129732..04d206f919 100644
> --- a/docs/misc/xen-command-line.pandoc
> +++ b/docs/misc/xen-command-line.pandoc
> @@ -133,18 +133,6 @@ resume.
>  `s3_mode` instructs Xen to set up the boot time (option `vga=`) video
>  mode during S3 resume.
>  
> -### allow_unsafe (x86)
> -> `= <boolean>`
> -
> -> Default: `false`
> -
> -Force boot on potentially unsafe systems. By default Xen will refuse
> -to boot on systems with the following errata:
> -
> -* AMD Erratum 121. Processors with this erratum are subject to a guest
> -  triggerable Denial of Service. Override only if you trust all of
> -  your PV guests.
> -
>  ### altp2m (Intel)
>  > `= <boolean>`
>  
> diff --git a/xen/arch/x86/cpu/amd.c b/xen/arch/x86/cpu/amd.c
> index 712734a6e7..f1f4a25754 100644
> --- a/xen/arch/x86/cpu/amd.c
> +++ b/xen/arch/x86/cpu/amd.c
> @@ -20,10 +20,6 @@
>  
>  #include "cpu.h"
>  
> -/* 1 = allow, 0 = don't allow guest creation, -1 = don't allow boot */
> -int8_t __read_mostly opt_allow_unsafe;
> -boolean_param("allow_unsafe", opt_allow_unsafe);
> -
>  /* Signal whether the ACPI C1E quirk is required. */
>  bool __read_mostly amd_acpi_c1e_quirk;
>  bool __ro_after_init amd_legacy_ssbd;
> @@ -1205,19 +1201,12 @@ static void cf_check init_amd(struct cpuinfo_x86 *c)
>       if (c->family == 0x10)
>               __clear_bit(X86_FEATURE_MONITOR, c->x86_capability);
>  
> -     if (!cpu_has_amd_erratum(c, AMD_ERRATUM_121))
> -             opt_allow_unsafe = 1;
> -     else if (opt_allow_unsafe < 0)
> -             panic("Xen will not boot on this CPU for security reasons"
> -                   "Pass \"allow_unsafe\" if you're trusting all your"
> -                   " (PV) guest kernels.\n");
> -     else if (!opt_allow_unsafe && c == &boot_cpu_data)
> +     if (cpu_has_amd_erratum(c, AMD_ERRATUM_121))
> +     {
>               printk(KERN_WARNING
> -                    "*** Xen will not allow creation of DomU-s on"
> -                    " this CPU for security reasons. ***\n"
> -                    KERN_WARNING
> -                    "*** Pass \"allow_unsafe\" if you're trusting"
> -                    " all your (PV) guest kernels. ***\n");
> +                        "*** This CPU is affected with erratum 121"
> +                        " 64-bits PV guests are able to cause a DoS (XSA-9) 
> ***\n");

We try to avoid splitting log messages, so that people can grep easily
for them.

I would also add a add_taint(TAINT_MACHINE_INSECURE); here.

I wonder however if an update of the advisory would also be needed, as
we are modifying the applied fix, and hence the text in the advisory
no longer matches the code in Xen.

Thanks, Roger.



 


Rackspace

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