From nobody Thu Jun 12 03:14:55 2025 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 4bHnhM3g6vz5y04V for ; Thu, 12 Jun 2025 03:14:59 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-il1-x129.google.com (mail-il1-x129.google.com [IPv6:2607:f8b0:4864:20::129]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bHnhM1xqrz3tBW for ; Thu, 12 Jun 2025 03:14:59 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Authentication-Results: mx1.freebsd.org; none Received: by mail-il1-x129.google.com with SMTP id e9e14a558f8ab-3da73df6c4eso4326845ab.0 for ; Wed, 11 Jun 2025 20:14:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd.org; s=google; t=1749698097; x=1750302897; darn=freebsd.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=8s9HKt/lEf3aRSdMLdj5Erqy0Ht0Xyrxkg91M/V5TuI=; b=cc1fU9IAzIAX2/RD8vjM9RYlaUr6vbgRNAd/QIYXLrHqJ+dRTTERo5hRz+zQ7H25TA alM/JIi2iDtFR53gCRF3WNsbXAWqCsR6kH1BBnsTQHMqWKCWWkxUMA/xFBzUYgPdvarn vUwP9c04LjARNAJ17fAJR66Jf+f7uW3LHnXdvYuLL/fY+NkJqTd2h8KnAd5USSuPCDBh nxnavYS/eft35exsdDk4gfMwrNxQ2F8pkRcp2FhrRiScuwq+x6g+u1IffNuvx0DsDrr+ 7fwN3lHTEMqYD9+fvIttH2ycPvm3Zt8Z8TaIvxif+n+PqPEV0/IRRc+EoIRGZI7771CT LkGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1749698097; x=1750302897; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=8s9HKt/lEf3aRSdMLdj5Erqy0Ht0Xyrxkg91M/V5TuI=; b=A6fyAssSuyAthCsA4ClAflT9G0VPFzfgAYrKNhmBddvVinlsf4q1G3yAaijzVHk/i2 aGCirWfZTq2KNGYoza8piF4ZYG3P6FxkYvgXxxTMxXTjfDZ74wVJlc0BxfqOQT3qTRzb DgCGtC3kLj+hPoupMi8tDRSyBOfpdwZv8n9g8XXMVdqg0aNCz1BmKF/G8qIWCHMw6vS+ A7Tve8qulCWsB+PFiDmwzoDi1i1vUl1h8tOD6Bb4L+afOg7VYm2e/NIy2KIuXs1AqcKo InrSd7yL151Gx+2V00LOqpXegy76HwYe0hOsr/Tqc7kOpxp99VRJnnmzMETrglIrfrnE eYlg== X-Forwarded-Encrypted: i=1; AJvYcCVzP8dY+CHnnUMvbheqsOrtGqTEpm9/eUnrouAdOJSWUP2f9fBcUCgi1dIfToRD6EJri5qatW+3pWXHHKHS6XZLzod1@freebsd.org X-Gm-Message-State: AOJu0YyN6UOmFu5f0LI4tpAdbzR0A0NLJArnEiprC4fTMU/b050xaMUh SkQXCLZ6MkRFqOwpZtW/WHxgnURJiNEXY1X9oryVoOGmVQKjZKE/2aiOnly6H8UtfLr0EM+Fy06 qRpTSS/Q= X-Gm-Gg: ASbGncsvQtQL8yoCK/HLtshYujArUrsydBsOfiOcFlkL6Koll8lU77VAOoUibIET7si 51HTI1E31qcUnFDMxn2b/P9CeugMTxOEkmb60azEN597GaiT+7umtmLp4E94Y8f5zUeWUSdmFSk hLfnvca27gdsUekf5eWAp8/7qMfdXHEpFKp2UL+UwxQWTp7N0X9olpBOsiVOM08f4p/SA2y8y3i aeEsgCeyhBWIq8jhdJwjPAWFtb/b2GQeORQiHFU2q7wZFaJBKEWYB9u9A8Or1j827ofW+85Xj3a C4bjt4/10Lw+4JO6nYSXmOIW/b5G0OOzGpPCjVi/8vZJ X-Google-Smtp-Source: AGHT+IHN7ulVM4DNtygJqVQDmAxTKja4oXAW4xXKDSsXKrljSdeG/GucQy4B0+aTI2bCCJS/MY+rcg== X-Received: by 2002:a05:6e02:4518:20b0:3dd:f4ea:109f with SMTP id e9e14a558f8ab-3ddf4ea10bdmr32231895ab.0.1749698096857; Wed, 11 Jun 2025 20:14:56 -0700 (PDT) Received: from mutt-hbsd ([2001:470:4001:1::95]) by smtp.gmail.com with ESMTPSA id e9e14a558f8ab-3ddfbade69csm1592235ab.52.2025.06.11.20.14.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Jun 2025 20:14:56 -0700 (PDT) Date: Thu, 12 Jun 2025 03:14:55 +0000 From: Shawn Webb To: Jessica Clarke Cc: Warner Losh , Warner Losh , Ricardo Branco , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 3d12567133bf - main - Add the POSIX sig2str(3) & str2sig(3) calls Message-ID: X-Operating-System: FreeBSD mutt-hbsd 14.2-STABLE-HBSD FreeBSD 14.2-STABLE-HBSD HARDENEDBSD-14-STABLE amd64 X-PGP-Key: https://git.hardenedbsd.org/hardenedbsd/pubkeys/-/blob/master/Shawn_Webb/03A4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc References: <202506112316.55BNGeGh046207@gitrepo.freebsd.org> <86507548-1B8C-4CD1-BB18-C884D38EA489@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 MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ogq5fvkdxf2poib2" Content-Disposition: inline In-Reply-To: <86507548-1B8C-4CD1-BB18-C884D38EA489@freebsd.org> X-Rspamd-Queue-Id: 4bHnhM1xqrz3tBW X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] --ogq5fvkdxf2poib2 Content-Type: text/plain; protected-headers=v1; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Subject: Re: git: 3d12567133bf - main - Add the POSIX sig2str(3) & str2sig(3) calls MIME-Version: 1.0 On Thu, Jun 12, 2025 at 04:05:05AM +0100, Jessica Clarke wrote: > On 12 Jun 2025, at 03:59, Warner Losh wrote: > >=20 > > On Wed, Jun 11, 2025 at 10:56=E2=80=AFPM Shawn Webb wrote: > >>=20 > >> On Wed, Jun 11, 2025 at 11:16:40PM +0000, Warner Losh wrote: > >>> The branch main has been updated by imp: > >>>=20 > >>> URL: https://cgit.FreeBSD.org/src/commit/?id=3D3d12567133bfb4082a5115= f16a71a865ff2af7fb > >>>=20 > >>> commit 3d12567133bfb4082a5115f16a71a865ff2af7fb > >>> Author: Ricardo Branco > >>> AuthorDate: 2025-05-10 20:56:03 +0000 > >>> Commit: Warner Losh > >>> CommitDate: 2025-06-11 23:16:22 +0000 > >>>=20 > >>> Add the POSIX sig2str(3) & str2sig(3) calls > >>>=20 > >>> Signed-off-by: Ricardo Branco > >>> Reviewed by: imp, kib, des, jilles > >>> Pull Request: https://github.com/freebsd/freebsd-src/pull/1696 > >>> --- > >>> include/signal.h | 9 ++++ > >>> lib/libc/gen/Makefile.inc | 3 ++ > >>> lib/libc/gen/Symbol.map | 2 + > >>> lib/libc/gen/psignal.3 | 56 ++++++++++++++++++++++- > >>> lib/libc/gen/sig2str.c | 112 +++++++++++++++++++++++++++++++++++++= +++++++++ > >>> 5 files changed, 180 insertions(+), 2 deletions(-) > >>>=20 > >>> diff --git a/include/signal.h b/include/signal.h > >>> index c1d341f317f4..22fefb63568f 100644 > >>> --- a/include/signal.h > >>> +++ b/include/signal.h > >>> @@ -40,6 +40,10 @@ > >>> #include > >>> #endif > >>>=20 > >>> +#if __POSIX_VISIBLE >=3D 202405 || __BSD_VISIBLE > >>> +#define SIG2STR_MAX 32 /* size of buffer required for sig2str(= ) */ > >>> +#endif > >>=20 > >> Hey Warner and Ricardo, > >>=20 > >> The above breaks building world when _FORTIFY_SOURCE=3D2. I've committ= ed > >> in HardenedBSD a fix: > >> https://git.hardenedbsd.org/hardenedbsd/HardenedBSD/-/commit/0572db282= c5a542fe0de52739932e91eade537ed > >>=20 > >> I suppose that the !defined gate might not actually be desired, since > >> doing it the way I did might cause issues if third-party code defines > >> the macro to a value smaller than what libc was built with. I might > >> remove that gate. > >=20 > > I don't think we need the !defined part of it... > >=20 > > But what software is breaking? What's the error message? Maybe the > > fact it's undefined is pointing at a different bug=E2=80=A6 >=20 > Probably include/ssp/signal.h unconditionally defining the wrapper? > Presumably gating that with the same condition as sig2str itself would > fix things properly rather than such bogus hacks. >=20 > But yes, including the actual error message when reporting a build > failure would have been helpful. I apologize. I indeed should have included the error message. It's included below. =3D=3D=3D=3D BEGIN LOG =3D=3D=3D=3D =3D=3D=3D> lib/liblua (all) cc -target x86_64-unknown-freebsd15.0 --sysroot=3D/usr/obj/usr/src/amd64.am= d64/tmp -B/usr/obj/usr/src/amd64.amd64/tmp/usr/bin -O2 -pipe -fno-common -= DHARDENEDBSD -I/usr/src/lib/liblua -I/usr/src/lib/liblua/modules -I/usr/src= /contrib/lua/src -DLUA_PROGNAME=3D"\"\"" -g -gz=3Dzlib -mretpoline -fPIC = -flto -fzero-call-used-regs=3Dused -MD -MF.depend.lapi.o -MTlapi.o -std=3D= gnu17 -Wno-format-zero-length -fstack-protector-strong -D_FORTIFY_SOURCE=3D= 2 -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized -Wno-po= inter-sign -Wdate-time -Wno-empty-body -Wno-string-plus-int -Wno-unused-con= st-variable -Wno-error=3Dunused-but-set-parameter -Wno-error=3Dcast-functio= n-type-mismatch -Wno-tautological-compare -Wno-unused-value -Wno-parenthese= s-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-type= def -Wno-address-of-packed-member -Wno-switch -Wno-switch-enum -Wno-knr-pro= moted-parameter -Qunused-arguments -c /usr/src/contrib/lua/src/lapi.c = -o lapi.o In file included from /usr/src/contrib/lua/src/lapi.c:19: In file included from /usr/src/contrib/lua/src/lapi.h:12: In file included from /usr/src/contrib/lua/src/lstate.h:130: In file included from /usr/obj/usr/src/amd64.amd64/tmp/usr/include/signal.h= :76: /usr/obj/usr/src/amd64.amd64/tmp/usr/include/ssp/signal.h:41:23: error: use= of undeclared identifier 'SIG2STR_MAX' 41 | if (__ssp_bos(str) < SIG2STR_MAX) | ^ 1 error generated. *** Error code 1 Stop. make[5]: stopped making "all" in /usr/src/lib/liblua =3D=3D=3D=3D END LOG =3D=3D=3D=3D --=20 Shawn Webb Cofounder / Security Engineer HardenedBSD Signal Username: shawn_webb.74 Tor-ified Signal: +1 303-901-1600 / shawn_webb_opsec.50 https://git.hardenedbsd.org/hardenedbsd/pubkeys/-/raw/master/Shawn_Webb/03A= 4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc --ogq5fvkdxf2poib2 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEA6TL67gupaZ9nzhT/y5nonf44foFAmhKRh8ACgkQ/y5nonf4 4foEAA/+OqFmcGA8qgv7T+HrQ6jMDwjXfV0p6sxeAtyUii5CxW5oQ1ZS6/eRnF9j eXW3Cc6hSL98HpeZ34sHarWd2oCCYX8pYiD3Uhlo3xI4I+tSTWTeuyIhX+SAJxqP XYIDfTzn82uHpx9D50KlyBK6bGF6x3tMZnAJIAKfHZX6l6wfyq2Ja+VkjBRCHnft YbzbXaPB8cAId9HDSbce7wOtoNeyJESDsPvvG06CVaolAg2aak5YZ0HjjfgfJwK8 hJUi+XJjR1+wLu7CXyaRwU+Y7R7xzKrpF1SsEZq3IDpEUMlY/wq7evQ5t1lis1nu rXAtv9Kkp4kbQhicw3GWML1wXCayjWa++kJ2V+TQ/3GIFI8CRGX4aGNaVDI/xP0s SZpk5DqmcPxKyttKR1YcbWIHyiQqCcmRpVuuQs0YqkvGfsmedc5y+nhm/EO4If6E Pcr0oH6OZBGZtTdNNj+VwVyR3GA+JrxqBVDqgFO4AVKOTEOwEUnfRdTs0y/yvhlg +lGLKwKjetDsSNqIdYURzgTZzCcnt4YIT8+kkXr7M+8/rx08ukKRLB9zVqbemRAT 9gH7cCDOKkn1CZklQseO2wvVkIF5KUH5PZZXgZPwUFclq9lY6JD7pozQEKMbYLrW RpXjiEBjsEVtew9b0qUfLAYIRBL0orqaL5vImuPz8j053muDZmY= =SMcD -----END PGP SIGNATURE----- --ogq5fvkdxf2poib2--