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


Groups > linux.kernel > #1207861

Re: [GIT PULL] x86 fixes

From Linus Torvalds <torvalds@linux-foundation.org>
Newsgroups linux.kernel
Subject Re: [GIT PULL] x86 fixes
Date 2015-08-14 21:10 +0200
Message-ID <pXswx-2Ca-7@gated-at.bofh.it> (permalink)
References <pXhrr-3w7-1@gated-at.bofh.it> <pXrTQ-1Dj-17@gated-at.bofh.it> <pXsdb-206-13@gated-at.bofh.it> <pXsmS-2bn-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, Aug 14, 2015 at 11:57 AM, Linus Torvalds
<torvalds@linux-foundation.org> wrote:
>
> That code seems fine to me (and explicitly errors out when it's not in
> the LDT). FPU_CS is actually the CS selector value.
>
> So testing that for being in the LDT by checking bit #2, and then
> using FPU_get_ldt_descriptor() on it actually seems *correct*.
>
> It's the actual instruction data segment handling that looks entirely
> broken, and was explicitly made *more* broken by that commit.

Note that in practice, it's *probably* true that if CS ends up being
in the LDT (so we're running something odd like Wine), then *probably*
the data segments are going to be in the LDT too. So the old code that
unconditionally looked things up in the LDT probably worked in
practice, even if it was wrong.

The new code cannot *possibly* work at all, because even if the data
segment register is in the LDT, it uses the wrong thing to look up the
LDT entry, so it will get the wrong base.

But as mentioned, it will only *matter* on something like a 486SX, and
only when the whole "CS/DS didn't match the default flat segments"
case triggers, so not only do you have to run on a 486SX, you will
have to run something like Wine on it. So it sounds very very unlikely
that this bug matters in practice.

                      Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

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


Thread

[GIT PULL] x86 fixes Ingo Molnar <mingo@kernel.org> - 2015-08-14 09:20 +0200
  Re: [GIT PULL] x86 fixes Linus Torvalds <torvalds@linux-foundation.org> - 2015-08-14 20:30 +0200
    Re: [GIT PULL] x86 fixes Andy Lutomirski <luto@amacapital.net> - 2015-08-14 20:50 +0200
      Re: [GIT PULL] x86 fixes Linus Torvalds <torvalds@linux-foundation.org> - 2015-08-14 21:00 +0200
        Re: [GIT PULL] x86 fixes Linus Torvalds <torvalds@linux-foundation.org> - 2015-08-14 21:10 +0200
          Re: [GIT PULL] x86 fixes Andy Lutomirski <luto@amacapital.net> - 2015-08-14 21:20 +0200
            Re: [GIT PULL] x86 fixes Linus Torvalds <torvalds@linux-foundation.org> - 2015-08-14 21:40 +0200
        Re: [GIT PULL] x86 fixes Andy Lutomirski <luto@amacapital.net> - 2015-08-14 21:20 +0200
    Re: [GIT PULL] x86 fixes Ingo Molnar <mingo@kernel.org> - 2015-08-17 10:10 +0200
      Re: [GIT PULL] x86 fixes Denys Vlasenko <dvlasenk@redhat.com> - 2015-08-17 13:00 +0200
        Re: [GIT PULL] x86 fixes Linus Torvalds <torvalds@linux-foundation.org> - 2015-08-17 19:00 +0200
          Re: [GIT PULL] x86 fixes Ingo Molnar <mingo@kernel.org> - 2015-08-18 10:00 +0200
      Re: [GIT PULL] x86 fixes Linus Torvalds <torvalds@linux-foundation.org> - 2015-08-17 18:50 +0200
        Re: [GIT PULL] x86 fixes "H. Peter Anvin" <hpa@zytor.com> - 2015-08-17 19:00 +0200
          Re: [GIT PULL] x86 fixes Linus Torvalds <torvalds@linux-foundation.org> - 2015-08-17 19:20 +0200
            Re: [GIT PULL] x86 fixes "H. Peter Anvin" <hpa@zytor.com> - 2015-08-18 00:20 +0200
              Re: [GIT PULL] x86 fixes Ingo Molnar <mingo@kernel.org> - 2015-08-19 08:00 +0200
                Re: [GIT PULL] x86 fixes Ingo Molnar <mingo@kernel.org> - 2015-08-19 08:20 +0200
                Re: [GIT PULL] x86 fixes Ingo Molnar <mingo@kernel.org> - 2015-08-19 09:00 +0200
                Re: [GIT PULL] x86 fixes "H. Peter Anvin" <hpa@zytor.com> - 2015-08-19 12:10 +0200
            Re: [GIT PULL] x86 fixes Bryan O'Donoghue <pure.logic@nexus-software.ie> - 2015-08-18 01:50 +0200
      Re: [GIT PULL] x86 fixes "H. Peter Anvin" <hpa@zytor.com> - 2015-08-17 23:10 +0200
      Re: [GIT PULL] x86 fixes Andy Lutomirski <luto@amacapital.net> - 2015-08-18 02:00 +0200
        Re: [GIT PULL] x86 fixes "H. Peter Anvin" <hpa@zytor.com> - 2015-08-18 02:10 +0200
        Re: [GIT PULL] x86 fixes "H. Peter Anvin" <hpa@zytor.com> - 2015-08-18 02:10 +0200
          Re: [GIT PULL] x86 fixes Andy Lutomirski <luto@amacapital.net> - 2015-08-18 02:20 +0200
            Re: [GIT PULL] x86 fixes "H. Peter Anvin" <hpa@zytor.com> - 2015-08-18 08:00 +0200
            Re: [GIT PULL] x86 fixes "H. Peter Anvin" <hpa@zytor.com> - 2015-08-18 08:10 +0200
        Re: [GIT PULL] x86 fixes Ingo Molnar <mingo@kernel.org> - 2015-08-18 10:00 +0200

csiph-web