Skip to content

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

Merged
copybara-service[bot] merged 2 commits intomasterfrom
test/cl893842262
Apr 3, 2026
Merged

proc: Add /proc/sys/kernel/randomize_va_space#12864
copybara-service[bot] merged 2 commits intomasterfrom
test/cl893842262

Conversation

@copybara-service
Copy link
Copy Markdown

proc: Add /proc/sys/kernel/randomize_va_space

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.

FUTURE_COPYBARA_INTEGRATE_REVIEW=#12814 from tanyifeng:proc-randomize-va-space d29516d

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>
@copybara-service copybara-service Bot added the exported Issue was exported automatically label Apr 3, 2026
@copybara-service copybara-service Bot merged commit dd4e8d9 into master Apr 3, 2026
@copybara-service copybara-service Bot deleted the test/cl893842262 branch April 3, 2026 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

exported Issue was exported automatically

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants