Linux-S390 Archive mirror
 help / color / mirror / Atom feed
From: Heiko Carstens <hca@linux.ibm.com>
To: Sumanth Korikkar <sumanthk@linux.ibm.com>
Cc: Josh Poimboeuf <jpoimboe@kernel.org>,
	gor@linux.ibm.com, kernel test robot <lkp@intel.com>,
	s-vadapalli@ti.com, r-gunasekaran@ti.com, rogerq@kernel.org,
	oe-kbuild-all@lists.linux.dev, linux-s390@vger.kernel.org,
	iii@linux.ibm.com, agordeev@linux.ibm.com, davem@davemloft.net,
	naresh.kamboju@linaro.org
Subject: Re: [s390:features 97/98] Unsupported relocation type: 21
Date: Thu, 7 Mar 2024 17:13:56 +0100	[thread overview]
Message-ID: <20240307161356.33873-D-hca@linux.ibm.com> (raw)
In-Reply-To: <ZenfbNt966EMJcsY@li-2b55cdcc-350b-11b2-a85c-a78bff51fc11.ibm.com>

On Thu, Mar 07, 2024 at 04:38:20PM +0100, Sumanth Korikkar wrote:
> From d6641b8492ade37709a7099cea0ef71f29d062d0 Mon Sep 17 00:00:00 2001
> From: Sumanth Korikkar <sumanthk@linux.ibm.com>
> Date: Thu, 7 Mar 2024 09:46:11 +0100
> Subject: [PATCH] s390/tools: handle rela R_390_GOTPCDBL/R_390_GOTOFF64
> 
> lkp test robot reported unhandled relocation type: R_390_GOTPCDBL, when
> kernel is built with -fno-PIE. relocs tool reads vmlinux and handles
> absolute relocations.  PC relative relocs doesn't need adjustment.
> 
> Also, the R_390_GOTPCDBL/R_390_GOTOFF64 relocations are present
> currently only when KASAN is enabled.
> 
> The following program can create a R_390_GOTPCDBL/R_390_GOTOFF64 reloc
> (with fPIE/fPIC).
> 
> void funcb(int *b) {
>   *b = *b + 100;
> }
> 
> void gen_gotoff(void)
> {
>   int b = 10;
>   funcb (&b);
> }
> 
> gcc -c sample.c -fPIC -fsanitize=kernel-address --param asan-stack=1
> 
> The above example (built with -fPIC) was linked to one of the
> built-in.a (built with -fno-PIE) and checked for correctness with kaslr
> enabled. Both the relocs turns out relative and can be skipped.
> 
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202402221404.T2TGs8El-lkp@intel.com/
> Fixes: 55dc65b46023 ("s390: add relocs tool")
> Signed-off-by: Sumanth Korikkar <sumanthk@linux.ibm.com>
> ---
>  arch/s390/tools/relocs.c | 2 ++
>  1 file changed, 2 insertions(+)

Applied, thanks!

      parent reply	other threads:[~2024-03-07 16:14 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-22  6:42 [s390:features 97/98] Unsupported relocation type: 21 kernel test robot
2024-02-22 17:37 ` Josh Poimboeuf
2024-02-23  9:50   ` Yujie Liu
2024-02-23 10:03 ` Sumanth Korikkar
2024-02-23 10:19   ` Sumanth Korikkar
2024-02-23 23:59   ` Josh Poimboeuf
2024-02-26 10:54     ` Sumanth Korikkar
2024-02-26 12:55       ` Sumanth Korikkar
2024-03-07 15:28         ` Sumanth Korikkar
2024-03-07 15:38         ` Sumanth Korikkar
2024-03-07 15:52           ` Vasily Gorbik
2024-03-07 16:13           ` Heiko Carstens [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:
  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=20240307161356.33873-D-hca@linux.ibm.com \
    --to=hca@linux.ibm.com \
    --cc=agordeev@linux.ibm.com \
    --cc=davem@davemloft.net \
    --cc=gor@linux.ibm.com \
    --cc=iii@linux.ibm.com \
    --cc=jpoimboe@kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=naresh.kamboju@linaro.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=r-gunasekaran@ti.com \
    --cc=rogerq@kernel.org \
    --cc=s-vadapalli@ti.com \
    --cc=sumanthk@linux.ibm.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 read-only IMAP folder(s) and NNTP newsgroup(s).