From nobody Wed Sep 17 12:18:58 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cRd9G4LQzz67Hhg; Wed, 17 Sep 2025 12:18:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cRd9G1JvQz3VPb; Wed, 17 Sep 2025 12:18:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758111538; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=F7C+2P9AFIQjj5xwwfSmeDQ5qpe3OZY7JruBXQ6zqEE=; b=VFMxrrn5QlaFPZaSBZw84KPODZelGXXviNwEG4fhOTKYCn7x33+iMEik+qxfVMUoLAnxp4 /sEoL8Iy7KUZSOZz567Z0Qtn/QTTTnGAV85Sa3mYYHm5djQ/8aX10MP+Wvy2RT3HWFeb32 x2nty1u7MLV3Cbj29/2+9zFjX32GcQWnPewuuKFeC17J26nJuatyncCN8uaC3LW+Kqm01+ JJ/GiCHYw5u6DTRgYMENvWW5iL6eO+JL0VxCtJe9BtEXkpyQInV+8PBmTrjHF8iTdnns99 ZNTAT8wroIdJs84tBsw6MzFlicYzcEEWH9kxPcYamLyxE1GGWjGMGNsMCBP0xw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758111538; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=F7C+2P9AFIQjj5xwwfSmeDQ5qpe3OZY7JruBXQ6zqEE=; b=XMElTIyri8LSMa90OZ44PQPgHJ7WLaGp7O23CcRJpzHYIBNaldVjL9kmhAGstp0sVfr1BO pSiquqj9ExZsnUbx8FwHkoIziV62GAkGI8nM/njMFZnY978WH110YvYtp6E+Uv/YZeKlsQ FLYkMSHZr8ZXUrXvS6XtuSjXDSNK2TcX9vxQ66RrXOXqXtc4/cpR/ILWTXiUlFx6A1u58x Q8Auyz2zZIkEx481TIRjX8G/E/3sMecKcLmw0XPSdriSJT3P8LCqfEPaxUR9yyI5c7p+rv sWZHprT/2ux2Ok6xRPGmxvi6G7mrMSbryIwQ+sLkwU4qdlvYg1P7XElQ3AEWvA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758111538; a=rsa-sha256; cv=none; b=cRZaIYRXofm8iS5LTwYlzTpBvdvDvdH9eV1dBG4ovxkInHmJ/hPK4YhMuxW7OBrvciPCyy LqnDk7Zh+0FM16K0J6hlDKduR93xkr0h/0onl/VNbx/RDr7TeWnPdUsC6d1KJl5acZ2F17 eWhT9sFtaiWNCZEEuEh8M7WC4zUHwLjZxMgCX0UcZHWz5SCvZow7UIirl+xtxduyDAf7xG 6GSolK6XVVe1oPWzNIm8MQcOBkwBRYcXK74DQU2bhCB0tP4TnsKQlmg6waN/+Mdw0Wno+c z/lwJosxYnowLjafgSymCUNDveJ5FgEvOeKlP4XVclXPxoUZ+MM0JuU064SKBQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cRd9G0wG7z8wR; Wed, 17 Sep 2025 12:18:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58HCIwkf085520; Wed, 17 Sep 2025 12:18:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58HCIwMx085517; Wed, 17 Sep 2025 12:18:58 GMT (envelope-from git) Date: Wed, 17 Sep 2025 12:18:58 GMT Message-Id: <202509171218.58HCIwMx085517@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: a61e7b5c98f8 - main - cred: 'kern.ngroups' tunable: Rework the comment on the initial value List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a61e7b5c98f840b4a7777d718218d0f63569c52a Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=a61e7b5c98f840b4a7777d718218d0f63569c52a commit a61e7b5c98f840b4a7777d718218d0f63569c52a Author: Olivier Certner AuthorDate: 2025-08-27 13:50:59 +0000 Commit: Olivier Certner CommitDate: 2025-09-17 12:16:01 +0000 cred: 'kern.ngroups' tunable: Rework the comment on the initial value Remove the parts about the effective GID being stored as the first element of the groups array, as this is generally not the case now after commit be1f7435ef21 ("kern: start tracking cr_gid outside of cr_groups[]") (some credentials export structures still have the old layout, and need to do the 'ngroups_max + 1' computation, but given the computation needed to obtain a size in bytes, this detail is not really important here). Remove the part about 32-bit machines, avoiding another modification when support for them is removed. No functional change. MFC after: 5 days MFC to: stable/15 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52265 --- sys/kern/subr_param.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/sys/kern/subr_param.c b/sys/kern/subr_param.c index 471640c290a7..a67e5fa6cbff 100644 --- a/sys/kern/subr_param.c +++ b/sys/kern/subr_param.c @@ -235,14 +235,11 @@ init_param1(void) * specification for , paragraph "Runtime Increasable * Values"). * - * On the other hand, INT_MAX would result in an overflow for the common - * 'ngroups_max + 1' computation (to obtain the size of the internal - * groups array, its first element being reserved for the effective - * GID). Also, the number of allocated bytes for the group array must - * not overflow on 32-bit machines. For all these reasons, we limit the - * number of supplementary groups to some very high number that we - * expect will never be reached in all practical uses and ensures we - * avoid the problems just exposed, even if 'gid_t' was to be enlarged + * On the other hand, a too high value would result in an overflow when + * computing the number of bytes to allocate for the groups array. We + * thus limit the number of supplementary groups to some very high + * number that we expect will never be reached in all practical uses, + * avoiding the problem just exposed even if 'gid_t' were to be enlarged * by a magnitude. */ ngroups_max = NGROUPS_MAX;