public inbox for [email protected]
 help / color / mirror / Atom feed
* Re: [PATCH liburing] examples/ucontext-cp.c: cope with variable SIGSTKSZ
       [not found]     ` <[email protected]>
@ 2021-04-22 14:22       ` Stefano Garzarella
  2021-04-23 14:13         ` Pavel Begunkov
  0 siblings, 1 reply; 2+ messages in thread
From: Stefano Garzarella @ 2021-04-22 14:22 UTC (permalink / raw)
  To: Stefan Hajnoczi
  Cc: io-uring, Pavel Begunkov, H.J. Lu, libc-alpha, Jens Axboe,
	linux-block

+Cc: [email protected]
+Cc: Pavel Begunkov <[email protected]>

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 <[email protected]> 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 <[email protected]>
>> > >   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 <[email protected]>
>> > > Signed-off-by: Stefan Hajnoczi <[email protected]>
>> > > ---
>> > > 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 <[email protected]>


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH liburing] examples/ucontext-cp.c: cope with variable SIGSTKSZ
  2021-04-22 14:22       ` [PATCH liburing] examples/ucontext-cp.c: cope with variable SIGSTKSZ Stefano Garzarella
@ 2021-04-23 14:13         ` Pavel Begunkov
  0 siblings, 0 replies; 2+ messages in thread
From: Pavel Begunkov @ 2021-04-23 14:13 UTC (permalink / raw)
  To: Stefano Garzarella, Stefan Hajnoczi
  Cc: io-uring, H.J. Lu, libc-alpha, Jens Axboe, linux-block

On 4/22/21 3:22 PM, Stefano Garzarella wrote:
> +Cc: [email protected]
> +Cc: Pavel Begunkov <[email protected]>
> 
> 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 <[email protected]> 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 <[email protected]>
>>> > >   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 <[email protected]>
>>> > > Signed-off-by: Stefan Hajnoczi <[email protected]>
>>> > > ---
>>> > > 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 <[email protected]>

Right, and there are already people complaining
https://github.com/axboe/liburing/issues/320


-- 
Pavel Begunkov

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-04-23 14:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <[email protected]>
     [not found] ` <[email protected]>
     [not found]   ` <CAMe9rOpK08CJ5TdQ1fZJ2sGUVjHqoTHS2kT8EzDEejuodu8Ksg@mail.gmail.com>
     [not found]     ` <[email protected]>
2021-04-22 14:22       ` [PATCH liburing] examples/ucontext-cp.c: cope with variable SIGSTKSZ Stefano Garzarella
2021-04-23 14:13         ` Pavel Begunkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox