Skip to content

proc: Add /proc/sys/kernel/randomize_va_space#12814

Open
tanyifeng wants to merge 1 commit intogoogle:masterfrom
tanyifeng:proc-randomize-va-space
Open

proc: Add /proc/sys/kernel/randomize_va_space#12814
tanyifeng wants to merge 1 commit intogoogle:masterfrom
tanyifeng:proc-randomize-va-space

Conversation

@tanyifeng
Copy link
Copy Markdown
Contributor

Expose randomize_va_space in procfs with a static value of 2 (full randomization), matching gVisor's actual ASLR behavior.

gVisor always applies full ASLR for user memory mappings, so we report the value 2 to match the actual behavior.

This fixes programs(e.g. https://github.com/psf/pyperf) that read this file to collect ASLR metadata and fail with ENOENT when the file is missing.

Expose randomize_va_space in procfs with a static value of 2
(full randomization), matching gVisor's actual ASLR behavior.

gVisor always applies full ASLR for user memory mappings, so we
report the value 2 to match the actual behavior.

This fixes programs(e.g. https://github.com/psf/pyperf) that
read this file to collect ASLR metadata and fail with ENOENT
when the file is missing.

Signed-off-by: Tan Yifeng <yiftan@tencent.com>
@tanyifeng tanyifeng force-pushed the proc-randomize-va-space branch from 1fade4c to 45f086f Compare March 29, 2026 06:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant