RFR: 8329961: Buffer overflow in os::Linux::kernel_version [v3]

Robbin Ehn rehn at openjdk.org
Wed Apr 10 11:23:10 UTC 2024


On Wed, 10 Apr 2024 09:14:36 GMT, Johan Sjölen <jsjolen at openjdk.org> wrote:

> Another thing: We shouldn't call `uname`. Reading `/proc/sys/kernel/osrelease` is sufficient.

I don't follow that. uname() is POSIX portable, while /proc/sys/kernel/osrelease is Linux specific.
Now this is code is in Linux part, but I don't see why a less portable way that require more code would be superior?

-------------

PR Comment: https://git.openjdk.org/jdk/pull/18697#issuecomment-2047268002


More information about the hotspot-runtime-dev mailing list