public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
From: Jes Sorensen <jes@wildopensource.com>
To: Arjan van de Ven <arjan@infradead.org>
Cc: Andrew Morton <akpm@osdl.org>,
	linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [patch -mm series] ia64 specific /dev/mem handlers
Date: Tue, 22 Feb 2005 22:30:41 +0000	[thread overview]
Message-ID: <yq04qg4i5wu.fsf@jaguar.mkp.net> (raw)
In-Reply-To: <1109109833.6024.109.camel@laptopd505.fenrus.org>

>>>>> "Arjan" = Arjan van de Ven <arjan@infradead.org> writes:

Arjan> On Tue, 2005-02-22 at 04:52 -0500, Jes Sorensen wrote:
>> Hi,
>> 
>> This patch introduces ia64 specific read/write handlers for
>> /dev/mem access which is needed to avoid uncached pages to be
>> accessed through the cached kernel window which can lead to random
>> corruption. It also introduces a new page-flag PG_uncached which
>> will be used to mark the uncached pages. I assume this may be
>> useful to other architectures as well where the CPU may use
>> speculative reads which conflict with uncached access. In addition
>> I moved do_write_mem to be under ARCH_HAS_DEV_MEM as it's only ever
>> used if that is defined.
>> 
>> The patch is needed for the new ia64 special memory driver (mspec -
>> former fetchop).

Arjan> is there ANY valid reason to allow access to cached uses at
Arjan> all?  (eg kernel ram)

Arjan> why not just disable any such ram access entirely...

You mean uncached?

For userspace it's used by some of the MPI type apps in userland.
Presumably there's cases where it gives better performance. For the
SN2 hardware there's also a special mode known as fetchop mode which
requires uncached memory, it's used quite heavily by the same types of
apps.

The problem is if you then have apps such as lcrash which may read
through all kernel memory. If a page is mapped uncached to userland
you can hit the memory corruption case if you access the same page
cached from within a kernel cached mapping. I suspect the suspend code
could hit similar problems, but I don't know that code well enough to
say if it's the case or not.

Cheers,
Jes

  reply	other threads:[~2005-02-22 22:30 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-22  9:52 [patch -mm series] ia64 specific /dev/mem handlers Jes Sorensen
2005-02-22 10:03 ` Andrew Morton
2005-02-22 12:08   ` Andi Kleen
2005-02-22 14:41   ` Jes Sorensen
2005-02-22 17:52     ` Matthew Wilcox
2005-02-22 19:25       ` Andrew Morton
2005-02-22 19:35         ` Dave Hansen
2005-02-22 21:38           ` Jes Sorensen
2005-02-23  0:48             ` Dave Hansen
2005-02-22 21:34         ` Jes Sorensen
2005-02-22 22:39         ` Jes Sorensen
2005-02-22 23:34           ` Andrew Morton
2005-02-23 10:01             ` Jes Sorensen
2005-02-23 22:34               ` Christoph Hellwig
2005-02-24 16:11                 ` Jes Sorensen
2005-03-10  6:55                   ` Andrew Morton
2005-03-10 13:49                     ` Jes Sorensen
2005-02-22 18:05 ` Luck, Tony
2005-02-22 22:03 ` Arjan van de Ven
2005-02-22 22:30   ` Jes Sorensen [this message]
2005-02-22 22:42     ` Arjan van de Ven
2005-02-23  8:12       ` Jes Sorensen
2005-02-23  8:24         ` Arjan van de Ven
2005-03-03 11:37 ` Andrew Morton
2005-03-03 12:53   ` Jes Sorensen
2005-03-04 12:26     ` Jes Sorensen

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=yq04qg4i5wu.fsf@jaguar.mkp.net \
    --to=jes@wildopensource.com \
    --cc=akpm@osdl.org \
    --cc=arjan@infradead.org \
    --cc=linux-ia64@vger.kernel.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