This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
V2 [PATCH 0/5] i386: Finish CET support
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: libc-alpha at sourceware dot org
- Date: Wed, 8 Jan 2020 08:15:30 -0800
- Subject: V2 [PATCH 0/5] i386: Finish CET support
This patch set finishes CET support on i386:
1. getcontext, setcontext and swapcontext are updated not to preserve
EAX, ECX and EDX. Since they are caller-saved, caller will reload them
after getcontext, setcontext and swapcontext calls if needed. The extra
scratch registers are used to enable CET.
2. Add missing _CET_ENDBR to i386 assembly files.
3. Enable CET support in i386 ucontext functions.
Tested on i386 CET/non-CET machines.
H.J. Lu (5):
i386: Don't unnecessarily save and restore EAX, ECX and EDX [BZ#
25262]
i386/sub_n.S: Add a missing _CET_ENDBR to indirect jump target
i386: Add _CET_ENDBR to assembly files without ENTRY
i386: Remove _exit.S
i386: Enable CET support in ucontext functions
sysdeps/i386/i386-mcount.S | 2 +
sysdeps/i386/nptl/pthread_spin_lock.S | 2 +
sysdeps/i386/nptl/pthread_spin_unlock.S | 3 +
sysdeps/i386/pthread_spin_trylock.S | 2 +
sysdeps/i386/sub_n.S | 1 +
sysdeps/unix/sysv/linux/i386/_exit.S | 44 ------
sysdeps/unix/sysv/linux/i386/getcontext.S | 64 +++++++-
sysdeps/unix/sysv/linux/i386/makecontext.S | 123 +++++++++++++++
sysdeps/unix/sysv/linux/i386/setcontext.S | 112 ++++++++++++--
sysdeps/unix/sysv/linux/i386/swapcontext.S | 156 ++++++++++++++++++--
sysdeps/unix/sysv/linux/i386/sysdep.h | 5 +
sysdeps/unix/sysv/linux/i386/ucontext_i.sym | 1 +
12 files changed, 442 insertions(+), 73 deletions(-)
delete mode 100644 sysdeps/unix/sysv/linux/i386/_exit.S
--
2.24.1