summarylogtreecommitdiffstats
path: root/max_map_count.patch
blob: 82b0bbd8d0b2d28411875b02b0c57935271dec7c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
From 90240bcd90a568878738e66c0d45bed3e38e347b Mon Sep 17 00:00:00 2001
From: Tk-Glitch <ti3nou@gmail.com>
Date: Fri, 12 Mar 2021 18:11:38 +0200
Subject: [PATCH] Set vm.max_map_count set to some giant value

Or fsync games will crash. Potentially good candidate for Arch upstream?
---
 include/linux/mm.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/include/linux/mm.h b/include/linux/mm.h
index 80bb6408f..6c8b55cd1 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -146,8 +146,7 @@ extern int mmap_rnd_compat_bits __read_mostly;
  * not a hard limit any more. Although some userspace tools can be surprised by
  * that.
  */
-#define MAPCOUNT_ELF_CORE_MARGIN	(5)
-#define DEFAULT_MAX_MAP_COUNT	(USHRT_MAX - MAPCOUNT_ELF_CORE_MARGIN)
+#define DEFAULT_MAX_MAP_COUNT	(26214400000)

 extern int sysctl_max_map_count;

--
2.28.0