Re: [PATCH 2/2] make /dev/kmem return error for highmem

2013-02-08 Thread H. Peter Anvin
On 02/08/2013 12:28 PM, Dave Hansen wrote: I was auding the /dev/mem code for more questionable uses of __pa(), and ran across this. My assumption is that if you use /dev/kmem, you expect to be able to read the kernel virtual mappings. However, those mappings _stop_ as soon as we hit high memor

[PATCH 2/2] make /dev/kmem return error for highmem

2013-02-08 Thread Dave Hansen
I was auding the /dev/mem code for more questionable uses of __pa(), and ran across this. My assumption is that if you use /dev/kmem, you expect to be able to read the kernel virtual mappings. However, those mappings _stop_ as soon as we hit high memory. The pfn_valid() check in here is good fo