xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@arm.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>,
	Xen-devel <xen-devel@lists.xenproject.org>
Cc: "Stefano Stabellini" <sstabellini@kernel.org>,
	"Wei Liu" <wl@xen.org>, "Jan Beulich" <JBeulich@suse.com>,
	"Roger Pau Monné" <roger.pau@citrix.com>
Subject: Re: [Xen-devel] [PATCH 3/4] xen/link: Fold .data.read_mostly into .data
Date: Wed, 19 Jun 2019 22:28:45 +0100	[thread overview]
Message-ID: <3e5cb174-d83f-e1a1-1d6e-4e0073fa9956@arm.com> (raw)
In-Reply-To: <1560975087-25632-4-git-send-email-andrew.cooper3@citrix.com>



On 6/19/19 9:11 PM, Andrew Cooper wrote:
> .data.read_mostly only needs separating from adjacent data by one cache line
> to be effective, and placing it adjacent to .data.page_aligned fulfills this
> requirement.
> 
> For ARM, .ex_table appears to be a vestigial remnant.  Nothing in the
> resulting build ever inspects or acts on the contents of the table.  The arm32
> build does however have some assembly routines which fill .ex_table.
> 
> Drop all of ARM's .ex_table infrastructure, to reduce the size of the compiled
> binary, and avoid giving the illusion of exception handling working.

I am not in favor of this change. assembler.h is meant to be a verbatim 
copy of the Linux counterpart.

[...]

> diff --git a/xen/arch/arm/xen.lds.S b/xen/arch/arm/xen.lds.S
> index 2b44e5d..3dc5117 100644
> --- a/xen/arch/arm/xen.lds.S
> +++ b/xen/arch/arm/xen.lds.S
> @@ -94,27 +94,13 @@ SECTIONS
>     _erodata = .;                /* End of read-only data */
>   
>     .data : {                    /* Data */
> +       *(.data.read_mostly)

Before, .data.read_mostly was SMP_CACHE_BYTES aligned. Now, it seems 
there are no alignment.

This may end up to have _erodata and .data.read_mostly to be part of the 
same page. As Arm enforce read-only, you may crash on access to 
.data.read_mostly.

So I think you have
. = ALIGN(PAGE_SIZE)
*(.data.read_mostly)
.align(SMP_CACHE_BYTES).

Cheers,

-- 
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  reply	other threads:[~2019-06-19 21:29 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-19 20:11 [Xen-devel] [PATCH 0/4] xen/link: Fixes and improvements to Xen's linking Andrew Cooper
2019-06-19 20:11 ` [Xen-devel] [PATCH 1/4] xen/link: Cope with .rodata.cst* sections Andrew Cooper
2019-06-19 21:18   ` Julien Grall
2019-06-20  8:26     ` Roger Pau Monné
2019-06-21  9:05   ` Jan Beulich
2019-06-19 20:11 ` [Xen-devel] [PATCH 2/4] xen/link: Link .data.schedulers and CONSTRUCTERS in more appropriate locations Andrew Cooper
2019-06-19 21:21   ` Julien Grall
2019-06-20  8:40   ` Roger Pau Monné
2019-06-20 12:34     ` Andrew Cooper
2019-06-21  9:14   ` Jan Beulich
2019-06-19 20:11 ` [Xen-devel] [PATCH 3/4] xen/link: Fold .data.read_mostly into .data Andrew Cooper
2019-06-19 21:28   ` Julien Grall [this message]
2019-06-19 21:48     ` Andrew Cooper
2019-06-20 12:24       ` Julien Grall
2019-06-21  9:24   ` Jan Beulich
2019-06-19 20:11 ` [Xen-devel] [PATCH 4/4] xen/link: Misc cleanup Andrew Cooper
2019-06-19 21:30   ` Julien Grall
2019-06-19 21:38     ` Andrew Cooper
2019-06-20 12:29       ` Julien Grall
2019-06-20  8:43   ` Roger Pau Monné
2019-06-21  9:34   ` Jan Beulich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3e5cb174-d83f-e1a1-1d6e-4e0073fa9956@arm.com \
    --to=julien.grall@arm.com \
    --cc=JBeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=roger.pau@citrix.com \
    --cc=sstabellini@kernel.org \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).