1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:47:45 +00:00

LibCoreDump+CrashDaemon: Compress coredumps

Most coredumps contain large amounts of consecutive null bytes and as
such are a prime candidate for compression.

This commit makes CrashDaemon compress files once the kernel finishes
emitting them, as well as adds the functionality needed in LibCoreDump
to then parse them.
This commit is contained in:
Idan Horowitz 2021-03-26 18:46:20 +03:00 committed by Andreas Kling
parent b8f462a78b
commit 9f656b6fa9
8 changed files with 70 additions and 15 deletions

View file

@ -185,7 +185,8 @@ static void create_tmp_coredump_directory()
{
dbgln("Creating /tmp/coredump directory");
auto old_umask = umask(0);
auto rc = mkdir("/tmp/coredump", 0755);
// FIXME: the coredump directory should be made read-only once CrashDaemon is no longer responsible for compressing coredumps
auto rc = mkdir("/tmp/coredump", 0777);
if (rc < 0) {
perror("mkdir(/tmp/coredump)");
VERIFY_NOT_REACHED();