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-ASN: AS3215 2.6.0.0/16 X-Spam-Status: No, score=-4.3 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (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 EF2311F5AE for ; Thu, 22 Apr 2021 09:59:51 +0000 (UTC) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 03B4B39C000D; Thu, 22 Apr 2021 09:59:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 03B4B39C000D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1619085591; bh=3JC+FrC8kW9yjI+xSNFebXalDnxoffxG/hAMeMUBYHk=; h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=kcUpz/ePbro+RyehCl8RngTHjw8mG9ZkhNchD9gcDflpb7lSfAFmoeemCk4vq8w2/ UKK1zWwbfiRCxACa77bcrZIAcgKXiVWcqXjN1W2FQVaKXz3o/xqse6nkHmCDCecuPT WssNGoWGSE16qp7++cLQeGAdfwuSTDaVtgia3XZk= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by sourceware.org (Postfix) with ESMTP id 42149389367D for ; Thu, 22 Apr 2021 09:59:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 42149389367D 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-379-FJmPCfs4MCuipEOwC6wgzQ-1; Thu, 22 Apr 2021 05:59:45 -0400 X-MC-Unique: FJmPCfs4MCuipEOwC6wgzQ-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4DF7984BA40; Thu, 22 Apr 2021 09:59:44 +0000 (UTC) Received: from localhost (ovpn-115-28.ams2.redhat.com [10.36.115.28]) by smtp.corp.redhat.com (Postfix) with ESMTP id E972F5D9C6; Thu, 22 Apr 2021 09:59:43 +0000 (UTC) Date: Thu, 22 Apr 2021 10:59:42 +0100 To: "H.J. Lu" Subject: Re: [PATCH liburing] examples/ucontext-cp.c: cope with variable SIGSTKSZ Message-ID: References: <20210413150319.764600-1-stefanha@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="tTB7Fo7YtaBGELxr" Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 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: Stefan Hajnoczi via Libc-alpha Reply-To: Stefan Hajnoczi Cc: Jens Axboe , linux-block@vger.kernel.org, libc-alpha@sourceware.org Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" --tTB7Fo7YtaBGELxr Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Apr 19, 2021 at 11:38:07AM -0700, H.J. Lu wrote: > On Mon, Apr 19, 2021 at 7:35 AM Stefan Hajnoczi wro= te: > > > > On Tue, Apr 13, 2021 at 04:03:19PM +0100, Stefan Hajnoczi wrote: > > > The size of C arrays at file scope must be constant. The following > > > compiler error occurs with recent upstream glibc (2.33.9000): > > > > > > CC ucontext-cp > > > ucontext-cp.c:31:23: error: variably modified =E2=80=98stack_buf=E2= =80=99 at file scope > > > 31 | unsigned char stack_buf[SIGSTKSZ]; > > > | ^~~~~~~~~ > > > make[1]: *** [Makefile:26: ucontext-cp] Error 1 > > > > > > The following glibc commit changed SIGSTKSZ from a constant value to a > > > variable: > > > > > > commit 6c57d320484988e87e446e2e60ce42816bf51d53 > > > Author: H.J. Lu > > > Date: Mon Feb 1 11:00:38 2021 -0800 > > > > > > sysconf: Add _SC_MINSIGSTKSZ/_SC_SIGSTKSZ [BZ #20305] > > > ... > > > +# define SIGSTKSZ sysconf (_SC_SIGSTKSZ) > > > > > > Allocate the stack buffer explicitly to avoid declaring an array at f= ile > > > scope. > > > > > > Cc: H.J. Lu > > > Signed-off-by: Stefan Hajnoczi > > > --- > > > Perhaps the glibc change needs to be revised before releasing glibc 2= =2E34 > > > since it might break applications. That's up to the glibc folks. It > > > doesn't hurt for liburing to take a safer approach that copes with the > > > SIGSTKSZ change in any case. > > > > glibc folks, please take a look. The commit referenced above broke > > compilation of liburing's tests. It's possible that applications will > > hit similar issues. Can you check whether the SIGSTKSZ change needs to > > be reverted/fixed before releasing glibc 2.34? > > >=20 > It won't be changed for glibc 2.34. Thanks for the response, H.J. and Paul. In that case liburing needs this patch. Stefan --tTB7Fo7YtaBGELxr Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEhpWov9P5fNqsNXdanKSrs4Grc8gFAmCBSQ4ACgkQnKSrs4Gr c8g8tQf/eZkYU0VK1+vqZXkq7OGFswziLeF9lAtl8YIt40yIHVyLKq18nSArBUPP ee0RHJZ8HH1T5PJct2SZAF1r5LyndGxngBX61LpOkIizjRNDQKrr0sf5fEp84cvF mry2p5++FnOGWTLvJZz2pboJ5YYbUNSb1Z6sTZHuXx8nack5uZFG6sjk9uJS5ZP0 yKvSYEqKLh6w1iSCWI5Oojw7HusAo2erRuIF3vjTTVceNiSQkGUsXvbTkaSerpVh MjgIhcmdkUmEczKq4I7UzEyDHG2sZoW6JeIYX70IZ3iSRB3rkRAMtD5uGjeRVYsq hhxbX0BFCqHhuNXr0k+w9nel3kLHhA== =7suT -----END PGP SIGNATURE----- --tTB7Fo7YtaBGELxr--