From: Florian Weimer via Libc-alpha <libc-alpha@sourceware.org>
To: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Rich Felker <dalias@libc.org>,
libc-alpha <libc-alpha@sourceware.org>,
linux-api <linux-api@vger.kernel.org>,
Boqun Feng <boqun.feng@gmail.com>,
Will Deacon <will.deacon@arm.com>,
linux-kernel <linux-kernel@vger.kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Ben Maurer <bmaurer@fb.com>, Dave Watson <davejwatson@fb.com>,
Thomas Gleixner <tglx@linutronix.de>,
Paul <paulmck@linux.vnet.ibm.com>, Paul Turner <pjt@google.com>,
Joseph Myers <joseph@codesourcery.com>
Subject: Re: [PATCH glibc 1/3] glibc: Perform rseq registration at C startup and thread creation (v20)
Date: Wed, 03 Jun 2020 14:31:54 +0200 [thread overview]
Message-ID: <87r1uwwcsl.fsf@oldenburg2.str.redhat.com> (raw)
In-Reply-To: <1953500643.51064.1591186963416.JavaMail.zimbra@efficios.com> (Mathieu Desnoyers's message of "Wed, 3 Jun 2020 08:22:43 -0400 (EDT)")
* Mathieu Desnoyers:
> ----- On Jun 3, 2020, at 8:05 AM, Florian Weimer fweimer@redhat.com wrote:
>
>> * Mathieu Desnoyers:
>>
>>> +#ifdef __cplusplus
>>> +# if __cplusplus >= 201103L
>>> +# define __rseq_static_assert(expr, diagnostic) static_assert (expr,
>>> diagnostic)
>>> +# 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) >= 201112L
>>> +# define __rseq_static_assert(expr, diagnostic) _Static_assert (expr,
>>> diagnostic)
>>> +# 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
>> [-Werror=attributes]
>> # define __rseq_alignas(x) alignas (x)
>> ^
>> ../sysdeps/unix/sysv/linux/sys/rseq.h:122:14: note: in expansion of macro
>> ‘__rseq_alignas’
>> uint32_t __rseq_alignas (32) version;
>> ^
>
> Is that when compiling C or C++ code ? If it's C code, I would expect
> "_Alignas" to be used, not "alignas".
>
> Which exact version of gcc do you use ?
C++ code. CXX was set to this compiler at configure time:
gcc version 9.3.1 20200408 (Red Hat 9.3.1-2) (GCC)
>> 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.
>
> OK. Should I do that in a separate patch, or you do it on top of my patchset,
> or should I re-spin another round of the series ?
I think the initial commit should mirror the current UAPI header
contents.
Keep the macros for the UAPI patch though. 8-) We can pick up these
changes once they have been merged into Linux.
Thanks,
Florian
next prev parent reply other threads:[~2020-06-03 12:32 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-27 18:51 [PATCH glibc 0/3] Restartable Sequences enablement Mathieu Desnoyers via Libc-alpha
2020-05-27 18:51 ` [PATCH glibc 1/3] glibc: Perform rseq registration at C startup and thread creation (v20) Mathieu Desnoyers via Libc-alpha
2020-06-03 12:05 ` Florian Weimer via Libc-alpha
2020-06-03 12:22 ` Mathieu Desnoyers via Libc-alpha
2020-06-03 12:31 ` Florian Weimer via Libc-alpha [this message]
2020-06-03 12:40 ` Mathieu Desnoyers via Libc-alpha
2020-06-03 17:22 ` Joseph Myers
2020-06-04 11:10 ` Mathieu Desnoyers via Libc-alpha
2020-06-04 17:46 ` Joseph Myers
2020-06-11 17:47 ` Mathieu Desnoyers via Libc-alpha
2020-06-11 20:26 ` Joseph Myers
2020-06-18 12:22 ` Szabolcs Nagy
2020-06-18 13:03 ` Mathieu Desnoyers via Libc-alpha
2020-06-22 15:33 ` Mathieu Desnoyers via Libc-alpha
2020-05-27 18:51 ` [PATCH glibc 2/3] Linux: Use rseq in sched_getcpu if available (v9) Mathieu Desnoyers via Libc-alpha
2020-05-27 18:51 ` [PATCH glibc 3/3] rseq registration tests (v11) Mathieu Desnoyers via Libc-alpha
2020-06-03 12:07 ` [PATCH glibc 0/3] Restartable Sequences enablement Florian Weimer via Libc-alpha
2020-06-03 12:27 ` Mathieu Desnoyers via Libc-alpha
2020-06-03 12:33 ` Florian Weimer via Libc-alpha
2020-06-03 13:40 ` Florian Weimer via Libc-alpha
2020-06-05 17:04 ` Mathieu Desnoyers via Libc-alpha
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/libc/involved.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r1uwwcsl.fsf@oldenburg2.str.redhat.com \
--to=libc-alpha@sourceware.org \
--cc=bmaurer@fb.com \
--cc=boqun.feng@gmail.com \
--cc=dalias@libc.org \
--cc=davejwatson@fb.com \
--cc=fweimer@redhat.com \
--cc=joseph@codesourcery.com \
--cc=linux-api@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=paulmck@linux.vnet.ibm.com \
--cc=peterz@infradead.org \
--cc=pjt@google.com \
--cc=tglx@linutronix.de \
--cc=will.deacon@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).