Adam Wolk wrote:
> Hi tech@,
>
> Using the GREATSCOTT[1] pattern to output in the ktrace signal handler,
> dropping the need for an snprintf and the 8k stack buffer.
>
> Brought to attention by BlackFrog on #openbsd-daily
>
> Feedback, OK's?
so mistake in the original: sizeof() includes the
On Sun, Jun 11, 2017 at 11:10:30AM -0600, Theo de Raadt wrote:
> + write(STDERR_FILENO, NO_KTRACE, sizeof(NO_KTRACE));
>
> Naw, I dislike that sizeof.
>
> You can use dprintf, it is signal-safe in OpenBSD as long as the format
> string doesn't contain floating-point strings.
Attaching
+ write(STDERR_FILENO, NO_KTRACE, sizeof(NO_KTRACE));
Naw, I dislike that sizeof.
You can use dprintf, it is signal-safe in OpenBSD as long as the format
string doesn't contain floating-point strings.
Hi tech@,
Using the GREATSCOTT[1] pattern to output in the ktrace signal handler,
dropping the need for an snprintf and the 8k stack buffer.
Brought to attention by BlackFrog on #openbsd-daily
Feedback, OK's?
Regards,
Adam
[1] - https://marc.info/?l=openbsd-tech=149613049920485=2
Index: