RFR: 8329995: Restricted access to `/proc` can cause JFR initialization to crash [v2]
Jaroslav Bachorik
jbachorik at openjdk.org
Mon Apr 15 13:21:01 UTC 2024
> Please, review this trivial change to make using `ProcessIterator` more robust in the presence of SELinux or a similar system.
>
> The call to `os::opendir("/proc")` may return `nulltptr` if the `/proc` is not accessible due to restrictions placed by the SELinux. In that case the `ProcessIterator` will SIGSEG because it assumes the `_dir`, which is the variable storing the result of the `os::opendir("/proc")` call to be non-null.
>
> The patch is missing regression test because it is very hard to simulate `/proc` not being accessible to the test process.
Jaroslav Bachorik has updated the pull request incrementally with one additional commit since the last revision:
Add explanatory comment
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/18775/files
- new: https://git.openjdk.org/jdk/pull/18775/files/cf7eb4aa..d114a437
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=18775&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=18775&range=00-01
Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
Patch: https://git.openjdk.org/jdk/pull/18775.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/18775/head:pull/18775
PR: https://git.openjdk.org/jdk/pull/18775
More information about the hotspot-jfr-dev
mailing list