RFR: 8264130: PAC-RET protection for Linux/AArch64 [v2]

Andrew Haley aph at openjdk.java.net
Thu Nov 11 18:10:35 UTC 2021


On Thu, 11 Nov 2021 16:31:41 GMT, Andrew Dinn <adinn at openjdk.org> wrote:

> > Am I right is saying that for Macos, all generated code is remapped RO before execution?
> 
> Ah, no, it seems the code cache is not RWX all the time as far as Java threads are concerned. The Macos/AArch64 code is strategically calling pthread_jit_write_protect_np at Java <-> JVM transition points.

And this requires magic kernel support. I did mention it to a kernel engineer who wasn't very impressed, but I think it's pretty cool.

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

PR: https://git.openjdk.java.net/jdk/pull/6334



More information about the build-dev mailing list