From: Manfred Spraul <manfred@colorfullife.com>
To: Jamie Lokier <lk@tantalophile.demon.co.uk>
Cc: Linus Torvalds <torvalds@transmeta.com>,
linux-kernel@vger.kernel.org, bcrl@redhat.com
Subject: Re: x86 ptep_get_and_clear question
Date: Fri, 16 Feb 2001 19:04:33 +0100 [thread overview]
Message-ID: <3A8D6BB1.342E62DB@colorfullife.com> (raw)
In-Reply-To: <3A8C499A.E0370F63@colorfullife.com> <Pine.LNX.4.10.10102151702320.12656-100000@penguin.transmeta.com> <20010216151839.A3989@pcep-jamie.cern.ch> <3A8D4045.F8F27782@colorfullife.com> <20010216162741.A4284@pcep-jamie.cern.ch> <3A8D4D43.CF589FA0@colorfullife.com> <20010216170029.A4450@pcep-jamie.cern.ch> <3A8D540C.92C66398@colorfullife.com> <20010216174316.A4500@pcep-jamie.cern.ch> <3A8D5F6C.D81F2F28@colorfullife.com> <20010216183707.A4821@pcep-jamie.cern.ch>
Jamie Lokier wrote:
>
> > > Ben, fancy writing a boot-time test?
> > >
> > I'd never rely on such a test - what if the cpu checks in 99% of the
> > cases, but doesn't handle some cases ('rep movd, everything unaligned,
> > ...'.
>
> A good point. The test results are inconclusive.
>
> > And check the Pentium III erratas. There is one with the tlb
> > that's only triggered if 4 instruction lie in a certain window and all
> > access memory in the same way of the tlb (EFLAGS incorrect if 'andl
> > mask,<memory_addr>' causes page fault)).
>
> Nasty, but I don't see what an obscure and impossible to work around
> processor bug has to do with this thread. It doesn't actually change
> page fault handling, does it?
>
Page fault handling is unchanged, but perhaps there are other races. And
note that these races wouldn't be processor bugs - the spec nowhere
guarantee the behaviour you assume.
Ben tries to prove that the current cpu _never_ sets the dirty bit
without checking the present bit.
A very simple test might be
cpu 1:
cli();
a = 0; b = 0; m = 0;
flush_local_tlb_page(a);
flush_local_tlb_page(b);
flush_local_tlb_page(a);
while(!m);
while (!a && !b);
a = 1;
cpu 2:
<wait>
cli();
both ptes for a and b as writable, not dirty.
m = 1;
udelay(100);
change the pte of a to not present.
wmb();
b = 1;
Now start with variants:
change to read only instead of not present
a and b in the same way of the tlb, in a different way.
change pte with write, change with lock;
.
.
.
But you'll never prove that you tested every combination.
--
Manfred
next prev parent reply other threads:[~2001-02-16 18:04 UTC|newest]
Thread overview: 62+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-02-15 1:50 x86 ptep_get_and_clear question Kanoj Sarcar
2001-02-15 2:13 ` Ben LaHaise
2001-02-15 2:37 ` Kanoj Sarcar
2001-02-15 10:55 ` Jamie Lokier
2001-02-15 16:06 ` Ben LaHaise
2001-02-15 16:35 ` Jamie Lokier
2001-02-15 17:23 ` Kanoj Sarcar
2001-02-15 17:27 ` Ben LaHaise
2001-02-15 17:38 ` Kanoj Sarcar
2001-02-15 17:46 ` Ben LaHaise
2001-02-15 17:47 ` Jamie Lokier
2001-02-15 17:47 ` Jamie Lokier
2001-02-15 18:05 ` Kanoj Sarcar
2001-02-15 18:05 ` Kanoj Sarcar
2001-02-15 18:23 ` Kanoj Sarcar
2001-02-15 18:23 ` Kanoj Sarcar
2001-02-15 18:42 ` Jamie Lokier
2001-02-15 18:42 ` Jamie Lokier
2001-02-15 18:57 ` Kanoj Sarcar
2001-02-15 18:57 ` Kanoj Sarcar
2001-02-15 19:06 ` Ben LaHaise
2001-02-15 19:06 ` Ben LaHaise
2001-02-15 19:19 ` Kanoj Sarcar
2001-02-15 19:19 ` Kanoj Sarcar
2001-02-15 20:16 ` Linus Torvalds
2001-02-15 18:51 ` Manfred Spraul
2001-02-15 18:51 ` Manfred Spraul
2001-02-15 19:05 ` Kanoj Sarcar
2001-02-15 19:05 ` Kanoj Sarcar
2001-02-15 19:19 ` Jamie Lokier
2001-02-15 19:19 ` Jamie Lokier
2001-02-15 20:31 ` Linus Torvalds
2001-02-15 21:26 ` Manfred Spraul
2001-02-15 21:29 ` Manfred Spraul
2001-02-16 1:21 ` Linus Torvalds
2001-02-16 14:18 ` Jamie Lokier
2001-02-16 14:59 ` Manfred Spraul
2001-02-16 15:27 ` Jamie Lokier
2001-02-16 15:54 ` Manfred Spraul
2001-02-16 16:00 ` Jamie Lokier
2001-02-16 16:23 ` Manfred Spraul
2001-02-16 16:43 ` Jamie Lokier
2001-02-16 17:12 ` Manfred Spraul
2001-02-16 17:20 ` Jamie Lokier
2001-02-16 17:36 ` Linus Torvalds
2001-02-16 18:49 ` Manfred Spraul
2001-02-16 19:00 ` Linus Torvalds
2001-02-16 19:02 ` Ben LaHaise
2001-02-16 19:32 ` Linus Torvalds
2001-02-16 19:42 ` Ben LaHaise
2001-02-16 17:37 ` Jamie Lokier
2001-02-16 18:04 ` Manfred Spraul [this message]
2001-02-16 18:09 ` Jamie Lokier
2001-02-16 18:36 ` Hugh Dickins
2001-02-16 17:29 ` Ben LaHaise
2001-02-16 17:38 ` Linus Torvalds
2001-02-16 17:44 ` Ben LaHaise
2001-02-16 17:59 ` Linus Torvalds
2001-02-15 23:57 ` Jamie Lokier
2001-02-16 0:55 ` Linus Torvalds
2001-02-15 19:07 ` Jamie Lokier
2001-02-15 19:07 ` Jamie Lokier
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=3A8D6BB1.342E62DB@colorfullife.com \
--to=manfred@colorfullife.com \
--cc=bcrl@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lk@tantalophile.demon.co.uk \
--cc=torvalds@transmeta.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.