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=-2.8 required=3.0 tests=BAYES_00,BODY_8BITS, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, NICE_REPLY_A,RCVD_IN_DNSWL_MED,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 762CC1F5AE for ; Fri, 23 Apr 2021 14:13:31 +0000 (UTC) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 13372393C846; Fri, 23 Apr 2021 14:13:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 13372393C846 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1619187210; bh=+xcvu/qUqC379ECYMecXBCghxgPo0LkCVkt2Sha9gI0=; h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=D7Pidy1pJAUJC8zTO96PaCZ40JN3G/ph5g5AF96AVkuIdWZMmO5H/hmzt1s5fgCx5 KrX7DTCjkF2qcvoQgYNZHTvx64XuVV9eEURUpOPRQLdfvfP/0gopOFicWhJVGfqRvV P6UVwJQJCXYd0a5BFdq6g35Qpr9u2VkERz17f/eY= Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) by sourceware.org (Postfix) with ESMTPS id 0A6C2382E82D for ; Fri, 23 Apr 2021 14:13:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 0A6C2382E82D Received: by mail-wm1-x32a.google.com with SMTP id n10-20020a05600c4f8ab0290130f0d3cba3so5866537wmq.1 for ; Fri, 23 Apr 2021 07:13:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=+xcvu/qUqC379ECYMecXBCghxgPo0LkCVkt2Sha9gI0=; b=L4RYOVpcny9wLsWco+62AeQX1U6VVwsyB6sVqGfJ9e97BUof1UyCbv6/rjGrOKUfLO h+9GOleWqa7gthoH7St4r9pOC1XyzPgC5403U+CEhd3yH4imUKmVMnAmi1E5SaoArQT5 Pw3jdwVx7w+IlbjyWFxbtUUFCaFH2vqYg3jDQpgUUadBXmtOc9gNYBpJp91iHzqJDTxn YeS64vJLQJM8rg1dtjIYvD2Zhnd0hdlmgEADTKlpD0STIWX0V1R6U+Fam8peXwGpgobT gRQ4pQeTsF8v4as133gxmQWe05fUavcgEz1+F6AubsZ8/+YY/sOGQ1uoc6T6ShLn0FsZ JVCw== X-Gm-Message-State: AOAM532RTiUOLynpYQg1vHEZN8FwBYDw6ph0H2bd42SpF7jbctjErkAQ t2y4xjk7g8710uaeszhwdR0= X-Google-Smtp-Source: ABdhPJwGYKqIZGrnrk6Gs4g9YAaDa7qDHh64cpdd7i8Xm82tWJs9djKmU8ZbylX1l5Vqc6GiYhAgWg== X-Received: by 2002:a05:600c:6d4:: with SMTP id b20mr5806496wmn.99.1619187206018; Fri, 23 Apr 2021 07:13:26 -0700 (PDT) Received: from [192.168.8.197] ([148.252.128.225]) by smtp.gmail.com with ESMTPSA id j12sm9135705wro.29.2021.04.23.07.13.25 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 23 Apr 2021 07:13:25 -0700 (PDT) Subject: Re: [PATCH liburing] examples/ucontext-cp.c: cope with variable SIGSTKSZ To: Stefano Garzarella , Stefan Hajnoczi References: <20210413150319.764600-1-stefanha@redhat.com> <20210422142245.evlxjvfw3emh7ivw@steredhat> Message-ID: <89aaba8e-9a39-5269-201f-83d1f96e1ec0@gmail.com> Date: Fri, 23 Apr 2021 15:13:21 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.9.1 MIME-Version: 1.0 In-Reply-To: <20210422142245.evlxjvfw3emh7ivw@steredhat> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit 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: Pavel Begunkov via Libc-alpha Reply-To: Pavel Begunkov Cc: Jens Axboe , libc-alpha@sourceware.org, io-uring@vger.kernel.org, linux-block@vger.kernel.org Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" On 4/22/21 3:22 PM, Stefano Garzarella wrote: > +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 Right, and there are already people complaining https://github.com/axboe/liburing/issues/320 -- Pavel Begunkov