Re:Copy-and-Patch Compilation: fast compilation algorithm fo...
by IAmLiterallyAB on Sunday June 02, 2024 @11:04PM
(#40558978)
Or you do what V8 does with WebAssembly and just use WX pages because doing it correctly is "too hard" to do without losing performance.
[ Parent
| on HN ]
Re:Copy-and-Patch Compilation: fast compilation algorithm fo...
by mrugiero on Monday June 03, 2024 @02:05PM
(#40565431)
Does that even work in W^X platforms? Context for my response has that assumption, we can't simply throw it out the window, right?
I think I read somewhere about making two mappings to the same physical page (one W, one X), are you referring to that?
(I'd still need to know how that works as it kinda defeats the protection, the OS should prohibit that, right?)
Re:Copy-and-Patch Compilation: fast compilation algorithm fo...
by IAmLiterallyAB on Tuesday June 04, 2024 @09:08AM
(#40574201)
Oh, for sure what I said wouldn't work on a W^X system. I was just pointing out that one of the most widely used JIT software uses WX pages.
What OSes prohibit that? Linux doesn't (well, I think it can with SeLinux maybe?). OpenBSD might?
Re:Copy-and-Patch Compilation: fast compilation algorithm fo...
by mrugiero on Friday June 07, 2024 @12:11PM
(#40610008)
The question was about OSes with hardened runtime protections. The most basic of them all is W^X. All BSDs use it, and IIRC Linux is able to enforce it as well. I'd be surprised if it isn't the default in most distros, but I guess it's not impossible. I need to go for lunch so I won't check right now.