Re: [PATCH v8 1/3] riscv: Introduce CONFIG_RELOCATABLE

2023-05-22 Thread Alexandre Ghiti
On 19/05/2023 23:55, Palmer Dabbelt wrote: On Fri, 19 May 2023 14:48:59 PDT (-0700), sch...@linux-m68k.org wrote: 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

Re: [PATCH v8 1/3] riscv: Introduce CONFIG_RELOCATABLE

2023-05-19 Thread Palmer Dabbelt
On Fri, 19 May 2023 14:48:59 PDT (-0700), sch...@linux-m68k.org wrote: 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/Makefil

Re: [PATCH v8 1/3] riscv: Introduce CONFIG_RELOCATABLE

2023-05-19 Thread Andreas Schwab
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

Re: [PATCH v8 1/3] riscv: Introduce CONFIG_RELOCATABLE

2023-05-19 Thread Alexandre Ghiti
On 5/11/23 20:18, Andreas Schwab wrote: On Mai 09 2023, Alexandre Ghiti wrote: On 5/9/23 21:07, Andreas Schwab wrote: That does not work with UEFI booting: Loading Linux 6.4.0-rc1-1.g668187d-default ... Loading initial ramdisk ... Unhandled exception: Instruction access fault EPC: 800

Re: [PATCH v8 1/3] riscv: Introduce CONFIG_RELOCATABLE

2023-05-12 Thread Palmer Dabbelt
On Thu, 11 May 2023 11:18:23 PDT (-0700), sch...@linux-m68k.org wrote: On Mai 09 2023, Alexandre Ghiti wrote: On 5/9/23 21:07, Andreas Schwab wrote: That does not work with UEFI booting: Loading Linux 6.4.0-rc1-1.g668187d-default ... Loading initial ramdisk ... Unhandled exception: Instructio

Re: [PATCH v8 1/3] riscv: Introduce CONFIG_RELOCATABLE

2023-05-11 Thread Andreas Schwab
On Mai 09 2023, Alexandre Ghiti wrote: > On 5/9/23 21:07, Andreas Schwab wrote: >> That does not work with UEFI booting: >> >> Loading Linux 6.4.0-rc1-1.g668187d-default ... >> Loading initial ramdisk ... >> Unhandled exception: Instruction access fault >> EPC: 80016d56 RA: 8020334

Re: [PATCH v8 1/3] riscv: Introduce CONFIG_RELOCATABLE

2023-05-09 Thread Alexandre Ghiti
On 5/9/23 21:07, Andreas Schwab wrote: That does not work with UEFI booting: Loading Linux 6.4.0-rc1-1.g668187d-default ... Loading initial ramdisk ... Unhandled exception: Instruction access fault EPC: 80016d56 RA: 8020334e TVAL: 007f80016d56 EPC: 002d1d56 RA: 00

Re: [PATCH v8 1/3] riscv: Introduce CONFIG_RELOCATABLE

2023-05-09 Thread Andreas Schwab
That does not work with UEFI booting: Loading Linux 6.4.0-rc1-1.g668187d-default ... Loading initial ramdisk ... Unhandled exception: Instruction access fault EPC: 80016d56 RA: 8020334e TVAL: 007f80016d56 EPC: 002d1d56 RA: 004be34e reloc adjusted Unhandled excep

Re: [PATCH v8 1/3] riscv: Introduce CONFIG_RELOCATABLE

2023-03-24 Thread Alexandre Ghiti
Hi Nick, On 3/22/23 19:25, Nick Desaulniers wrote: On Fri, Feb 24, 2023 at 7:58 AM Björn Töpel wrote: Alexandre Ghiti writes: +cc linux-kbuild, llvm, Nathan, Nick On 2/15/23 15:36, Alexandre Ghiti wrote: From: Alexandre Ghiti I tried a lot of things, but I struggle to understand, does

Re: [PATCH v8 1/3] riscv: Introduce CONFIG_RELOCATABLE

2023-03-23 Thread Fangrui Song
On Wed, Mar 22, 2023 at 11:26 AM Nick Desaulniers wrote: > > On Fri, Feb 24, 2023 at 7:58 AM Björn Töpel wrote: > > > > Alexandre Ghiti writes: > > > > > +cc linux-kbuild, llvm, Nathan, Nick > > > > > > On 2/15/23 15:36, Alexandre Ghiti wrote: > > >> From: Alexandre Ghiti > > >> > > > I tried a

Re: [PATCH v8 1/3] riscv: Introduce CONFIG_RELOCATABLE

2023-03-22 Thread Nick Desaulniers
On Fri, Feb 24, 2023 at 7:58 AM Björn Töpel wrote: > > Alexandre Ghiti writes: > > > +cc linux-kbuild, llvm, Nathan, Nick > > > > On 2/15/23 15:36, Alexandre Ghiti wrote: > >> From: Alexandre Ghiti > >> > > I tried a lot of things, but I struggle to understand, does anyone have > > any idea? FYI

Re: [PATCH v8 1/3] riscv: Introduce CONFIG_RELOCATABLE

2023-03-22 Thread Alexandre Ghiti
@linux-kbuild: Does anyone has an idea to solve this? Thanks! On 2/22/23 13:29, Alexandre Ghiti wrote: +cc linux-kbuild, llvm, Nathan, Nick On 2/15/23 15:36, Alexandre Ghiti wrote: From: Alexandre Ghiti This config allows to compile 64b kernel as PIE and to relocate it at any virtual addres

Re: [PATCH v8 1/3] riscv: Introduce CONFIG_RELOCATABLE

2023-02-24 Thread Björn Töpel
Alexandre Ghiti writes: > +cc linux-kbuild, llvm, Nathan, Nick > > On 2/15/23 15:36, Alexandre Ghiti wrote: >> From: Alexandre Ghiti >> >> This config allows to compile 64b kernel as PIE and to relocate it at >> any virtual address at runtime: this paves the way to KASLR. >> Runtime relocation i

Re: [PATCH v8 1/3] riscv: Introduce CONFIG_RELOCATABLE

2023-02-22 Thread Alexandre Ghiti
+cc linux-kbuild, llvm, Nathan, Nick On 2/15/23 15:36, Alexandre Ghiti wrote: From: Alexandre Ghiti This config allows to compile 64b kernel as PIE and to relocate it at any virtual address at runtime: this paves the way to KASLR. Runtime relocation is possible since relocation metadata are em

[PATCH v8 1/3] riscv: Introduce CONFIG_RELOCATABLE

2023-02-15 Thread Alexandre Ghiti
From: Alexandre Ghiti This config allows to compile 64b kernel as PIE and to relocate it at any virtual address at runtime: this paves the way to KASLR. Runtime relocation is possible since relocation metadata are embedded into the kernel. Note that relocating at runtime introduces an overhead e