Kexec Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCHv2 0/6] arm64: zboot support
@ 2023-05-16  7:31 Pingfan Liu
  2023-05-16  7:31 ` [PATCHv2 1/6] kexec: Change the image probe's prototype Pingfan Liu
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: Pingfan Liu @ 2023-05-16  7:31 UTC (permalink / raw)
  To: kexec; +Cc: Pingfan Liu, horms, ardb, jeremy.linton

As more complicated capsule kernel format occurs like zboot, where the
compressed kernel is stored as a payload. The straight forward
decompression can not meet the demand.

As the first step, on aarch64, reading in the kernel file in a probe
method and decide how to unfold the content by the method itself.

The new designed probe interface returns two factors:
1. the parsed kernel_buf should be returned so that it can be used by
the image load method later.
2. the final fd passed to sys_kexec_file_load, since aarch64 kernel can
only work with Image format, the outer payload should be stripped and a
temporary file of Image should be created.

* Things left to do on arches besides aarch64 *
After substitution, although each probe mehod seems to have the same
prototype, they have differenct purpose on the first argument.
On aarch64, the argument is used to pass the kernel file name, while on
the other arches, it is used to passs the decompressed kernel.

This can be cured by scattering out the logic of reading the kernel file
into each probe. (This should be done by coccinelle. But let us keep a
small step for the time being)

v1 -> v2:
take in Jeremy's patches to implement zboot format support
use coccinelle and sed to substitue the image probe method prototype. 

To: kexec@lists.infradead.org
Cc: horms@verge.net.au
Cc: ardb@kernel.org
Cc: jeremy.linton@arm.com


Jeremy Linton (4):
  arm64: Fix some issues with zImage _probe()
  kexec/zboot: Add arch independent zboot support
  arm64: Add ZBOOT PE containing compressed image support
  arm64: Hook up the ZBOOT support as vmlinuz

Pingfan Liu (2):
  kexec: Change the image probe's prototype
  arm64: Scatter the logic of reading of kernel file into each probe

 include/kexec-pe-zboot.h                   |  15 +++
 kexec/Makefile                             |   1 +
 kexec/arch/arm/kexec-arm.h                 |   6 +-
 kexec/arch/arm/kexec-uImage-arm.c          |   2 +-
 kexec/arch/arm64/Makefile                  |   3 +-
 kexec/arch/arm64/image-header.h            |   1 +
 kexec/arch/arm64/kexec-arm64.c             |   1 +
 kexec/arch/arm64/kexec-arm64.h             |  19 ++-
 kexec/arch/arm64/kexec-elf-arm64.c         |   8 +-
 kexec/arch/arm64/kexec-image-arm64.c       |   7 +-
 kexec/arch/arm64/kexec-uImage-arm64.c      |  17 ++-
 kexec/arch/arm64/kexec-vmlinuz-arm64.c     | 101 ++++++++++++++++
 kexec/arch/arm64/kexec-zImage-arm64.c      |  32 ++---
 kexec/arch/cris/kexec-cris.h               |   3 +-
 kexec/arch/cris/kexec-elf-cris.c           |   2 +-
 kexec/arch/hppa/kexec-elf-hppa.c           |   2 +-
 kexec/arch/hppa/kexec-hppa.h               |   3 +-
 kexec/arch/i386/kexec-beoboot-x86.c        |   4 +-
 kexec/arch/i386/kexec-bzImage.c            |   2 +-
 kexec/arch/i386/kexec-elf-x86.c            |   2 +-
 kexec/arch/i386/kexec-mb2-x86.c            |   5 +-
 kexec/arch/i386/kexec-multiboot-x86.c      |   7 +-
 kexec/arch/i386/kexec-nbi.c                |   2 +-
 kexec/arch/i386/kexec-x86.h                |  19 ++-
 kexec/arch/ia64/kexec-elf-ia64.c           |   2 +-
 kexec/arch/ia64/kexec-ia64.h               |   3 +-
 kexec/arch/loongarch/kexec-elf-loongarch.c |   3 +-
 kexec/arch/loongarch/kexec-loongarch.h     |   7 +-
 kexec/arch/loongarch/kexec-pei-loongarch.c |   3 +-
 kexec/arch/m68k/kexec-elf-m68k.c           |   2 +-
 kexec/arch/m68k/kexec-m68k.h               |   3 +-
 kexec/arch/mips/kexec-elf-mips.c           |   2 +-
 kexec/arch/mips/kexec-mips.h               |   3 +-
 kexec/arch/ppc/kexec-dol-ppc.c             |   2 +-
 kexec/arch/ppc/kexec-elf-ppc.c             |   2 +-
 kexec/arch/ppc/kexec-ppc.h                 |   9 +-
 kexec/arch/ppc/kexec-uImage-ppc.c          |   2 +-
 kexec/arch/ppc64/kexec-elf-ppc64.c         |   2 +-
 kexec/arch/ppc64/kexec-ppc64.h             |   3 +-
 kexec/arch/sh/kexec-elf-sh.c               |   2 +-
 kexec/arch/sh/kexec-sh.h                   |  12 +-
 kexec/arch/sh/kexec-uImage-sh.c            |   2 +-
 kexec/arch/x86_64/kexec-bzImage64.c        |   2 +-
 kexec/arch/x86_64/kexec-elf-x86_64.c       |   2 +-
 kexec/arch/x86_64/kexec-x86_64.h           |  10 +-
 kexec/kexec-pe-zboot.c                     | 134 +++++++++++++++++++++
 kexec/kexec.c                              |  50 +++++---
 kexec/kexec.h                              |   4 +-
 48 files changed, 423 insertions(+), 107 deletions(-)
 create mode 100644 include/kexec-pe-zboot.h
 create mode 100644 kexec/arch/arm64/kexec-vmlinuz-arm64.c
 create mode 100644 kexec/kexec-pe-zboot.c

-- 
2.31.1


_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

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

end of thread, other threads:[~2023-06-29  3:58 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-16  7:31 [PATCHv2 0/6] arm64: zboot support Pingfan Liu
2023-05-16  7:31 ` [PATCHv2 1/6] kexec: Change the image probe's prototype Pingfan Liu
2023-05-24 11:52   ` Simon Horman
2023-05-25  3:32     ` Pingfan Liu
2023-06-01  1:45       ` Pingfan Liu
2023-06-29  3:57         ` Pingfan Liu
2023-05-16  7:31 ` [PATCHv2 2/6] arm64: Fix some issues with zImage _probe() Pingfan Liu
2023-05-16  7:31 ` [PATCHv2 3/6] arm64: Scatter the logic of reading of kernel file into each probe Pingfan Liu
2023-05-16  7:31 ` [PATCHv2 4/6] kexec/zboot: Add arch independent zboot support Pingfan Liu
2023-05-16  7:31 ` [PATCHv2 5/6] arm64: Add ZBOOT PE containing compressed image support Pingfan Liu
2023-05-16  7:31 ` [PATCHv2 6/6] arm64: Hook up the ZBOOT support as vmlinuz Pingfan Liu

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