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

Re: [PATCH] xen/link: Don't separate .data.read_mostly from .data


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • From: Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Date: Fri, 13 Nov 2026 01:38:42 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=epam.com; dmarc=pass action=none header.from=epam.com; dkim=pass header.d=epam.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=txOHt7D5DftPVBdrOiU0NTTUYvT4sKIbzoMy5zDrbMk=; b=CvWnDYnZ79TzyKyI35F/T8BFuI5Z3kuaXbBBMB2rs/q0YUMbwbAq1fAx4DBDzLEw93HDToCUr51l5bjr1uSSKgZx9aXUMfb8cwatv4RHxwcstliyTh0f4bVPpYTR3Ekkm8qqG++2/qDi2r/uuVKR2vl0VzQEXDKBcLd86DumKlAPd+8nb6HNlX7+DK3S54siHnx3QONE58vEXt2392RBVZvy36haEGAVvuhZ6w/MMMAgiQQH9xKva2gG6wJNajrSfMSpafSzMjHnuzEvok7AYgVxBNBlGZ+Iyonre8Yp1V1OOMTnlLFsAHasIWFIxa5UnQYoQY8Fc0rrgHnc3A+96Q==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=vuoBxqNrLe2XNy5jDrNcgvHOKYn526ulmHjF8vZHX38LjzOy/F6eM3jOXTKy5eWD1FneBQTnpgTAX9SaWnJkMDyKhYDXeuQoQBtAFzV/7DwwRX3hJ+/Egr2UQ8eh59Ob0f6yP7nzUzhe/KqGrlCYP7Gs1++lGACXg0Jzu9UFZnmDF6kUTe7E8ivJ37jf4UGNLUigQwRU3v/I4socLTFrhdOe4mttcI7pBywDTkheAPURlA3xaDyimf+FuEcr45bjnvBH7y74Cy67BeUFKJ5Vs/YtNmKgetwfn/owk+g1mCWLEWTf9lwGFbwcjQlsdxE6Dq+rBSa9SN6BDLQbzzKE3g==
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=epam.com header.i="@epam.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:x-ms-exchange-senderadcheck"
  • Authentication-results: mx.microsoft.com 1; dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=epam.com;
  • Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Roger Pau Monné <roger@xxxxxxxxxxxxxx>, Teddy Astie <teddy.astie@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>, Baptiste Le Duc <baptiste.le-duc@xxxxxxxxxx>, Timothy Pearson <tpearson@xxxxxxxxxxxxxxxxxxxxx>, Ross Lagerwall <ross.lagerwall@xxxxxxxxxx>
  • Delivery-date: Fri, 13 Nov 2026 01:38:54 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHdctfhcr4bwV693ke06QHWrVIraQ==
  • Thread-topic: [PATCH] xen/link: Don't separate .data.read_mostly from .data

Hi Andrew,

Andrew Cooper <andrew.cooper3@xxxxxxxxxx> writes:

