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.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,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 8A8582EC84 for ; Fri, 13 Sep 2024 18:01:08 +0200 (CEST) Received: (qmail 20101 invoked by uid 550); 13 Sep 2024 16:01:02 -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 20062 invoked from network); 13 Sep 2024 16:01:02 -0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=JX6MhO+xhN0JI8p/PdkQp+ZEqgkv8p9c1lGLneZRX7a33yHtnOW5RExurG+HFeN3rSLV0fjDfpqftbnhxX8/kiz9R8QMFT5xllwEQGqYP163XK0KeN+UpdObX2r8TRFwB3YuJV9VURt49jbU0g0cFh+kafYf+7RkjWUUaFuF8+MzovEGMm9ymHgVnVFL0kl1pDVhkYXwZbkb0El8SodFq+Zr3ydeWdk4I9RX3/VbJ1/85NbXJrkIGF/6I5tNqvWXZ/MWGMiW3/JytjJPCCdPqr9/h9iowv2s5M+GoTeeFovSJP9Xv3iQM0OXuyoayjjUnq7GKjdVWWOZ5lAlSsW1nw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=vij0TP7pR7z+HGs7cXVzMb2wTJZVs3lxJ0BL6zXx69c=; b=JemjU/+r46rSo0jzg6H8jTcIOaMJ3AlsbpVgDS0D2TQqzDTa4kp9FdYXQiY2bYBkI5PHaXEUGKVWMdX4Ve0w528u10d22qGrTL7c+1vVXPDtlJyCkY6y4eu636qxGEIuaAT4VQu91jfjoc6zOMe/e/jZC5r5JKlHtejVfihm2mECDg1EqhjyFT+dCVIwMadAp47JXdn9xDUVou0ydcG3v82UyM/wQ4ZzVpvbdSl+Xnj4p4oWgceNaZbhtP12VsoCIQCIlhUauWXOK/KsCJeySqsa82Kee1lZ+YS0FL8FbxVNVQW1JLnrfSKhwmZDgPqlb1zaADihTrnT5KVzKRD40Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=vij0TP7pR7z+HGs7cXVzMb2wTJZVs3lxJ0BL6zXx69c=; b=EDvUZKZMqNS5QjOT3rWrnHNXjFYNzv8FGIYwyJsnTQimfq0b6nzxt/elGhXe1qBRCuNEnr9mNDJYXj98TzLc+hojQbYD+d5bj0lighZFbIveeKjkxRPKQf7p9uS9bJXhclHWAY0/3BOBhMq5PohmKnjiVRmEDPyrHmqHggqT2bUi/fgypQuNM0iVcY5yKu0VxgEqmlv3kXvscHgmppxFNIpT8fLSM4zM+kHkgFAdKx0BbpfS+K8qCaRMeuLqZvaUgxAcbbMH6/OV1p2vAM8kDkQxtg8bTeuM38Tct44kMsQpcTiJOknKyEG4alCP0eZUrNI70CJiAZ8jhqwbRMyJlw== From: Kate Deplaix To: Rich Felker CC: "musl@lists.openwall.com" Thread-Topic: [musl] [PATCH] Increase NGROUPS_MAX from 32 to 1024 Thread-Index: AQHaF1GzKihnOc5A+USW4zyi/GxOQLFjKqYAgAAfDwCAAJLRAIDzlxl0gAA1fACAAAaDNQ== Date: Fri, 13 Sep 2024 16:00:52 +0000 Message-ID: References: <20240411010738.GY4163@brightrain.aerifal.cx> <20240913144736.GZ10433@brightrain.aerifal.cx> In-Reply-To: <20240913144736.GZ10433@brightrain.aerifal.cx> Accept-Language: en-GB, en-US Content-Language: en-GB X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: CWLP265MB4157:EE_|LO7P265MB7591:EE_ x-ms-office365-filtering-correlation-id: ebb06988-38ee-46af-6a43-08dcd40d3e95 x-microsoft-antispam: BCL:0;ARA:14566002|8060799006|461199028|15030799003|9400799024|19110799003|12050799009|15080799006|4302099013|3412199025|440099028|102099032|1602099012; x-microsoft-antispam-message-info: Bdg1jzstXS7Yad1H5jpSKEKe0V+VZsEvuNDtPqcNQN4/ncGCm+S37g9zqOyLV8F4OpUx6rkJ34v0mAUoKkSW21mPEC2NoDmYQdGuzlE428jbyeDHQgPUY7gZqwA/m+fLUIkfNG5Nbtj7wE9aGcJ//Q719o71ginYs0L1swrEQmQGWtj2tRz2kkES2sTY/peF4+1SlcCqjMMBYH1qPy5lsjJcxYb5to40aKmTB7xyc0qLvmZ9H0rGKhorUKH8BbVd2w3l358PdyS66lI8rMc9+1y1OcKfp0semkG4CKvvWfHfR5flc2Rq0B2uDoof2cfK8OwUcHFFCiL6xeL5jtnMa2vHk83SVBVAwbmsyVKnehWnms3ZZcDulsSZH6bCeSJDL/CoaNXmMqyS2OFZQgTqvju9EfRgkCOtBgwJsx8CzGlBOViAMCcQrT/S8f+Cxce0Gp8JcYqvBSouUdlcPPr18/MtNWV0JCr/2NtRNfNh8DPT/M2gtx5jAkKD3sciXwLzRXf4qM3INjJIspRBs+jFRdNzkvf1PJKHQShgr8lYOUS5DYVzqZiauJOG+hRM6C98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Js1vlI9DRymEi5ghR3uaksdMIb/J1bDDvdqWd/Cnn?= =?us-ascii?Q?+F23JytsH1ooqJZKmbGy1Dh73FcaC9tSBpcQ8o0y+LpNOc4M98vKJxgB7Uyg?= =?us-ascii?Q?WnPzqWS3V9N3sbBAadSQ33rOKscIyz7lnJs2H9d/AM55Mro4nFM4+EY4sqd/?= =?us-ascii?Q?GPU+2g+1IIlGqRPMJ8HG/qqSsMrpn/BKkoP2gH4dkQqfqGqoO7HTeEx8xt3L?= =?us-ascii?Q?BFTB2odpHSHCKMj1sp0n9e55EpStBO11iRnFZIfTxXZMpIZv8WQohz++qId3?= =?us-ascii?Q?9XCYMtA52TNLIVm6ReZ+a2YsG88TMz9xSt/l1dfaF/cEUnbfX7AGQuZ0Wk7n?= =?us-ascii?Q?jNMYmp4A4BZS2oaeg4iuT54sR/VrmrZ2SLgk3eCFizFUBcQkL3muP/NUtcI0?= =?us-ascii?Q?vhiJNo7sIItm5f9M6g2tmjcLMh/I2xL+MFUHDxxEghLp9sTyjArPtH8PCaVe?= =?us-ascii?Q?zKLEloZ/2JXm5lnoOq4g4HYX4m6KoN9tKGtoUYj2IYFLkEJZhUhvVcudBsSQ?= =?us-ascii?Q?hsxo4iJxmeUgHcuTzJTp+/0thPVWA8D2F7tV6YjeDy47XmHk5NIgFaihEiny?= =?us-ascii?Q?XVMJNKNAg8Cnv9CxrWkSCw6NQ9YmBP+sCcuqy8iaOQEYccPWD4rVPDFNGlTO?= =?us-ascii?Q?DpXRa+zCCkcE1zMgtye8SVFTOIbahYoJBurLoLGReTmC7e397wCV8YNNS4zt?= =?us-ascii?Q?bZ8UbkxdTJgS1ptuH1+iCGpP/Eeq4E2HMLSbNhOibAHkS7uKrmBZKSkMa1+y?= =?us-ascii?Q?IkQ=3D?= Content-Type: multipart/alternative; boundary="_000_CWLP265MB4157A01AA054C084992AEDD3BC652CWLP265MB4157GBRP_" MIME-Version: 1.0 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CWLP265MB4157.GBRP265.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: ebb06988-38ee-46af-6a43-08dcd40d3e95 X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Sep 2024 16:00:52.9176 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: LO7P265MB7591 Subject: Re: [musl] [PATCH] Increase NGROUPS_MAX from 32 to 1024 --_000_CWLP265MB4157A01AA054C084992AEDD3BC652CWLP265MB4157GBRP_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable The problem is that NGROUPS_MAX is used in downstream projects, not sysconf= (_SC_NGROUPS_MAX). Notoriously one of the main user of musl (Alpine Linux) = does not modify this value which makes the whole system break completely if= a user happens to be added to more than 32 groups. Changing every opensource projects that use NGROUPS_MAX to use sysconf(_SC_= NGROUPS_MAX) instead doesn't seem like a reasonable answer to me, even if i= t might be the correct one in theory. I also really don't understand why you want to support 20+ years old kernel= versions (pre 2.6.4) which aren't even POSIX conformant according to your = own page: https://wiki.musl-libc.org/supported-platforms. I also don't thin= k it would also break anything on those platforms anyway if a higher value = was used. Most uses i've seen use this value to allocate a static array, so= aside from a couple more bytes of memory used there isn't much to lose. Cheers, Kate ________________________________ From: Rich Felker Sent: 13 September 2024 15:47 To: Kate Deplaix Cc: musl@lists.openwall.com Subject: Re: [musl] [PATCH] Increase NGROUPS_MAX from 32 to 1024 On Fri, Sep 13, 2024 at 11:45:13AM +0000, Kate Deplaix wrote: > Hi, > > Is there anything i can do to make a fix for this go forward? What requirements are you still trying to satisfy? 3f49203c55cc made it so initgroups accepts arbitrarily many groups independent of NGROUPS_MAX. My reading of POSIX is that the macro NGROUPS_MAX is a "minimum maximum" that any instance of the implementation might impose, which for us I think is the 32 imposed by old Linux. sysconf(_SC_NGROUPS_MAX) does not yet expose a larger runtime max; is that what you'd like to see happen? Source I'm going on: https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/limits.h.html under the heading "Runtime Increasable Values". Rich --_000_CWLP265MB4157A01AA054C084992AEDD3BC652CWLP265MB4157GBRP_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable
The problem is that NGROUPS_MAX is used in downstream projects, not sysconf= (_SC_NGROUPS_MAX). Notoriously one of the main user of musl (Alpine Linux) = does not modify this value which makes the whole system break completely if= a user happens to be added to more than 32 groups.

