[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALCETrWB=Q3Y2JjYCMZc+xsWDKWbas5FaygN67kbpjyNrD91MA@mail.gmail.com>
Date: Wed, 8 Jul 2015 12:04:24 -0700
From: Andy Lutomirski <luto@...capital.net>
To: Kees Cook <keescook@...omium.org>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
Arjan van de Ven <arjan@...ux.intel.com>,
Andy Lutomirski <luto@...nel.org>,
"the arch/x86 maintainers" <x86@...nel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Oleg Nesterov <oleg@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
Borislav Petkov <bp@...en8.de>
Subject: Re: [PATCH] x86/kconfig/32: Mark CONFIG_VM86 as BROKEN
On Wed, Jul 8, 2015 at 11:48 AM, Kees Cook <keescook@...omium.org> wrote:
> On Wed, Jul 8, 2015 at 10:55 AM, Linus Torvalds
> <torvalds@...ux-foundation.org> wrote:
>> On Wed, Jul 8, 2015 at 10:49 AM, Andy Lutomirski <luto@...capital.net> wrote:
>>>
>>> I don't know how to tell whether something is trying to use real mode,
>>> but I can play this just fine in DOSEMU on my 64-bit laptop:
>>
>> So a 64-bit distro obviously will never have used vm86 mode - it
>> doesn't work there. Never has. There's no sane way to get to vm86 mode
>> from long mode, that's just how the 64-bit extensions worked.
>>
>> (64-bit hardware obviously does support vm86 mode, but you have to
>> play games with mixing long mode and CPL0 32-bit protected mode to get
>> there, and we never did that).
>>
>> It's the 32-bit distros I would worry about. The ones that may have
>> well disabled emulation, because they have vm86 mode enabled.
>
> Speaking as the dosemu maintainer in Debian and Ubuntu, I can confirm
> what Andy mentioned: dosemu will kick over to emulation if SYS_vm86
> and SYS_vm86old fail. The other area I remember that used vm86 mode
> was non-KMS Xorg drivers and anything using svgalib that tried to do
> video card BIOS initialization.
Adam Jackson said on the Fedora list that everything uses x86emu these
days. And haven't modern kernels already dropped most of the UMS
support already?
>
> Also, Andy, I think you weren't looking at i386 builds of Ubuntu.
> Current Ubuntu, and 12.04 ("Precise") LTS (supported until 2017), and
> 14.04 LTS (until 2019) releases all have CONFIG_VM86.
Hmm. I was going off something someone said an IRC. Apparently I
should have double-checked.
If you have a test system easily available, can you see what happens
if you try to do:
$ sudo auditctl -e 1
$ sudo auditctl -D # just in case you had a "-a task,never" rule installed
$ dosemu
on a system with CONFIG_VM86=y? I bet it fails. Maybe it gets lucky
due to the the bogus vm86 asm code managing to explode with
eax=-ENOSYS, triggering a fallback to emulation.
--Andy
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists