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

Re: [PATCH v3 3/4] xen/arm: switch ARM to use generic implementation of bug.h



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 ).

Now I am totally confused...

~ Oleksii



 


Rackspace

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