Project Description

When we experience a early boot crash, we are not able to analyze the kernel dump, as user-space wasn't able to load the crash system. The idea is to make the crash system compiled into the host kernel (think of initramfs) so that we can create a kernel dump really early in the boot process.

Goal for the Hackweeks

  1. Investigate if this is possible and the implications it would have (done in HW21)
  2. Hack up a PoC (done in HW22 and HW23)
  3. Prepare RFC series (giving it's only one week, we are entering wishful thinking territory here).

update HW23

  • I was able to include the crash kernel into the kernel Image.
  • I'll need to find a way to load that from init/main.c:startkernel() probably after kcsaninit()
  • I workaround for a smoke test was to hack kexecfileload systemcall which has two problems:
    1. My initramfs in the porduction kernel does not have a new enough kexec version, that's not a blocker but where the week ended
    2. As the crash kernel is part of init.data it will be already stale once I can call kexecfileload from user-space.

The solution is probably to rewrite the POC so that the invocation can be done from init.text (that's my theory) but I'm not sure if I can reuse the kexec infrastructure in the kernel from there, which I rely on heavily.

Resources

Looking for hackers with the skills:

kernel kdump

This project is part of:

Hack Week 21 Hack Week 22 Hack Week 23

Activity

  • 6 months ago: vbabka liked this project.
  • 6 months ago: pvorel liked this project.
  • over 1 year ago: jzerebecki liked this project.
  • over 1 year ago: tdz liked this project.
  • over 1 year ago: Zildj1an liked this project.
  • over 1 year ago: Zildj1an joined this project.
  • over 1 year ago: tschmitz liked this project.
  • over 1 year ago: paolodepa liked this project.
  • over 1 year ago: afeijoo liked this project.
  • almost 2 years ago: clin liked this project.
  • almost 2 years ago: ptesarik liked this project.
  • almost 2 years ago: akumar joined this project.
  • almost 2 years ago: akumar liked this project.
  • almost 2 years ago: coolgw liked this project.
  • almost 2 years ago: mbrugger started this project.
  • almost 2 years ago: mbrugger added keyword "kdump" to this project.
  • almost 2 years ago: mbrugger added keyword "kernel" to this project.
  • almost 2 years ago: mbrugger originated this project.

  • Comments

    • mbrugger
      7 months ago by mbrugger | Reply

      I got a tip to look into grub2 multiboot. Maybe we can load the crash kernel to the reserved memory region from grub. We then would only need to pass a kernel argument so that the kernel takes this into account.

    Similar Projects

    Model checking the BPF verifier by shunghsiyu

    Project Description

    BPF verifier plays a ...


    Authenticated hashes for BTRFS by dsterba

    Project Description

    Implement a checksum ...