Message ID | 20241023083920.466015-7-yury.khrustalev@arm.com |
---|---|
State | New |
Headers | show
Return-Path: <libc-alpha-bounces~incoming=patchwork.ozlabs.org@sourceware.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=libc-alpha-bounces~incoming=patchwork.ozlabs.org@sourceware.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4XYMwh51qqz1xwy for <incoming@patchwork.ozlabs.org>; Wed, 23 Oct 2024 19:41:56 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id CB4193858C32 for <incoming@patchwork.ozlabs.org>; Wed, 23 Oct 2024 08:41:54 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by sourceware.org (Postfix) with ESMTP id 0AA50385840A for <libc-alpha@sourceware.org>; Wed, 23 Oct 2024 08:41:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0AA50385840A Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 0AA50385840A Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1729672899; cv=none; b=R6VKqaeZTRkjr2oun3+p7MPZfDorSn6i3a+zPZu4YD+8cC6i/VjL0NRf/zY/sEygfFehaMQiwsiUJA///UumQZK7Wx0pjWTSZBRrmVqFH/qasyD9rXvvR6js3IbnH0DfAFHx+ThgBSDfYYdah0lkzNaO4y8ttmBKy3xsiBOelh0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1729672899; c=relaxed/simple; bh=oWXhLGXNw74nmW+2QMEMJteXb00LobTKqr1NJH8bRwE=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=TTf7GhbM0m6SvbQi4nRSZshp6VlwNG0NpXq3fI/7GiEaNxZYqAKR96Id/XUIWQ9kcuGmD17AdNg/W0Lvhj499GAGJaLKHjZTkQStzDT+HCEOi15v0qqodmACT/xh16+Rryk9b/vgl6Mp4ZnwZn/P3Km6moHsodbfVSjM1HD3M04= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 837441575; Wed, 23 Oct 2024 01:42:06 -0700 (PDT) Received: from udebian.localdomain (unknown [10.1.39.30]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 2A8F03F528; Wed, 23 Oct 2024 01:41:36 -0700 (PDT) From: Yury Khrustalev <yury.khrustalev@arm.com> To: libc-alpha@sourceware.org Cc: fweimer@redhat.com, adhemerval.zanella@linaro.org, codonell@redhat.com, nsz@gcc.gnu.org Subject: [PATCH v3 06/23] aarch64: Add GCS support to vfork Date: Wed, 23 Oct 2024 09:39:03 +0100 Message-Id: <20241023083920.466015-7-yury.khrustalev@arm.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241023083920.466015-1-yury.khrustalev@arm.com> References: <20241023083920.466015-1-yury.khrustalev@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-13.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_NONE, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list <libc-alpha.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/libc-alpha/> List-Post: <mailto:libc-alpha@sourceware.org> List-Help: <mailto:libc-alpha-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=subscribe> Errors-To: libc-alpha-bounces~incoming=patchwork.ozlabs.org@sourceware.org |
Series |
aarch64: Add support for Guarded Control Stack extension
|
expand
|
diff --git a/sysdeps/unix/sysv/linux/aarch64/vfork.S b/sysdeps/unix/sysv/linux/aarch64/vfork.S index e71e492da3..cfaf4a1ffb 100644 --- a/sysdeps/unix/sysv/linux/aarch64/vfork.S +++ b/sysdeps/unix/sysv/linux/aarch64/vfork.S @@ -33,8 +33,14 @@ ENTRY (__vfork) cmn x0, #4095 b.cs .Lsyscall_error + cbz x0, L(child) RET - +L(child): + /* Return with indirect branch in the child to support GCS. + Clear x30 to crash early if the child tries to ret. */ + mov x1, x30 + mov x30, 0 + br x1 PSEUDO_END (__vfork) libc_hidden_def (__vfork)
From: Szabolcs Nagy <szabolcs.nagy@arm.com> --- sysdeps/unix/sysv/linux/aarch64/vfork.S | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)