From: Maxim Levitsky <maximlevitsky@gmail.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Arjan van de Ven <arjan@infradead.org>, linux-kernel@vger.kernel.org
Subject: Re: RFC: banning device driver reserved resources from /dev/mem
Date: Mon, 06 Oct 2008 15:40:16 +0200 [thread overview]
Message-ID: <48EA1540.8060409@gmail.com> (raw)
In-Reply-To: <20081006102739.16d1a434@lxorguk.ukuu.org.uk>
Alan Cox wrote:
>> This patch adds, to the existing config option to restrict /dev/mem, the
>> reserved regions to the "banned from /dev/mem use" list, so now
>> both kernel memory and device-exclusive MMIO regions are banned.
>
> This breaks a whole class of diagnostic and debug tools which quite
> intentionally dump the MMIO register space of devices that are live.
>
> Plus it doesn't actually work - if I have /dev/mem open and mmapped you
> don't pull the pages from under me....
>
> The problem with the way this is going is the more you take from /dev/mem
> the sooner someone is forced to add /dev/mem-proper which undoes it all
> again so they can get work done.
>
> It's certainly a useful debug aid to know about such things but I don't
> believe it's something you should ban.
Exactly,
I think the proper solution is to make /dev/mem pure diagnostic tool.
Drivers should use /sys mappings of pci devices to access their iomem
, or even better they should not touch pci mappings
directly at all, but talk to kernel, and if xorg needs access
to video memory it should talk to drm and get its mapping from there.
Best regards,
Maxim Levitsky
next prev parent reply other threads:[~2008-10-06 13:40 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-06 1:01 RFC: banning device driver reserved resources from /dev/mem Arjan van de Ven
2008-10-06 5:23 ` Ingo Molnar
2008-10-06 5:26 ` Arjan van de Ven
2008-10-06 9:27 ` Alan Cox
2008-10-06 13:40 ` Maxim Levitsky [this message]
2008-10-06 13:48 ` Alan Cox
2008-10-06 13:52 ` Arjan van de Ven
2008-10-06 14:01 ` Alan Cox
2008-10-06 14:05 ` Arjan van de Ven
2008-10-06 14:14 ` Alan Cox
2008-10-06 14:24 ` Arjan van de Ven
2008-10-06 14:38 ` Alan Cox
2008-10-06 14:57 ` Arjan van de Ven
2008-10-06 15:29 ` Alan Cox
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=48EA1540.8060409@gmail.com \
--to=maximlevitsky@gmail.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=arjan@infradead.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox