From patchwork Wed Jan 8 14:58:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Desnoyers X-Patchwork-Id: 1219728 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-108526-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=efficios.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="vNGAHdPE"; dkim=pass (2048-bit key; unprotected) header.d=efficios.com header.i=@efficios.com header.b="jjf1l6cU"; dkim-atps=neutral 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 ozlabs.org (Postfix) with ESMTPS id 47tC812TNvz9sRh for ; Thu, 9 Jan 2020 01:59:29 +1100 (AEDT) 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:cc:subject:date:message-id; q=dns; s= default; b=RdTHQt+zfn69JbdXzmh2GKrdR1BnCI1Ue9r8tIIh3cq8To212qq5p quAx2PW07ygcF8VFreRgTAHBklHmwj0LJD0OXx7vbJq2dI1/GJhp9g6inTltskmD B18vUUUoUaMYjRAM8ahM9/XXDBgvyFRqvQBEo43rfdrVNSeDG+obD4= 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:cc:subject:date:message-id; s=default; bh=O2mKIHWAF2VduuT0GKHKBJE4YU4=; b=vNGAHdPENxDFNBxzwOsVm7OqxONI I8IDUp0klvtoB2gl6xjMRmY10F9fhAo3syCFzJGfAOvkmbYaZlhC7ChnWzf3gfCr UFrhP43ubZJOylOfQL/6wu9UUpF7dZ+cBKn7lTGh8N8HV4TyN+9NEqOvJTxm5ZQM hRLyise90c9ycJc= Received: (qmail 13290 invoked by alias); 8 Jan 2020 14:59:23 -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 Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 13281 invoked by uid 89); 8 Jan 2020 14:59:22 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-15.7 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy=sk:__libc_ X-HELO: mail.efficios.com DKIM-Filter: OpenDKIM Filter v2.10.3 mail.efficios.com 0315D69598F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=efficios.com; s=default; t=1578495559; bh=LPDoZSACNiTuum0HL24a4OuLhomP9fHNzcCh7VOoP5U=; h=From:To:Date:Message-Id; b=jjf1l6cUoW9UBGIRwNW3IEFq3VdsCDZdYKCaCFk98FEjorDj3Tt87Zwz910gPo0Fl 2m43nZEXOOoWwFSZ/8pHjz5Ng8wUdJKl9RqCC8n4i/B7xKs2+7DaqsBydn0lbc6jMA jr8nwbVrTWuQZia6UqPAj3xKNMKJR/kx0TROOnH4A/aRhw09on3doEjYm5XCwbfhiE LkF6mRm+K3a5s/f6BMS5VT+Izux7aIaUn8FrsH7lOuJbLejph0ar/Frj4MDQ9xhMGh LtHompn9D+/7MqP4/ftUCizUFCa95w9Nc22ynA4rtVN8JFHTSpj/HxxQMeZYOBsNPv 7gdsz6kw0ozwg== From: Mathieu Desnoyers To: Carlos O'Donell Cc: Florian Weimer , Joseph Myers , Szabolcs Nagy , libc-alpha@sourceware.org, Mathieu Desnoyers Subject: [RFC PATCH glibc 0/8] Restartable Sequences enablement Date: Wed, 8 Jan 2020 09:58:43 -0500 Message-Id: <20200108145851.13594-1-mathieu.desnoyers@efficios.com> Hi, Please find the rseq-enablement patchset for comments in this series. This patch series is based on glibc master branch at commit d006e84d5d Fix formatting of ChangeLog ouput Since the last post, I updated the manual following the advices I received, removed the syscall table patches from the series, as they are now merged into glibc master. I also updated the abilist following le/be split for arm, microblaze, and sh. Thanks for the feedback! Mathieu Florian Weimer (3): Introduce Implement __libc_early_init nptl: Start new threads with all signals blocked [BZ #25098] Mathieu Desnoyers (5): glibc: Perform rseq(2) registration at C startup and thread creation (v14) glibc: sched_getcpu(): use rseq cpu_id TLS on Linux (v5) support record failure: allow use from constructor support: implement xpthread key create/delete (v3) rseq registration tests (v7) NEWS | 10 + csu/init-first.c | 4 - csu/libc-start.c | 5 + elf/Makefile | 5 +- elf/Versions | 1 + elf/dl-call-libc-early-init.c | 41 ++ elf/dl-load.c | 9 + elf/dl-lookup-direct.c | 116 ++++++ elf/dl-lookup.c | 10 +- elf/dl-open.c | 24 ++ elf/elf_machine_sym_no_match.h | 34 ++ elf/libc-early-init.h | 35 ++ elf/libc_early_init.c | 30 ++ elf/rtld.c | 4 + manual/threads.texi | 30 +- misc/rseq-internal.h | 33 ++ nptl/descr.h | 10 +- nptl/pthread_create.c | 57 +-- support/Makefile | 2 + support/check.h | 4 + support/support_record_failure.c | 18 +- support/xpthread_key_create.c | 25 ++ support/xpthread_key_delete.c | 24 ++ support/xthread.h | 2 + sysdeps/generic/ldsodefs.h | 17 + sysdeps/mach/hurd/i386/init-first.c | 4 - sysdeps/mips/dl-machine.h | 15 - sysdeps/mips/elf_machine_sym_no_match.h | 43 +++ sysdeps/unix/sysv/linux/Makefile | 11 +- sysdeps/unix/sysv/linux/Versions | 3 + sysdeps/unix/sysv/linux/aarch64/bits/rseq.h | 43 +++ sysdeps/unix/sysv/linux/aarch64/libc.abilist | 1 + sysdeps/unix/sysv/linux/alpha/libc.abilist | 1 + sysdeps/unix/sysv/linux/arm/be/libc.abilist | 1 + sysdeps/unix/sysv/linux/arm/bits/rseq.h | 83 ++++ sysdeps/unix/sysv/linux/arm/le/libc.abilist | 1 + sysdeps/unix/sysv/linux/bits/rseq.h | 29 ++ sysdeps/unix/sysv/linux/csky/libc.abilist | 1 + sysdeps/unix/sysv/linux/hppa/libc.abilist | 1 + sysdeps/unix/sysv/linux/i386/libc.abilist | 1 + sysdeps/unix/sysv/linux/ia64/libc.abilist | 1 + .../sysv/linux/m68k/coldfire/libc.abilist | 1 + .../unix/sysv/linux/m68k/m680x0/libc.abilist | 1 + .../sysv/linux/microblaze/be/libc.abilist | 1 + .../sysv/linux/microblaze/le/libc.abilist | 1 + sysdeps/unix/sysv/linux/mips/bits/rseq.h | 62 +++ .../sysv/linux/mips/mips32/fpu/libc.abilist | 1 + .../sysv/linux/mips/mips32/nofpu/libc.abilist | 1 + .../sysv/linux/mips/mips64/n32/libc.abilist | 1 + .../sysv/linux/mips/mips64/n64/libc.abilist | 1 + sysdeps/unix/sysv/linux/nios2/libc.abilist | 1 + sysdeps/unix/sysv/linux/powerpc/bits/rseq.h | 37 ++ .../linux/powerpc/powerpc32/fpu/libc.abilist | 1 + .../powerpc/powerpc32/nofpu/libc.abilist | 1 + .../linux/powerpc/powerpc64/be/libc.abilist | 1 + .../linux/powerpc/powerpc64/le/libc.abilist | 1 + .../unix/sysv/linux/riscv/rv64/libc.abilist | 1 + sysdeps/unix/sysv/linux/rseq-internal.h | 77 ++++ sysdeps/unix/sysv/linux/rseq-sym.c | 43 +++ sysdeps/unix/sysv/linux/s390/bits/rseq.h | 37 ++ .../unix/sysv/linux/s390/s390-32/libc.abilist | 1 + .../unix/sysv/linux/s390/s390-64/libc.abilist | 1 + sysdeps/unix/sysv/linux/sched_getcpu.c | 29 +- sysdeps/unix/sysv/linux/sh/be/libc.abilist | 1 + sysdeps/unix/sysv/linux/sh/le/libc.abilist | 1 + .../sysv/linux/sparc/sparc32/libc.abilist | 1 + .../sysv/linux/sparc/sparc64/libc.abilist | 1 + sysdeps/unix/sysv/linux/sys/rseq.h | 30 ++ sysdeps/unix/sysv/linux/tst-rseq-nptl.c | 353 ++++++++++++++++++ sysdeps/unix/sysv/linux/tst-rseq.c | 114 ++++++ sysdeps/unix/sysv/linux/x86/bits/rseq.h | 30 ++ .../unix/sysv/linux/x86_64/64/libc.abilist | 1 + .../unix/sysv/linux/x86_64/x32/libc.abilist | 1 + 73 files changed, 1553 insertions(+), 70 deletions(-) create mode 100644 elf/dl-call-libc-early-init.c create mode 100644 elf/dl-lookup-direct.c create mode 100644 elf/elf_machine_sym_no_match.h create mode 100644 elf/libc-early-init.h create mode 100644 elf/libc_early_init.c create mode 100644 misc/rseq-internal.h create mode 100644 support/xpthread_key_create.c create mode 100644 support/xpthread_key_delete.c create mode 100644 sysdeps/mips/elf_machine_sym_no_match.h create mode 100644 sysdeps/unix/sysv/linux/aarch64/bits/rseq.h create mode 100644 sysdeps/unix/sysv/linux/arm/bits/rseq.h create mode 100644 sysdeps/unix/sysv/linux/bits/rseq.h create mode 100644 sysdeps/unix/sysv/linux/mips/bits/rseq.h create mode 100644 sysdeps/unix/sysv/linux/powerpc/bits/rseq.h create mode 100644 sysdeps/unix/sysv/linux/rseq-internal.h create mode 100644 sysdeps/unix/sysv/linux/rseq-sym.c create mode 100644 sysdeps/unix/sysv/linux/s390/bits/rseq.h create mode 100644 sysdeps/unix/sysv/linux/sys/rseq.h create mode 100644 sysdeps/unix/sysv/linux/tst-rseq-nptl.c create mode 100644 sysdeps/unix/sysv/linux/tst-rseq.c create mode 100644 sysdeps/unix/sysv/linux/x86/bits/rseq.h