Re: Reading /dev/mem by dd

From: Alan Cox
Date: Thu Nov 12 2009 - 13:12:20 EST


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.
> >
> > > not have to mean making /dev/mem useless for whatever good uses it has.
> >
> > It does. Plain and simple.
>
> 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.

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.

Alan
--
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/