All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Hansen <dave.hansen@intel.com>
To: Matt Fleming <matt.fleming@intel.com>
Cc: Borislav Petkov <bp@suse.de>,
	the arch/x86 maintainers <x86@kernel.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: BUG() at boot in __phys_addr with DEBUG_VIRTUAL
Date: Wed, 12 Nov 2014 06:57:58 -0800	[thread overview]
Message-ID: <54637576.7030004@intel.com> (raw)
In-Reply-To: <1415784298.14686.323.camel@mfleming-mobl1.ger.corp.intel.com>

On 11/12/2014 01:24 AM, Matt Fleming wrote:
> On Tue, 2014-11-11 at 15:19 -0800, Dave Hansen wrote:
>> I'm seeing a BUG() at boot in __phys_addr when it has DEBUG_VIRTUAL enabled:
>>
>>>> [    1.193264] ------------[ cut here ]------------
>>>> [    1.198502] kernel BUG at /home/davehans/linux.git/arch/x86/mm/physaddr.c:36!
>>> ...
>>>> [    1.368810] Call Trace:
>>>> [    1.371590]  [<ffffffff8105824c>] __change_page_attr_set_clr+0x42c/0xff0
>>>> [    1.379197]  [<ffffffff81059e42>] kernel_map_pages_in_pgd+0x72/0x110
>>>> [    1.386410]  [<ffffffff81fe2be2>] __map_region+0x45/0x63
>>>> [    1.392437]  [<ffffffff81fe2e13>] efi_map_region+0x32/0xce
>>>> [    1.398663]  [<ffffffff81fe2936>] efi_enter_virtual_mode+0x18c/0x3a4
>>>> [    1.405876]  [<ffffffff81fcb0b6>] start_kernel+0x421/0x4a1
>>>> [    1.412101]  [<ffffffff81fcaa85>] ? set_init_arg+0x55/0x55
>>>> [    1.418327]  [<ffffffff81fca120>] ? early_idt_handlers+0x120/0x120
>>>> [    1.425342]  [<ffffffff81fca5f2>] x86_64_start_reservations+0x2a/0x2c
>>>> [    1.432652]  [<ffffffff81fca746>] x86_64_start_kernel+0x152/0x161
>>>> [    1.439565] Code: 0f 94 c2 31 c0 e8 a6 47 83 00 48 c7 c7 41 49 cc 81 31 c0 e8 98 47 83 00 31 d2 be 01 00 00 00 48 c7 c7 a0 49 f2 81 e8 ab 4a 0e 00 <0f> 0b 0f 0b 4c 89 e2 48 c7 c6 b3 e5 a0 81 48 c7 c7 5c 7a ca 81 
>>>> [    1.461866] RIP  [<ffffffff8105c055>] __phys_addr+0x185/0x260
>>>> [    1.468400]  RSP <ffffffff81e03cf8>
>>>> [    1.472396] ---[ end trace b59b0f17341a4bc4 ]---
> 
> I'm having trouble linking that BUG_ON() with a line in Linus' tree.
> What's the failing expression?

It's actually tripping over this in __phys_addr:

     VIRTUAL_BUG_ON((x > y) || !phys_addr_valid(x));

I dumped out a few of the variables too:

[    1.161406] __phys_addr() x: 0x000078009d3c6000
[    1.166567] __phys_addr() origx: 0x000000009d3c6000
[    1.171832] __phys_addr() y: 0x000000011d3c6000
[    1.176999] __phys_addr() __START_KERNEL_map: 0xffffffff80000000
[    1.183841] __phys_addr() PAGE_OFFSET: 0xffff880000000000
[    1.189993] __phys_addr() x valid: 0

So it looks like the root cause is a physical address getting pass in in
the first place instead of a virtual.

  reply	other threads:[~2014-11-12 14:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-11 23:19 BUG() at boot in __phys_addr with DEBUG_VIRTUAL Dave Hansen
2014-11-11 23:47 ` Borislav Petkov
2014-11-12  9:24 ` Matt Fleming
2014-11-12 14:57   ` Dave Hansen [this message]
2014-11-12 15:11     ` Borislav Petkov
2014-11-12 15:20       ` Dave Hansen
2014-11-12 17:25         ` Borislav Petkov
2014-11-13 10:36           ` Matt Fleming
2014-12-09 10:35             ` Borislav Petkov
2014-11-13 13:08         ` Matt Fleming
2015-01-27 21:37 ` Matt Fleming

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=54637576.7030004@intel.com \
    --to=dave.hansen@intel.com \
    --cc=bp@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matt.fleming@intel.com \
    --cc=x86@kernel.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.