From: Andreas Schwab <schwab@linux-m68k.org>
To: Alexandre Ghiti <alex@ghiti.fr>
Cc: Albert Ou <aou@eecs.berkeley.edu>,
Alexandre Ghiti <alexghiti@rivosinc.com>,
linux-kernel@vger.kernel.org, Palmer Dabbelt <palmer@dabbelt.com>,
Nicholas Piggin <npiggin@gmail.com>,
Paul Walmsley <paul.walmsley@sifive.com>,
linux-riscv@lists.infradead.org, linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH v8 1/3] riscv: Introduce CONFIG_RELOCATABLE
Date: Fri, 19 May 2023 23:48:59 +0200 [thread overview]
Message-ID: <87sfbsvvp0.fsf@igel.home> (raw)
In-Reply-To: <6fc7f0e1-0dde-9b41-0d60-6b0bd65bb630@ghiti.fr> (Alexandre Ghiti's message of "Fri, 19 May 2023 13:08:12 +0200")
On Mai 19 2023, Alexandre Ghiti wrote:
> I have tested the following patch successfully, can you give it a try
> while I make sure this is the only place I forgot to add the -fno-pie
> flag?
>
> diff --git a/arch/riscv/kernel/Makefile b/arch/riscv/kernel/Makefile
> index fbdccc21418a..153864e4f399 100644
> --- a/arch/riscv/kernel/Makefile
> +++ b/arch/riscv/kernel/Makefile
> @@ -23,6 +23,10 @@ ifdef CONFIG_FTRACE
> CFLAGS_REMOVE_alternative.o = $(CC_FLAGS_FTRACE)
> CFLAGS_REMOVE_cpufeature.o = $(CC_FLAGS_FTRACE)
> endif
> +ifdef CONFIG_RELOCATABLE
> +CFLAGS_alternative.o += -fno-pie
> +CFLAGS_cpufeature.o += -fno-pie
> +endif
> ifdef CONFIG_KASAN
> KASAN_SANITIZE_alternative.o := n
> KASAN_SANITIZE_cpufeature.o := n
I can confirm that this fixes the crash.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."
next prev parent reply other threads:[~2023-05-19 21:49 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-15 14:36 [PATCH v8 0/3] Introduce 64b relocatable kernel Alexandre Ghiti
2023-02-15 14:36 ` [PATCH v8 1/3] riscv: Introduce CONFIG_RELOCATABLE Alexandre Ghiti
2023-02-22 12:29 ` Alexandre Ghiti
2023-02-24 15:58 ` Björn Töpel
2023-03-22 18:25 ` Nick Desaulniers
2023-03-23 20:01 ` Fangrui Song
2023-03-24 10:34 ` Alexandre Ghiti
2023-03-22 13:38 ` Alexandre Ghiti
2023-05-09 19:07 ` Andreas Schwab
2023-05-09 19:55 ` Alexandre Ghiti
2023-05-11 18:18 ` Andreas Schwab
2023-05-12 18:41 ` Palmer Dabbelt
2023-05-19 11:08 ` Alexandre Ghiti
2023-05-19 21:48 ` Andreas Schwab [this message]
2023-05-19 21:55 ` Palmer Dabbelt
2023-05-22 10:48 ` Alexandre Ghiti
2023-02-15 14:36 ` [PATCH v8 2/3] powerpc: Move script to check relocations at compile time in scripts/ Alexandre Ghiti
2023-02-15 14:36 ` [PATCH v8 3/3] riscv: Check relocations at compile time Alexandre Ghiti
2023-02-20 9:14 ` [PATCH v8 0/3] Introduce 64b relocatable kernel Björn Töpel
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=87sfbsvvp0.fsf@igel.home \
--to=schwab@linux-m68k.org \
--cc=alex@ghiti.fr \
--cc=alexghiti@rivosinc.com \
--cc=aou@eecs.berkeley.edu \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=npiggin@gmail.com \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.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).