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


Groups > linux.kernel > #1606111

Re: [lkp-robot] [x86] 69218e4799: BUG:kernel_hang_in_boot_stage

From Andy Lutomirski <luto@kernel.org>
Newsgroups linux.kernel
Subject Re: [lkp-robot] [x86] 69218e4799: BUG:kernel_hang_in_boot_stage
Date 2017-03-22 01:10 +0100
Message-ID <tnC0G-2r8-11@gated-at.bofh.it> (permalink)
References (2 earlier) <tnxDI-7Ii-19@gated-at.bofh.it> <tnxDI-7Ii-17@gated-at.bofh.it> <tnyzM-8nv-9@gated-at.bofh.it> <tnzma-yy-25@gated-at.bofh.it> <tnABA-1iQ-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, Mar 21, 2017 at 3:32 PM, Andy Lutomirski <luto@amacapital.net> wrote:
> On Tue, Mar 21, 2017 at 2:11 PM, Linus Torvalds
> <torvalds@linux-foundation.org> wrote:
>> On Tue, Mar 21, 2017 at 1:25 PM, Thomas Garnier <thgarnie@google.com> wrote:
>>> The issue seems to be related to exceptions happening in close pages
>>> to the fixmap GDT remapping.
>>>
>>> The original page fault happen in do_test_wp_bit which set a fixmap
>>> entry to test WP flag. If I grow the number of processors supported
>>> increasing the distance between the remapped GDT page and the WP test
>>> page, the error does not reproduce.
>>>
>>> I am still looking at the exact distance between repro and no-repro as
>>> well as the exact root cause.
>>
>> Hmm. Have we set the GDT limit incorrectly, somehow? The GDT *can*
>> cover 8k entries, which at 8 bytes each would be 64kB.
>
> The QEMU barf says the GDT limit is 0xff, for better or for worse.
>
>>
>> So somebody trying to load an invalid segment (say, 0xffff) might end
>> up causing an access to the GDT base + 64k - 8.
>>
>> It is also possible that the CPU might do a page table writability
>> check *before* it does the limit check. That would sound odd, though.
>> Might be a CPU errata.
>>
>

> There's presumably something genuinely wrong with our GDT.

This is suspicious.  I added this code in test_wp_bit:

    if (memcmp(get_current_gdt_ro(), get_current_gdt_rw(), 4096) != 0) {
        pr_err("Oh crap\n");
        BUG_ON(1);
    }

It printed "Oh crap" and blew up.  Methinks something's wrong with the
fixmap.  Is it possible that we're crossing a PMD boundary and failing
to translate the addresses right?

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


Thread

Re: [lkp-robot] [x86] 69218e4799: BUG:kernel_hang_in_boot_stage Thomas Garnier <thgarnie@google.com> - 2017-03-21 19:30 +0100
  Re: [lkp-robot] [x86] 69218e4799: BUG:kernel_hang_in_boot_stage Thomas Garnier <thgarnie@google.com> - 2017-03-21 20:30 +0100
    Re: [lkp-robot] [x86] 69218e4799: BUG:kernel_hang_in_boot_stage Thomas Garnier <thgarnie@google.com> - 2017-03-21 21:30 +0100
      Re: [lkp-robot] [x86] 69218e4799: BUG:kernel_hang_in_boot_stage Linus Torvalds <torvalds@linux-foundation.org> - 2017-03-21 22:20 +0100
        Re: [lkp-robot] [x86] 69218e4799: BUG:kernel_hang_in_boot_stage Andy Lutomirski <luto@amacapital.net> - 2017-03-21 23:40 +0100
          Re: [lkp-robot] [x86] 69218e4799: BUG:kernel_hang_in_boot_stage Andy Lutomirski <luto@kernel.org> - 2017-03-22 01:10 +0100
            Re: [lkp-robot] [x86] 69218e4799: BUG:kernel_hang_in_boot_stage Thomas Garnier <thgarnie@google.com> - 2017-03-22 01:50 +0100
              Re: [lkp-robot] [x86] 69218e4799: BUG:kernel_hang_in_boot_stage Andy Lutomirski <luto@kernel.org> - 2017-03-22 05:50 +0100
                Re: [lkp-robot] [x86] 69218e4799: BUG:kernel_hang_in_boot_stage Thomas Garnier <thgarnie@google.com> - 2017-03-22 06:20 +0100
                Re: [lkp-robot] [x86] 69218e4799: BUG:kernel_hang_in_boot_stage Ingo Molnar <mingo@kernel.org> - 2017-03-22 08:40 +0100
                Re: [lkp-robot] [x86] 69218e4799: BUG:kernel_hang_in_boot_stage Andy Lutomirski <luto@amacapital.net> - 2017-03-22 17:40 +0100
                Re: [lkp-robot] [x86] 69218e4799: BUG:kernel_hang_in_boot_stage Thomas Garnier <thgarnie@google.com> - 2017-03-22 17:50 +0100
                Re: [lkp-robot] [x86] 69218e4799: BUG:kernel_hang_in_boot_stage Andy Lutomirski <luto@kernel.org> - 2017-03-22 18:10 +0100
  Re: [lkp-robot] [x86] 69218e4799: BUG:kernel_hang_in_boot_stage Linus Torvalds <torvalds@linux-foundation.org> - 2017-03-21 20:30 +0100

csiph-web