mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Felix Rubinstein <felixru@gmail.com>
To: linux-kernel@vger.kernel.org
Subject: /dev/mem implementation
Date: Sun, 17 Jan 2010 18:47:10 +0200	[thread overview]
Message-ID: <af0693f01001170847r49083075hc538a42b6bcd65ab@mail.gmail.com> (raw)

The recent kernels use CONFIG_STRICT_DEVMEM and CONFIG_X86_PAT
concerning the /dev/mem (/dev/kmem) so interchangeably one cannot
figure out what exactly does it mean to access the /dev/mem if both
CONFIG_STRICT_DEVMEM and CONFIG_X86_PAT are disabled.

It would be more logically to remove pat_enabled variable in
arch/x86/mm/pat.c and to make everything under CONFIG_X86_PAT define.
The same goes for phys_mem_access_prot_allowed function (from
arch/x86/mm/pat.c) even though CONFIG_X86_PAT is disabled.
To make the story worse there are four implementations of
range_is_allowed depending on how CONFIG_STRICT_DEVMEM and
CONFIG_X86_PAT are defined.


I see the motivation to limit the access to DRAM from root account
CONFIG_STRICT_DEVMEM by mmap'ing /dev/[k]mem but it's easily overruled
by simple char driver and implementing mmap of it's own totally
bypassing all limitations.

What do you think about it guy?
Appreciate it.

Thanks,
Felix R.

             reply	other threads:[~2010-01-17 16:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-17 16:47 Felix Rubinstein [this message]
2010-01-17 17:40 ` Arjan van de Ven
2010-01-18 10:22   ` Andi Kleen
2010-01-18 12:18   ` Felix Rubinstein
2010-01-18 15:16     ` Arjan van de Ven

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=af0693f01001170847r49083075hc538a42b6bcd65ab@mail.gmail.com \
    --to=felixru@gmail.com \
    --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

all inboxes | Powered by JetHome®