From nobody Thu Oct 12 04:20:59 2023 X-Original-To: dev-commits-src-all@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 4S5bzc0BhCz4xC6V; Thu, 12 Oct 2023 04:21:00 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S5bzb6JQcz4XvX; Thu, 12 Oct 2023 04:20:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697084459; 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=9ui/ZsD3AU91Y7vYAmBXy/9DX/nk7PVTm+UPOxGdwRo=; b=iE5Qcq2k6944rl1/ih2s8muFME0FSLEAF62LwYsI6fgysJ4ghV+i2pT2oQuNoY4ptMFaHX LI016pNY9lMjuda9c7iewyAqKEla+5Osuxh0m2MHLN0uxsDaLn+qjjp9QXrXbtVCM4VY5O RHAkf1szfzxud6XDviWnl3ohQMFjjFmBX2J/PK4UgoU0pkubHiLNLP6Y590Np2+KVaKZOp 1ceq/xgJsL/eJ3t20x+yKKho/URyZhK8l8z2b67bpeE057mYfd7Z5e4GcvoJkHiBgLoeIw m/O6o3GdKfNZAgX3ABeIrLPW/ZWAMLySk7QMFFctPb256tzPO5kCfPepdSUu1A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697084459; a=rsa-sha256; cv=none; b=UXuqduXQCfRvDXr1hPUlRCHL41Pj3HNAQlucNHKwI3EJkrVgsl7HZGZC0SGwJKCQZMtx28 NGuq3tgS9oiMEavZ1Jkc1KkutpGe1SLdHkcRAljRjBZb6iSlIXdvSnPG2da5GezO6QQ5jr 6o17zUqt0F5FXrJrGdUEarlEjsPhbpuQWXHooOP3P1475TUbUtcACiWEdvCwrDKOZXpMun 2tf+eU57c2c96NeoU2+Ol47Xrzx/U7XCBb4mvtSmg816amu+bKXOLdPOUHGtIEDNBfZztZ 8LL4wALbcPSXlojjAbo/IeTqkTd7JfEoIBuXk/q+663z3j/nmg2eSA8iRBfDpw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697084459; 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=9ui/ZsD3AU91Y7vYAmBXy/9DX/nk7PVTm+UPOxGdwRo=; b=YyRELhh84Fq0UNClSrqTEI1yuv65vgWdjbWf7BCN+JmsDCNvnN/KdxdNQQdpH5QcXwd+mF UYR/qcPTtDMk7GwU/RxO3O3VxLNrmc/2UeDoqvupxofZ711HQnbSBIS3yZp4Z41wh92DEK QuZ9ElwhuNDTm9ubwqkUazhx8/lVAxxoF7SBqchyFP9agGnd2iZ4CsSIVOqNqrWGHYIHv3 MGus+qBqnRCb8z8rF9C2Kwa4N1oVB56FaxfdcjOkqaM1klQ+iWxOsLrClw7A9MtqT2O4lY Gnubtjq0anMdaWgceYIg5KS5fASK6Ckrd1V4nFSVTMKILQ1/CuJ/Bg4mgJzx3g== 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 4S5bzb5M7Jzpq7; Thu, 12 Oct 2023 04:20:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39C4Kxvf086491; Thu, 12 Oct 2023 04:20:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39C4KxKW086488; Thu, 12 Oct 2023 04:20:59 GMT (envelope-from git) Date: Thu, 12 Oct 2023 04:20:59 GMT Message-Id: <202310120420.39C4KxKW086488@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 4f8eaa24a2ac - stable/13 - fd: Add sysctl flag CTLFLAG_TUN to loader tunables List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 4f8eaa24a2ac40363ad13101a60ba3516a7ef401 Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=4f8eaa24a2ac40363ad13101a60ba3516a7ef401 commit 4f8eaa24a2ac40363ad13101a60ba3516a7ef401 Author: Zhenlei Huang AuthorDate: 2023-10-09 10:30:21 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-12 04:19:37 +0000 fd: Add sysctl flag CTLFLAG_TUN to loader tunables The following sysctl variables are actually loader tunables. Add sysctl flag CTLFLAG_TUN to them so that `sysctl -T` will report them correctly. 1. kern.maxfiles 2. kern.maxfilesperproc No functional change intended. Reviewed by: kib, imp MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D42113 (cherry picked from commit 2af5ce5b5efb0cf6514acdc4a8b4058221641c39) (cherry picked from commit d9aa723347825418c742164c3e9a77d1e4b6943d) --- sys/kern/kern_descrip.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c index dbf4ab1828de..de6bfe8bc1ae 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -5111,10 +5111,11 @@ DB_SHOW_COMMAND(files, db_show_files) } #endif -SYSCTL_INT(_kern, KERN_MAXFILESPERPROC, maxfilesperproc, CTLFLAG_RW, +SYSCTL_INT(_kern, KERN_MAXFILESPERPROC, maxfilesperproc, + CTLFLAG_RWTUN | CTLFLAG_NOFETCH, &maxfilesperproc, 0, "Maximum files allowed open per process"); -SYSCTL_INT(_kern, KERN_MAXFILES, maxfiles, CTLFLAG_RW, +SYSCTL_INT(_kern, KERN_MAXFILES, maxfiles, CTLFLAG_RWTUN | CTLFLAG_NOFETCH, &maxfiles, 0, "Maximum number of files"); SYSCTL_INT(_kern, OID_AUTO, openfiles, CTLFLAG_RD,