Date: Thu, 12 Jun 2025 04:05:05 +0100 From: Jessica Clarke <jrtc27@freebsd.org> To: Warner Losh <imp@bsdimp.com> Cc: Shawn Webb <shawn.webb@hardenedbsd.org>, Warner Losh <imp@freebsd.org>, Ricardo Branco <rbranco@suse.de>, 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: <86507548-1B8C-4CD1-BB18-C884D38EA489@freebsd.org> In-Reply-To: <CANCZdfrDU8x5atpC0jGhi66G6OO9ELKTV-Wyvb4yFaNM4Atxcg@mail.gmail.com> References: <202506112316.55BNGeGh046207@gitrepo.freebsd.org> <ngi7bslz4knvlxm2x53mc6uyf5capuyb6pvftwwczfdv2nhjp2@ybinoxkw6vyc> <CANCZdfrDU8x5atpC0jGhi66G6OO9ELKTV-Wyvb4yFaNM4Atxcg@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 12 Jun 2025, at 03:59, Warner Losh <imp@bsdimp.com> wrote: >=20 > On Wed, Jun 11, 2025 at 10:56=E2=80=AFPM Shawn Webb = <shawn.webb@hardenedbsd.org> 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=3D3d12567133bfb4082a5115f16a71a865= ff2af7fb >>>=20 >>> commit 3d12567133bfb4082a5115f16a71a865ff2af7fb >>> Author: Ricardo Branco <rbranco@suse.de> >>> AuthorDate: 2025-05-10 20:56:03 +0000 >>> Commit: Warner Losh <imp@FreeBSD.org> >>> CommitDate: 2025-06-11 23:16:22 +0000 >>>=20 >>> Add the POSIX sig2str(3) & str2sig(3) calls >>>=20 >>> Signed-off-by: Ricardo Branco <rbranco@suse.de> >>> 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 <sys/_ucontext.h> >>> #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 = committed >> in HardenedBSD a fix: >> = https://git.hardenedbsd.org/hardenedbsd/HardenedBSD/-/commit/0572db282c5a5= 42fe0de52739932e91eade537ed >>=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 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. But yes, including the actual error message when reporting a build failure would have been helpful. Jess
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86507548-1B8C-4CD1-BB18-C884D38EA489>