Descriptor table fixes / cleanup for i386
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest21 patches 36 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/21 | i386 Pnp segments in segment hdrivers/ include/ | +14 | 0 replies | |
| 2/21 | i386 Always relax segmentsarch/ | +17 | 0 replies | |
| 3/21 | i386 Apm seg in gdtarch/ arch/ | +5 | 0 replies | |
| 4/21 | i386 Broken bios commonarch/ arch/ arch/ +2 more | +23 | 7 replies | |
| 5/21 | i386 Pnp byte granularityarch/ include/ | +7 | 0 replies | |
| 6/21 | i386 Fixed pnp bios limitsarch/ drivers/ | +13 | 0 replies | |
| 7/21 | i386 Losing fs gs to biosarch/ drivers/ include/ | +42 | 1 reply | |
| 8/21 | i386 Segment protect properlydrivers/ include/ include/ | +12 | 0 replies | |
| 9/21 | i386 Deprecate obsolete ldt accessorsinclude/ | +0 | 0 replies | |
| 10/21 | i386 Use protected segment for 16bit stackarch/ | +2 | 0 replies | |
| 11/21 | i386 Stop deleting ntarch/ | +0 | 0 replies | |
| 12/21 | i386 Deprecate descriptor asmarch/ arch/ arch/ +3 more | +70 | 3 replies | |
| 13/21 | i386 Gdt page isolationarch/ arch/ arch/ +4 more | +19 | 0 replies | |
| 14/21 | i386 Apm is on cpu zero onlyarch/ | +11 | 5 replies | |
| 15/21 | i386 Deprecate useless bugarch/ | +1 | 0 replies | |
| 16/21 | i386 Eliminate duplicate segment macrosarch/ arch/ include/ | +22 | 2 replies | |
| 17/21 | i386 Ldt cleanups 1arch/ arch/ include/ +1 more | +9 | 0 replies | |
| 18/21 | i386 Ldt cleanups 2include/ | +18 | 0 replies | |
| 19/21 | i386 Kprobes semaphore fixarch/ arch/ arch/ +1 more | +129 | 13 replies | |
| 20/21 | i386 Ldt cleanups 3arch/ include/ include/ | +64 | 0 replies | |
| 21/21 | i386 Ldt context inlinearch/ include/ include/ | +24 | 2 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/21] Descriptor table fixes / cleanup for i386
Patches to clean up descriptor access in Linux to make it friendly to virtualization environments. The basic problem is that the GDT must be write protected, which causes spurious overhead when the GDT lies on the same page as other data. This problem exists both for VMware and Xen; Xen actually requires page isolation, so we have implemented the most general and compatible solution. While VMware suffers only from false sharing, Xen suffers from the false-validation problem, which requires the extra space for the GDT page to be zeroed.
The GDTs for secondary processors are allocated dynamically to avoid bloating kernel static data with GDTs for not-present processors.
Along the way, I discovered two serious but subtle problems; there was no consistent mechanism for converting an EIP to a linear address, which presented a serious challenge for the kprobes code, since the LDT is protected by a semaphore which must be acquired in user context, with interrupts enabled. The second problem was that %fs, and %gs could end up loaded with bad cached values after a PnP or APM BIOS call.
Many other small enhancements to readability, compactness, correctness, and overall goodness were discovered along the way.
The core piece of these patches is getting the GDT page aligned; I wil rework or deprecate any other pieces of this that are not wanted / unnecessary / (hopefully not) buggy.
Testing: 4 way SMP boot-halts, kernel compiles, stress, UML, LDT
test suites, insane cross-modifying code for breakpoint testing.
Zachary Amsden <[email protected]>