[vbox-dev] Problem with memory management in VirtualBox with kernel 5.8

Larry Finger Larry.Finger at lwfinger.net
Sun Jun 28 18:18:07 GMT 2020


When kernel 5.8 eliminated the export of kernel routines such as 
__get_vm_area(), VirtualBox was forced to revert to code used before that 
routine was introduced in 2.6.23. The resulting code will build but not load 
with the error "modprobe: ERROR: could not insert 'vboxdrv': Exec format error".

Removal of the following piece of code allows the driver to load, but not run:

#  define EXEC_MEMORY_SIZE   2097152    /* 2 MB */
extern uint8_t g_abExecMemory[EXEC_MEMORY_SIZE];
__asm__(".section execmemory, \"awx\", @progbits\n\t"
         ".align 32\n\t"
         ".globl g_abExecMemory\n"
         "g_abExecMemory:\n\t"
         ".zero " RT_XSTR(EXEC_MEMORY_SIZE) "\n\t"
         ".type g_abExecMemory, @object\n\t"
         ".size g_abExecMemory, " RT_XSTR(EXEC_MEMORY_SIZE) "\n\t"
         ".text\n\t");

I do not have enough knowledge of x86 assembler to know what that code is 
supposed to do or why it fails. I would appreciate help.

Thanks,

Larry



More information about the vbox-dev mailing list