All the mail mirrored from 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: Jan Beulich <jbeulich@suse.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	Stefano Stabellini <sstabellini@kernel.org>,
	Gianluca Guida <gianluca@rivosinc.com>,
	Bertrand Marquis <bertrand.marquis@arm.com>,
	Volodymyr Babchuk <Volodymyr_Babchuk@epam.com>
Subject: Re: [PATCH v3 3/4] xen/arm: switch ARM to use generic implementation of bug.h
Date: Wed, 1 Mar 2023 09:31:13 +0000	[thread overview]
Message-ID: <538020a3-07d2-391b-0fcc-4e4b4902d2f7@xen.org> (raw)
In-Reply-To: <a2980d855cb11e447a794725163ff120d38fc127.camel@gmail.com>

Hi,

On 01/03/2023 08:58, Oleksii wrote:
> On Tue, 2023-02-28 at 17:48 +0000, Julien Grall wrote:
>> Hi Oleksii,
>>
>> On 28/02/2023 15:09, Oleksii wrote:
>>> On Sat, 2023-02-25 at 16:49 +0000, Julien Grall wrote:
>>>> Hi Oleksii,
>>>>
>>>> On 24/02/2023 11:31, Oleksii Kurochko wrote:
>>>>> The following changes were made:
>>>>> * make GENERIC_BUG_FRAME mandatory for ARM
>>>>
>>>> I have asked in patch #1 but will ask it again because I think
>>>> this
>>>> should be recorded in the commit message. Can you outline why it
>>>> is
>>>> not
>>>> possible to completely switch to the generic version?
>>> I haven't tried to switch ARM too because of comment regarding 'i'
>>> in
>>> <asm/bug.h>:
>>> /*
>>>    * GCC will not allow to use "i"  when PIE is enabled (Xen doesn't
>>> set
>>> the
>>>    * flag but instead rely on the default value from the compiler).
>>> So
>>> the
>>>    * easiest way to implement run_in_exception_handler() is to pass
>>> the
>>> to
>>>    * be called function in a fixed register.
>>>    */
>>
>> I would expect this comment to be valid for any arch. So if there is
>> a
>> need to deal with PIE, then we would not be able to use "i" in the
>> BUG
>> frame.
>>
>> Note that we are now explicitly compiling Xen without PIE (see
>> Config.mk).
> Then it looks like some architectures isn't expected to be compiled
> with PIE. I mean that x86's bug.h is used 'i' and there is no any
> alternative version in case of PIE.
> 
> If Xen should be compilable with PIE then we have to use ARM
> implementation of bug.h everywhere. ( based on comment about 'i' with
> PIE ).

The comment was added because until commit ecd6b9759919 ("Config.mk: 
correct PIE-related option(s) in EMBEDDED_EXTRA_CFLAGS") we would let 
the compiler to decide whether PIE should be enabled.

Now we are forcing -fno-pie for Xen on any architecture (the flag is 
added at the top-level in Config.mk).

> 
> Now I am totally confused...

My point was not about using the Arm implementation everywhere. My point 
was that we disable even for Arm and therefore it is fine to use the 
common version.

If in the future we need to support PIE in Xen (I am not aware of any 
effort yet), then we could decide to update the common BUG framework. 
But for now, I don't think this is something you need to care in your 
series.

Cheers,

-- 
Julien Grall


  reply	other threads:[~2023-03-01  9:31 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-24 11:31 [PATCH v3 0/4] introduce generic implementation of macros from bug.h Oleksii Kurochko
2023-02-24 11:31 ` [PATCH v3 1/4] xen: introduce CONFIG_GENERIC_BUG_FRAME Oleksii Kurochko
2023-02-25 16:42   ` Julien Grall
2023-02-27  9:48     ` Jan Beulich
2023-02-28 17:21     ` Oleksii
2023-02-28 18:01       ` Julien Grall
2023-02-28 20:24         ` Oleksii
2023-02-27 14:23   ` Jan Beulich
2023-02-28 10:30     ` Oleksii
2023-02-28 10:42       ` Jan Beulich
2023-02-24 11:31 ` [PATCH v3 2/4] xen: change <asm/bug.h> to <xen/bug.h> Oleksii Kurochko
2023-02-25 16:47   ` Julien Grall
2023-02-28 12:38     ` Oleksii
2023-02-28 14:04       ` Julien Grall
2023-02-28 13:07     ` Oleksii
2023-02-28 13:30       ` Jan Beulich
2023-02-28 16:00         ` Oleksii
2023-02-27 14:29   ` Jan Beulich
2023-02-28 13:14     ` Oleksii
2023-02-24 11:31 ` [PATCH v3 3/4] xen/arm: switch ARM to use generic implementation of bug.h Oleksii Kurochko
2023-02-25 16:49   ` Julien Grall
2023-02-25 17:05     ` Julien Grall
2023-02-28 17:21       ` Oleksii
2023-02-28 17:57         ` Julien Grall
2023-03-01 12:31           ` Oleksii
2023-03-01 13:58             ` Julien Grall
2023-03-01 15:16               ` Oleksii
2023-03-01 15:21                 ` Julien Grall
2023-03-01 15:28                   ` Oleksii
2023-03-01 15:58                   ` Oleksii
2023-02-28 15:09     ` Oleksii
2023-02-28 17:48       ` Julien Grall
2023-03-01  8:58         ` Oleksii
2023-03-01  9:31           ` Julien Grall [this message]
2023-03-01 12:33             ` Oleksii
2023-02-24 11:31 ` [PATCH v3 4/4] xen/x86: switch x86 to use generic implemetation " Oleksii Kurochko
2023-02-27 14:46   ` Jan Beulich
2023-02-28 16:28     ` Oleksii
2023-02-28 16:36       ` 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=538020a3-07d2-391b-0fcc-4e4b4902d2f7@xen.org \
    --to=julien@xen.org \
    --cc=Volodymyr_Babchuk@epam.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=bertrand.marquis@arm.com \
    --cc=gianluca@rivosinc.com \
    --cc=jbeulich@suse.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.