From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 941203858C42 for ; Sat, 17 Feb 2024 02:04:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 941203858C42 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 941203858C42 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1708135499; cv=none; b=bu+lM8UCjhiv08EjJEz18i4eWevGFlJqQmdJrIxlhLQHDuW3eQ4f9iIwojS3SEkSnSv+QpFjubc1cEg7raxKguveQr2C3YV6G3lKuZZ8NYKVFO+TIddCJo1pohy/vw1QFZIGcRP/APlUjEQDYQxXRzq0ra+UTB4WFswaYCagAVE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1708135499; c=relaxed/simple; bh=YS8JMoNKXPAcGHTrdrQ9eV7vHoCELrFZIHA6PJM1HDU=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=Yrg8lsRon+nL2k6juurau27BR15gAKoLy2m0mWjzE6z+73ORbSRoDFaHb9OaOOhEuFPfJFq/gCUtmYB7TQuvyP8yiTUxP9v0XQtz5QAaM3SFpK663mRJ1XPMYJTmJEFTsChwPodKvWy29QABBkBJUh/sGpeyJo62oSBSbiGYpOA= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1708135497; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to; bh=tVUWyI2uO/0mInlrhJZYbyW/cIWVP4O5KqnLB1hIuE8=; b=ZjwDJvFocUILxn8C/OLwCRNnIjTxcB2zFP0aKXNPHyP6Ukv4lQBA8GS1xSX+UOcGL0EIur skJtVOZ2xB+qYF3lh/vvT6LhQFpHS7GIlIxdo6PTAX6zABYKtOFncrG/hhBcajvlpEFL3l VvcC6l1l1p7J6KQqLGDAKaVxHH/sSZk= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-325-AtVwHwnwOlCyUac4M5cwng-1; Fri, 16 Feb 2024 21:04:55 -0500 X-MC-Unique: AtVwHwnwOlCyUac4M5cwng-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 895E41C05AB6; Sat, 17 Feb 2024 02:04:55 +0000 (UTC) Received: from greed.delorie.com (unknown [10.22.8.101]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6CF2E1C060B1; Sat, 17 Feb 2024 02:04:55 +0000 (UTC) Received: from greed.delorie.com.redhat.com (localhost [127.0.0.1]) by greed.delorie.com (8.15.2/8.15.2) with ESMTP id 41H24sno321215; Fri, 16 Feb 2024 21:04:54 -0500 From: DJ Delorie To: Michael Jeanson Cc: libc-alpha@sourceware.org, mjeanson@efficios.com Subject: Re: [PATCH v8 4/8] nptl: Add features to internal 'struct rseq_area' In-Reply-To: <20240206162801.882585-5-mjeanson@efficios.com> Date: Fri, 16 Feb 2024 21:04:54 -0500 Message-ID: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.7 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-10.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,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: Michael Jeanson writes: > 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. Are there any kernels that still provide auxvals that result in a 8 byte rseq area? I.e. perhaps an older kernel that doesn't support the feature area at all? > 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. */ If the answer to the first question is "yes" then this should be changed to say "8 bytes" etc. > 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; > }; Ok.