Re: BUG() at boot in __phys_addr with DEBUG_VIRTUAL

From: Borislav Petkov
Date: Wed Nov 12 2014 - 12:25:25 EST


On Wed, Nov 12, 2014 at 07:20:53AM -0800, Dave Hansen wrote:
> So perhaps efi_map_region() is handing an address from the EFI identity
> map down in here. __pa() gets called on it, but that fails since __pa()
> only works on the *KERNEL* identity map.

Grrr, yeah, so pageattr.c assumes the kernel pgd in some places still.

> I think we might actually need to walk the page tables in there. Even
> the pfn_range_is_mapped() code looks to be dealing with the kernel
> identity map.

Yep, pageattr.c should be taught to pay attention to cpa->pgd. Btw, we
do have lookup_address_in_pgd() there which should do the walking.

But before we do that: Matt, why do we need the kernel text mapped 1:1
in the EFI page table at all?

You've added this with

4f9dbcfc4029 ("x86/efi: Add mixed runtime services support")

AFAICT.

Thanks.

--
Regards/Gruss,
Boris.

Sent from a fat crate under my desk. Formatting is fine.
--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/