Changing every opensource projects that use NGROUPS_MAX to use sysconf(_SC_= NGROUPS_MAX) instead doesn't seem like a reasonable answer to me, even if i= t might be the correct one in theory.

I also really don't understand why you want to support 20+ years old kernel= versions (pre 2.6.4) which aren't even POSIX conformant according to your = own page: https://wiki.musl-libc.org/supported-platforms. I also don't think it w= ould also break anything on those platforms anyway if a higher value was us= ed. Most uses i've seen use this value to allocate a static array, so aside= from a couple more bytes of memory used there isn't much to lose.

Cheers,
Kate


From: Rich Felker <dalia= s@libc.org>
Sent: 13 September 2024 15:47
To: Kate Deplaix <kit-ty-kate@outlook.com>
Cc: musl@lists.openwall.com <musl@lists.openwall.com>
Subject: Re: [musl] [PATCH] Increase NGROUPS_MAX from 32 to 1024
 
On Fri, Sep 13, 2024 at 11:45:13AM +0000, Kate Dep= laix wrote:
> Hi,
>
> Is there anything i can do to make a fix for this go forward?

What requirements are you still trying to satisfy? 3f49203c55cc made
it so initgroups accepts arbitrarily many groups independent of
NGROUPS_MAX.

My reading of POSIX is that the macro NGROUPS_MAX is a "minimum
maximum" that any instance of the implementation might impose, which for us I think is the 32 imposed by old Linux.
sysconf(_SC_NGROUPS_MAX) does not yet expose a larger runtime max; is
that what you'd like to see happen?

Source I'm going on:
https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/limits.h= .html
under the heading "Runtime Increasable Values".

Rich
--_000_CWLP265MB4157A01AA054C084992AEDD3BC652CWLP265MB4157GBRP_--