Hacker News new | ask | show | jobs
by wtallis 2047 days ago
> but also you'd need to watch for writes to executable pages that have been already AOT translated.

Wouldn't executable pages (translated or not) normally be mapped as read-only, ensuring the processor faults on any attempt to modify them?

1 comments

Ah, the question is whether Darwin enforces W^X, because if so, the problem becomes very easy. Then you re-translate whenever a page becomes executable [again].
On Arm 64-bit Darwin, W^X is enforced at all times.