From nobody Tue Jul 28 10:06:32 2026 X-Original-To: dev-commits-src-branches@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 4h8WMX6TrKz6mVRY for ; Tue, 28 Jul 2026 10:06:32 +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 4h8WMX4jGMz3h5v for ; Tue, 28 Jul 2026 10:06:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1785233192; 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=TneZp/nir8rmnphA8XTSj1ZcR5NEa8bbpYXqLZ4YKdk=; b=IS2g2CUNsNVYyUYUvKU0r8B79XwWgKrO6hNnS5vjOjm1LjZMffYC7aq1fN/Nfo6dYOQV1p wwzpR3aa836criYqVb3bawQGFi67VoBRWc51Jr4aaakwNxcGOuO80bZTj91OTYq5QRop26 mUchOCAPJCdbojqCNoLPYRxyBkFmN/+pGzkpir25kxj6jQNtZcZ4k6/sxKAhWujX295obp gJwgAFGPqbt13TKS02XfOpiD1c0Nz6dchdG6GWwJ/izwwhyFpUq8V82q6KYqXtKxg5MZM+ OSxH0dMsHWFdfZyVM1N7oBJGhuvrYWJSE/ChUF81ZGmGEmO3Q6Wht7DH4Zb0qg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1785233192; a=rsa-sha256; cv=none; b=Ra5jNFddEnlufPP38uwqCul34S6PKL5AYhm77hYBcuHu9h9OqLWc+0R9dX9qNOzHAS2Y5y FC5lT5fjglBehoUh6j4AmZvzg26quzH2F6vRREdVJWG4xsamW+mTTq9ncvr1uZVOFmBwWm OioNOjQjT7RAVKkUpFUEMAyZ/exHs3XiqDTJMTQN+S/SmObJnF2LIuRhh9X6tSKG4gSazn J/SLwfv41xm4EbGeGN43YLAYWaaL39xsN5gwSQo0x6Gs/D5OUoO2SlvDSc4+wSuMNWw9bi 3peGZX84YBrMQg2x+aUVELAICrlVEOWjdYHq8Wj7DiHMVJJix6DdnLs4cgRONw== 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=1785233192; 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=TneZp/nir8rmnphA8XTSj1ZcR5NEa8bbpYXqLZ4YKdk=; b=vWlWlgdTDKFYcNUnZRrNN7eVrP+VYiNMNzw2Wp4SdYcL1VPpbWJHpSPmDZtuwWGd1ItMG0 x3FQ4RPKVvKuk6Aps/jhsCRlnMxMmOG7d5uTVw/nqmUW4IL59U1ZUCPKwKtoGgQKapaeuT GzkeOdGOuCFVOERJSrzLJaI9iZO2+fJUwXkZqjQ8Rhr1hXL97VNR1OoUO5yE+0n5yTrB9A ZSShSXnJsl6IukUNuZBMNv7tFyGMkilZ+WuNT0uCMJxI+VTsiWhIgiE8wxKUkFwsFK5wKY nHFhTEM754r2Khk/x4n0/+gmrLkv6OhcScQ3g+mtQKVD3RKdvXu5CcjsgHDxAQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4h8WMX2lxPzbYc for ; Tue, 28 Jul 2026 10:06:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1e843 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 28 Jul 2026 10:06:32 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alexander Leidinger Subject: git: c724b26acd59 - stable/15 - exterror: advertise error strings via kern.features.exterr_strings List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@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/stable/15 X-Git-Reftype: branch X-Git-Commit: c724b26acd59fe5078c5e64e707303ef9c2c522c Auto-Submitted: auto-generated Date: Tue, 28 Jul 2026 10:06:32 +0000 Message-Id: <6a687f28.1e843.347d9c47@gitrepo.freebsd.org> The branch stable/15 has been updated by netchild: URL: https://cgit.FreeBSD.org/src/commit/?id=c724b26acd59fe5078c5e64e707303ef9c2c522c commit c724b26acd59fe5078c5e64e707303ef9c2c522c Author: Alexander Leidinger AuthorDate: 2026-07-21 20:39:56 +0000 Commit: Alexander Leidinger CommitDate: 2026-07-28 10:04:41 +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 (cherry picked from commit c8db6d4b63f18c81557628ad0d3f715bea46cc99) --- 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 1b88581714d2..b829a70f26aa 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);