From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtpout.efficios.com (smtpout.efficios.com [IPv6:2607:5300:203:b2ee::31e5]) by sourceware.org (Postfix) with ESMTPS id 0E82B3858C60 for ; Tue, 6 Feb 2024 16:28:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0E82B3858C60 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=efficios.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=efficios.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 0E82B3858C60 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:5300:203:b2ee::31e5 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1707236894; cv=none; b=qtWLJMqV8k0VvJ0FOK8fbBnre/Gyzq983B+m+XoXcuBr78C1LBdjg17wq36tcSeB4UOMWyxl5a2I4eOo6iGCSeYrrMrNSlzvVvqio3zL3X6El8thar52dNNk9lm05nsGSoE5P6EmBUpq/BZiRg4/VQUAVbCLAr3s0cMbKPc/ecY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1707236894; c=relaxed/simple; bh=aX9kTJaJPuQEulCsU+WxDWPDi04zQNxYFqlMU/W9O0o=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=X2O3Xdcg5lTX0k9LVf1DRq2Jx415rSQ+AjaKLHvy5wNf3pQ6PGCQvGAPVY/erFctGBcBgQFkNb35+nuItPBXX+Zcjt3bOwaBYTqUwYbbpP7cKXaqo0bw23racgtp1wwaakk1lt55ItL226v2ri0W6cTRelny30DthTU69y4Nog0= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=efficios.com; s=smtpout1; t=1707236892; bh=aX9kTJaJPuQEulCsU+WxDWPDi04zQNxYFqlMU/W9O0o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=L+C6EOTWv/FslrPBIl6bAFPHwaG6BmFUIuRHGD/+MBssZ5uWwFgJEpUXU2dxubjFF l/IfqR/QK2J4Ny7ajtszRgdcXISU6rT2bCYA+1hMKZ3WT6+QAHZ2uA3uFQD9XVbtaM UaUrEfzhD9T6KmsHCvhVY/Xpipmr4nvuYYryRHl5iCJ5VkDsPlNlBjvCc4OrThpmK6 dG/ByAc6brQ7iLmoSC2pTmL6jH7ebuKoh/xeoWnIeP0Mvmq0a0EJbhUpi5oI0vf8TM 4ACIlpvJzAK/hZANcIYceUUaEm79Hd+1u+C2v3mBwvVpc+/SgmBynvsajm6ix4jcKG jagtmxradzNcQ== Received: from laptop-mjeanson.internal.efficios.com (192-222-143-198.qc.cable.ebox.net [192.222.143.198]) by smtpout.efficios.com (Postfix) with ESMTPSA id 4TTpZh59M1zXK6; Tue, 6 Feb 2024 11:28:12 -0500 (EST) From: Michael Jeanson To: libc-alpha@sourceware.org Cc: Michael Jeanson Subject: [PATCH v8 4/8] nptl: Add features to internal 'struct rseq_area' Date: Tue, 6 Feb 2024 11:27:57 -0500 Message-Id: <20240206162801.882585-5-mjeanson@efficios.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240206162801.882585-1-mjeanson@efficios.com> References: <20240206162801.882585-1-mjeanson@efficios.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: The 'struct rseq_area' is used to define the offset of the various features available in the rseq ABI. Add fields that follow cpu_id (rseq_cs, flags, node_id, mm_cid) in preparation for their use. Access to features following the original rseq ABI 20 bytes (after 'flags') starting with 'node_id' must be gated by an rseq feature size test. Signed-off-by: Michael Jeanson --- sysdeps/unix/sysv/linux/rseq-internal.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/sysdeps/unix/sysv/linux/rseq-internal.h b/sysdeps/unix/sysv/linux/rseq-internal.h index b6c9deea6b..a63e4afbdb 100644 --- a/sysdeps/unix/sysv/linux/rseq-internal.h +++ b/sysdeps/unix/sysv/linux/rseq-internal.h @@ -28,13 +28,17 @@ #include /* rseq area registered with the kernel. Use a custom definition - here to isolate from kernel struct rseq changes. The - implementation of sched_getcpu needs acccess to the cpu_id field; - the other fields are unused and not included here. */ + here to isolate from kernel struct rseq changes. Access to fields + beyond the 20 bytes of the original ABI (after 'flags') must be gated + by a check of the feature size. */ struct rseq_area { uint32_t cpu_id_start; uint32_t cpu_id; + uint64_t rseq_cs; + uint32_t flags; + uint32_t node_id; + uint32_t mm_cid; }; static inline struct rseq_area * -- 2.34.1