RFR: 8330171: Lazy W^X switch implementation

Kim Barrett kim.barrett at oracle.com
Sat Apr 13 19:28:19 UTC 2024


> On Apr 13, 2024, at 8:35 AM, Andrew Haley <aph-open at littlepinkcloud.com> wrote:
> 
> On 4/12/24 18:18, Sergey Nazarkin wrote:
>> It is the way in which it is implemented in the current code.
> 
> No, it's not. That's not what we do at all.
> 
> We don't set W^X when we need it: instead, we set it at certain times in the hope
> that it'll be needed. I'm suggesting we should set W^X *exactly* where we need it,
> such as at patching methods. Not at VM entry.
> 
> Get rid of all the assert_wx_state. If deoptimization needs WXWrite, then it should
> set it, not hope for someone else to have done it.

There was a recent internal-to-Oracle discussion about W^X, which led to
something that I think is along the lines of what @aph is suggesting,
including a prototype. I will poke some of the folks who were more deeply
involved in that discussion (I was just casually following along, and am not
knowledgeable in this area), but it's a weekend now, so it might take them
some time to respond.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Message signed with OpenPGP
URL: <https://mail.openjdk.org/pipermail/hotspot-dev/attachments/20240413/343e5f80/signature.asc>


More information about the hotspot-dev mailing list