From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1944) id 0ED2C385C422; Wed, 14 Feb 2024 15:06:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0ED2C385C422 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1707923203; bh=b1CFqbuC9RkbqzLJzUZVybRlZk8EXU08d/ZrkuhLR28=; h=From:To:Subject:Date:From; b=uujw+8io8l6LsVPpZfD+OoW8IzXny0CodLC7RlvIX/yyAIOC+jt0p3U9sbtPSf3Hm MVxqib434q5NtBceocc2Om5RCA0EfLqipfH9VPj5PMjZemVw0wcvxxrTS/487DqTlq jdeJgKXUjytNVHoRG1VATbvJwYAE+wjM6ebEJovQ= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Szabolcs Nagy To: glibc-cvs@sourceware.org Subject: [glibc/arm/gcs] aarch64: Add GCS support to vfork X-Act-Checkin: glibc X-Git-Author: Szabolcs Nagy X-Git-Refname: refs/heads/arm/gcs X-Git-Oldrev: c3274a8582b4915efea5a16558e730d362bea177 X-Git-Newrev: 868c129b90a52f7c30b8a560dc580f851db4b6fc Message-Id: <20240214150643.0ED2C385C422@sourceware.org> Date: Wed, 14 Feb 2024 15:06:43 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=868c129b90a52f7c30b8a560dc580f851db4b6fc commit 868c129b90a52f7c30b8a560dc580f851db4b6fc Author: Szabolcs Nagy Date: Wed Dec 27 18:36:10 2023 +0000 aarch64: Add GCS support to vfork Diff: --- sysdeps/unix/sysv/linux/aarch64/vfork.S | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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)