All of lore.kernel.org
 help / color / mirror / Atom feed
From: ebiederm@xmission.com (Eric W. Biederman)
To: Thomas Hellstrom <thellstrom@vmware.com>
Cc: "Pallipadi\, Venkatesh" <venkatesh.pallipadi@intel.com>,
	Linux kernel mailing list <linux-kernel@vger.kernel.org>,
	"Siddha\, Suresh B" <suresh.b.siddha@intel.com>
Subject: Re: 2.6.29 pat issue
Date: Thu, 05 Feb 2009 17:11:41 -0800	[thread overview]
Message-ID: <m1tz78pdwy.fsf@fess.ebiederm.org> (raw)
In-Reply-To: <498B5ADE.3090602@vmware.com> (Thomas Hellstrom's message of "Thu\, 05 Feb 2009 22\:32\:14 +0100")

Thomas Hellstrom <thellstrom@vmware.com> writes:


> Indeed, it's crucial to keep the mappings consistent, but failure to do so is a
> kernel driver bug, it should never be the result of invalid user data.

It easily can be.  Think of an X server mmaping frame buffers. Or other
device bars.

> There are other more common kernel bugs that can be even worse and hang / crash
> the system. For example using uninitialized spinlocks, writing to kfreed memory
> etc. There is code in the kernel to detect these as well, but this code is
> behind debug defines.

There are cpu errata on almost every cpu in existence that come into play
if you have the cacheabilty attributes wrong on a page.  CPUs have been known
to do very weird things when you hit those errata.  At the best of it you
are no longer running on a deterministic machine, at the worst of it you
crash the cpu.

> IMHO checking each vm_insert_pfn() for caching attribute correctness is not
> something that should be enabled by default, due to the CPU overhead. Production
> drivers should never violate this.

If it is a problem the implementation should become more efficient.  Userspace
as well as drivers can generate these mappings so even with a perfect driver
you cannot guarantee that someone else does not have that area of memory
mapped differently.

Eric

  parent reply	other threads:[~2009-02-06  1:11 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-05 12:47 2.6.29 pat issue Thomas Hellström
2009-02-05 18:03 ` Pallipadi, Venkatesh
2009-02-05 21:32   ` Thomas Hellstrom
2009-02-05 23:08     ` Pallipadi, Venkatesh
2009-02-06  9:51       ` Thomas Hellström
2009-02-06  1:11     ` Eric W. Biederman [this message]
2009-02-06  9:43       ` Thomas Hellström
2009-03-04  6:08         ` Pallipadi, Venkatesh
2009-03-04  9:56           ` Thomas Hellstrom
2009-03-06 22:38             ` Pallipadi, Venkatesh
2009-03-06 23:44               ` Thomas Hellstrom
2009-03-10  1:39                 ` Pallipadi, Venkatesh
2009-03-10  8:22                   ` Thomas Hellstrom
2009-03-10 17:42                     ` Pallipadi, Venkatesh
2009-03-11  9:17                       ` Thomas Hellstrom
2009-03-11  9:33                         ` Ingo Molnar
2009-03-11 17:54                           ` [PATCH] VM, x86, PAT: Change implementation of is_linear_pfn_mapping Pallipadi, Venkatesh
2009-03-11 22:09                             ` Frans Pop
2009-03-12  0:31                               ` Pallipadi, Venkatesh
2009-03-12  3:22                                 ` Pallipadi, Venkatesh
2009-03-12  5:45                                 ` Frans Pop
2009-03-12 18:59                                   ` Pallipadi, Venkatesh
2009-03-12 20:30                                     ` Frans Pop
2009-03-12 22:48                                       ` Pallipadi, Venkatesh
2009-03-13  0:36                                         ` Ingo Molnar
2009-03-13  0:45                                           ` [PATCH] VM, x86, PAT: Change is_linear_pfn_mapping to not use vm_pgoff Pallipadi, Venkatesh
2009-03-13  4:03                                             ` [tip:x86/urgent] " Pallipadi, Venkatesh
2009-03-13 16:25                                               ` Nick Piggin
2009-03-13 17:00                                                 ` Pallipadi, Venkatesh
2009-03-14  2:52                                                   ` Nick Piggin
2009-03-13 23:35                                                 ` [PATCH] Add a new vm flag to track full pfnmap at mmap Pallipadi, Venkatesh
2009-03-14  2:53                                                   ` Nick Piggin
2009-03-14  8:54                                                   ` [tip:x86/urgent] VM, x86, PAT: add " Pallipadi, Venkatesh

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=m1tz78pdwy.fsf@fess.ebiederm.org \
    --to=ebiederm@xmission.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=suresh.b.siddha@intel.com \
    --cc=thellstrom@vmware.com \
    --cc=venkatesh.pallipadi@intel.com \
    /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.