Skip to content

x86/ptrace: regset access to the GDT and LDT

H. Peter Anvin, Intel lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v3 Latest7 patches 14 repliesIn review

Changes in v3 from the cover letter

Requalify LDT segments for selectors that have actually changed.

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7x86/ldt: refresh %fs and %gs in refresh_ldt_segments()arch/x86/kernel/ldt.c+54 -168 replies
2/7x86/ldt: use a common value for read_default_ldt()arch/x86/kernel/ldt.c+2 -60 replies
3/7x86: move fill_user_desc() from tls.c to desc.h and add validity checkarch/x86/include/asm/desc.h arch/x86/kernel/tls.c+22 -190 replies
4/7x86/tls: create an explicit config symbol for the TLS area in the GDTarch/x86/Kconfig arch/x86/kernel/Makefile+5 -20 replies
5/7x86/segment: add #define for the last user-visible GDT slotarch/x86/include/asm/segment.h+10 -00 replies
6/7x86/tls,ptrace: provide regset access to the GDTarch/x86/kernel/ptrace.c arch/x86/kernel/tls.c arch/x86/kernel/tls.h +1 more+118 -571 reply
7/7x86/ldt,ptrace: provide regset access to the LDTarch/x86/include/asm/desc.h arch/x86/include/asm/ldt.h arch/x86/kernel/ldt.c +2 more+204 -443 replies

Reviews trailers per patch

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

Read the v3 thread

Cover letter [PATCH v3 0/7] x86/ptrace: regset access to the GDT and LDT

From: "H. Peter Anvin" <[email protected]>

Give a debugger access to the visible part of the GDT and LDT. This allows a debugger to find out what a particular segment descriptor corresponds to; e.g. if %cs is 16, 32, or 64 bits.

v3:
Requalify LDT segments for selectors that have actually changed.

v2:
Add missing change to elf.h for the very last patch.

Cc Ingo Molnar <[email protected]>
Cc Thomas Gleixner <[email protected]>
Cc Andy Lutomirski <[email protected]>
Cc Chang S. Bae <[email protected]>
Cc Markus T. Metzger <[email protected]>
Cc H. Peter Anvin <[email protected]>
 arch/x86/Kconfig               |   4 +
 arch/x86/include/asm/desc.h    |  24 +++-
 arch/x86/include/asm/ldt.h     |  16 +++
 arch/x86/include/asm/segment.h |  10 ++
 arch/x86/kernel/Makefile       |   3 +-
 arch/x86/kernel/ldt.c          | 283 ++++++++++++++++++++++++++++++++---------
 arch/x86/kernel/ptrace.c       | 103 ++++++++++++++-
 arch/x86/kernel/tls.c          | 102 +++++----------
 arch/x86/kernel/tls.h          |   8 +-
 include/uapi/linux/elf.h       |   2 +
 10 files changed, 413 insertions(+), 142 deletions(-)