All of lore.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Dave Hansen <dave@linux.vnet.ibm.com>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, bp@alien8.de,
	mingo@kernel.org, tglx@linutronix.de
Subject: Re: [PATCH 2/2] make /dev/kmem return error for highmem
Date: Fri, 08 Feb 2013 12:48:20 -0800	[thread overview]
Message-ID: <51156494.3050300@zytor.com> (raw)
In-Reply-To: <20130208202814.E1196596@kernel.stglabs.ibm.com>

On 02/08/2013 12:28 PM, Dave Hansen wrote:
> I was auding the /dev/mem code for more questionable uses of
> __pa(), and ran across this.
>
> My assumption is that if you use /dev/kmem, you expect to be
> able to read the kernel virtual mappings.  However, those
> mappings _stop_ as soon as we hit high memory.  The
> pfn_valid() check in here is good for memory holes, but since
> highmem pages are still valid, it does no good for those.
>
> Also, since we are now checking that __pa() is being done on
> valid virtual addresses, this might have tripped the new
> check.  Even with the new check, this code would have been
> broken with the NUMA remapping code had we not ripped it
> out:
>

It would be great if you could take a stab at fixing /dev/mem and 
/dev/kmem... there are a bunch of problems with both which seem to 
really translate to "HIGHMEM was never properly implemented"...

	-hpa


-- 
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel.  I don't speak on their behalf.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

WARNING: multiple messages have this Message-ID (diff)
From: "H. Peter Anvin" <hpa@zytor.com>
To: Dave Hansen <dave@linux.vnet.ibm.com>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, bp@alien8.de,
	mingo@kernel.org, tglx@linutronix.de
Subject: Re: [PATCH 2/2] make /dev/kmem return error for highmem
Date: Fri, 08 Feb 2013 12:48:20 -0800	[thread overview]
Message-ID: <51156494.3050300@zytor.com> (raw)
In-Reply-To: <20130208202814.E1196596@kernel.stglabs.ibm.com>

On 02/08/2013 12:28 PM, Dave Hansen wrote:
> I was auding the /dev/mem code for more questionable uses of
> __pa(), and ran across this.
>
> My assumption is that if you use /dev/kmem, you expect to be
> able to read the kernel virtual mappings.  However, those
> mappings _stop_ as soon as we hit high memory.  The
> pfn_valid() check in here is good for memory holes, but since
> highmem pages are still valid, it does no good for those.
>
> Also, since we are now checking that __pa() is being done on
> valid virtual addresses, this might have tripped the new
> check.  Even with the new check, this code would have been
> broken with the NUMA remapping code had we not ripped it
> out:
>

It would be great if you could take a stab at fixing /dev/mem and 
/dev/kmem... there are a bunch of problems with both which seem to 
really translate to "HIGHMEM was never properly implemented"...

	-hpa


-- 
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel.  I don't speak on their behalf.


  reply	other threads:[~2013-02-08 20:48 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-08 20:28 [PATCH 1/2] add helper for highmem checks Dave Hansen
2013-02-08 20:28 ` Dave Hansen
2013-02-08 20:28 ` [PATCH 2/2] make /dev/kmem return error for highmem Dave Hansen
2013-02-08 20:28   ` Dave Hansen
2013-02-08 20:48   ` H. Peter Anvin [this message]
2013-02-08 20:48     ` H. Peter Anvin
2013-02-08 20:50 ` [PATCH 1/2] add helper for highmem checks H. Peter Anvin
2013-02-08 20:50   ` H. Peter Anvin
2013-02-08 23:16   ` Dave Hansen
2013-02-08 23:16     ` Dave Hansen
2013-02-09  9:41 ` Borislav Petkov
2013-02-09  9:41   ` Borislav Petkov
2013-02-09 10:47   ` Borislav Petkov
2013-02-09 10:47     ` Borislav Petkov
2013-02-11 17:32     ` Dave Hansen
2013-02-11 17:32       ` Dave Hansen
2013-02-11 18:09       ` H. Peter Anvin
2013-02-11 18:09         ` H. Peter Anvin
2013-02-11 18:28       ` Borislav Petkov
2013-02-11 18:28         ` Borislav Petkov
2013-02-11 19:44         ` H. Peter Anvin
2013-02-11 19:44           ` H. Peter Anvin
2013-02-11 22:34           ` Borislav Petkov
2013-02-11 22:34             ` Borislav Petkov
2013-02-11 22:46             ` H. Peter Anvin
2013-02-11 22:46               ` H. Peter Anvin
2013-02-11 23:00               ` Borislav Petkov
2013-02-11 23:00                 ` Borislav Petkov
2013-02-11 23:02                 ` H. Peter Anvin
2013-02-11 23:02                   ` H. Peter Anvin

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=51156494.3050300@zytor.com \
    --to=hpa@zytor.com \
    --cc=bp@alien8.de \
    --cc=dave@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mingo@kernel.org \
    --cc=tglx@linutronix.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.