VirtualBox

Opened 4 years ago

Closed 4 years ago

#19305 closed defect (fixed)

EFLAGS.AC is clear

Reported by: Jan Palus Owned by:
Component: VMM Version: VirtualBox 6.1.2
Keywords: Cc:
Guest type: other Host type: Linux

Description

I am struggling with getting distribution build of VirtualBox to work under Linux. Whenever VM start is attempted it fails and following is logged in dmesg:

[   41.692109] ModuleInit, line 178: EFLAGS.AC is clear! (0x202)
[   41.692127] ModuleInit, line 207: EFLAGS.AC is clear! (0x202)
[   41.692163] ModuleInit, line 211: EFLAGS.AC is clear! (0x246)
[   41.692177] ModuleInit, line 215: EFLAGS.AC is clear! (0x246)
[   41.692189] ModuleInit, line 219: EFLAGS.AC is clear! (0x246)
[   41.692189] ModuleInit, line 222: EFLAGS.AC is clear! (0x246)
[   41.692190] ModuleInit, line 227: EFLAGS.AC is clear! (0x246)
[   41.692190] ModuleInit, line 233: EFLAGS.AC is clear! (0x246)
[   41.692191] ModuleInit, line 243: EFLAGS.AC is clear! (0x246)
[   41.692199] ModuleInit, line 253: EFLAGS.AC is clear! (0x246)

I've been looking a bit into code and don't really understand how it's expected to work. ModuleInit in VMMR0 is using VMM_CHECK_SMAP_CHECK in multiple places and probably that's what causes init method failure. VMM_CHECK_SMAP_CHECK ensures that CPU AC bit is set in EFLAGS. The only possibility to disable the check is to enable VBOX_WITH_RAM_IN_KERNEL which appears to be disabled on purpose. Hence AC flag check is mandatory. On the other hand VBOX_WITHOUT_EFLAGS_AC_SET_IN_VBOXDRV was added in src/VBox/HostDrivers/Support/linux/Makefile so there's no way AC bit is actually set. Could you please clarify?

Change History (3)

comment:1 by Jan Palus, 4 years ago

I think script that we use for building kernel modules needs an update (./src/VBox/HostDrivers/linux/export_modules.sh):

if [ -n "$VBOX_WITH_HARDENING" ]; then
    sed -e "s;VBOX_WITH_EFLAGS_AC_SET_IN_VBOXDRV;;g" \
        -e "s;IPRT_WITH_EFLAGS_AC_PRESERVING;;g" \
        < $PATH_VBOXDRV/linux/Makefile > $PATH_TMP/vboxdrv/Makefile
else
    sed -e "s;VBOX_WITH_HARDENING;;g" \
        -e "s;VBOX_WITH_EFLAGS_AC_SET_IN_VBOXDRV;;g" \
        -e "s;IPRT_WITH_EFLAGS_AC_PRESERVING;;g" \
        < $PATH_VBOXDRV/linux/Makefile > $PATH_TMP/vboxdrv/Makefile
fi

I don't think it should remove VBOX_ WITH _EFLAGS_AC_* in both cases. I suppose the latter case should remove VBOX_ WITHOUT _EFLAGS_AC_*. Also not sure if dependency on VBOX_WITH_HARDENING while other places depend on VBOX_WITH_RAM_IN_KERNEL is correct.

comment:2 by bird, 4 years ago

Status: newawaitsfeedback

There seems to be some mixup with some VMM changes that hadn't yet been done on linux in 6.1.2. I think it should be fixed in 6.1.4. Please retry with the latest 6.1.x. If it still does not work, please point me to the exact VirtualBox package you are trying to use (export_modules.sh isn't used with all of them).

comment:3 by bird, 4 years ago

Resolution: fixed
Status: awaitsfeedbackclosed

On second viewing, the code in question should be disabled in 6.1.4, so it shouldn't be able to cause any trouble. Closing as fixed.

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use