archive mirror
 help / color / mirror / Atom feed
From: Philipp Rudo <>
To: Alexander Egorenkov <>
Subject: Re: [PATCH 1/1] s390/kexec: handle R_390_PLT32DBL reloc entries in arch_kexec_do_relocs()
Date: Thu, 9 Dec 2021 12:00:37 +0100	[thread overview]
Message-ID: <20211209120037.050e3db1@rhtmp> (raw)
In-Reply-To: <>

Hi Alexander,

On Wed, 08 Dec 2021 18:42:05 +0100
Alexander Egorenkov <> wrote:

> Hi Philipp,
> Philipp Rudo <> writes:
> > Hi Alexander,
> >
> > thanks for taking care of this so fast!
> >
> > My personal approach was slightly different (see below). The idea
> > behind this was that arch_kexec_do_relocs is also used by others which
> > might have a PLT. For them your approach would mean an ABI breakage. On
> > the other hand in case the other users have the same problem they would
> > need to handle it for themselves. Not sure what's the better approach.
> >  
> I'm also fine with your proposal for the fix.
> If i'm not mistaken, arch_kexec_do_relocs() is used in decompressor and
> for purgatory at the moment, and both should have all relocs resolved.
> Do we have more users of arch_kexec_do_relocs() ? That was the reason i
> added the fix to arch_kexec_do_relocs().

no, there are no other users of arch_kexec_do_relocs other than
kexec_file and kaslr at the moment.

From a technical perspective your patch was totally fine for todays
use cases. My concern was more for a potential future user. But maybe I
was a little bit overcautious... 

> Now i'm actually wondering why we don't have any issues with
> decompressor, probably because we do the final link where all
> PLT-relative addresses are fixed. Because i see plenty of R_390_PLT32DBL
> in startup.o e.g.

IIUC, the culprit is the '-r' option in the LDFLAGS. With this option
the output can be used again as input _for ld_. The way I interpret
this is that ld can (and apparently does) use any internal convention
without complying with the ABI when this option is given.

kaslr doesn't use '-r' but a combination of -fPIE (CFLAGS) and -pie
(LDFLAGS) so they are not affected by ld's internal behavior. Maybe
it's worth investigating in the long run if the purgatory could be build
with -fPIE/-pie as well.


      reply	other threads:[~2021-12-09 11:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-08 10:58 Alexander Egorenkov
2021-12-08 13:59 ` Philipp Rudo
2021-12-08 17:42   ` Alexander Egorenkov
2021-12-09 11:00     ` Philipp Rudo [this message]

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:

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

  git send-email \
    --in-reply-to=20211209120037.050e3db1@rhtmp \ \ \ \ \ \
    --subject='Re: [PATCH 1/1] s390/kexec: handle R_390_PLT32DBL reloc entries in arch_kexec_do_relocs()' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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