* [PATCH 0/6] i386 virtualization patches, Set 3
@ 2005-08-15 22:58 zach
2005-08-15 23:24 ` Andi Kleen
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: zach @ 2005-08-15 22:58 UTC (permalink / raw)
To: akpm, chrisw, linux-kernel, virtualization, zach
This round attempts to conclude all of the LDT related cleanup with some
finally nice looking LDT code, fixes for the UML build, a bugfix for
really rather nasty kprobes problems, and the basic framework for an LDT
test suite. It is really rather unfortunate that this code is so
difficult to test, even with DOSemu and Wine, there are still very nasty
corner cases here - anyone want an iret to 16-bit stack test?.
I was going to attempt to clean up the math-emu code to make it use the
nice new segment and descriptor table accessors, but it quickly became
apparent that this would be a long, tedious, error prone process that
would eventually result in the death of a large section of my brain.
In addition, it is not very fun to test this on the actual hardware it
is designed to run on (although I did manage to track down a 386 with
detachable i387 coprocessor, the owner is not sure it still boots).
Someday it would be nice to have an audit of this code; it appears to
be riddled with bugs relating to segmentation, for example it assumes
LDT segments on overrides, does not use the mm->context semaphore to
protect LDT access, and generally looks scarily out of date in both
function and appearance.
I also have a makeover for the pgtable.h code. Splitting operations that
write hardware page tables into the sub-arch layer was very ugly,
hopefully this is a much cleaner approach. There really must be a way
for a paravirtualized hypervisor to hook the page table updates, and this
appears to be the cleanest solution so far.
This patch set is based on 2.6.13-rc6 -mm1 broken out series. It applies
and builds i386, x86_64, and um-i386 on 2.6.13-rc5. I've tested PAE and
non-PAE SMP kernels and am working on an LDT test suite. Depends on
the i386 cleanups, sub-arch movement, and LDT cleanups I've already sent
out.
--
Zachary Amsden <zach@vmware.com>
Whee! Actually deliver the signal.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 0/6] i386 virtualization patches, Set 3
2005-08-15 22:58 [PATCH 0/6] i386 virtualization patches, Set 3 zach
@ 2005-08-15 23:24 ` Andi Kleen
2005-08-15 23:27 ` David Lang
2005-08-16 3:08 ` Brian Gerst
2005-08-16 7:44 ` Chris Wright
2 siblings, 1 reply; 7+ messages in thread
From: Andi Kleen @ 2005-08-15 23:24 UTC (permalink / raw)
To: zach; +Cc: akpm, chrisw, linux-kernel, virtualization
On Mon, Aug 15, 2005 at 03:58:09PM -0700, zach@vmware.com wrote:
> I was going to attempt to clean up the math-emu code to make it use the
> nice new segment and descriptor table accessors, but it quickly became
> apparent that this would be a long, tedious, error prone process that
> would eventually result in the death of a large section of my brain.
> In addition, it is not very fun to test this on the actual hardware it
> is designed to run on (although I did manage to track down a 386 with
> detachable i387 coprocessor, the owner is not sure it still boots).
> Someday it would be nice to have an audit of this code; it appears to
> be riddled with bugs relating to segmentation, for example it assumes
> LDT segments on overrides, does not use the mm->context semaphore to
> protect LDT access, and generally looks scarily out of date in both
> function and appearance.
Perhaps the best would be to just remove it. Near all 386s should be far
beyond their MTBF by now. Mark it CONFIG_BROKEN and if nobody complains for
one or two releases remove it completely.
The ugly verify_area 386 bugfix workaround code could go at the same
time.
-Andi
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 0/6] i386 virtualization patches, Set 3
2005-08-15 23:24 ` Andi Kleen
@ 2005-08-15 23:27 ` David Lang
2005-08-15 23:35 ` Andi Kleen
0 siblings, 1 reply; 7+ messages in thread
From: David Lang @ 2005-08-15 23:27 UTC (permalink / raw)
To: Andi Kleen; +Cc: zach, akpm, chrisw, linux-kernel, virtualization
On Tue, 16 Aug 2005, Andi Kleen wrote:
>
> On Mon, Aug 15, 2005 at 03:58:09PM -0700, zach@vmware.com wrote:
>> I was going to attempt to clean up the math-emu code to make it use the
>> nice new segment and descriptor table accessors, but it quickly became
>> apparent that this would be a long, tedious, error prone process that
>> would eventually result in the death of a large section of my brain.
>> In addition, it is not very fun to test this on the actual hardware it
>> is designed to run on (although I did manage to track down a 386 with
>> detachable i387 coprocessor, the owner is not sure it still boots).
>> Someday it would be nice to have an audit of this code; it appears to
>> be riddled with bugs relating to segmentation, for example it assumes
>> LDT segments on overrides, does not use the mm->context semaphore to
>> protect LDT access, and generally looks scarily out of date in both
>> function and appearance.
>
> Perhaps the best would be to just remove it. Near all 386s should be far
> beyond their MTBF by now. Mark it CONFIG_BROKEN and if nobody complains for
> one or two releases remove it completely.
you are forgetting about the embedded market, there 386 cpu (or things
that look like 386 cpu's) are still available.
David Lang
> The ugly verify_area 386 bugfix workaround code could go at the same
> time.
>
> -Andi
> -
> 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/
>
--
There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies.
-- C.A.R. Hoare
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 0/6] i386 virtualization patches, Set 3
2005-08-15 23:27 ` David Lang
@ 2005-08-15 23:35 ` Andi Kleen
0 siblings, 0 replies; 7+ messages in thread
From: Andi Kleen @ 2005-08-15 23:35 UTC (permalink / raw)
To: David Lang; +Cc: Andi Kleen, zach, akpm, chrisw, linux-kernel, virtualization
> you are forgetting about the embedded market, there 386 cpu (or things
> that look like 386 cpu's) are still available.
They cannot use it much though because the code is obviously in so
bad shape. Perhaps they have all FPUs ? Ok given LDT usage
is rare, but still there are probably lots of other bugs
in that unmaintained code too.
-Andi
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 0/6] i386 virtualization patches, Set 3
2005-08-15 22:58 [PATCH 0/6] i386 virtualization patches, Set 3 zach
2005-08-15 23:24 ` Andi Kleen
@ 2005-08-16 3:08 ` Brian Gerst
2005-08-16 3:33 ` Zachary Amsden
2005-08-16 7:44 ` Chris Wright
2 siblings, 1 reply; 7+ messages in thread
From: Brian Gerst @ 2005-08-16 3:08 UTC (permalink / raw)
To: zach; +Cc: akpm, chrisw, linux-kernel, virtualization
zach@vmware.com wrote:
> This round attempts to conclude all of the LDT related cleanup with some
> finally nice looking LDT code, fixes for the UML build, a bugfix for
> really rather nasty kprobes problems, and the basic framework for an LDT
> test suite. It is really rather unfortunate that this code is so
> difficult to test, even with DOSemu and Wine, there are still very nasty
> corner cases here - anyone want an iret to 16-bit stack test?.
>
> I was going to attempt to clean up the math-emu code to make it use the
> nice new segment and descriptor table accessors, but it quickly became
> apparent that this would be a long, tedious, error prone process that
> would eventually result in the death of a large section of my brain.
> In addition, it is not very fun to test this on the actual hardware it
> is designed to run on (although I did manage to track down a 386 with
> detachable i387 coprocessor, the owner is not sure it still boots).
> Someday it would be nice to have an audit of this code; it appears to
> be riddled with bugs relating to segmentation, for example it assumes
> LDT segments on overrides, does not use the mm->context semaphore to
> protect LDT access, and generally looks scarily out of date in both
> function and appearance.
If you really want to test the math emu code, you can hack check_x87 in
head.S to always leave the fpu disabled. Then you can test it on any
cpu, not just a 386.
--
Brian Gerst
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 0/6] i386 virtualization patches, Set 3
2005-08-16 3:08 ` Brian Gerst
@ 2005-08-16 3:33 ` Zachary Amsden
0 siblings, 0 replies; 7+ messages in thread
From: Zachary Amsden @ 2005-08-16 3:33 UTC (permalink / raw)
To: Brian Gerst; +Cc: akpm, chrisw, linux-kernel, virtualization
Brian Gerst wrote:
> If you really want to test the math emu code, you can hack check_x87
> in head.S to always leave the fpu disabled. Then you can test it on
> any cpu, not just a 386.
That is a good idea, and while a valid point, it actually still requires
writing the code to actually test the FPU, specifically, using weird
prefixes, LDT based segments, and other oddities that don't get
generated from "normal" C code. I'm pretty sure the existing code works
for the 99% cases or else it wouldn't have gotten there in the first
place. But testing the corner cases here is even nastier than testing
the LDT corner cases - you would basically need to write a lot of hand
coded i387 assembler. Perhaps such a test might exist, but in all
honesty, without a comprehensive test, it is simply far too easy to
introduce a bug here, and far too likely it will either not be noticed
until it has caused someone a possibly undetected numerical error, or
I'm just wasting my time because noone is using this code anyways.
Fortunately, the Hubble telescope has been upgraded to a 486 ;)
Zach
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 0/6] i386 virtualization patches, Set 3
2005-08-15 22:58 [PATCH 0/6] i386 virtualization patches, Set 3 zach
2005-08-15 23:24 ` Andi Kleen
2005-08-16 3:08 ` Brian Gerst
@ 2005-08-16 7:44 ` Chris Wright
2 siblings, 0 replies; 7+ messages in thread
From: Chris Wright @ 2005-08-16 7:44 UTC (permalink / raw)
To: zach; +Cc: akpm, chrisw, linux-kernel, virtualization
* zach@vmware.com (zach@vmware.com) wrote:
> This patch set is based on 2.6.13-rc6 -mm1 broken out series. It applies
> and builds i386, x86_64, and um-i386 on 2.6.13-rc5. I've tested PAE and
> non-PAE SMP kernels and am working on an LDT test suite. Depends on
> the i386 cleanups, sub-arch movement, and LDT cleanups I've already sent
> out.
I put these in the virt-2.6 git tree, with the one minor wrprotect macro
change I mentioned.
thanks,
-chris
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2005-08-16 7:44 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-15 22:58 [PATCH 0/6] i386 virtualization patches, Set 3 zach
2005-08-15 23:24 ` Andi Kleen
2005-08-15 23:27 ` David Lang
2005-08-15 23:35 ` Andi Kleen
2005-08-16 3:08 ` Brian Gerst
2005-08-16 3:33 ` Zachary Amsden
2005-08-16 7:44 ` Chris Wright
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.