linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/6] x86/entry/vdso: cleanups for vdso build and 32-bit vdso
@ 2025-10-26 22:12 H. Peter Anvin
  2025-10-26 22:12 ` [PATCH 1/6] x86/entry/vdso: rename vdso_image_* to vdso*_image H. Peter Anvin
                   ` (5 more replies)
  0 siblings, 6 replies; 10+ messages in thread
From: H. Peter Anvin @ 2025-10-26 22:12 UTC (permalink / raw)
  To: H. Peter Anvin, Jason A. Donenfeld, Peter Zijlstra (Intel),
	Theodore Ts'o, Thomas Weißschuh, Xin Li, Andrew Cooper,
	Andy Lutomirski, Ard Biesheuvel, Borislav Petkov, Brian Gerst,
	Dave Hansen, Ingo Molnar, James Morse, Jarkko Sakkinen,
	Josh Poimboeuf, Kees Cook, Nam Cao, Oleg Nesterov, Perry Yuan,
	Thomas Gleixner, Thomas Huth, Uros Bizjak, linux-kernel,
	linux-mm, linux-sgx, x86

From: "H. Peter Anvin" (Intel) <hpa@zytor.com>

This patchset cleans up the vdso build by building the 32- and 64-bit
vdsos in separate directories, moving the vdso2c tool to
arch/x86/tools, and by merging common code and especially Makefile
rules between the 32- and 64-bit vdsos to the greatest extent
possible.

Be more strict about sanitizing and standardizing the vdso build options.

If the vdso is build with CET endbr support, add an endbr32
instruction to system_call.S.

	x86/entry/vdso: rename vdso_image_* to vdso*_image
	x86/entry/vdso: refactor the vdso build
	x86/entry/vdso32: remove int80_landing_pad
	x86/entry/vdso32: remove SYSCALL_ENTER_KERNEL macro in sigreturn.S
	x86/entry/vdso32: remove open-coded DWARF in sigreturn.S
	x86/entry/vdso32: add endbr32 to system_call.S

Overall, the patchset removes 90 lines of code. Although it touches a
lot of files, the vast majority is just code movement and/or
deduplication.

	-hpa

---
 arch/x86/Makefile                                  |   2 +-
 arch/x86/entry/syscall_32.c                        |   2 +-
 arch/x86/entry/vdso/.gitignore                     |  11 +-
 arch/x86/entry/vdso/Makefile                       | 162 +--------------------
 arch/x86/entry/vdso/common/Makefile.include        |  83 +++++++++++
 arch/x86/entry/vdso/{vdso-note.S => common/note.S} |   5 +-
 arch/x86/entry/vdso/{ => common}/vclock_gettime.c  |   0
 arch/x86/entry/vdso/{ => common}/vdso-layout.lds.S |   0
 arch/x86/entry/vdso/{ => common}/vgetcpu.c         |   0
 arch/x86/entry/vdso/vdso32/Makefile                |  24 +++
 arch/x86/entry/vdso/vdso32/note.S                  |  19 +--
 arch/x86/entry/vdso/vdso32/sigreturn.S             | 152 +++++--------------
 arch/x86/entry/vdso/vdso32/system_call.S           |  10 +-
 arch/x86/entry/vdso/vdso32/vclock_gettime.c        |   5 +-
 arch/x86/entry/vdso/vdso32/vdso32.lds.S            |   2 +-
 arch/x86/entry/vdso/vdso32/vgetcpu.c               |   4 +-
 arch/x86/entry/vdso/vdso64/Makefile                |  45 ++++++
 arch/x86/entry/vdso/vdso64/note.S                  |   1 +
 arch/x86/entry/vdso/vdso64/vclock_gettime.c        |   1 +
 .../entry/vdso/{vdso.lds.S => vdso64/vdso64.lds.S} |   2 +-
 arch/x86/entry/vdso/{ => vdso64}/vdsox32.lds.S     |   2 +-
 arch/x86/entry/vdso/vdso64/vgetcpu.c               |   1 +
 .../entry/vdso/{ => vdso64}/vgetrandom-chacha.S    |   0
 arch/x86/entry/vdso/{ => vdso64}/vgetrandom.c      |   2 +-
 arch/x86/entry/vdso/{ => vdso64}/vsgx.S            |   0
 arch/x86/entry/vdso/vma.c                          |  24 ++-
 arch/x86/include/asm/dwarf2.h                      |   1 +
 arch/x86/include/asm/elf.h                         |   2 +-
 arch/x86/include/asm/vdso.h                        |   6 +-
 arch/x86/kernel/asm-offsets.c                      |   6 +
 arch/x86/kernel/process_64.c                       |   6 +-
 arch/x86/kernel/signal_32.c                        |   4 +-
 arch/x86/tools/Makefile                            |  15 +-
 arch/x86/{entry/vdso => tools}/vdso2c.c            |   1 -
 arch/x86/{entry/vdso => tools}/vdso2c.h            |   0
 35 files changed, 255 insertions(+), 345 deletions(-)


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2025-10-29 14:37 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-10-26 22:12 [PATCH 0/6] x86/entry/vdso: cleanups for vdso build and 32-bit vdso H. Peter Anvin
2025-10-26 22:12 ` [PATCH 1/6] x86/entry/vdso: rename vdso_image_* to vdso*_image H. Peter Anvin
2025-10-26 22:12 ` [PATCH 2/6] x86/entry/vdso: refactor the vdso build H. Peter Anvin
2025-10-26 22:12 ` [PATCH 3/6] x86/entry/vdso32: remove int80_landing_pad H. Peter Anvin
2025-10-28  6:50   ` kernel test robot
2025-10-29  6:54   ` Brian Gerst
2025-10-29 14:36     ` H. Peter Anvin
2025-10-26 22:12 ` [PATCH 4/6] x86/entry/vdso32: remove SYSCALL_ENTER_KERNEL macro in sigreturn.S H. Peter Anvin
2025-10-26 22:12 ` [PATCH 5/6] x86/entry/vdso32: remove open-coded DWARF " H. Peter Anvin
2025-10-26 22:12 ` [PATCH 6/6] x86/entry/vdso32: add endbr32 to system_call.S H. Peter Anvin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox