Received: by 2002:a25:2c96:0:0:0:0:0 with SMTP id s144csp254975ybs; Tue, 26 May 2020 08:25:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxiQFs3vFQK8XxYX886QdZq6oOIXhyDjyLZKlriXW4BBzwjOsEIwRW6W2qDLDrIGdiGDCUw X-Received: by 2002:a50:ee0b:: with SMTP id g11mr19933430eds.114.1590506737565; Tue, 26 May 2020 08:25:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590506737; cv=none; d=google.com; s=arc-20160816; b=CctLQuI0yvaxKfHVzEAYvz8x3d8NJZapQ5DUMue7vo9RKq1KSw5NIPV+xIGmxZ2/Rt nO5zMAv+kwFZ1hDzRkzmQUvy2+Q8fXw1GJtVhdRvGsp1Z+8B03inGOLVgAK0qOQeKnIJ lhiLIv0S8HDGAS5E3Ujvx8ycWHbjwhvWbcfpG44Q1y1ih/Cp/TYgnL9cd7GCQUJXvz2H 58UlEXxe9VfH/TfQo8eHgwcgY0HpRhXPowcA6sx/WdrHK0de/e+lr5qJRvQTuocaY8qk rI54QkmubXLJ1ASk5jH9Csue0++TdkNV4LUxCwki0qkCDE3xQ+Kb2Jk4x4INFtzGrgyi z9Pw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:thread-index:thread-topic :content-transfer-encoding:mime-version:subject:references :in-reply-to:message-id:cc:to:from:date:dkim-signature:dkim-filter; bh=SKrOEP5pGa9ajAYrExv6tmSsQLUAXbFOGSG0aVKLqZc=; b=Rlw1dAVWfVMkine86LBJy1DGEaOYQgZQ8/2RIWYDxCa0T8mOz2PcskU+JJlzvWm2ED 386jFNVIJ+cS+d/7WL4apdIBeA/zpTraHAmkN7BGgNOTILYwjILBtc1xv2HoM96zpGAR rDLNYGUD66x0STTZHiMnoIKWIRmbPntcHE97fy60x9UqJZROuQeuanj37sb5+cqACUuJ 1qiw5Wc8bqC/x/CT9Ls27qjae2Ap79o3hltJWCE0evIu2IhAozFcyY2+oc17zdAhaW7g 2OC/oO5+kOKWvQyV52XqWokQ5BeGQTLbejKi9aQjuh8pcXKNuvPOpHXOZFPPw4Uw88wX S/OQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@efficios.com header.s=default header.b=XQ2rqTUy; 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=efficios.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u1si46126ejz.492.2020.05.26.08.25.14; Tue, 26 May 2020 08:25:37 -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=@efficios.com header.s=default header.b=XQ2rqTUy; 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=efficios.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729882AbgEZPWI (ORCPT + 99 others); Tue, 26 May 2020 11:22:08 -0400 Received: from mail.efficios.com ([167.114.26.124]:33662 "EHLO mail.efficios.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728279AbgEZPWH (ORCPT ); Tue, 26 May 2020 11:22:07 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.efficios.com (Postfix) with ESMTP id 2A2B32539DC; Tue, 26 May 2020 11:22:06 -0400 (EDT) Received: from mail.efficios.com ([127.0.0.1]) by localhost (mail03.efficios.com [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id r5CHuBHdRu9w; Tue, 26 May 2020 11:22:05 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mail.efficios.com (Postfix) with ESMTP id CCA652539D9; Tue, 26 May 2020 11:22:05 -0400 (EDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.efficios.com CCA652539D9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=efficios.com; s=default; t=1590506525; bh=SKrOEP5pGa9ajAYrExv6tmSsQLUAXbFOGSG0aVKLqZc=; h=Date:From:To:Message-ID:MIME-Version; b=XQ2rqTUy7+LdrVi4/K9Hb9w+gbNDirUXP49Brj19U88DvQyA2NAkRNWhE6gsD0jC1 55SbMVeAdoNddOJoNkwLXXVAjuuxTBWSWChELy3/UPfSTQgdgPGc7eLHnoBohHKOwI 29E1D5OSTAzvLU5uxBdvsJ181bA1PC1BIWlWm77n6AtQXyy0h8JV35UiP7j2BkDBJP AhR9rhb0ZvOrx6DO/R0HyTroMWXsshno/D9r/LFKm9VtxEgVwiuwghVXtWATyE2xWJ XxXY5NcfV8FIcQ6Fwn6yNv/88tJkRv7svValKDX5kTc+Vnu6H82I2VxFTStwBuOGw6 P7G0tdyPBKkvQ== X-Virus-Scanned: amavisd-new at efficios.com Received: from mail.efficios.com ([127.0.0.1]) by localhost (mail03.efficios.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 15NWPF5usT5q; Tue, 26 May 2020 11:22:05 -0400 (EDT) Received: from mail03.efficios.com (mail03.efficios.com [167.114.26.124]) by mail.efficios.com (Postfix) with ESMTP id BC77C253D8A; Tue, 26 May 2020 11:22:05 -0400 (EDT) Date: Tue, 26 May 2020 11:22:05 -0400 (EDT) From: Mathieu Desnoyers To: Florian Weimer 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 Message-ID: <1940294182.34562.1590506525684.JavaMail.zimbra@efficios.com> In-Reply-To: <877dwypwuj.fsf@oldenburg2.str.redhat.com> References: <20200501021439.2456-1-mathieu.desnoyers@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> <877dwypwuj.fsf@oldenburg2.str.redhat.com> Subject: Re: [PATCH glibc 1/3] glibc: Perform rseq registration at C startup and thread creation (v19) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [167.114.26.124] X-Mailer: Zimbra 8.8.15_GA_3928 (ZimbraWebClient - FF76 (Linux)/8.8.15_GA_3928) Thread-Topic: glibc: Perform rseq registration at C startup and thread creation (v19) Thread-Index: fw53pKjM0pFKmGwjq/cBVSRtxzONcQ== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ----- On May 26, 2020, at 10:57 AM, Florian Weimer fweimer@redhat.com wrote= : > * Mathieu Desnoyers: >=20 >>> 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 { >=20 > 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. Indeed, it's weird. >=20 >> 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 curren= t >> 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 ? >=20 > Written this way, it's an aliasing violation. I don't think it's very > useful. OK, I'll just remove it. Thanks, Mathieu --=20 Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com