Messages in this thread | | | Date | Wed, 17 Sep 2003 13:50:59 -0700 (PDT) | From | Linus Torvalds <> | Subject | Re: [PATCH] Athlon/Opteron Prefetch Fix for 2.6.0test5 + numbers |
| |
On Wed, 17 Sep 2003, Andi Kleen wrote: > > Also when the fault address is equal EIP we don't check.
And this is a good example of something that can break.
The fault address is a linear address after segment translation. The EIP is _before_ segment translation.
You don't translate the EIP with the CS base.
Which means that the two can match even if they have nothing to do with each other. It will happen in vm86 mode and in things like wine. So that check is broken.
Also, for the same reason, you won't fix up prefetches in wine.
Also, you do things like comparing pointers for less/greater than, and at least some versions of gcc has done that wrong - using signed comparisons. Which leaves you potentially open to denial-of-service attacks if somebody generates a long list of prefixes around the 0x80000000 mark and the size check doesn't catch them.
In short, this is harder than you seem to think. And right now you _do_ do the wrong things for Wine, and I think that not only should that be fixed, it should be made athlon-specific so that any other potential bugs won't impact people that it shouldn't impact.
See?
Linus
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |