RFR: JDK-8313764: Offer JVM HS functionality to shared lib load operations done by the JDK codebase [v2]

Matthias Baesken mbaesken at openjdk.org
Wed Nov 15 08:45:35 UTC 2023

On Wed, 23 Aug 2023 15:18:03 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:

>> Currently there is a number of functionality that would be interesting to have for shared lib load operations in the JDK C code.
>> Some examples :
>> Events::log_dll_message for hs-err files reporting
>> JFR event NativeLibraryLoad
>> There is the need to update the shared lib Cache on AIX ( see LoadedLibraries::reload() , see also https://bugs.openjdk.org/browse/JDK-8314152 ),
>> this is currently not fully in sync with libs loaded form jdk c-libs and sometimes reports outdated information
>> Offer an interface (e.g. jvm.cpp) to support this.
> Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision:
>   windows aarch64 build issues

In the meantime,   https://bugs.openjdk.org/browse/JDK-8295159  was integrated.
There we restore on x86_64 and aarch the floating point environment  (fenv_t)  after loading libs in HS os::dll_load / dlopen_helper to avoid  'silent' manipulation of the fenv by 'bad' shared libs.
But unfortunately this does not work for  libs  not going through this coding (like the ones loaded from JDK c code).

 (And even if restoring in these additional cases is not wanted, we could at least *warn* about the change by a trace .)

Might be worth considering in context of this change .


PR Comment: https://git.openjdk.org/jdk/pull/15264#issuecomment-1812023112

More information about the security-dev mailing list