From nobody Mon Jul 27 22:33:12 2026 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 4h8Czb2YFkz6lxvT; Mon, 27 Jul 2026 22:33:15 +0000 (UTC) (envelope-from markj@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (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 "smtp.freebsd.org", Issuer "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4h8Czb1gG4z3Dch; Mon, 27 Jul 2026 22:33:15 +0000 (UTC) (envelope-from markj@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1785191595; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=OsH+LG78Ip1qIc4WjprMNrycq7xHZNQPvXmShnbP6ds=; b=aHKWFkB5K37E0WorwO6Mh9NXpfoFSkMsUUrzIBFBP9Tza7CG/Bie1QBpYh+IfC9cxfLDjS gWuXcA/xyAjKVy9Xd7NIR/Dwv3HHBvO8SB+r0y8vY4j831udvrwtI7bTm4jp55EJ+RJ3kP 7c5ng/WczMhYKhkLGd7izHGAfHckVfLYVpy5u4DceVGfj8XO2tsijfTdvfh6OaYeLSFOm5 iI8pA3t5fS/xqsuADVWkwBxhpT7M1xORB20W8Bnm2JOHz4wWghjtTQ70zg15K/jykCaVZB WkE6PQA3Ts5Iwvv9dEsQH4tRlU6o2J+VYidyH3+oQWPW+9CcR70ZUUZUwGOjAw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1785191595; a=rsa-sha256; cv=none; b=r9oNYi5elHc48QvmIxhZt8TJgJ6cE23eekOYI1jDRVTbm4ewCOUNm5/8EZuhYRJa1fxTyh J187S8MpPW+hMdd6LsCsjk9m5oMeGcZn/ibrXH9yTMnlgzYPBg/W3N0OWXFZIMIvvrTIF1 ucBNjAKX1LGBmYQyKbn9Up91kWju5bMWlX0F5cDQIoNBQvv8mi0XTHsNy5Ylns5OV/LvNp ugPy1IRfUCP7Phs0WJRbJziVyY4uFDq9lL07RrhFxOPDpOwMfx4QVDfTXCQC/qWeHF1AxN 0M3QaCwYQUDDsTkJpQ3JLY994iAc160Oy/y5RGsTPZ7GhMPfWWCQ+FUb0n0LLA== 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=1785191595; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=OsH+LG78Ip1qIc4WjprMNrycq7xHZNQPvXmShnbP6ds=; b=isRiJGyfn2tbgSHX8nm9h62K7k6aJfuevAOqh054K9RLJSXucVvR+IlL1ypKxF+QkPtuBp QetTCcBodI848kTuFIjYupamGfjN8xlINYd7QNJkxdYEMGmkhRM+epCPym74sk0tjOVJiL Lhbp+2bZnBSSS479X7OJMHij6VMSx3pgIX+cq8nyPLBUPX7iCmeZRQbbSXhMJNsxfj1iJP luIqQgG52fNydlNJPPcBgLokBhKmvTgmaKsaKNz8OYNVE3e/XaSc0ck2R0mgoCEZU4uzsk 0YHyV0I60PNCgx1fHgNOIgjffbKHNUM0QD5Mwq/T+0WNvpiyMG19b0uf9+ywkw== Received: from nuc (192-0-220-237.cpe.teksavvy.com [192.0.220.237]) (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) (Authenticated sender: markj) by smtp.freebsd.org (Postfix) with ESMTPSA id 4h8CzZ67Z6z10j2; Mon, 27 Jul 2026 22:33:14 +0000 (UTC) (envelope-from markj@freebsd.org) Date: Mon, 27 Jul 2026 18:33:12 -0400 From: Mark Johnston To: Olivier Certner Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-branches@freebsd.org Subject: Re: git: 4018a762498a - stable/14 - sysctl(9): Booleans: Accept integers to ease knob conversion Message-ID: References: <6a61e63d.3cd9c.7613cf69@gitrepo.freebsd.org> 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6a61e63d.3cd9c.7613cf69@gitrepo.freebsd.org> On Thu, Jul 23, 2026 at 10:00:29AM +0000, Olivier Certner wrote: > The branch stable/14 has been updated by olce: > > URL: https://cgit.FreeBSD.org/src/commit/?id=4018a762498ab20c6545942faaaefd6371728f48 > > commit 4018a762498ab20c6545942faaaefd6371728f48 > Author: Olivier Certner > AuthorDate: 2026-01-27 09:45:03 +0000 > Commit: Olivier Certner > CommitDate: 2026-07-23 09:59:01 +0000 > > sysctl(9): Booleans: Accept integers to ease knob conversion > > In sysctl_handle_bool(), if the output buffer (for the old value) has > room for exactly 4 bytes (sizeof(int)), then output the current boolean > value as an integer rather than a 'uint8_t'. Conversely, if 4 bytes > exactly remain in the input buffer (for the new value), treat them as an > integer and derive the new boolean value from it. > > Doing so allows to convert existing integer syscstl knobs that are > interpreted as a boolean into true boolean ones while staying > backwards-compatible. > > That brings no drawback as no code currently uses sysctl_handle_bool() > as part of a series of calls to sysctl_handle_*() functions for > (de)serialization of some compound structure. If that case ever > materializes, it can be easily solved, e.g., by creating > a sysctl_handle_bool_strict() variant. > > In the future, we might want to go further and generally be more liberal > in the external type of integers we accept and output, by tolerating any > kind of supported integers (8-bit to 64-bit), enabling integer type > changes of knob's internal representations without breaking the ABI for > consumers hardcoding the passed integers (instead of relying on sysctl > knob type information). > > Reviewed by: jhb > MFC after: 2 weeks > Sponsored by: The FreeBSD Foundation > Differential Revision: https://reviews.freebsd.org/D54925 > > (cherry picked from commit 406da392ef8d77b39fe9bfd36bdb440eb3e5ae0a) This was MFCed without commit 895e1c6567d9561c86f8d20b47e924911bce989e, which has a Fixes tag referencing this commit. I noticed because a few regression tests in tests/sys/kern/sigwait.c fail as a result. The newly added tools/tools/git/git-mfc utility will catch such mistakes: if you use it as a replacement for git-cherry-pick, it'll automatically MFC fixup commits; further, if you run `git mfc --dangling`, it'll detect and report issues like this automatically, for example: $ git mfc --dangling -c olce 895e1c6567d9561c86f8d20b47e924911bce989e ("sysctl(9): Booleans: Fix old value length discovery") fixes 406da392ef8d77b39fe9bfd36bdb440eb3e5ae0a ("sysctl(9): Booleans: Accept integers to ease knob conversion") e8dec0038bd95f6d940afa19b4d101f466280fd6 ("sched_4bsd: Fix conflating priority of differently-niced CPU-bound threads") fixes eebc148f25c3012b943083b48fbfc13494e9c77f ("sched_4bsd: ESTCPULIM(): Allow any value in the timeshare range") a6587ae0f46dba4e47fa92c831f55288ec181734 ("sched_ule: Fix selecting lowest priority thread early in corner case") fixes 6792f3411f6d99e1698589835adbf6b7b51c7c74 ("sched_ule: Recover previous nice and anti-starvation behaviors") f93cd891aefd839da869dcdb450d00050d5e701e ("MAC/do: Make it style(9) compliant again") fixes 6c3def74e2deb825e7dac4ffebaaf651f547e392 ("MAC/do: Support multiple users and groups as single rule's targets")