Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1518750

Re: [PATCH 0/4] x86: enable User-Mode Instruction Prevention

From Stas Sergeev <stsp@list.ru>
Newsgroups linux.kernel
Subject Re: [PATCH 0/4] x86: enable User-Mode Instruction Prevention
Date 2016-11-10 10:00 +0100
Message-ID <sBTnb-3hK-5@gated-at.bofh.it> (permalink)
References (1 earlier) <sBetH-1nU-15@gated-at.bofh.it> <sBgFb-2G7-13@gated-at.bofh.it> <sBsQ1-2tX-11@gated-at.bofh.it> <sBzot-6GJ-15@gated-at.bofh.it> <sBRlo-1Xo-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi!

I don't know the context of that discussion, so I'll only
comment on the dosemu part.

10.11.2016 09:46, Ricardo Neri пишет:
> I took a closer look at the dosemu code. It appears that it does not
> purposely utilize SGDT to obtain the descriptor table while in vm86. It
> does use SGDT (in protected mode) to emulate certain functionality such
> as the Virtual xxx Driver. In such a case, UMIP needs to be disabled.
> However, this code seems to be disabled [1].
Indeed.
The code you've found, was copied from wine, because
dosemu supports windows-3.1. But sgdt is in win32s part
that is disabled in dosemu. It is however enabled in wine, or
at least it was when I ported the VxD code from there. So you
may want to ask wine devs if they still use sgdt and vm86.
In dosemu, if we ever enable win32s support, we won't rely
on sgdt. In fact, when some prot mode program under dosemu
uses GDT selectors, in a fault handler we replace them with
LDT selectors.

>   dosemu includes an i386
> emulator that in some cases uses the actual instructions of the host
> system.
In dosemu2 code, the places you've found, now contain this:
error("SGDT not implemented\n");
If we ever support SGDT, we'll use some emulation/fake values.

So overall, dosemu is not going to willingly use sgdt in any
near future. But the programs running under vm86 or in prot mode
may do so. This is very uncommon though, especially under dosemu,
because it supports only a "polite" programs - those that work
under win95's dos prompt. No one would get sufficiently hurt if
sgdt under vm86 will somehow change from its current behaviour.

You can ask wine people for their sgdt use in win32s subsystem.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/4] x86: enable User-Mode Instruction Prevention Ricardo Neri <ricardo.neri-calderon@linux.intel.com> - 2016-11-08 07:20 +0100
  [PATCH 3/4] x86: Enable User-Mode Instruction Prevention Ricardo Neri <ricardo.neri-calderon@linux.intel.com> - 2016-11-08 07:20 +0100
  [PATCH 4/4] selftests/x86: Add tests for User-Mode Instruction Prevention Ricardo Neri <ricardo.neri-calderon@linux.intel.com> - 2016-11-08 07:20 +0100
  [PATCH 2/4] x86: Prepare vm86 tasks to handle User-Mode Instruction Prevention Ricardo Neri <ricardo.neri-calderon@linux.intel.com> - 2016-11-08 07:20 +0100
    Re: [PATCH 2/4] x86: Prepare vm86 tasks to handle User-Mode  Instruction Prevention Andy Lutomirski <luto@amacapital.net> - 2016-11-08 17:10 +0100
      Re: [PATCH 2/4] x86: Prepare vm86 tasks to handle User-Mode  Instruction Prevention Peter Zijlstra <peterz@infradead.org> - 2016-11-08 18:10 +0100
        Re: [PATCH 2/4] x86: Prepare vm86 tasks to handle User-Mode  Instruction Prevention Ricardo Neri <ricardo.neri-calderon@linux.intel.com> - 2016-11-09 05:30 +0100
  Re: [PATCH 0/4] x86: enable User-Mode Instruction Prevention Peter Zijlstra <peterz@infradead.org> - 2016-11-08 14:20 +0100
    Re: [PATCH 0/4] x86: enable User-Mode Instruction Prevention Andy Lutomirski <luto@amacapital.net> - 2016-11-08 16:40 +0100
      Re: [PATCH 0/4] x86: enable User-Mode Instruction Prevention Thomas Gleixner <tglx@linutronix.de> - 2016-11-08 18:00 +0100
        Re: [PATCH 0/4] x86: enable User-Mode Instruction Prevention Ricardo Neri <ricardo.neri-calderon@linux.intel.com> - 2016-11-09 05:30 +0100
      Re: [PATCH 0/4] x86: enable User-Mode Instruction Prevention Ricardo Neri <ricardo.neri-calderon@linux.intel.com> - 2016-11-09 05:40 +0100
        Re: [PATCH 0/4] x86: enable User-Mode Instruction Prevention Andy Lutomirski <luto@amacapital.net> - 2016-11-09 12:40 +0100
          Re: [PATCH 0/4] x86: enable User-Mode Instruction Prevention Ricardo Neri <ricardo.neri-calderon@linux.intel.com> - 2016-11-10 07:50 +0100
            Re: [PATCH 0/4] x86: enable User-Mode Instruction Prevention Stas Sergeev <stsp@list.ru> - 2016-11-10 10:00 +0100
              Re: [PATCH 0/4] x86: enable User-Mode Instruction Prevention Ricardo Neri <ricardo.neri-calderon@linux.intel.com> - 2016-11-11 05:20 +0100

csiph-web