You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks to the comment #845 (comment) I tried adding the NX-bit, but I ran into the definition of read for execution and read for data. Can you give any implementation tips?
When starting an OS that requires NX-bit (Windows 8/10), I see a message in the logs about enabling the NX bit, but the result is the same as before.
I understand that this is a difficult task, but the number of function calls to read from memory is too large. Can this be simplified?
Am I doing the right thing by storing the nx flag in tlb?
I also don't quite understand how the implementation of the nx bit can improve OS support, since this flag is only needed for security.
I don't know how to test this. I couldn't run any kvm tests other than realmode.flat.
I understand that this is a difficult task, but the number of function calls to read from memory is too large. Can this be simplified?
Sure, I'm open to suggestions. A good starting point is the read_imm family of functions, which is by far the most common case of reading instructions.
Am I doing the right thing by storing the nx flag in tlb?
Yes, I believe that's the right approach.
I also don't quite understand how the implementation of the nx bit can improve OS support, since this flag is only needed for security.
Supposedly Windows 8 doesn't work without NX support unless you use workarounds. I haven't tested it. And it's a pre-req for 64-bit support.
I don't know how to test this. I couldn't run any kvm tests other than realmode.flat.
At the very least:
Boot some OSes and check that they detect and apply the NX bit. This can be added to tests/full/run.js
Write some unit tests that set up a page tables with NX protection, jump into them and observe that the page fault is being hit. This could be added to tests/nasm or tests/qemu or tests/jit-paging (this one could be forked) or kvm-unit-test.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Thanks to the comment #845 (comment) I tried adding the NX-bit, but I ran into the definition of read for execution and read for data. Can you give any implementation tips?
When starting an OS that requires NX-bit (Windows 8/10), I see a message in the logs about enabling the NX bit, but the result is the same as before.