[vbox-dev] Problem with kernel 5.4

Frank Batschulat frank.batschulat at oracle.com
Thu Sep 19 12:29:16 GMT 2019


On Wed, 18 Sep 2019 21:16:12 +0200, Larry Finger  
<Larry.Finger at lwfinger.net> wrote:

> In kernel 5.4, the wrapper routines set_pages_x() and set_pages_nx()  
> that enable/disable execution of memory are removed. The underlying  
> routines set_memory_x() and set_memory_nx() are not, and will not be  
> exported. See  
> http://lkml.iu.edu/hypermail/linux/kernel/1909.2/02763.html for a  
> discussion of the issue.
>
> I have currently disabled the only calls to these routines, which occur  
> in alloc-r0drv-linux.c. My test VMs appear to work OK.
>
> Is there some case where allocated pages really need to be executable?  
> If so, then the developers at Oracle will need to consult with Linus to  
> develop a method that will be acceptable. In the meantime, I have  
> developed a patch that allows a build with kernel 5.4 that eliminates  
> the offending calls.

Thanks Larry. I agree with Linux, having arbitrary kernel modules
flip page attributes to make them executable is certainly
a questionable idea and obviously nott going to work with 5.4.

I'll investigate and gather information of why it was thought to be
required and how we gonna deal with this situation going forward.

tracking bug filed is:

#18945: Linux 5.4: no more arbitrary executable pages
https://www.virtualbox.org/ticket/18945

cheers
-- 
frankB

Oracle Virtualbox Development



More information about the vbox-dev mailing list