RFR(S): 8221175: Fix bad function case for controlled JVM crash on PPC64 big-endian
Lindenmaier, Goetz
goetz.lindenmaier at sap.com
Mon Mar 25 08:19:02 UTC 2019
Hi Gustavo,
thanks for fixing this, looks good.
Best regards,
Goetz.
> -----Original Message-----
> From: Gustavo Romero <gromero at linux.vnet.ibm.com>
> Sent: Freitag, 22. März 2019 17:15
> To: hotspot-runtime-dev at openjdk.java.net
> Cc: daniel.daugherty at oracle.com; Lindenmaier, Goetz
> <goetz.lindenmaier at sap.com>; ppc-aix-port-dev at openjdk.java.net
> Subject: RFR(S): 8221175: Fix bad function case for controlled JVM crash on
> PPC64 big-endian
>
> Hi,
>
> Please, could I get reviews for the following change?
>
> bug : https://bugs.openjdk.java.net/browse/JDK-8221175
> webrev: http://cr.openjdk.java.net/~gromero/8221175/v1/
>
> It fixes the way a function pointer is defined in order to call a bad function
> at address 0xF (controlled crash case 13) on PPC64 big-endian machines.
>
> On PPC64 big-endian compiler defaults to ABI ELFv1 which mandates function
> pointers to part of a function descriptor, at offset 0 [1].
>
> Currently the SIGISEGV being generated by case 13 is incorrect because if a
> function descriptor is not use to call the bad function address the program
> segfaults before effectively calling the function, when trying to load
> the (bad) function pointer from offset 0 of base address 0xF, so before
> branching to the function.
>
> It does not affect PPC64 little-endian machines because by default ABI ELFv2
> is used (instead of ABI ELFv1) and for that ABI no function descriptor is
> defined / employed.
>
> The fix consists in defining properly a function descriptor with a bad function
> at offset 0 (the following offset are no important in that case) and using that
> function descriptor to call the bad function, only on PPC64 big-endian
> machines.
>
> That issue was found when investigating the JDK-8220794 issue [2].
>
> Thank you.
>
> Best regards,
> Gustavo
>
> [1] http://refspecs.linuxfoundation.org/ELF/ppc64/PPC-elf64abi.html#FUNC-
> DES
> [2] https://bugs.openjdk.java.net/browse/JDK-8220794
More information about the ppc-aix-port-dev
mailing list