Comments (2)
It stands to reason that it is possible, but it'd require a complete redo of the assembler architecture to support it as this is handled in a dependency : | . Probably would need to keep a shadow copy of the map around in RW memory, track any changes made and then only edit the affected pages to get some semblance of efficiency.
But well, I can tell you mprotect doesn't bother flushing the I$, otherwise #50 wouldn't be a thing. That was my assumption at first as well but it was proven wrong. Then the only logical thing it could be doing is just sequentially editing the TLB entries of the entire buffer. 200us is still a lot for that though, 10MB should be only two thousand and something pages, and ARM's loose ordering shenanigans should allow it to just queue up all the edits and only then throw in a barrier so why is it taking .1 microsecond per page.
from dynasm-rs.
Thanks for the answer!
Yeah 0.1us per page is a lot and I'm not sure why either. Maybe it depends on the microarchitecture of the AArch64 implementation?
My use case is a RV64 -> AArch64 dynamic binary translator, and I'm patching the code to edit inline caches. I guess I should just put the caches outside the executable region for now :)
from dynasm-rs.
Related Issues (20)
- The memmap crate is no longer maintained. HOT 8
- Incorrect instruction encoding on aarch64 HOT 4
- Is emitting text output possible? HOT 2
- Broken link to the documentation HOT 2
- How to choose assembler for shellcode generation HOT 2
- Impossible relocation on x86 HOT 2
- Panic when trying to use 0xff as immediate for a logical operation HOT 6
- Switch to github actions
- Can't encode repne scasb HOT 1
- Website link in the repo's "About" section is wrong HOT 3
- Example of how to run a PE32 executable/library? HOT 7
- Feature request: compile-time resolution of "super-local" label HOT 5
- Language dialect reference for AArch64 has some stale x86/x86-64 references HOT 2
- omit known zero offset HOT 2
- Consider using `MAP_JIT` on macOS HOT 1
- Link to GitHub pages is broken HOT 3
- Question: dynamically replacing code while running it HOT 4
- Executable buffer relocations HOT 5
- ImpossibleRelocation error on seemingly valid AArch64 code HOT 4
- Aarch64: mov w0, immu32 expects a u64 when encoded at runtime
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dynasm-rs.