[PATCH] RFC: Provide a function to reset IFUNC PLTs
Florian Weimer
fweimer@redhat.com
Mon Mar 13 13:59:26 GMT 2023
* Jan Kratochvil:
> On Wed, 08 Mar 2023 21:04:59 +0800, Adhemerval Zanella Netto wrote:
>> But as Florian has said, fixing on glibc won't work consistently on other
>> libraries that uses cpuid instruction.
>
> In Java world the other libraries (in general, there are some JNI exceptions)
> do not matter as they are a Java code JIT-compiled by JVM.
That's not really true for GUI applications, which use quite a few
system libraries. Even in headless applications, font rendering code
may be loaded, say for PDF generation. If system versions are used,
that pulls in compression libraries and PCRE, and those tend to have
CPUID-based switching, too (but perhaps not in the form of IFUNC
resolvers). This is just on x86-64—on aarch64, you will have to deal
with the outline atomics most distributions use.
I suggest you base your OpenJDK work on the OpenJDK musl port. This
way, you can carefully control what you build and how you build it, and
also make it impossible to pick up system libraries by accident. And
static JNI would be a good fit if you do not expect JNI to be used
anyway.
Thanks,
Florian
More information about the Libc-alpha
mailing list