From: Andi Kleen <ak@suse.de>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Andi Kleen <ak@suse.de>, Andrea Arcangeli <andrea@suse.de>,
Benjamin LaHaise <bcrl@redhat.com>,
linux-kernel@vger.kernel.org,
Richard Brunner <richard.brunner@amd.com>,
mark.langsdorf@amd.com
Subject: Re: another new version of pageattr caching conflict fix for 2.4
Date: Sun, 16 Jun 2002 20:43:06 +0200 [thread overview]
Message-ID: <20020616204305.A32022@wotan.suse.de> (raw)
In-Reply-To: <m13cvnun7o.fsf@frodo.biederman.org>
On Sun, Jun 16, 2002 at 11:50:51AM -0600, Eric W. Biederman wrote:
> Andi Kleen <ak@suse.de> writes:
>
> > On Sun, Jun 16, 2002 at 04:08:49AM -0600, Eric W. Biederman wrote:
> > >
> > > Don't allow the change_page_attr if page->count > 1 is an easy solution,
> > > and it probably suffices. Beyond that anything mmaped can be found
> >
> > Erm, what should it do then? Fail the AGP map ?
>
> Why not. If user-space has already mapped the memory one way, turning
> around and using it another way is a problem. If the memory is
> dynamically allocated for AGP I don't even see how this case
> could occur.
It's a random error. AGP randomly gets some page that is already mapped
by /dev/mem somewhere. There is nothing that it can do to avoid this.
As /dev/mem is root only and root can already cause much damage it is
probably not worth avoiding the particular breakage.
Now if someone used change_page_attr as a more general call and used
it on random memory that could be already mapped to user space in a more
legitimate way then he or she has to do much more work anyways (avoiding
alias etc.). Part of that more work would be to check the page count.
I don't think it should be done by the low level routine.
>
> The kernel already exposes through /proc/mtrr the ability to
> arbitrarily change the caching of pages. And since this is a case
> of physical aliasing we need to make certain the mtrr's don't
> conflict. So much of this is already exposed to user space already.
MTRRs work on physical, not virtual memory, so they have no aliasing
issues.
> > You can already use WT. DRM does that already in fact.
> > Newer Intel/AMD CPUs allow to set up a more general PAT table with some
> > more modis, but to be honest I don't see the point in most of them,
> > except perhaps WC. Unfortunately there is no 'weak ordering like alpha/sparc64'
> > mode that could be used in the kernel :-)
>
> With the PAT table only write-back, write-combining, uncached interest
> me. Given the number of BIOS's that don't set all of RAM to
> write-back and the major performance penalty of running on uncached
> RAM having the kernel fix it, would reduce a lot of headaches long
> term.
Fixing the MTRRs is fine, but it is really outside the scope of my patch.
Just changing the kernel map wouldn't be enough to fix wrong MTRRs,
because it wouldn't cover highmem.
-Andi
next prev parent reply other threads:[~2002-06-16 18:43 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-06-13 20:15 New version of pageattr caching conflict fix for 2.4 Andi Kleen
2002-06-14 1:03 ` Benjamin LaHaise
2002-06-14 1:24 ` Andi Kleen
2002-06-14 1:37 ` Benjamin LaHaise
2002-06-14 4:00 ` Andrea Arcangeli
2002-06-14 4:17 ` Benjamin LaHaise
2002-06-14 4:27 ` Andi Kleen
2002-06-14 15:28 ` Benjamin LaHaise
2002-06-14 16:13 ` Andi Kleen
2002-06-14 17:31 ` Andrea Arcangeli
2002-06-14 18:05 ` another new " Andi Kleen
2002-06-16 10:08 ` Eric W. Biederman
2002-06-16 16:48 ` Andi Kleen
2002-06-16 17:50 ` Eric W. Biederman
2002-06-16 18:43 ` Andi Kleen [this message]
2002-06-16 19:56 ` Eric W. Biederman
2002-06-16 23:37 ` Andi Kleen
2002-06-17 0:08 ` Albert D. Cahalan
2002-06-17 4:06 ` Eric W. Biederman
2002-06-17 6:53 ` Andrea Arcangeli
2002-06-17 15:46 ` Eric W. Biederman
2002-06-14 4:28 ` New " Andrea Arcangeli
-- strict thread matches above, loose matches on Subject: below --
2002-06-17 21:07 another new " richard.brunner
2002-06-18 17:34 ` Eric W. Biederman
2002-06-17 21:13 richard.brunner
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=20020616204305.A32022@wotan.suse.de \
--to=ak@suse.de \
--cc=andrea@suse.de \
--cc=bcrl@redhat.com \
--cc=ebiederm@xmission.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.langsdorf@amd.com \
--cc=richard.brunner@amd.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox