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: AS17314 8.43.84.0/22 X-Spam-Status: No, score=-4.2 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, 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 [8.43.85.97]) (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 746ED1F8C6 for ; Fri, 9 Jul 2021 19:35:29 +0000 (UTC) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7FB47398E82C for ; Fri, 9 Jul 2021 19:35:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7FB47398E82C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1625859328; bh=Jk7VaUKcubHu2HCCU8O0c4+guMfzbvCPJ1ecB3LOXFU=; h=References:In-Reply-To:Date:Subject:To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=fAG6E+x9UCdaub43UVp2yFinFCLy+n8aUJ7vGB0O4WkLkjWo539xhootBpGTxzzos MmdLPYHjkPCbMTIfhMpPxhDF0ZHeJL4vEqPVGY7pdPZLF+9ViS2tKn2cWgj7cqj+/d Nkv/fmt2MzPwT26alYqA3AQEy5wlXuFfftBbFzWI= Received: from mail-pg1-x533.google.com (mail-pg1-x533.google.com [IPv6:2607:f8b0:4864:20::533]) by sourceware.org (Postfix) with ESMTPS id 27AB13857C5D for ; Fri, 9 Jul 2021 19:35:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 27AB13857C5D Received: by mail-pg1-x533.google.com with SMTP id h4so10966721pgp.5 for ; Fri, 09 Jul 2021 12:35:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=Jk7VaUKcubHu2HCCU8O0c4+guMfzbvCPJ1ecB3LOXFU=; b=VWBwXZe8gI3oQU/cd2s+u3kUzrl/vUTkrPPD/kNYjAbyK6dwX4SBv2RgOys1j3u9+m v3oEdxTVVVbzIzulHJ3p8PCudd7GXCrs0Pxv3YsEOKhT9vtCJYiYwE43zk8HUHQQ63Wh O2fD61G0IRA+V4IuLdwFxEbjp7EICQ0IM398JqNntS4t9Dh1z/3pIFZyA3ygoB5nxdaU mSnC2uRay0DmShBLRxNOmAJMjrcawBeKh92xXwDHeEEd/JrhOe1FalfXqs6kfvGjtFwF ugjntSoTfxFIA38rbITQ/XogJyzQQUFZxUl+UQYm+v6XGWxaJsgRPRvTuSTEZLEzp6Qh LyVw== X-Gm-Message-State: AOAM532VBcR2IHNEsA7foTtkWsbEuu6IE7eO1WmZLWSrFsyNatlShTNj 1SxyvHHvBkSi8MneEaVcqgbQ5N89p35GaVgOQjw= X-Google-Smtp-Source: ABdhPJy1TD33VtJPnTR5hv5M8m+h6h8a3j78BTtgk7YkfnGiveunAzeJuWZQhVInwqGPrzRNZnhYvkS/ukP4oOJTWaM= X-Received: by 2002:a05:6a00:10c5:b029:327:1c58:8e0d with SMTP id d5-20020a056a0010c5b02903271c588e0dmr13116872pfu.57.1625859308136; Fri, 09 Jul 2021 12:35:08 -0700 (PDT) MIME-Version: 1.0 References: <20201010121935.3263605-1-hjl.tools@gmail.com> <20201014174659.GL32292@arm.com> <20201015122653.GA319424@gmail.com> In-Reply-To: Date: Fri, 9 Jul 2021 12:34:32 -0700 Message-ID: Subject: Re: V2 [PATCH] Deprecate SIGSTKSZ/MINSIGSTKSZ with _SC_SIGSTKSZ_SOURCE To: "Carlos O'Donell" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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: "H.J. Lu via Libc-alpha" Reply-To: "H.J. Lu" Cc: GNU C Library , Dave Martin , Joseph Myers Errors-To: libc-alpha-bounces+e=80x24.org@sourceware.org Sender: "Libc-alpha" On Fri, Jul 9, 2021 at 11:53 AM Carlos O'Donell wrote: > > On 10/15/20 5:22 PM, H.J. Lu via Libc-alpha wrote: > > From a9b02d82571c0b0e0a5d4b46f0683a5341046bdf Mon Sep 17 00:00:00 2001 > > From: "H.J. Lu" > > Date: Thu, 15 Oct 2020 05:21:28 -0700 > > Subject: [PATCH] Deprecate SIGSTKSZ/MINSIGSTKSZ with _SC_SIGSTKSZ_SOURC= E > > MIME-Version: 1.0 > > Content-Type: text/plain; charset=3DUTF-8 > > Content-Transfer-Encoding: 8bit > > > > When _SC_SIGSTKSZ_SOURCE is defined, deprecate SIGSTKSZ and MINSIGSTKSZ= : > > This is approved for glibc 2.35 when the tree reopens. > > It is entirely my fault this won't make it into 2.34 because I've been > prioritizing other ABI changes. Sorry for that. > > My feeling is that we should kick off the deprecation, allow 6 months for > downstreams to catch FTBS, and send patches upstream for inclusion in > subsequent distros. > > Please commit this when we reopen the branch for 2.35. Will do after 2.34 is branched. > I also think that for 2.35 we could consider PTHREAD_STACK_MIN deprecated > in exactly the same way and at the same time? I have reviewed the PTHREAD= _STACK_MIN > non-constant changes just now. I will submit a patch for PTHREAD_STACK_MIN after this one. Thanks. > Reviewed-by: Carlos O'Donell > > > tst-minsigstksz-5.c: In function =E2=80=98do_test=E2=80=99: > > tst-minsigstksz-5.c:46:3: warning: =E2=80=98__MINSIGSTKSZ=E2=80=99 is d= eprecated: Use sysconf (_SC_MINSIGSTKSZ) instead of MINSIGSTKSZ [-Wdeprecat= ed-declarations] > > 46 | void *stack_bottom =3D stack_buffer + (stack_buffer_size + MI= NSIGSTKSZ) / 2; > > | ^~~~ > > In file included from ../signal/signal.h:315, > > from ../include/signal.h:2, > > from tst-minsigstksz-5.c:19: > > ../sysdeps/unix/sysv/linux/bits/sigstksz.h:35:1: note: declared here > > 35 | __MINSIGSTKSZ (void) > > | ^~~~~~~~~~~~~ > > --- > > sysdeps/unix/sysv/linux/Makefile | 6 ++++-- > > sysdeps/unix/sysv/linux/bits/sigstksz.h | 18 ++++++++++++++++-- > > 2 files changed, 20 insertions(+), 4 deletions(-) > > > > diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux= /Makefile > > index b51a02a6e6..5576c729ae 100644 > > --- a/sysdeps/unix/sysv/linux/Makefile > > +++ b/sysdeps/unix/sysv/linux/Makefile > > @@ -189,9 +189,11 @@ sysdep_headers +=3D sys/timex.h bits/timex.h > > sysdep_routines +=3D ntp_gettime ntp_gettimex > > endif > > > > +CFLAGS-SIGSTKSZ +=3D -D_SC_SIGSTKSZ_SOURCE -Wno-error=3Ddeprecated-dec= larations > > + > > ifeq ($(subdir),signal) > > # Compile tst-minsigstksz-5.c with _SC_SIGSTKSZ_SOURCE. > > -CFLAGS-tst-minsigstksz-5.c +=3D -D_SC_SIGSTKSZ_SOURCE > > +CFLAGS-tst-minsigstksz-5.c +=3D $(CFLAGS-SIGSTKSZ) > > > > tests-special +=3D $(objpfx)tst-signal-numbers.out > > # Depending on signal.o* is a hack. What we actually want is a depend= ency > > @@ -233,7 +235,7 @@ endif > > > > ifeq ($(subdir),support) > > # Compile xsigstack.c with _SC_SIGSTKSZ_SOURCE. > > -CFLAGS-xsigstack.c +=3D -D_SC_SIGSTKSZ_SOURCE > > +CFLAGS-xsigstack.c +=3D $(CFLAGS-SIGSTKSZ) > > endif > > > > ifeq ($(subdir),termios) > > diff --git a/sysdeps/unix/sysv/linux/bits/sigstksz.h b/sysdeps/unix/sys= v/linux/bits/sigstksz.h > > index cd5b3cc895..b90a614de6 100644 > > --- a/sysdeps/unix/sysv/linux/bits/sigstksz.h > > +++ b/sysdeps/unix/sysv/linux/bits/sigstksz.h > > @@ -23,11 +23,25 @@ > > #if __USE_SC_SIGSTKSZ > > # include > > > > +__attribute_deprecated_msg__ ("Use sysconf (_SC_SIGSTKSZ) instead of S= IGSTKSZ") > > +__extern_always_inline long > > +__SIGSTKSZ (void) > > +{ > > + return sysconf (_SC_SIGSTKSZ); > > +} > > + > > +__attribute_deprecated_msg__ ("Use sysconf (_SC_MINSIGSTKSZ) instead o= f MINSIGSTKSZ") > > +__extern_always_inline long > > +__MINSIGSTKSZ (void) > > +{ > > + return sysconf (_SC_SIGSTKSZ); > > +} > > + > > /* Default stack size for a signal handler: sysconf (SC_SIGSTKSZ). */ > > # undef SIGSTKSZ > > -# define SIGSTKSZ sysconf (_SC_SIGSTKSZ) > > +# define SIGSTKSZ __SIGSTKSZ () > > > > /* Minimum stack size for a signal handler: SIGSTKSZ. */ > > # undef MINSIGSTKSZ > > -# define MINSIGSTKSZ SIGSTKSZ > > +# define MINSIGSTKSZ __MINSIGSTKSZ () > > #endif > > -- > > 2.26.2 > > > > > -- > Cheers, > Carlos. > --=20 H.J.