Suggestion: Remove NMT header & footer canaries
Johan Sjolen
johan.sjolen at oracle.com
Thu Oct 17 08:57:58 UTC 2024
Hi Hotspot-dev,
Today NMT has two canaries: A header and a footer canary. These enable mainly two things:
1. For NMT to aid in identifying and describing a pointer
2. A basic form of out-of-bounds protection
With the introduction of UBSan and Asan into OpenJDK we have gained stronger tools for out-of-bounds analysis, without requiring NMT to be activated. Therefore, I believe that point 2 is no longer something that NMT needs to support. For point 1, we will unfortunately be losing this ability for malloc:ed memory if the canaries are removed, only retaining it for mmaped memory.
I'd like to suggest that we remove these canaries. It would open up valuable real estate in the malloc headers, which we may or may not use for future NMT feature development. I am writing this e-mail as part of community outreach. I want to make sure that I am not missing valuable information which may lead me to re-evaluate the position on this matter.
I am looking forward to your replies.
All the best,
Johan Sjölén
More information about the hotspot-dev
mailing list