public inbox for linux-riscv@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH v4 0/1] riscv: Allow to downgrade paging mode from the command line
@ 2023-01-31 15:11 Alexandre Ghiti
  2023-01-31 15:11 ` [PATCH v4 1/1] " Alexandre Ghiti
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Alexandre Ghiti @ 2023-01-31 15:11 UTC (permalink / raw)
  To: Jonathan Corbet, Paul Walmsley, Palmer Dabbelt, Albert Ou,
	Conor Dooley, Ard Biesheuvel, linux-doc, linux-kernel,
	linux-riscv
  Cc: Alexandre Ghiti

This new version gets rid of the limitation that prevented KASAN kernels
to use the newly introduced parameters.

While looking into KASLR, I fell onto commit aacd149b6238 ("arm64: head:
avoid relocating the kernel twice for KASLR"): it allows to use the fdt
functions very early in the boot process with KASAN enabled by simply
compiling a new version of those functions without instrumentation.

I had to change the handling of the command line parsing to make the
code self-contained in kernel/pi/cmd_early.c to avoid calling too many
__pi prefixed functions from outside this file.

I'll use this approach like arm64 to handle the extraction of the random
seedi from the device tree for KASLR.

@Ard: I copied the "pi" name but I have to admit I don't know what it
means.

Alexandre Ghiti (1):
  riscv: Allow to downgrade paging mode from the command line

 .../admin-guide/kernel-parameters.txt         |  5 +-
 arch/riscv/kernel/Makefile                    |  2 +
 arch/riscv/kernel/pi/Makefile                 | 34 ++++++++++++
 arch/riscv/kernel/pi/cmdline_early.c          | 52 +++++++++++++++++++
 arch/riscv/lib/memcpy.S                       |  2 +
 arch/riscv/lib/memmove.S                      |  2 +
 arch/riscv/mm/init.c                          | 36 ++++++++++---
 7 files changed, 126 insertions(+), 7 deletions(-)
 create mode 100644 arch/riscv/kernel/pi/Makefile
 create mode 100644 arch/riscv/kernel/pi/cmdline_early.c

-- 
2.37.2


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-02-20 13:10 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-31 15:11 [PATCH v4 0/1] riscv: Allow to downgrade paging mode from the command line Alexandre Ghiti
2023-01-31 15:11 ` [PATCH v4 1/1] " Alexandre Ghiti
2023-02-20 13:10   ` Björn Töpel
2023-01-31 15:34 ` [PATCH v4 0/1] " Alexandre Ghiti
2023-01-31 19:24 ` Conor Dooley
2023-02-02 15:07   ` Alexandre Ghiti
2023-02-02 15:13     ` Alexandre Ghiti
2023-02-17 14:48 ` Björn Töpel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox