Hacker News new | ask | show | jobs
by dwattttt 400 days ago
As sibling notes, executable memory is not by default writable. If desired, you can also further disallow any executable memory to me allocated or modified by your process, even via the normal APIs, by calling SetProcessMitigationPolicy with ProcessDynamicCodePolicy.

https://learn.microsoft.com/en-us/windows/win32/api/processt...

1 comments

The exception to this is if you're leveraging large-page support. Large pages are always read/write (and nonpageable).

But that's a rare edge case.