All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Lutomirski <luto@amacapital.net>
To: Stas Sergeev <stsp@list.ru>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Austin S Hemmelgarn <ahferroin7@gmail.com>,
	Josh Boyer <jwboyer@fedoraproject.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Andrew Bird (Sphere Systems)" <ajb@spheresystems.co.uk>,
	Ingo Molnar <mingo@kernel.org>, Kees Cook <keescook@chromium.org>,
	Brian Gerst <brgerst@gmail.com>
Subject: Re: stop breaking dosemu (Re: x86/kconfig/32: Rename CONFIG_VM86 and default it to 'n')
Date: Thu, 3 Sep 2015 10:21:38 -0700	[thread overview]
Message-ID: <CALCETrUWqwd1RzOTeOOm21pHnDks76ty1E8Of6TMNcSBVAW=rg@mail.gmail.com> (raw)
In-Reply-To: <55E88138.4080905@list.ru>

On Thu, Sep 3, 2015 at 10:19 AM, Stas Sergeev <stsp@list.ru> wrote:
> 03.09.2015 19:57, Linus Torvalds пишет:
>> On Thu, Sep 3, 2015 at 8:44 AM, Austin S Hemmelgarn
>> <ahferroin7@gmail.com> wrote:
>>>
>>> This lets you turn this on or off at runtime.
>>
>> Tangential aside: we already effectively have a flag that could turn
>> off vm86 mode dynamically: /proc/sys/vm/mmap_min_addr.
>>
>> Sadly (or not) we default it to 4096, which still leaves vm86 mode
>> usable, although it effectively disables *dos* use for it. Which is
>> kind of the worst of both worlds: you can use the vm86() system call
>> for bad things (if you can find a hole in it), but you probably cannot
>> actually use it for DOS emulation, because the traditional BIOS data
>> segment is at 0040.
>>
>> Anyway, what that means is that pretty much the only *valid* use of
>> vm86() mode is probably when the system maintainer has set
>> 'mmap_min_addr' to zero. So we could probably use that as an already
>> existing flag that disallows vm86 by our current default values.
>>
>> Stas - can you confirm that to actually use vm86 mode, you end up
>> setting that mmap_min_addr thing to zero? Or do you end up using a
>> mixed-mode setup, where you use vm86() for most things, but emulate
>> things that trap in the zero page?
> Yes, good point.
> dosemu complains about /proc/sys/vm/mmap_min_addr.
> Trapping on zero-page access will likely not work, because
> IIRC some distros raise that value even more.
> So yes, please use that to completely disable vm86().
> You won't even break dosemu's checks, because it (obviously)
> tries mmap() before trying vm86().
>

I'm okay with that.  Shall I send a patch?

There's also vbetool, but I think that almost everyone considers it
dead at this point, and it seems reasonably likely that it needs
mmap_min_addr == 0 as well.

--Andy

  reply	other threads:[~2015-09-03 17:22 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-02  9:37 stop breaking dosemu (Re: x86/kconfig/32: Rename CONFIG_VM86 and default it to 'n') Stas Sergeev
2015-09-02 14:08 ` Andy Lutomirski
2015-09-02 15:31   ` Kees Cook
2015-09-02 17:30   ` Stas Sergeev
2015-09-02 17:46   ` Josh Boyer
2015-09-02 17:50     ` Stas Sergeev
2015-09-02 20:22       ` Josh Boyer
2015-09-02 20:47         ` Stas Sergeev
2015-09-02 20:55           ` Andy Lutomirski
2015-09-02 20:59             ` Josh Boyer
2015-09-02 21:12             ` Stas Sergeev
2015-09-02 21:40               ` Andy Lutomirski
2015-09-02 21:53                 ` Stas Sergeev
2015-09-03 12:11                   ` Austin S Hemmelgarn
2015-09-03 12:15                     ` Stas Sergeev
2015-09-03 15:44                       ` Austin S Hemmelgarn
2015-09-03 16:34                         ` Stas Sergeev
2015-09-03 18:51                           ` Austin S Hemmelgarn
2015-09-03 21:28                             ` Stas Sergeev
2015-09-04 10:09                               ` Chuck Ebbert
2015-09-04 10:46                                 ` Stas Sergeev
2015-09-04 12:34                                   ` Austin S Hemmelgarn
2015-09-04 13:06                                     ` Stas Sergeev
2015-09-04 19:51                                       ` Austin S Hemmelgarn
2015-09-04 21:16                                         ` Stas Sergeev
2015-09-04 21:30                                           ` Stas Sergeev
2015-09-04 22:46                                             ` Raymond Jennings
2015-09-04 23:18                                               ` Stas Sergeev
2015-09-03 22:39                             ` Stas Sergeev
2015-09-03 16:57                         ` Linus Torvalds
2015-09-03 17:19                           ` Stas Sergeev
2015-09-03 17:21                             ` Andy Lutomirski [this message]
2015-09-03 17:34                               ` Stas Sergeev
2015-09-03 17:13                         ` Stas Sergeev
2015-09-03 12:01               ` Austin S Hemmelgarn
2015-09-03 12:09                 ` Stas Sergeev
2015-09-02 17:52     ` Kees Cook
2015-09-02 20:25       ` Josh Boyer
2015-09-02 18:19     ` Andy Lutomirski
2015-09-02 20:26       ` Josh Boyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CALCETrUWqwd1RzOTeOOm21pHnDks76ty1E8Of6TMNcSBVAW=rg@mail.gmail.com' \
    --to=luto@amacapital.net \
    --cc=ahferroin7@gmail.com \
    --cc=ajb@spheresystems.co.uk \
    --cc=brgerst@gmail.com \
    --cc=jwboyer@fedoraproject.org \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=stsp@list.ru \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.