From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: from second.openwall.net (second.openwall.net [193.110.157.125]) by inbox.vuxu.org (Postfix) with SMTP id 276662330B for ; Thu, 11 Apr 2024 13:44:28 +0200 (CEST) Received: (qmail 28256 invoked by uid 550); 11 Apr 2024 11:44:24 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 28224 invoked from network); 11 Apr 2024 11:44:24 -0000 From: "Laurent Bercot" To: musl@lists.openwall.com Date: Thu, 11 Apr 2024 11:44:16 +0000 Message-Id: In-Reply-To: References: <20240411010738.GY4163@brightrain.aerifal.cx> User-Agent: eM_Client/9.2.2157.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Subject: Re: [musl] [PATCH] Increase NGROUPS_MAX from 32 to 1024 >I had a look at Debian Codesearch for NGROUPS_MAX, to see what >applications are actually doing with the macro. And I found no instance >of anyone using it as an array size. I do. e.g.=20 https://git.skarnet.org/cgi-bin/cgit.cgi/s6/tree/src/daemontools-extras/s6-= applyuidgid.c#n22 It's in small short-lived utilities that don't allocate anything, so=20 I'm not too worried about overflowing the stack, but the change would not be friendly to resource-constrained environments. My code runs on not-so-conformant systems such as Solaris or MacOS,=20 where I'm not sure that sysconf() and _SC_NGROUPS_MAX are even defined and=20 correct. I can test, but that's more work, and convoluted heuristics to make=20 things support every case are a strong decrease in readability and reliability, an additional portability nightmare I don't want to deal with. Whereas NGROUPS_MAX works everywhere. I'm not sure what the best course of action is. I think it still=20 probably is eating the ephemeral 256kB stack penalty if NGROUPS_MAX is increased to 65536. -- Laurent