From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 8E90E3894C25 for ; Thu, 22 Apr 2021 14:22:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 8E90E3894C25 Received: from mail-ej1-f69.google.com (mail-ej1-f69.google.com [209.85.218.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-255-00wK007XO4GTuVOiBe0TbA-1; Thu, 22 Apr 2021 10:22:49 -0400 X-MC-Unique: 00wK007XO4GTuVOiBe0TbA-1 Received: by mail-ej1-f69.google.com with SMTP id jl27-20020a17090775dbb029037ccdce96e6so7231217ejc.21 for ; Thu, 22 Apr 2021 07:22:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=6dM3vlskxaUCVoSymQo+tBQHrfX2GxQW1OumkU4YCLc=; b=K1WfaUnBvBr7Scnd6wn6j5XXqRKrHWQSxETTXaiO/YRkPNGppXkCaCBryD7Os00fDA G3k/vjdoFzpJ1igxL1iF/XfRA2KfcUx8bDLu3pBNKJ/qBF2Rz1QLRRVAg9xNHzoRiZqt XUOO6PMs0Kd7F1BhxnDKTiKn8iy+YaDY0s77KsKRWVw68OT6t45g7mSFANhZNajev/NB 0hFZFP6xlqLbyK0wZ69H92qyT4TZU4XozHB2ayqWHO23D6FeiGiGDn7ilxcK9EA8Dg7l EggCWJNjaG9+RyaN7wdJbIrXLHGbdNkcPXycjrUE7oLZ3keSBKeTRAqbGSddgtQl6BoC 60dg== X-Gm-Message-State: AOAM533jB6STPEPZGWW6MSvcOiGFcWwkSqULh2rH3uhiIw96aaj3NMwY mNIEn1gu0aLQFkvZ5CKd8RujphXwusDtd/KH99aMmM3k7R8GQ2qYARC+qiumiIQ7t2IxqKQo4qt 59xuHgKsqjZT/4qONV+S9 X-Received: by 2002:a17:906:60d6:: with SMTP id f22mr3627816ejk.177.1619101368041; Thu, 22 Apr 2021 07:22:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxg6IpTdebpcD59morQGAl2NDtrxuofK+0xAYW+6pVHquUotCJVra+jBhH6twGEGfu7JKrqBg== X-Received: by 2002:a17:906:60d6:: with SMTP id f22mr3627797ejk.177.1619101367853; Thu, 22 Apr 2021 07:22:47 -0700 (PDT) Received: from steredhat (host-79-34-249-199.business.telecomitalia.it. [79.34.249.199]) by smtp.gmail.com with ESMTPSA id ws15sm1985849ejb.38.2021.04.22.07.22.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Apr 2021 07:22:47 -0700 (PDT) Date: Thu, 22 Apr 2021 16:22:45 +0200 From: Stefano Garzarella To: Stefan Hajnoczi Cc: io-uring@vger.kernel.org, Pavel Begunkov , "H.J. Lu" , libc-alpha@sourceware.org, Jens Axboe , linux-block@vger.kernel.org Subject: Re: [PATCH liburing] examples/ucontext-cp.c: cope with variable SIGSTKSZ Message-ID: <20210422142245.evlxjvfw3emh7ivw@steredhat> References: <20210413150319.764600-1-stefanha@redhat.com> MIME-Version: 1.0 In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8; format=flowed Content-Disposition: inline Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org 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: , X-List-Received-Date: Thu, 22 Apr 2021 14:22:54 -0000 +Cc: io-uring@vger.kernel.org +Cc: Pavel Begunkov Original message: https://www.spinics.net/lists/linux-block/msg67077.html On Thu, Apr 22, 2021 at 10:59:42AM +0100, Stefan Hajnoczi wrote: >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 wrote: >> > >> > 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 ‘stack_buf’ 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 file >> > > scope. >> > > >> > > Cc: H.J. Lu >> > > Signed-off-by: Stefan Hajnoczi >> > > --- >> > > Perhaps the glibc change needs to be revised before releasing glibc 2.34 >> > > 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? >> > >> >> It won't be changed for glibc 2.34. > >Thanks for the response, H.J. and Paul. > >In that case liburing needs this patch. > I think so: Reviewed-by: Stefano Garzarella