RE: [PATCH] enable to read region 5 from /dev/kmem

From: Luck, Tony <tony.luck_at_intel.com>
Date: 2005-07-13 08:08:39
>> It comes down to what the real semantics of /dev/kmem are supposed
>> to be.
>
>That is certainly true.  I thought we had settled that pages with the
>WB attribute would _only_ be accessible in a cacheable fashion and
>pages without the WB attribute would _only_ be accessible uncached.

So what is the right thing to do when a user goes through /dev/kmem
and tries to violate this rule?  For region 7 addresses we silently
redirect the access to region 6 for uncacheable pages.  At the time
this seemed a reasonable thing to do as it might be hard for a kmem
using program to track down whether a page is marked uncacheable ...
and the "kernel virtual = physical + PAGE_OFFSET" rule works on many
architectures, so doing this may magically make some kmem readers
get the right answers without crashing.

We could do a similar thing for region 6 and silently remap to region
7 for pages that should only be accessed cacheably ... but what if the
user going through /dev/kmem and seeking into region 6 knows what they
are doing and wants to perform uncacheable access?  If the user is
accessing region 6, then they didn't get there by blind chance.

Which gets back to the semantics of /dev/kmem.

-Tony
-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Tue Jul 12 18:11:08 2005

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:40 EST