sysctl.conf: Set low address space protection sysctl to recommended value

Message ID 0829b3ff-309b-4742-8fa7-f40282cbb8a7@ipfire.org
State Staged
Commit 592e879c4ea9b750076acb53f1a0b7b46821b882
Headers
Series sysctl.conf: Set low address space protection sysctl to recommended value |

Commit Message

Peter Müller 19 Nov 2026, 3:41 p.m. UTC
The current setting of protecting only the first 4kB of virtual low
memory dates back to 32-bit ARM support times, where enforcing more was
not feasible. Today's kernel documentation recommends a different value,
suitable for 64-bit architectures, which the generic IPFire kernel
configuration presets already.

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
---
 config/etc/sysctl.conf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Michael Tremer 19 Nov 2026, 3:50 p.m. UTC | #1
Hello Peter,

Thank you for the patch. I have merged it.

Since the value now matches CONFIG_DEFAULT_MMAP_MIN_ADDR in our kernel
configuration, there is no need to set it a second time in sysctl.conf.
I have therefore dropped the line again in a follow-up commit:

  https://git.ipfire.org/?p=ipfire-2.x.git;a=commit;h=71b39d14bf

sysctl.conf is also shipped with Core Update 207, so existing systems
will pick up the kernel default.

-Michael
  

Patch

diff --git a/config/etc/sysctl.conf b/config/etc/sysctl.conf
index 819076b80..a7a5493bb 100644
--- a/config/etc/sysctl.conf
+++ b/config/etc/sysctl.conf
@@ -24,7 +24,7 @@  net.ipv4.conf.all.accept_source_route = 0
 net.ipv4.conf.all.log_martians = 1
 
 kernel.printk = 1 4 1 7
-vm.mmap_min_addr = 4096
+vm.mmap_min_addr = 65536
 vm.min_free_kbytes = 8192
 
 # Disable IPv6 by default.