diff options
| author | Christian Brauner <brauner@kernel.org> | 2026-08-20 01:09:33 +0200 |
|---|---|---|
| committer | Christian Brauner <brauner@kernel.org> | 2026-09-22 13:25:02 +0200 |
| commit | f82383160f0f51bdb8fdb1950aff4ceda53f024f (patch) | |
| tree | 03be7fde972116e19d3004c099357529018c57fb /include | |
| parent | 675f4a0d7bc751600f7cdc155f440b336695b45d (diff) | |
| download | linux-next-f82383160f0f51bdb8fdb1950aff4ceda53f024f.tar.gz linux-next-f82383160f0f51bdb8fdb1950aff4ceda53f024f.zip | |
coredump: send the coredump in records if requested
When the coredump server raises COREDUMP_RECORDS send the coredump in
records. A record consists of a struct coredump_record_header and data.
A header and the bytes it describes go out in one iovec.
A hole is flushed through __dump_emit() like before. So zeroes still are
sent on the socket as actual data records. Making holes cheap is
COREDUMP_SPARSE's job.
Link: https://patch.msgid.link/20260820-work-coredump-sparse-v2-16-ba32dd718c51@kernel.org
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/coredump.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/coredump.h b/include/linux/coredump.h index 709388dd5659..b252bb2843b3 100644 --- a/include/linux/coredump.h +++ b/include/linux/coredump.h @@ -6,6 +6,7 @@ #include <linux/mm.h> #include <linux/fs.h> #include <linux/sched/coredump.h> +#include <uapi/linux/coredump.h> #include <asm/siginfo.h> #ifdef CONFIG_COREDUMP @@ -40,7 +41,11 @@ struct coredump_params { u64 mask; /* COREDUMP_STATE_* raised while the coredump is written. */ enum coredump_state state; + /* Record header scratch, NULL unless the coredump is a record stream. */ + struct coredump_record_header *record_hdr; + /* Bytes handed to the file, record headers included. */ loff_t written; + /* Offset in the coredump, record headers excluded. */ loff_t pos; loff_t to_skip; int vma_count; |
