mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrei Warkentin <awarkentin@vmware.com>
To: LKML <linux-kernel@vger.kernel.org>
Subject: /dev/mem "unbounded?"
Date: Wed, 9 Nov 2011 13:01:18 -0800 (PST)	[thread overview]
Message-ID: <820243891.352129.1320872478210.JavaMail.root@zimbra-prod-mbox-2.vmware.com> (raw)
In-Reply-To: <51331881.351549.1320871450391.JavaMail.root@zimbra-prod-mbox-2.vmware.com>

Dear LKML,

In the previous kernels, valid_phys_addr_range was not
defined for x86, and used the static variant which
returned 0 if access went above __pa(high_memory).

Current behavior, though, relies on the x86 variant
of valid_phys_addr_range, defined in arch/x86/include/asm/io.h,
that always returns 1, hence, reading will never end since there
won't be any condition (barring an MCE on physical hardware) that
would say "Bad Address". Is this supposed to be by design?

How about exposing the "top" allocated resource address from 
linux/kernel/resource.c? That way /dev/mem will know when
all the "interesting" bits end, and can return -EFAULT for
everything above that.

Thanks,
A


       reply	other threads:[~2011-11-09 21:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <51331881.351549.1320871450391.JavaMail.root@zimbra-prod-mbox-2.vmware.com>
2011-11-09 21:01 ` Andrei Warkentin [this message]
2011-11-09 22:18   ` H. Peter Anvin
2011-11-09 22:38     ` Andrei Warkentin
2011-11-10  0:11       ` H. Peter Anvin
2011-11-10  5:10         ` Andrei Warkentin

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=820243891.352129.1320872478210.JavaMail.root@zimbra-prod-mbox-2.vmware.com \
    --to=awarkentin@vmware.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

Powered by JetHome