[starnix][procfs] Honor kptr_restrict in kallsyms Replace the /proc/sys/kernel/kptr_restrict stub with atomic kernel state (defaulting to 0) and enforce CAP_SYS_ADMIN and 0..=2 range validation on writes. Update /proc/kallsyms open-time address formatting to expose kernel section and symbol addresses to all readers when kptr_restrict is 0, restrict non-zero addresses to CAP_SYSLOG holders when kptr_restrict is 1, and mask addresses to zero for all readers when kptr_restrict is 2. Fixed: 571122037 Test: fx test procfs_test sysctl_test Test: fx test starnix_bionic_test Change-Id: I783fae051e845861af86799bf22d6ff3f0bb9d98 Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/1880906 Reviewed-by: Nathaniel Manista <nathaniel@google.com> Presubmit-Verified: fuchsia-internal-scoped@luci-project-accounts.iam.gserviceaccount.com <fuchsia-internal-scoped@luci-project-accounts.iam.gserviceaccount.com> Fuchsia-Auto-Submit: Benjamin Lerman <qsr@google.com> Commit-Queue: Benjamin Lerman <qsr@google.com>
Fuchsia is an open source, general purpose operating system supporting modern 64-bit Intel and ARM processors.
We expect everyone interacting with our project to respect our code of conduct.
Read more about Fuchsia's principles.
See Getting Started.
See fuchsia.dev.