Received: by 2002:a25:2c96:0:0:0:0:0 with SMTP id s144csp237892ybs; Tue, 26 May 2020 08:02:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx1te3dWS8udfEMVcORn2DPnPzGk/oC3z3V8r5pjkpC1uosr0+0r/tqfGRuNZzhJ7rPhllM X-Received: by 2002:a50:a7e3:: with SMTP id i90mr20958214edc.6.1590505372144; Tue, 26 May 2020 08:02:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590505372; cv=none; d=google.com; s=arc-20160816; b=Bhcd9HE64/ikd9MDG5jPGVs8nkYbC9syVc91kx3RxaUEdbwtnOQ5NqvMtu5RSorb4h al2Ye5LwzKadHsfnja6t1NvOwA37SW8U1t+dpxo4eWk8iE/izfD3cshbCnTRtHBl6dG/ fSNiRHHNrqymtfEl43KDbxqr9+rwZSQzjwey7yJrrBMkhI1u2USqSmjnyAh3w0ATw7LT y9TRXYBCNbGTvZErMvZnpK20Ff2bA2RBLY2rKR/qTL76SbxhiVeWnZxkm3RardUuQeOc pYK9sqn33RwTolag5rRURDSzTUZYWgjOuQA3k/uXb2Y8z85Uis3/Yn3DMOl07y2MfJvS i7GQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:message-id:in-reply-to:date:references:subject:cc:to :from:dkim-signature; bh=1VCJa5RbOMATerrFzZ+0VrpXn1iuIwJEs1VN+9Q6EoY=; b=riKxVQpCOOtHkJ0DBNHcPUQ7t40DRBLsO70HUdilrasf8zF0PYtPXb98P6Ytc3golF 52ikCcb+lbqkNOXUbhWraHzTu3WOwXE5NMuXoMiOloGHeYBlKUZko5g39aLG+h9laTOY Jo4Jwg08nC8GFYiKIqOfbThlr+061v9Jq3HcC9mkNHlObSE/tDn8+Pb9yAMvr0xxAuJe Pr30+faTpOTrDGocMCQavXO6OasDtSFQUpcLNZ6PZ2a+I+XP5pgJakd+PPRjFVNZurRr xDorz69uE2ReGEcOAbyllQYjL4qksvBoxem+X9hGhHImQHj8dKzkSoB55EA9ccBxh6Uu 6wvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=VYwqUWmJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lu3si25666ejb.305.2020.05.26.08.02.26; Tue, 26 May 2020 08:02:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=VYwqUWmJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729813AbgEZO6I (ORCPT + 99 others); Tue, 26 May 2020 10:58:08 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:30360 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727978AbgEZO6H (ORCPT ); Tue, 26 May 2020 10:58:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1590505087; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1VCJa5RbOMATerrFzZ+0VrpXn1iuIwJEs1VN+9Q6EoY=; b=VYwqUWmJX3o7nsfmayFxPTI9RA73MZ63N42jSHKD46AmWQ1tyMtm6M5G8FNWQuGAtpZtBn RKw7vpTkOHtecJ1XuGX9PeGA76vCISx4otA+7WMqaIEzjtlA8u8GK7u1XrKnxl416nYhTe UHDUwLihHE6bUu4ZbI533SeiLkdbzuU= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-193-kK8qVpVvPsKlX17v-sDKmw-1; Tue, 26 May 2020 10:58:03 -0400 X-MC-Unique: kK8qVpVvPsKlX17v-sDKmw-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 1AC45460; Tue, 26 May 2020 14:58:01 +0000 (UTC) Received: from oldenburg2.str.redhat.com (ovpn-112-180.ams2.redhat.com [10.36.112.180]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2BF8519930; Tue, 26 May 2020 14:57:57 +0000 (UTC) From: Florian Weimer To: Mathieu Desnoyers Cc: libc-alpha , Rich Felker , linux-api , Boqun Feng , Will Deacon , linux-kernel , Peter Zijlstra , Ben Maurer , Dave Watson , Thomas Gleixner , Paul , Paul Turner , Joseph Myers Subject: Re: [PATCH glibc 1/3] glibc: Perform rseq registration at C startup and thread creation (v19) References: <20200501021439.2456-1-mathieu.desnoyers@efficios.com> <87v9kqbzse.fsf@oldenburg2.str.redhat.com> <941087675.33347.1590418305398.JavaMail.zimbra@efficios.com> <87367ovy6k.fsf@oldenburg2.str.redhat.com> <108939265.33525.1590428184533.JavaMail.zimbra@efficios.com> <87lflerhqt.fsf@oldenburg2.str.redhat.com> <1701081361.34159.1590503556923.JavaMail.zimbra@efficios.com> <87ftbmpxqi.fsf@oldenburg2.str.redhat.com> <1931644690.34207.1590504804638.JavaMail.zimbra@efficios.com> Date: Tue, 26 May 2020 16:57:56 +0200 In-Reply-To: <1931644690.34207.1590504804638.JavaMail.zimbra@efficios.com> (Mathieu Desnoyers's message of "Tue, 26 May 2020 10:53:24 -0400 (EDT)") Message-ID: <877dwypwuj.fsf@oldenburg2.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Mathieu Desnoyers: >> Like the attribute, it needs to come right after the struct keyword, I >> think. (Trailing attributes can be ambiguous, but not in this case.) > > Nope. _Alignas really _is_ special :-( > > struct _Alignas (16) blah { > int a; > }; > > p.c:1:8: error: expected =E2=80=98{=E2=80=99 before =E2=80=98_Alignas=E2= =80=99 > struct _Alignas (16) blah { Meh, yet another unnecessary C++ incompatibility. C does not support empty structs, so I assume they didn't see the field requirement as a burden. > One last thing I'm planning to add in sys/rseq.h to cover acessing the > rseq_cs pointers with both the UAPI headers and the glibc struct rseq > declarations: > > /* The rseq_cs_ptr macro can be used to access the pointer to the current > rseq critical section descriptor. */ > #ifdef __LP64__ > # define rseq_cs_ptr(rseq) \ > ((const struct rseq_cs *) (rseq)->rseq_cs.ptr) > #else /* __LP64__ */ > # define rseq_cs_ptr(rseq) \ > ((const struct rseq_cs *) (rseq)->rseq_cs.ptr.ptr32) > #endif /* __LP64__ */ > > Does it make sense ? Written this way, it's an aliasing violation. I don't think it's very useful. Thanks, Florian