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: Thu, 20 Jun 2019 13:24:03 +0100 [thread overview]
Message-ID: <74705f1c-d0ac-27fd-3c88-a58adfcec81d@arm.com> (raw)
In-Reply-To: <5cb62752-e2a1-444e-e3e4-98b25dcfb626@citrix.com>
Hi Andrew,
On 6/19/19 10:48 PM, Andrew Cooper wrote:
> On 19/06/2019 22:28, Julien Grall wrote:
>> 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.
>
> What alternative do you propose then, because having infrastructure that
> gives the illusion of exception recovery working is a far worse option
> than deviating from Linux.
I learnt the hard way before that trying to adapt a Linux file to Xen
makes very difficult to keep track what's going on.
So my preference here is to just disable the section if they exists.
>>
>> [...]
>>
>>> 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).
>
> These both need to be PAGE_SIZE, or .data.page_aligned can end up having
> problems.
Good point, I missed the .data.page_aligned.
Cheers,
--
Julien Grall
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
next prev parent reply other threads:[~2019-06-20 12:24 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
2019-06-19 21:48 ` Andrew Cooper
2019-06-20 12:24 ` Julien Grall [this message]
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=74705f1c-d0ac-27fd-3c88-a58adfcec81d@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).