This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 0/4] i386: Finish CET support
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: GNU C Library <libc-alpha at sourceware dot org>
- Date: Tue, 7 Jan 2020 12:43:19 -0800
- Subject: Re: [PATCH 0/4] i386: Finish CET support
- References: <20191210204710.4832-1-hjl.tools@gmail.com>
On Tue, Dec 10, 2019 at 12:47 PM H.J. Lu <hjl.tools@gmail.com> wrote:
>
> 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 (4):
> 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: 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 | 1 +
> 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, 443 insertions(+), 29 deletions(-)
>
I'd like to get them into glibc 2.31. Is it too late?
Thanks.
--
H.J.