All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julien Grall <julien@xen.org>
To: Oleksii <oleksii.kurochko@gmail.com>, xen-devel@lists.xenproject.org
Cc: Stefano Stabellini <sstabellini@kernel.org>,
	Bertrand Marquis <bertrand.marquis@arm.com>,
	Volodymyr Babchuk <Volodymyr_Babchuk@epam.com>
Subject: Re: [PATCH v1] xen/arm: align *(.proc.info) in the linker script
Date: Thu, 2 Mar 2023 14:50:00 +0000	[thread overview]
Message-ID: <ab953ad7-0345-ce60-610d-02b6f4b26398@xen.org> (raw)
In-Reply-To: <472fee066070db9cb3c662bf5cc6f8cb681aeb1b.camel@gmail.com>

Hi Oleksii,

On 02/03/2023 07:34, Oleksii wrote:
> Hi Julien,
>>>> On Wed, 2023-03-01 at 16:21 +0000, Julien Grall wrote:
>>>>> Hi Oleksii,
>>>>>
>>>>> On 01/03/2023 16:14, Oleksii Kurochko wrote:
>>>>>> During testing of bug.h's macros generic implementation
>>>>>> yocto-
>>>>>> qemuarm
>>>>>> job crashed with data abort:
>>>>>
>>>>> The commit message is lacking some information. You are telling
>>>>> us
>>>>> that
>>>>> there is an error when building with your series, but this
>>>>> doesn't
>>>>> tell
>>>>> me why this is the correct fix.
>>>>>
>>>>> This is also why I asked to have the xen binary because I want
>>>>> to
>>>>> check
>>>>> whether this was a latent bug in Xen or your series effectively
>>>>> introduce a bug.
>>>>>
>>>>> Note that regardless what I just wrote this is a good idea to
>>>>> align
>>>>> __proc_info_start. I will try to have a closer look later and
>>>>> propose
>>>>> a
>>>>> commit message and/or any action for your other series.
>>>> Regarding binaries please take a look here:
>>>> https://lore.kernel.org/xen-devel/aa2862eacccfb0574859bf4cda8f4992baa5d2e1.camel@gmail.com/
>>>>
>>>> I am not sure if you get my answer as I had the message from
>>>> delivery
>>>> server that it was blocked for some reason.
>>>
>>> I got the answer. The problem now is gitlab only keep the artifact
>>> for
>>> the latest build and it only provide a zImage (having the ELF would
>>> be
>>> easier).
>>>
>>> I will try to reproduce the error on my end.
>>
>> I managed to reproduce it. It looks like that after your bug patch,
>> *(.rodata.*) will not be end on a 4-byte boundary. Before your patch,
>> all the messages will be in .rodata.str. Now they are in
>> .bug_frames.*,
>> so there some difference in .rodata.*.
>>
>> That said, it is not entirely clear why we never seen the issue
>> before
>> because my guessing there are no guarantee that .rodata.* will be
>> suitably aligned.
>>
>> Anyway, here a proposal for the commit message:
>>
>> "
>> xen/arm: Ensure the start *(.proc.info) of is 4-byte aligned
>>
>> The entries in *(.proc.info) are expected to be 4-byte aligned and
>> the
>> compiler will access them using 4-byte load instructions. On Arm32,
>> the
>> alignment is strictly enforced by the processor and will result to a
>> data abort if it is not correct.
>>
>> However, the linker script doesn't encode this requirement. So we are
>> at
>> the mercy of the compiler/linker to have aligned the previous
>> sections
>> suitably.
>>
>> This was spotted when trying to use the upcoming generic bug
>> infrastructure with the compiler provided by Yocto.
>>
>> Link:
>> https://lore.kernel.org/xen-devel/6735859208c6dcb7320f89664ae298005f70827b.camel@gmail.com/
>> "
>>
>> If you are happy with the proposed commit message, then I can update
>> it
>> while committing.
> I am happy with the proposed commit message.

Thanks. With that:

Reviewed-by: Julien Grall <jgrall@amazon.com>

I have addressed Jan's comment and committed the patch.

Cheers,

-- 
Julien Grall


  reply	other threads:[~2023-03-02 14:50 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-01 16:14 [PATCH v1] xen/arm: align *(.proc.info) in the linker script Oleksii Kurochko
2023-03-01 16:21 ` Julien Grall
2023-03-01 16:38   ` Oleksii
2023-03-01 17:50     ` Julien Grall
2023-03-01 20:38       ` Julien Grall
2023-03-02  7:34         ` Oleksii
2023-03-02 14:50           ` Julien Grall [this message]
2023-03-02 17:24             ` Oleksii
2023-03-02  9:45         ` Jan Beulich
2023-03-02 11:01           ` Julien Grall
2023-03-02 11:21             ` Jan Beulich
2023-03-02 12:51               ` Julien Grall

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=ab953ad7-0345-ce60-610d-02b6f4b26398@xen.org \
    --to=julien@xen.org \
    --cc=Volodymyr_Babchuk@epam.com \
    --cc=bertrand.marquis@arm.com \
    --cc=oleksii.kurochko@gmail.com \
    --cc=sstabellini@kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.