summaryrefslogtreecommitdiff
path: root/src/coredump
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2022-02-08 11:52:17 +0100
committerLennart Poettering <lennart@poettering.net>2022-02-08 11:54:55 +0100
commite677041e7a6988f73de802db6e49d962d432944b (patch)
tree12a0c0f0acdca69eb8006d73117b3821f8e4644c /src/coredump
parent560ace5da8b9daa4a68ba7d6ab7f0074fbf7b75e (diff)
downloadsystemd-e677041e7a6988f73de802db6e49d962d432944b.tar.gz
coredump: raise the coredump save size on 64bit systems to 32G (and lower it to 1G on 32bit systems)
Apparently 2G is too low for various real-life systems. But raising it universally above 2^32 sounds wrong to me, since that makes no sense on 32bit systems, that we still support. Hence, let's raise the limit to 32G on 64bit systems, and *lower* it to 1G on 32bit systems. 32G is 4 orders of magnitude higher then the old settings. Let's hope that's enough for now. Should this not be enough we can raise it further. Fixes: #22076
Diffstat (limited to 'src/coredump')
-rw-r--r--src/coredump/coredump.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/coredump/coredump.c b/src/coredump/coredump.c
index 20503cfd3b..aac75dc552 100644
--- a/src/coredump/coredump.c
+++ b/src/coredump/coredump.c
@@ -48,8 +48,14 @@
#include "uid-alloc-range.h"
#include "user-util.h"
-/* The maximum size up to which we process coredumps */
-#define PROCESS_SIZE_MAX ((uint64_t) (2LLU*1024LLU*1024LLU*1024LLU))
+/* The maximum size up to which we process coredumps. We use 1G on 32bit systems, and 32G on 64bit systems */
+#if __SIZEOF_POINTER__ == 4
+#define PROCESS_SIZE_MAX ((uint64_t) (1LLU*1024LLU*1024LLU*1024LLU))
+#elif __SIZEOF_POINTER__ == 8
+#define PROCESS_SIZE_MAX ((uint64_t) (32LLU*1024LLU*1024LLU*1024LLU))
+#else
+#error "Unexpected pointer size"
+#endif
/* The maximum size up to which we leave the coredump around on disk */
#define EXTERNAL_SIZE_MAX PROCESS_SIZE_MAX