linux-csky.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Fangrui Song <maskray@google.com>
To: Christophe Leroy <christophe.leroy@csgroup.eu>,
	Andy Lutomirski <luto@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Vincenzo Frascino <vincenzo.frascino@arm.com>
Cc: "linux-s390@vger.kernel.org" <linux-s390@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-csky@vger.kernel.org" <linux-csky@vger.kernel.org>,
	"linux-mips@vger.kernel.org" <linux-mips@vger.kernel.org>,
	"loongarch@lists.linux.dev" <loongarch@lists.linux.dev>,
	"linux-riscv@lists.infradead.org"
	<linux-riscv@lists.infradead.org>,
	"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH] vdso: Improve cmd_vdso_check to check all dynamic relocations
Date: Sun, 18 Dec 2022 10:31:39 -0800	[thread overview]
Message-ID: <CAFP8O3KZTkSbxXJ2yWt4w-F3xWHY_owCs03wN3Bhss57O-E_JQ@mail.gmail.com> (raw)
In-Reply-To: <3ec9737e-3d1a-c014-b91a-0e2d406a3b3d@csgroup.eu>

On Sun, Dec 4, 2022 at 8:58 AM Christophe Leroy
<christophe.leroy@csgroup.eu> wrote:
>
>
>
> Le 04/12/2022 à 05:50, Fangrui Song a écrit :
> > On Mon, Nov 14, 2022 at 4:46 PM Fangrui Song <maskray@google.com> wrote:
> >>
> >> On 2022-11-14, Christophe Leroy wrote:
> >>>
> >>>
> >>> Le 28/09/2022 à 07:25, Fangrui Song a écrit :
> >>>> On Sat, Sep 10, 2022 at 12:53 AM Fangrui Song <maskray@google.com> wrote:
> >>>>>
> >>>>> On 2022-08-30, Fangrui Song wrote:
> >>>>>> The actual intention is that no dynamic relocation exists. However, some
> >>>>>> GNU ld ports produce unneeded R_*_NONE. (If a port is not care enough to
> >>>>>> determine the exact .rel[a].dyn size, the trailing zeros become R_*_NONE
> >>>>>> relocations. E.g. powerpc64le ld as of 2.38 has the issue with
> >>>>>> defconfig.) R_*_NONE are generally no-op in the dynamic loaders. So just
> >>>>>> ignore them.
> >>>>>>
> >>>>>> With the change, we can remove ARCH_REL_TYPE_ABS. ARCH_REL_TYPE_ABS is a
> >>>>>> bit misnomer as ports may check RELAVETIVE/GLOB_DAT/JUMP_SLOT which are
> >>>>>> not called "absolute relocations". (The patch is motivated by the arm64
> >>>>>> port missing R_AARCH64_RELATIVE.)
> >>>>>>
> >>>>>> While here, replace "egrep" with "grep" as "egrep" is deprecated in GNU
> >>>>>> grep 3.7.
> >>>>>>
> >>>>>> Signed-off-by: Fangrui Song <maskray@google.com>
> >>>>>> ---
> >>>>>> [...]
> >>>>>>
> >>>>>
> >>>>> Ping.
> >>>>
> >>>> Ping^2 :)
> >>>
> >>> Can you explain which ARCH_REL_TYPE_ABS can be removed with this change ?
> >>> How is the verification done if ARCH_REL_TYPE_ABS is removed ?
> >>
> >> All ARCH_REL_TYPE_ABS relocation types can be removed. As explained, the
> >> real intention is to check no dynamic relocation, and this is done by
> >> the new
>
> Well, there was a typo in my question, I wanted to ask 'why', not 'which'.
>
> >>
> >>     cmd_vdso_check = if $(READELF) -rW $@ | grep -v _NONE | grep -q "R_\w*_"; \
> >>
> >> in this patch.
> >>
> >> grep -v _NONE is to work around some GNU ld ports (and likely older releases
> >> of some ports even if their latest versions are fixed) which produce
> >> unneeded R_*_NONE dynamic relocations.
> >
> > Ping :)
>
> Ok, that seems to work on powerpc.
>
> Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>

Thanks. Can a maintainer pick up this commit?

  reply	other threads:[~2022-12-18 18:34 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-30 19:37 [PATCH] vdso: Improve cmd_vdso_check to check all dynamic relocations Fangrui Song
2022-09-10  7:53 ` Fangrui Song
2022-09-28  5:25   ` Fangrui Song
2022-11-14 12:31     ` Christophe Leroy
2022-11-15  0:46       ` Fangrui Song
2022-12-04  4:50         ` Fangrui Song
2022-12-04 16:58           ` Christophe Leroy
2022-12-18 18:31             ` Fangrui Song [this message]
2022-12-21 23:51               ` [PATCH v2] " Fangrui Song
2022-12-29 16:22                 ` Palmer Dabbelt
2023-01-27 23:19                   ` Fangrui Song
2023-03-10 14:35                 ` Vincenzo Frascino
2023-03-10 19:10                   ` Fangrui Song

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=CAFP8O3KZTkSbxXJ2yWt4w-F3xWHY_owCs03wN3Bhss57O-E_JQ@mail.gmail.com \
    --to=maskray@google.com \
    --cc=christophe.leroy@csgroup.eu \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-csky@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=loongarch@lists.linux.dev \
    --cc=luto@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=vincenzo.frascino@arm.com \
    /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).