Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate & turn back on ValidateWrite in VirtWrite #8

Open
0vercl0k opened this issue Jul 18, 2021 · 0 comments
Open

Investigate & turn back on ValidateWrite in VirtWrite #8

0vercl0k opened this issue Jul 18, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@0vercl0k
Copy link
Owner

I remember I turned this off at one point:

bool Backend_t::VirtWrite(const Gva_t Gva, const uint8_t *Buffer,
                          const uint64_t BufferSize, const bool Dirty) {
  uint64_t Size = BufferSize;
  Gva_t CurrentGva = Gva;
  while (Size > 0) {
    Gpa_t Gpa;
    // XXX: Reenable ValidateReadWrite when bug is figured out.
    const bool Translate = VirtTranslate(
        CurrentGva, Gpa, MemoryValidate_t::ValidateRead /*Write*/);

I would run into cases where I'd VirtWrite onto a PTE that wasn't set writeable; but writing over it ignoring the PTE state never lead to any weird crash so I let it be.

It'd be good to understand why that is and what's the behavior behind; it might be the case that the PF handler turns it to writeable for unknown reason so we might need to emulate that behavior as well.

@0vercl0k 0vercl0k added the enhancement New feature or request label Jul 18, 2021
@0vercl0k 0vercl0k changed the title Investigate & turn back on ValidateWrite in Backend_t::VirtWrite Investigate & turn back on ValidateWrite in VirtWrite Jul 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant