From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-4.2 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 0D4121F55B for ; Wed, 3 Jun 2020 12:05:39 +0000 (UTC) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 4F42A383E806; Wed, 3 Jun 2020 12:05:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4F42A383E806 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1591185937; bh=veNBN0nIrJ2QwM6/V0a3q4/qqOsViBBqoFiGJMYOieg=; h=To:Subject:References:Date:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=kwCxwdmp4Sw8wkOlysH45HJL/BChO+4KMhHj/pBmahPGNag6mVbR1lasvQwXJQX5q D9aBkGB1GicdQCTFAmQZdd+csxUNwZq5PkBr7LJoFXr+gotI23CIKRQJz8dTDxNNos IvBiAfNksXEH8tpjbIpfIH7LfjlD/S874Uqh0twU= Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) by sourceware.org (Postfix) with ESMTP id 0F6FC3851C12 for ; Wed, 3 Jun 2020 12:05:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 0F6FC3851C12 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-510-XQuSdKH3OeaDMD3LRIVwnw-1; Wed, 03 Jun 2020 08:05:31 -0400 X-MC-Unique: XQuSdKH3OeaDMD3LRIVwnw-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D5713461; Wed, 3 Jun 2020 12:05:28 +0000 (UTC) Received: from oldenburg2.str.redhat.com (ovpn-112-181.ams2.redhat.com [10.36.112.181]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E79B15C220; Wed, 3 Jun 2020 12:05:22 +0000 (UTC) To: Mathieu Desnoyers Subject: Re: [PATCH glibc 1/3] glibc: Perform rseq registration at C startup and thread creation (v20) References: <20200527185130.5604-1-mathieu.desnoyers@efficios.com> <20200527185130.5604-2-mathieu.desnoyers@efficios.com> Date: Wed, 03 Jun 2020 14:05:21 +0200 In-Reply-To: <20200527185130.5604-2-mathieu.desnoyers@efficios.com> (Mathieu Desnoyers's message of "Wed, 27 May 2020 14:51:28 -0400") Message-ID: <87d06gxsla.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.79 on 10.5.11.16 X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Florian Weimer via Libc-alpha Reply-To: Florian Weimer Cc: Rich Felker , libc-alpha@sourceware.org, linux-api@vger.kernel.org, Boqun Feng , Will Deacon , linux-kernel@vger.kernel.org, Peter Zijlstra , Ben Maurer , Dave Watson , Thomas Gleixner , "Paul E. McKenney" , Paul Turner , Joseph Myers Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" * Mathieu Desnoyers: > +#ifdef __cplusplus > +# if __cplusplus >=3D 201103L > +# define __rseq_static_assert(expr, diagnostic) static_assert (expr, di= agnostic) > +# define __rseq_alignof(type) alignof (type) > +# define __rseq_alignas(x) alignas (x) > +# define __rseq_tls_storage_class thread_local > +# endif > +#elif (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) >=3D 201112L > +# define __rseq_static_assert(expr, diagnostic) _Static_assert (expr, d= iagnostic) > +# define __rseq_alignof(type) _Alignof (type) > +# define __rseq_alignas(x) _Alignas (x) > +# define __rseq_tls_storage_class _Thread_local > +#endif This does not seem to work. I get this with GCC 9: In file included from /tmp/cih_test_gsrKbC.cc:8:0: ../sysdeps/unix/sysv/linux/sys/rseq.h:42:50: error: attribute ignored [-Wer= ror=3Dattributes] # define __rseq_alignas(x) alignas (x) ^ ../sysdeps/unix/sysv/linux/sys/rseq.h:122:14: note: in expansion of macro = =E2=80=98__rseq_alignas=E2=80=99 uint32_t __rseq_alignas (32) version; ^ In any case, these changes really have to go into the UAPI header first. Only the __thread handling should remain. Otherwise, we'll have a tough situation on our hands changing the UAPI header, without introducing macro definition conflicts. I'd suggest to stick to the aligned attribute for the time being, like the current UAPI headers. The resut looks okay to me. I'm still waiting for feedback from other maintainers whether the level of documentation and testing is appropriate. Thanks, Florian