diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2023-05-11 09:51:34 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2023-05-11 09:51:34 +0000 |
commit | 75db4a873f638cc3cbb7fb586439ac7984a22b0c (patch) | |
tree | de309551fdaa4d41a2472daf01b0085c1005010c | |
parent | f0c9382f95231b9b08e3c80ab3b9e7619ebabb97 (diff) |
mi_syscall() can add the KTRC_CODE_SYSCALL flag to the syscall code.
In ktrsyscall() mask the code, otherwise kdump(1) does not show the
correct mib of SYS_sysctl when called by syscall(2).
OK guenther@
-rw-r--r-- | sys/kern/kern_ktrace.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_ktrace.c b/sys/kern/kern_ktrace.c index 16860982808..528547a8ab3 100644 --- a/sys/kern/kern_ktrace.c +++ b/sys/kern/kern_ktrace.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_ktrace.c,v 1.111 2023/02/16 08:50:57 claudio Exp $ */ +/* $OpenBSD: kern_ktrace.c,v 1.112 2023/05/11 09:51:33 bluhm Exp $ */ /* $NetBSD: kern_ktrace.c,v 1.23 1996/02/09 18:59:36 christos Exp $ */ /* @@ -160,7 +160,7 @@ ktrsyscall(struct proc *p, register_t code, size_t argsize, register_t args[]) u_int nargs = 0; int i; - if (code == SYS_sysctl) { + if ((code & KTRC_CODE_MASK) == SYS_sysctl) { /* * The sysctl encoding stores the mib[] * array because it is interesting. |