git: ac7506f22fa6 - stable/13 - tty: Default to printing kernel stack traceback only on INVARIANT kernels
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 19 Apr 2023 19:46:21 UTC
The branch stable/13 has been updated by imp:
URL: https://cgit.FreeBSD.org/src/commit/?id=ac7506f22fa6420a85327a3831e766706003c36c
commit ac7506f22fa6420a85327a3831e766706003c36c
Author: Warner Losh <imp@FreeBSD.org>
AuthorDate: 2023-04-19 19:32:45 +0000
Commit: Warner Losh <imp@FreeBSD.org>
CommitDate: 2023-04-19 19:44:20 +0000
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
(cherry picked from commit b69996d1d5d08fd5009ac325ea8e8154efd01b33)
---
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)