> This appears to be an error in x86 which got copied into all other
> architectures.  .data.read_mostly is an internal detail, and none of the
> similar sections get exposed externally.
>
> Simply place .data.read_mostly in .data.
>
> No functional change.
>
> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
> ---
> CC: Jan Beulich <jbeulich@xxxxxxxx>
> CC: Roger Pau Monné <roger@xxxxxxxxxxxxxx>
> CC: Teddy Astie <teddy.astie@xxxxxxxxxx>
> CC: Stefano Stabellini <sstabellini@xxxxxxxxxx>
> CC: Julien Grall <julien@xxxxxxx>
> CC: Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
> CC: Bertrand Marquis <bertrand.marquis@xxxxxxx>
> CC: Michal Orzel <michal.orzel@xxxxxxx>
> CC: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>
> CC: Baptiste Le Duc <baptiste.le-duc@xxxxxxxxxx>
> CC: Timothy Pearson <tpearson@xxxxxxxxxxxxxxxxxxxxx>
> CC: Ross Lagerwall <ross.lagerwall@xxxxxxxxxx>
>
> This is to simplfy the script checking that xen.efi's section
> attributes/alignments are correct for UEFI SecureBoot.
> ---
>  xen/arch/arm/xen.lds.S   | 8 +++-----
>  xen/arch/ppc/xen.lds.S   | 8 +++-----
>  xen/arch/riscv/xen.lds.S | 7 ++-----
>  xen/arch/x86/xen.lds.S   | 4 +---
>  4 files changed, 9 insertions(+), 18 deletions(-)
>
> diff --git a/xen/arch/arm/xen.lds.S b/xen/arch/arm/xen.lds.S
> index d1bb6c62d208..8d0954c90afd 100644
> --- a/xen/arch/arm/xen.lds.S
> +++ b/xen/arch/arm/xen.lds.S
> @@ -86,16 +86,14 @@ SECTIONS
>        __ro_after_init_end = .;
>    } : text
>  
> -  .data.read_mostly : {
> -       *(.data.read_mostly)
> -  } :text
> -
>    . = ALIGN(SMP_CACHE_BYTES);
>    .data : {                    /* Data */
> -       *(.data.page_aligned)
> +       *(.data.read_mostly)
>  
>         HYPFS_PARAM
>  
> +       *(.data.page_aligned)

A small question: why are you moving data.page_aligned? I don't think
that this can cause issues, but I want to understand the reason.

> +
>         *(.data .data.*)
>         CONSTRUCTORS
>    } :text
> diff --git a/xen/arch/ppc/xen.lds.S b/xen/arch/ppc/xen.lds.S
> index cddb70855307..b2159279169c 100644
> --- a/xen/arch/ppc/xen.lds.S
> +++ b/xen/arch/ppc/xen.lds.S
> @@ -77,16 +77,14 @@ SECTIONS
>          __ro_after_init_end = .;
>      } :text
>  
> -    DECL_SECTION(.data.read_mostly) {
> -        *(.data.read_mostly)
> -    } :text
> -
>      . = ALIGN(PAGE_SIZE);
>      DECL_SECTION(.data) {                    /* Data */
> -        *(.data.page_aligned)
> +        *(.data.read_mostly)
>  
>          HYPFS_PARAM
>  
> +        *(.data.page_aligned)
> +
>          *(.data .data.*)
>          CONSTRUCTORS
>      } :text
> diff --git a/xen/arch/riscv/xen.lds.S b/xen/arch/riscv/xen.lds.S
> index 250ee3f36f4f..d1c5ce59c90d 100644
> --- a/xen/arch/riscv/xen.lds.S
> +++ b/xen/arch/riscv/xen.lds.S
> @@ -84,16 +84,13 @@ SECTIONS
>          __ro_after_init_end = .;
>      } : text
>  
> -    .data.read_mostly : {
> -        *(.data.read_mostly)
> -    } :text
> -
>      . = ALIGN(PAGE_SIZE);
>      .data : {                    /* Data */
> -        *(.data.page_aligned)
> +        *(.data.read_mostly)
>  
>          HYPFS_PARAM
>  
> +        *(.data.page_aligned)
>          *(.sdata .sdata.*)
>          *(.data .data.*)
>          CONSTRUCTORS
> diff --git a/xen/arch/x86/xen.lds.S b/xen/arch/x86/xen.lds.S
> index 925848980219..99802aed4e13 100644
> --- a/xen/arch/x86/xen.lds.S
> +++ b/xen/arch/x86/xen.lds.S
> @@ -295,13 +295,11 @@ SECTIONS
>  
>    __2M_rwdata_start = .;       /* Start of 2M superpages, mapped RW. */
>    . = ALIGN(SMP_CACHE_BYTES);
> -  DECL_SECTION(.data.read_mostly) {
> +  DECL_SECTION(.data) {
>         *(.data.read_mostly)
>  
>         HYPFS_PARAM
> -  } PHDR(text)
>  
> -  DECL_SECTION(.data) {
>         *(.data.page_aligned)
>         *(.data .data.*)
>    } PHDR(text)
>
> base-commit: 4263fe42b736596cfa5bfec661f2f55f02759aa7
> prerequisite-patch-id: 680071148129321ffaf7bd7435d031904014f556

-- 
WBR, Volodymyr

 


Rackspace

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