From bdebf1f20999bb808b4a1d9ed7e7c7af0bdc7b76 Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Wed, 14 Oct 2026 12:01:37 +0200 Subject: [PATCH] wishlist: Get information about a Virtual Memory Area This might be problematic from a security perspective, but I don't know how to evaluate that. One could argue that this information is already available via /proc, but maybe packaging it this way makes it easier to defeat ASLR somehow. --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/README.md b/README.md index 15d4399..1c76298 100644 --- a/README.md +++ b/README.md @@ -839,6 +839,23 @@ call could help here, too. **Use-Case:** Any application that wants to terminate with a signal. +### Get information about a Virtual Memory Area + +Applications that wish to understand their own address space currently +have to parse `/proc/self/maps`. This is cumbersome (particularly from a +signal handler), and only works if `/proc` is mounted. It also does not +include the information about how far will a stack region +(`MAP_GROWSDOWN`) be extended by the kernel before triggering a +`SIGSEGV`. Applications needing this information need to resort to +various workarounds. + +Exposing this information via a syscall (`prctl(PR_GET_VMA, ...)`) would +avoid this guesswork and would be guaranteed to work in `/proc`-less +environments. + +**Use-Case:** `pthread_getattr_np`, checking for stack overflow, +in-process crash handlers examining application memory. + --- ## Finished Items