Skip to content

x86_64: Tidy up vsyscall emulation and make it optional

Andy Lutomirski lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 4 repliesIn review
  2. v13 patches 13 repliesSuperseded

Changes in v2 from the cover letter

- Added Josh's Reviewed-by
- Fixup up Xen bits in patch 3

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3x86_64,vsyscall: Turn vsyscalls all the way off when vsyscall=nonearch/x86/kernel/vsyscall_64.c+9 -50 replies
2/3x86_64,vsyscall: Rewrite comment and clean up headers in vsyscall codearch/x86/kernel/vsyscall_64.c+18 -334 replies
3/3x86_64,vsyscall: Make vsyscall emulation configurablearch/x86/Kconfig arch/x86/include/asm/fixmap.h arch/x86/include/asm/page_64.h +4 more+36 -70 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchJosh Triplett
1/3R-b
2/3R-b
3/3R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/3] x86_64: Tidy up vsyscall emulation and make it optional

Now that arch/x86/kernel/vsyscall_64.c contains only vsyscall emulation code, clean it up and make it optional.

Patch 1 makes vsyscall=none work be a bit more self-consistent: it actually removes the fake vsyscall page instead of just segfaulting anyone who tries to use it.

Patch 2 is pure cosmetic cleanup.

Patch 3 is the meat: it lets vsyscall emulation be configured out. The config option to disable it is hidden under CONFIG_EXPERT, since it will break legacy code.

Note that, last I checked, current userspace is unlikely to work if the vDSO *and* vsyscalls are off. Take it up with the glibc maintainers.

This applies on top of tip/x86/vdso.

Changes from v1:
- Added Josh's Reviewed-by
- Fixup up Xen bits in patch 3

Andy Lutomirski (3):
x86_64,vsyscall: Turn vsyscalls all the way off when vsyscall=none x86_64,vsyscall: Rewrite comment and clean up headers in vsyscall code x86_64,vsyscall: Make vsyscall emulation configurable

 arch/x86/Kconfig                | 18 ++++++++++++
 arch/x86/include/asm/fixmap.h   |  2 ++
 arch/x86/include/asm/page_64.h  |  4 ++-
 arch/x86/include/asm/vsyscall.h |  8 +++++
 arch/x86/kernel/Makefile        |  3 +-
 arch/x86/kernel/setup.c         |  2 --
 arch/x86/kernel/vsyscall_64.c   | 65 +++++++++++++++++------------------------
 arch/x86/xen/mmu.c              |  6 ++--
 8 files changed, 63 insertions(+), 45 deletions(-)
Signature · 1 line
1.9.3