From nobody Tue Jul 21 20:50:46 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 4h4V0C5vDpz6mRW5 for ; Tue, 21 Jul 2026 20:50:51 +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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4h4V0C47Zpz3VXS for ; Tue, 21 Jul 2026 20:50:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1784667051; 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=LESc3EXCLZtl8p8efauN1ysSyatdKdwDawvPAMFeevI=; b=UbzN+TXb2s/Q1m5ajoI43SsnRfz8MbKXnZTtKSamiW4C3JelTs2o9Gddv+hB3Z8pl1JBZQ cSFNY3JCiKYZUMb91BZZdK8jqce4SQBQAexyRe8+gU/RRIDiBtyxSH3OFoXL5N4UwNLkuF iVWKJNN33zE3Zm3nV63ymKPtdUcZK3OH+8+F6oPn8zhfLouyPdQthUimTgcrJsTRO5Xq9y TYph8et+9gkuGJJHmjYVIkHCUOxLdorwSjlsVJwswOlm/dyYNTXJqZGlEsL81HsAURCY4p w88yg8bL3M7k1Ymfs7A3rN8Lw5rUhUMLKqxKtzsggQDOXWdAR0aYXvGUaPC0Rw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1784667051; a=rsa-sha256; cv=none; b=wdx2RyIKSP8mT67AXYTUj59Yzz09wE3qrLGkot8lqis2b2SZzLtR8DF4lz8XXlKn9UgzDV pYYAVeeWOfAco+oUNZNhr5kM4axG2vY6i2NMlT34ZelrT8O4TzGcArHZ6tDnel37PoHnAP ciDdA4V3x8C9QoS0ElqyP6P17IOm6Bz/+A8pVHwoZKfZrSQT4hGTAiTD5YUnxtj5zvPoNF HQuQnLfCFyFgKDFKdPT0/MHnqX3D7v2tptuWaTfWJgpjhR35Q5Qnset6qNjjETbKUuvrf5 pPZqPLNDd/GYCu9EKoLu1O1aek5QcPkaZp4wzIB0S7l00uac0uRgrkIVdHiWLw== 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=1784667051; 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=LESc3EXCLZtl8p8efauN1ysSyatdKdwDawvPAMFeevI=; b=VFVDx7jW1R2TvgRxGecpNV0Ny0nCzh9KJuIwJ0q5/ivPDqKdAOsIFNSjihOPylDx+659tU PYQ8NLsE98/VWxyoUzVTTuE4a0MKD/dYRoRY24z3jl2vH8g3xRK76cUvtt/mjbq6rOIvhQ UxNzYiS2su9ERmpZb9B1TkU6o5bm8LceWBMuSDEJqnMmBvNHpaEoGc/DRxEkVHsm9WDWps YD4QvgE5oamwlf+e9iUL9b+j85R2Qp85CkaxbTdLAdHZKi20BAZtIxOEYn+dd/r23YPJRm W2MdVaJ3e3zvTKNXgWTqtb/cWthiwBZLGwpxFPUcfmR4ezKN3jxus84m17+mrQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4h4V0C2khyz14hN for ; Tue, 21 Jul 2026 20:50:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 26dc8 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 21 Jul 2026 20:50:46 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Leidinger Subject: git: c8db6d4b63f1 - main - exterror: advertise error strings via kern.features.exterr_strings 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=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: netchild X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c8db6d4b63f18c81557628ad0d3f715bea46cc99 Auto-Submitted: auto-generated Date: Tue, 21 Jul 2026 20:50:46 +0000 Message-Id: <6a5fdba6.26dc8.4a0d66d8@gitrepo.freebsd.org> The branch main has been updated by netchild: URL: https://cgit.FreeBSD.org/src/commit/?id=c8db6d4b63f18c81557628ad0d3f715bea46cc99 commit c8db6d4b63f18c81557628ad0d3f715bea46cc99 Author: Alexander Leidinger AuthorDate: 2026-07-21 20:39:56 +0000 Commit: Alexander Leidinger CommitDate: 2026-07-21 20:50:37 +0000 exterror: advertise error strings via kern.features.exterr_strings Allow userland, in particular test cases for EXTERROR conversions, to detect at run time whether extended errors include the descriptive message strings, which depends on the EXTERR_STRINGS kernel option and cannot be probed in any other way. Reviewed by: kib MFC after: 1 week Assisted-by: Claude Code (Fable 5) Differential Revision: https://reviews.freebsd.org/D58321 --- share/man/man9/exterror.9 | 13 ++++++++++++- sys/kern/sys_generic.c | 4 ++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/share/man/man9/exterror.9 b/share/man/man9/exterror.9 index 47ffda065d43..2c9dc73f7616 100644 --- a/share/man/man9/exterror.9 +++ b/share/man/man9/exterror.9 @@ -6,7 +6,7 @@ .\" Konstantin Belousov under sponsorship .\" from the FreeBSD Foundation. .\" -.Dd November 5, 2025 +.Dd July 21, 2026 .Dt EXTERROR 9 .Os .Sh NAME @@ -171,6 +171,17 @@ were modified to print the extended information if it is available in addition to the usual .Va errno decoding. +.Pp +Kernels built with the +.Cd option EXTERR_STRINGS +advertise the +.Va kern.features.exterr_strings +.Xr sysctl 8 +variable, see +.Xr feature_present 3 , +indicating that the reported errors include the descriptive message strings. +Without it, only the numeric information (error code, category, +source line number and parameters) is available. .Sh ASYNCHRONOUS INPUT/OUTPUT Due to the nature of the .Fx diff --git a/sys/kern/sys_generic.c b/sys/kern/sys_generic.c index c16e806e0bd7..5d356a26359b 100644 --- a/sys/kern/sys_generic.c +++ b/sys/kern/sys_generic.c @@ -112,6 +112,10 @@ static MALLOC_DEFINE(M_IOCTLOPS, "ioctlops", "ioctl data buffer"); static MALLOC_DEFINE(M_SELECT, "select", "select() buffer"); MALLOC_DEFINE(M_IOV, "iov", "large iov's"); +#ifdef EXTERR_STRINGS +FEATURE(exterr_strings, "Extended error reporting includes message strings"); +#endif + static int pollout(struct thread *, struct pollfd *, struct pollfd *, u_int); static int pollscan(struct thread *, struct pollfd *, u_int);