Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1336615
| From | Dan Williams <dan.j.williams@intel.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] x86/mm: Add x86 valid_phys_addr_range() for /dev/mem |
| Date | 2016-02-17 19:00 +0100 |
| Message-ID | <r3eyn-1js-9@gated-at.bofh.it> (permalink) |
| References | <r0rBM-3Ed-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, Feb 9, 2016 at 6:06 PM, Toshi Kani <toshi.kani@hpe.com> wrote: > x86 does not define ARCH_HAS_VALID_PHYS_ADDR_RANGE, which > leads /dev/mem to use the default valid_phys_addr_range() > and valid_mmap_phys_addr_range() in drivers/char/mem.c. > > The default valid_phys_addr_range() allows any range lower > than __pa(high_memory), which is the end of system RAM, and > disallows any range higher than it. > > Persistent memory may be located at lower and/or higher > address of __pa(high_memory) depending on their memory slots. > When using crash(8) via /dev/mem for analyzing data in > persistent memory, it can only access to the one lower than > __pa(high_memory). > > Add x86 valid_phys_addr_range() and valid_mmap_phys_addr_range() > to provide better checking: > - Physical address range is valid when it is fully backed by > IORESOURCE_MEM, regardless of __pa(high_memory). > - Other ranges, including holes, are invalid. > > This also allows crash(8) to access persistent memory ranges > via /dev/mem (with a minor change to remove high_memory check > from crash itself). If we're modifying crash(8) can't we also teach it to mmap /dev/pmemX directly? With commit 90a545e98126 "restrict /dev/mem to idle io memory ranges" /dev/mem should not have access to active pmem ranges.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] x86/mm: Add x86 valid_phys_addr_range() for /dev/mem Toshi Kani <toshi.kani@hpe.com> - 2016-02-10 02:20 +0100
Re: [PATCH] x86/mm: Add x86 valid_phys_addr_range() for /dev/mem Ingo Molnar <mingo@kernel.org> - 2016-02-17 10:30 +0100
Re: [PATCH] x86/mm: Add x86 valid_phys_addr_range() for /dev/mem Toshi Kani <toshi.kani@hpe.com> - 2016-02-17 17:10 +0100
Re: [PATCH] x86/mm: Add x86 valid_phys_addr_range() for /dev/mem Dan Williams <dan.j.williams@intel.com> - 2016-02-17 19:00 +0100
Re: [PATCH] x86/mm: Add x86 valid_phys_addr_range() for /dev/mem Toshi Kani <toshi.kani@hpe.com> - 2016-02-17 19:50 +0100
Re: [PATCH] x86/mm: Add x86 valid_phys_addr_range() for /dev/mem Dan Williams <dan.j.williams@intel.com> - 2016-02-17 20:10 +0100
Re: [PATCH] x86/mm: Add x86 valid_phys_addr_range() for /dev/mem Toshi Kani <toshi.kani@hpe.com> - 2016-02-17 20:30 +0100
csiph-web