RafaĆ H rafalh92@outlook.com writes:
Code is only used for non-page-aligned device drivers. Previously if relocation was happening on page boundary it crashed because only one page had changed protection in load_driver_module. Now code is changing protection for two pages (current and next). Also added "goto error" for VirtualProtect call for the current page. This change is safe because if it failed before this change updating the page content would crash anyway.
You should be able to simply duplicate the perform_relocations() functions from the standard loader.