Re: Reading /dev/mem by dd

From: Henrique de Moraes Holschuh
Date: Thu Nov 12 2009 - 15:02:17 EST


On Thu, 12 Nov 2009 18:13 +0000, "Alan Cox" <alan@xxxxxxxxxxxxxxxxxxx> wrote:
> On Thu, 12 Nov 2009 15:57:49 -0200 "Henrique de Moraes Holschuh"
> <hmh@xxxxxxxxxx> wrote:
> > On Thu, 12 Nov 2009 17:49 +0000, "Alan Cox"
> > <alan@xxxxxxxxxxxxxxxxxxx> wrote:
> > > > In this case, the problem seems to be access over /dev/mem to
> > > > stuff the kernel is already taking care of. Certainly "as safe
> > > > as possible" does
> > >
> > > Which is often what is desired - eg debugging driver stuff.
[...]
> > Is that the only valid use of /dev/mem, or even its main use?
>
> These days it is the primary use. Things like X11 were historically
> probably the biggest user of it, and things like LRMI sometimes need
> that sort of stuff.

Well, if debugging is the primary use, maybe the best long term plan
would be to get rid of the need for /dev/mem for anything other than
debugging, and after that is accomplished, move it to debugfs or make
it optional?

> The X case also involves X and the kernel both working with the same
> resource and in many cases that resource having registers that can
> crash a system if mis-accessed.

I see. That also tells me that whatever dark sides KMS has, it is much
better than the alternative :-)

--
"One disk to rule them all, One disk to find them. One disk to bring
them all and in the darkness grind them. In the Land of Redmond
where the shadows lie." -- The Silicon Valley Tarot
Henrique Holschuh

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/