Skip to content

Misc GDT fixes and a cleanup

Andy Lutomirski linux-efi lkml stable 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest7 patches 10 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7selftests/x86/ldt_gdt_32: Work around a glibc sigaction bugtools/testing/selftests/x86/ldt_gdt.c+46 -00 replies
2/7x86/gdt: Fix setup_fixmap_gdt() to use the correct PAarch/x86/include/asm/desc.h arch/x86/kernel/cpu/common.c+8 -20 replies
3/7x86/efi/32: Fix EFI on systems where the percpu GDT is virtually mappedarch/x86/platform/efi/efi_32.c+1 -10 replies
4/7x86/boot/32: Defer resyncing initial_page_table until percpu is set uparch/x86/kernel/setup.c arch/x86/kernel/setup_percpu.c+21 -158 replies
5/7x86/gdt: Get rid of the get_*_gdt_*_vaddr() helpersarch/x86/include/asm/desc.h arch/x86/kvm/vmx.c+2 -220 replies
6/7x86/xen/gdt: Use X86_FEATURE_XENPV instead of globals for the GDT fixuparch/x86/include/asm/desc.h arch/x86/kernel/cpu/common.c arch/x86/xen/enlighten.c+17 -150 replies
7/7x86/boot/32: Rewrite test_wp_bit()arch/x86/include/asm/processor.h arch/x86/kernel/cpu/proc.c arch/x86/kernel/setup.c +2 more+11 -430 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/7] Misc GDT fixes and a cleanup

Hi all-

This applies to tip:x86/mm. For ease of testing, the series is here, too:

https://git.kernel.org/pub/scm/linux/kernel/git/luto/linux.git/tag/?h=review_20170322_gdt_and_wp

This fixes a few issues, most of which appear to be rather old. For whatever reason, Thomas' GDT series unearthed them. (And one is a genuine bug in Thomas' code but, in his defense, he might have cut-and-pasted it verbatim from the identical bug in the EFI code.)

The last three patches are cleanups I did while tracking these down.

Boris, any chance you could test this series on Xen? The 64-bit case works for me, but I'm having issues testing on 32-bit right now.

Ingo, the first patch should address your concerns from the earlier version.

Andy Lutomirski (7):
selftests/x86/ldt_gdt_32: Work around a glibc sigaction bug x86/gdt: Fix setup_fixmap_gdt() to use the correct PA x86/efi/32: Fix EFI on systems where the percpu GDT is virtually
mapped
x86/boot/32: Defer resyncing initial_page_table until percpu is set up x86/gdt: Get rid of the get_*_gdt_*_vaddr() helpers x86/xen/gdt: Use X86_FEATURE_XENPV instead of globals for the GDT
fixup
x86/boot/32: Rewrite test_wp_bit()

 arch/x86/include/asm/desc.h           | 21 +++-------------
 arch/x86/include/asm/processor.h      |  2 --
 arch/x86/kernel/cpu/common.c          | 28 ++++++++++++---------
 arch/x86/kernel/cpu/proc.c            |  5 ++--
 arch/x86/kernel/setup.c               | 17 -------------
 arch/x86/kernel/setup_percpu.c        | 21 ++++++++++++++++
 arch/x86/kvm/vmx.c                    |  4 +--
 arch/x86/mm/init_32.c                 | 44 +++++++--------------------------
 arch/x86/platform/efi/efi_32.c        |  2 +-
 arch/x86/xen/enlighten.c              |  4 ---
 tools/testing/selftests/x86/ldt_gdt.c | 46 +++++++++++++++++++++++++++++++++++
 11 files changed, 101 insertions(+), 93 deletions(-)
Signature · 1 line
2.9.3