Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp619505ybk; Fri, 15 May 2020 09:12:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx2TJ9gSjS4JL8vWv1ivkwP1hBGDXPEZxa9hPqpXib8tyS0OwzXAsCKGyjbdoKNT7vy2o6T X-Received: by 2002:a17:906:5681:: with SMTP id am1mr3619972ejc.376.1589559155601; Fri, 15 May 2020 09:12:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589559155; cv=none; d=google.com; s=arc-20160816; b=ozelkRGvJb5BBABW/3mDMUYedLgsp6COuWR3R4mjWCTu+fordeTSevnTdUlf7Dyohj HhScdBhAITd3GR+eNx+ufqJ+vPYX/vXDp23YYESpveGnmOGjpdHe8aguBGca/uH+pMTv OU5yjbpwxUsaEph2+yeNBS2fIUsyDK9c4tGxx6vGKzxhgwRsZHwJSzS5Bad/C+u7Ai1G BZLrw9TpKZ08T2PFPzGeC8ksCA4qzobZ1jQp3YCW9Bzw+la6OAbEThPukLxjql+zqDNv loDGa9ksrLvIATx8kccln0UtUc70CEqrhI84qgOK/VSM2ZPxv9cj6ptLs6C4PGczGplw HJ4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=t9SXmEftS1Iyni9ZVbC4UphAzeeV+ytMmCNUKhVXDxo=; b=QVF5loTibW1VyyPtL4nM2jydjACVeN8FbSRtbJGMyyw5XovHChVTLW3N9U9BzuPp0c I3o6821IRwuKd8EkMQIMZUJpmCCGzik3ZEx1MjHc3bAe5qnEjcloizQ5MQMgEUR21iiw R4z5ZWTVTYX0QuOPoWLLxdYBcA7BJPKoPqzTdYinH5Zd5D4jrjEbK9oFmtM627rkmK8K C7XzSL0A8Rw0Uw08hI1Ok1+zxVkyqjXEWV6OrH9rfOpieai8IXMvXH8r51+uKxiLRMM+ EoobVJ4XdzeAJtBNVvuvedKmvppKNkG0WA0ycJ7OlDgeCRYq6eLnbkjblPgAneSAHv6V dT9w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t22si1402643edi.249.2020.05.15.09.12.11; Fri, 15 May 2020 09:12:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726252AbgEOQI0 (ORCPT + 99 others); Fri, 15 May 2020 12:08:26 -0400 Received: from 4.mo2.mail-out.ovh.net ([87.98.172.75]:45488 "EHLO 4.mo2.mail-out.ovh.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726223AbgEOQI0 (ORCPT ); Fri, 15 May 2020 12:08:26 -0400 Received: from player758.ha.ovh.net (unknown [10.110.115.173]) by mo2.mail-out.ovh.net (Postfix) with ESMTP id 116B41D7521 for ; Fri, 15 May 2020 18:02:55 +0200 (CEST) Received: from sk2.org (82-65-25-201.subs.proxad.net [82.65.25.201]) (Authenticated sender: steve@sk2.org) by player758.ha.ovh.net (Postfix) with ESMTPSA id 59D39126FF844; Fri, 15 May 2020 16:02:43 +0000 (UTC) From: Stephen Kitt To: Jonathan Corbet , Luis Chamberlain , Kees Cook , Iurii Zaikin , linux-doc@vger.kernel.org, linux-fsdevel@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Stephen Kitt Subject: [PATCH] docs: sysctl/kernel: document ngroups_max Date: Fri, 15 May 2020 18:02:22 +0200 Message-Id: <20200515160222.7994-1-steve@sk2.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Ovh-Tracer-Id: 13632114599481396613 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduhedrleekgdelfecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemucehtddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffufffkofgggfestdekredtredttdenucfhrhhomhepufhtvghphhgvnhcumfhithhtuceoshhtvghvvgesshhkvddrohhrgheqnecuggftrfgrthhtvghrnhepteegudfgleekieekteeggeetveefueefteeugfduieeitdfhhedtfeefkedvfeefnecukfhppedtrddtrddtrddtpdekvddrieehrddvhedrvddtudenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhhouggvpehsmhhtphdqohhuthdphhgvlhhopehplhgrhigvrhejheekrdhhrgdrohhvhhdrnhgvthdpihhnvghtpedtrddtrddtrddtpdhmrghilhhfrhhomhepshhtvghvvgesshhkvddrohhrghdprhgtphhtthhopehlihhnuhigqdhkvghrnhgvlhesvhhgvghrrdhkvghrnhgvlhdrohhrgh Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is a read-only export of NGROUPS_MAX, so this patch also changes the declarations in kernel/sysctl.c to const. Signed-off-by: Stephen Kitt --- Documentation/admin-guide/sysctl/kernel.rst | 9 +++++++++ kernel/sysctl.c | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Documentation/admin-guide/sysctl/kernel.rst b/Documentation/admin-guide/sysctl/kernel.rst index 0d427fd10941..5f12ee07665c 100644 --- a/Documentation/admin-guide/sysctl/kernel.rst +++ b/Documentation/admin-guide/sysctl/kernel.rst @@ -459,6 +459,15 @@ Notes: successful IPC object allocation. If an IPC object allocation syscall fails, it is undefined if the value remains unmodified or is reset to -1. + +ngroups_max +=========== + +Maximum number of supplementary groups, _i.e._ the maximum size which +``setgroups`` will accept. Exports ``NGROUPS_MAX`` from the kernel. + + + nmi_watchdog ============ diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 8a176d8727a3..2ba9f449d273 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c @@ -146,7 +146,7 @@ static unsigned long dirty_bytes_min = 2 * PAGE_SIZE; static int maxolduid = 65535; static int minolduid; -static int ngroups_max = NGROUPS_MAX; +static const int ngroups_max = NGROUPS_MAX; static const int cap_last_cap = CAP_LAST_CAP; /* @@ -883,7 +883,7 @@ static struct ctl_table kern_table[] = { #endif { .procname = "ngroups_max", - .data = &ngroups_max, + .data = (void *)&ngroups_max, .maxlen = sizeof (int), .mode = 0444, .proc_handler = proc_dointvec, base-commit: 1ae7efb388540adc1653a51a3bc3b2c9cef5ec1a -- 2.20.1