RFR: 8351040: [REDO] Protection zone for easier detection of accidental zero-nKlass use

Thomas Stuefe stuefe at openjdk.org
Thu Mar 27 08:48:14 UTC 2025


On Fri, 21 Mar 2025 10:15:10 GMT, Martin Doerr <mdoerr at openjdk.org> wrote:

>> Hi Thomas,
>> mprotect supports System V shared memory, but only if running in an environment where the MPROTECT_SHM=ON environmental variable is defined, which is not the case in the jdk. So we can fairly say System V shared memory cannot be mprotected by us.
>> 
>> The documentation says:
>> _The mprotect subroutine can only be used on shared memory regions backed with 4 KB or 64 KB pages;_ 
>> So we can mprotect 64K pages and mmap supports 64K pages beginning with AIX 7.3 TL1.
>> With JDK-8334371 we favor the use of mmap 64K pages over System V shared memory if running on a system with AIX 7.3 TL1 or higher. But as long as we allow lower os versions the system V shared memory is still in place, and the mprotect restriction stays valid.
>
> I haven't seen test errors with this new version. @JoKern65, @MBaesken: Are you aware of any problems?

Thanks @TheRealMDoerr and others!

Anyone willing to give me a second review?

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

PR Comment: https://git.openjdk.org/jdk/pull/23912#issuecomment-2757208833


More information about the hotspot-dev mailing list