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


Groups > linux.kernel > #1377691

Re: [PATCH v2] x86/mm/pat: Fix BUG_ON in mmap_mem on QEMU/i386

From Ingo Molnar <mingo@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH v2] x86/mm/pat: Fix BUG_ON in mmap_mem on QEMU/i386
Date 2016-04-13 11:40 +0200
Message-ID <rnprc-7F0-13@gated-at.bofh.it> (permalink)
References <rmQ0p-2ML-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


* Toshi Kani <toshi.kani@hpe.com> wrote:

> The following BUG_ON error was reported on QEMU/i386:
> 
>   kernel BUG at arch/x86/mm/physaddr.c:79!
>   Call Trace:
>   phys_mem_access_prot_allowed
>   mmap_mem
>   ? mmap_region
>   mmap_region
>   do_mmap
>   vm_mmap_pgoff
>   SyS_mmap_pgoff
>   do_int80_syscall_32
>   entry_INT80_32
> 
> after commit edfe63ec97ed ("x86/mtrr: Fix Xorg crashes in
> Qemu sessions").
> 
> PAT is now set to disabled state when MTRRs are disabled.
> Thus, reactivating the __pa(high_memory) check in
> phys_mem_access_prot_allowed().
> 
> When CONFIG_DEBUG_VIRTUAL is set, __pa() calls __phys_addr(),
> which in turn calls slow_virt_to_phys() for 'high_memory'.
> Because 'high_memory' is set to (the max direct mapped virt
> addr + 1), it is not a valid virtual address.  Hence,
> slow_virt_to_phys() returns 0 and hit the BUG_ON.  Using
> __pa_nodebug() instead of __pa() will fix this BUG_ON.
> 
> However, this code block, originally written for Pentiums and
> earlier, is no longer adequate since a 32-bit Xen guest has
> MTRRs disabled and supports ZONE_HIGHMEM.  In this setup,
> this code sets UC attribute for accessing RAM in high memory
> range.
> 
> Delete this code block as it has been unused for a long time.
> 
> Reported-by: kernel test robot <ying.huang@linux.intel.com>
> Link: https://lkml.org/lkml/2016/4/1/608
> Signed-off-by: Toshi Kani <toshi.kani@hpe.com>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Ingo Molnar <mingo@kernel.org>
> Cc: H. Peter Anvin <hpa@zytor.com>
> Cc: Borislav Petkov <bp@suse.de>
> Cc: David Vrabel <david.vrabel@citrix.com>

So you missed the Reviewed-by tag from Boris ...

I've added it, but please try to propagate tags!

Thanks,

	Ingo

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


Thread

[PATCH v2] x86/mm/pat: Fix BUG_ON in mmap_mem on QEMU/i386 Toshi Kani <toshi.kani@hpe.com> - 2016-04-11 21:50 +0200
  Re: [PATCH v2] x86/mm/pat: Fix BUG_ON in mmap_mem on QEMU/i386 Ingo Molnar <mingo@kernel.org> - 2016-04-13 11:40 +0200
    Re: [PATCH v2] x86/mm/pat: Fix BUG_ON in mmap_mem on QEMU/i386 Toshi Kani <toshi.kani@hpe.com> - 2016-04-13 15:30 +0200
  [tip:x86/asm] x86/mm/pat: Fix BUG_ON() in mmap_mem() on QEMU/i386 tip-bot for Toshi Kani <tipbot@zytor.com> - 2016-04-13 13:40 +0200

csiph-web