linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] RISC-V: Fix a few kexec_file_load(2) failures
@ 2023-07-26  9:53 Petr Tesarik
  2023-07-26  9:53 ` [PATCH v2 1/3] riscv/kexec: handle R_RISCV_CALL_PLT relocation type Petr Tesarik
                   ` (5 more replies)
  0 siblings, 6 replies; 14+ messages in thread
From: Petr Tesarik @ 2023-07-26  9:53 UTC (permalink / raw)
  To: Paul Walmsley, Palmer Dabbelt, Albert Ou, Conor Dooley, Li Huafei,
	Liao Chang, Masahiro Yamada, Kees Cook, Andrew Morton,
	Heiko Stuebner, Ricardo Ribalda, Alyssa Ross, Li Zhengyu,
	open list:RISC-V ARCHITECTURE, kexec, open list
  Cc: Torsten Duwe, Roberto Sassu, petr

From: Petr Tesarik <petr.tesarik.ext@huawei.com>

The kexec_file_load(2) syscall does not work at least in some kernel
builds. For details see the relevant section in this blog post:

https://sigillatum.tesarici.cz/2023-07-21-state-of-riscv64-kdump.html

This patch series handles an additional relocation types, removes the need
to implement a Global Offset Table (GOT) for the purgatory and fixes the
placement of initrd.

Changelog
=========

Changes from v1:
- Replace memcmp() with a for loop.
- Drop handling of 16-bit add/subtract relocations. They were used only
  by alternatives in strcmp(), which was referenced only by string.o.
- Add the initrd placement fix.

Petr Tesarik (1):
  riscv/purgatory: do not link with string.o and its dependencies

Torsten Duwe (2):
  riscv/kexec: handle R_RISCV_CALL_PLT relocation type
  riscv/kexec: load initrd high in available memory

 arch/riscv/kernel/elf_kexec.c    |  3 ++-
 arch/riscv/purgatory/Makefile    | 26 +-------------------------
 arch/riscv/purgatory/purgatory.c |  6 ++++--
 3 files changed, 7 insertions(+), 28 deletions(-)

-- 
2.25.1


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

end of thread, other threads:[~2023-08-09 14:36 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-26  9:53 [PATCH v2 0/3] RISC-V: Fix a few kexec_file_load(2) failures Petr Tesarik
2023-07-26  9:53 ` [PATCH v2 1/3] riscv/kexec: handle R_RISCV_CALL_PLT relocation type Petr Tesarik
2023-07-26 16:30   ` Conor Dooley
2023-07-26  9:54 ` [PATCH v2 2/3] riscv/purgatory: do not link with string.o and its dependencies Petr Tesarik
2023-07-26 16:33   ` Conor Dooley
2023-08-03 15:13     ` Palmer Dabbelt
2023-08-03 15:17       ` Conor Dooley
2023-08-03 15:33       ` Petr Tesarik
2023-07-26  9:54 ` [PATCH v2 3/3] riscv/kexec: load initrd high in available memory Petr Tesarik
2023-07-26 16:38   ` Conor Dooley
2023-07-26 18:27     ` Petr Tesarik
2023-08-01  9:27 ` [PATCH v2 0/3] RISC-V: Fix a few kexec_file_load(2) failures Petr Tesarik
2023-08-03 15:10 ` patchwork-bot+linux-riscv
2023-08-09 14:35 ` (subset) " Palmer Dabbelt

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).