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

Fix race between JIT executing emulated code and another image starting. #58

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Commits on May 7, 2024

  1. Fix race between JIT executing emulated code and another image starting.

    More silent corruption due to lack of reentrance. But it's not enough
    to wrap uc_mem_protect...interrupts can be re-enabled inside JITted
    code (or really anytime) due to TPL manipulation, so need to hook
    the EFI_CPU_ARCH_PROTOCOL interrupt manipulation routines.
    
    Very much reaching the point where a better JIT needs to be written
    that doesn't have the reentrancy issues.
    
    Tested with ArmVirtPkg running the virtio-net x64 driver + loading
    another x64 driver from Shell. No longer seeing Mnp/Snp errors
    due to accessing bogus buffer address.
    
    Signed-off-by: Andrei Warkentin <[email protected]>
    andreiw committed May 7, 2024
    Configuration menu
    Copy the full SHA
    f0b7074 View commit details
    Browse the repository at this point in the history