From b69996d1d5d08fd5009ac325ea8e8154efd01b33 Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Wed, 29 Jun 2022 08:26:58 -0600 Subject: [PATCH] tty: Default to printing kernel stack traceback only on INVARIANT kernels Change the default from printing a breif kernel thread stack informaton back to omitting it for non-invariant kernels in response to SIGINFO/^T. Full and brief stack support can be selected with the kern.tty_info_kstacks sysctl. MFC After: 2 weeks Sponsored by: Netflix Reviewed by: grembo, jhb Differential Revision: https://reviews.freebsd.org/D35576 --- sys/kern/tty_info.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/kern/tty_info.c b/sys/kern/tty_info.c index 237aa47a18da..be6de114bdfd 100644 --- a/sys/kern/tty_info.c +++ b/sys/kern/tty_info.c @@ -239,7 +239,11 @@ sbuf_tty_drain(void *a, const char *d, int len) } #ifdef STACK +#ifdef INVARIANTS static int tty_info_kstacks = STACK_SBUF_FMT_COMPACT; +#else +static int tty_info_kstacks = STACK_SBUF_FMT_NONE; +#endif static int sysctl_tty_info_kstacks(SYSCTL_HANDLER_ARGS)