STRUCT COREDUMP_REQ(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… NAME πŸ’…

struct coredump_req β€” bestie, it's literally the message the kernel sends to userspace ✨ (yes, the kernel is the one sliding into your DMs here, not the other way around).

This page lives in the Kernel API Manual section, so you already know it's that deep-kernel, uapi-adjacent lore 🫢


✨ SYNOPSIS ✨

struct coredump_req {
    __u32 size;
    __u32 size_ack;
    __u64 mask;
};

Look at her. Three fields, zero notes, absolute main character energy πŸ‘‘


πŸŽ€ Members πŸŽ€

  • size β€” the size of struct coredump_req itself. It's the "how much can you even read, babe" hint πŸŽ€
  • size_ack β€” the known size of struct coredump_ack on this kernel. Very "here's how much room you've got to reply" of her πŸ’Œ
  • mask β€” supported features. The bitmask of what's actually on the menu πŸ”₯

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so when a coredump happens, the kernel will connect to the coredump socket and send a coredump request to the coredump server. That's the whole vibe β€” kernel hits up the coredump server like "hey, something went down, you're gonna wanna see this" 😭

The size member is set to the size of struct coredump_req, and it provides a hint to userspace about how much data can be read. Think of it as the kernel being polite and telling you the portion size before you commit πŸ“

Userspace may use MSG_PEEK to peek the size of struct coredump_req and then choose to consume it in one go. Peek first, commit later β€” the iconique move πŸ’…

Userspace may also simply read a COREDUMP_ACK_SIZE_VER0 request. Yeah, just read it, no drama, no ceremony.

And if the size the kernel sends is larger, userspace simply discards any remaining data. Not me leaving the leftovers on the plate πŸ™ˆ


The coredump_req->mask member is set to the currently known features. Userspace may only set coredump_ack->mask to the bits raised by the kernel in coredump_req->mask. No cap β€” you can't just make up feature bits and expect the kernel to gas you up. Stay in your lane, use the bits you were given ⭐

The coredump_req->size_ack member is set by the kernel to the size of struct coredump_ack that the kernel knows. Userspace may only send up to coredump_req->size_ack bytes to the kernel and must set coredump_ack->size accordingly.

⚠️ lowkey a boundary issue if you ignore it: respect size_ack, and always set coredump_ack->size to match what you actually send. The kernel is not doing guesswork for you πŸ’€

🌈 SEE ALSO 🌈

  • Kernel file ./tools/include/uapi/linux/coredump.h
  • struct coredump_ack(9)
  • enum coredump_mark(9)

Alright bestie, that's the whole page πŸ¦‹ go forth and peek responsibly ✨

source: ./tools/include/uapi/linux Β· version/date: October 2026 Β· struct coredump_req(9) β€” mwah, that's a wrap πŸŽ€πŸ’–

πŸ“¦ where this page comes from