Messages in this thread | | | Date | Fri, 08 Feb 2013 12:48:20 -0800 | From | "H. Peter Anvin" <> | Subject | Re: [PATCH 2/2] make /dev/kmem return error for highmem |
| |
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 memory. The > pfn_valid() check in here is good for memory holes, but since > highmem pages are still valid, it does no good for those. > > Also, since we are now checking that __pa() is being done on > valid virtual addresses, this might have tripped the new > check. Even with the new check, this code would have been > broken with the NUMA remapping code had we not ripped it > out: >
It would be great if you could take a stab at fixing /dev/mem and /dev/kmem... there are a bunch of problems with both which seem to really translate to "HIGHMEM was never properly implemented"...
-hpa
-- H. Peter Anvin, Intel Open Source Technology Center I work for Intel. I don't speak on their behalf.
| |