Re: [PATCH] x86/kconfig/32: Mark CONFIG_VM86 as BROKEN
From: Eric W. Biederman
Date: Fri Jul 10 2015 - 10:18:39 EST
Andy Lutomirski <luto@xxxxxxxxxxxxxx> writes:
> On Wed, Jul 8, 2015 at 9:59 AM, Linus Torvalds
> <torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:
>> On Tue, Jul 7, 2015 at 7:33 PM, Arjan van de Ven <arjan@xxxxxxxxxxxxxxx> wrote:
>>>
>>> if this patch would not be acceptable, at minimum we need some sort of "off
>>> by default
>>> unless the sysadmin flips a sysfs thing", which is really just a huge hack.
>>
>> The only thing that matters is whether people use this or not.
>>
>
> I think that the world contains precisely two programs that use the
> vm86 syscalls. One is dosemu, and one is a test case I wrote.
Wine used to also call vm86.
> As far as I can tell (and I'll try to test this better for real later
> this week), dosemu already knows how to emulate real mode if vm86 is
> unavailable. So it's unclear that turning off the vm86 syscalls
> actually breaks anything whatsoever.
Yes. This happened after 64bit kernels became common years ago, as the
lack of vm86 on 64bit nearly killed the dosemu project.
> On the other hand, sys_vm86 fails if the syscall slow path is in use.
> That means that quite a few Fedora versions (auditing), anything with
> ptrace, seccomp (before 3.16 IIRC), and anything with context tracking
> is probably actually *improved* by turning off the vm86 syscalls even
> for dosemu users.
Is there any chance that vm86 is sufficiently badly broken before this
that we can conclude vm86 is not in use? It would really simplify this
discussion if we could point to code rot and say that it is clear that
no one has been testing this code path for ages, and that the code can't
possibly work the way it is now. That would just let us remove vm86.
> It only says "[OK]" because my test case isn't careful enough. That's
> a failure. I suspect it was a much worse failure a couple versions
> ago before my ENOSYS-reworking patch went in.
>
> I'll try to confirm later this week that dosemu can really handle real
> mode without sys_vm86.
I have not looked in ages but certainly on 64bit dosemu can.
As someone else pointed out dosemu maps the zero page so that may also
be a point where vm86 support gets broken.
Eric
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/