From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-3.0 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_GMAIL_RCVD, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=no autolearn_force=no version=3.4.2 Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 96A3C1F463 for ; Wed, 8 Jan 2020 16:16:33 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:mime-version :content-transfer-encoding; q=dns; s=default; b=uc4gcYxYRM7pVUWJ QE8cXg/7nP69Y1nOr3wrB6luE4Z8ZMIoL1aQNWM/DA4sdBeUdnsCCz7h9BlgDH4I J1w3Fxu4p4vAB8obSvD6EuU10VpRubDKYcXNBGU6TGuePFjf9VbILtKSy3ulCU+3 Dic01Zy//Js0LmOVebfA8iiqHrE= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:mime-version :content-transfer-encoding; s=default; bh=ZE1M4EMhPCbAbpHxmrEoJV w0Tgo=; b=Nno7h2vPmw7frHhAPkPtBs5xbgceAkJxLZwqoT/l9bW75zqljJO46P ZAlX46DUPUfB/Ax792G+LooMzC9ptX27bseZ8qVpr9F3JckUBmrLeKgPQV143u9K pKYI7JNGfu8X6HD+JdJAG2ocXXp1vWlzLTPd/wMFUFZFJVop1cOfY= Received: (qmail 12200 invoked by alias); 8 Jan 2020 16:15:52 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 12135 invoked by uid 89); 8 Jan 2020 16:15:51 -0000 Authentication-Results: sourceware.org; auth=none X-HELO: mail-pg1-f194.google.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=qlDYQE+I8SUGWJ6rdW4viIAAm82EqyJjlXSkQrjdyjE=; b=b37snKJ9BC3iAHMUw8/W3Z2Jq6a5cilpOHtfWu4ft0qvOLkiz6HKOwD8/8UgnswKTq DkPpAV2JhtGU6yxaH3rzav5eEnt7eENMm4rgPVaY5v93Qn3TleQol4z9+Z8NcZZwsof9 X0SFELQXj/F1Qfet0BVYCMhgokTaTq134WC9KLdoEYyiEkuSWmf8hW2XP0qeSh+r1SrS GBexz6DGnvtAdRrLTxPV/3IyRIJCX0opy20HrRC43zLgmuCXPmGXgLSIA2kXq9gl8z7V JxoAieXPLuNeTigpv95rXEs/S83sXpIFueSIzJPLIe97MAq6izK3AySuOuO7naIdgNfK 8JSQ== From: "H.J. Lu" To: libc-alpha@sourceware.org Subject: V2 [PATCH 0/5] i386: Finish CET support Date: Wed, 8 Jan 2020 08:15:30 -0800 Message-Id: <20200108161535.6141-1-hjl.tools@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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