summaryrefslogtreecommitdiff
path: root/tools/testing
diff options
context:
space:
mode:
authorChristian Brauner <brauner@kernel.org>2026-08-20 01:09:34 +0200
committerChristian Brauner <brauner@kernel.org>2026-09-22 13:25:02 +0200
commit3aa5ebec7895c4398b91c07792b18aaa37858a59 (patch)
treefff8f3d8d1054bafdc8acd6a9d5ac60682fa49b8 /tools/testing
parentf82383160f0f51bdb8fdb1950aff4ceda53f024f (diff)
downloadlinux-next-3aa5ebec7895c4398b91c07792b18aaa37858a59.tar.gz
linux-next-3aa5ebec7895c4398b91c07792b18aaa37858a59.zip
coredump: describe the holes when COREDUMP_SPARSE is negotiated
Make use of COREDUMP_SPARSE. Refuse it without COREDUMP_RECORDS. Actual holes are sent as a record with length indicating how much zero data there was. coredump_write() flushes a trailing hole if the coredump is done. Instead of writing the actual byte for pipes and sockets, collapse it. This stops wasting a header with coredump records for a single byte. So we now only write it when the coredump can be seeked. TL;DR a trailing hole is a zero record like any other and the records still cover the whole coredump. Link: https://patch.msgid.link/20260820-work-coredump-sparse-v2-17-ba32dd718c51@kernel.org Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
Diffstat (limited to 'tools/testing')
-rw-r--r--tools/testing/selftests/coredump/coredump_test_helpers.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/testing/selftests/coredump/coredump_test_helpers.c b/tools/testing/selftests/coredump/coredump_test_helpers.c
index 1c8658f35735..a5b9cde47239 100644
--- a/tools/testing/selftests/coredump/coredump_test_helpers.c
+++ b/tools/testing/selftests/coredump/coredump_test_helpers.c
@@ -275,7 +275,8 @@ bool send_coredump_ack(int fd, const struct coredump_req *req,
/* Every option the kernel is expected to advertise in coredump_req->mask. */
#define TEST_REQ_MASK_ALL \
(COREDUMP_KERNEL | COREDUMP_USERSPACE | \
- COREDUMP_REJECT | COREDUMP_WAIT | COREDUMP_RECORDS)
+ COREDUMP_REJECT | COREDUMP_WAIT | \
+ COREDUMP_RECORDS | COREDUMP_SPARSE)
bool check_coredump_req(const struct coredump_req *req)
{