Module Name: src
Committed By: martin
Date: Tue Oct 15 18:50:44 UTC 2019
Modified Files:
src/sys/kern [netbsd-9]: sys_ptrace_common.c
Log Message:
Pull up following revision(s) (requested by kamil in ticket #319):
sys/kern/sys_ptrace_common.c: revision 1.61
Remove 2 static asserts from the kernel ptrace code
sizeof(pid) and sizeof(lwp) will unlikely ever change and the check can
confuse.
The assert has been moved to ATF t_ptrace_wait.c r.1.132.
Requested by <christos>
To generate a diff of this commit:
cvs rdiff -u -r1.58.2.3 -r1.58.2.4 src/sys/kern/sys_ptrace_common.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/kern/sys_ptrace_common.c
diff -u src/sys/kern/sys_ptrace_common.c:1.58.2.3 src/sys/kern/sys_ptrace_common.c:1.58.2.4
--- src/sys/kern/sys_ptrace_common.c:1.58.2.3 Tue Oct 15 18:38:39 2019
+++ src/sys/kern/sys_ptrace_common.c Tue Oct 15 18:50:44 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: sys_ptrace_common.c,v 1.58.2.3 2019/10/15 18:38:39 martin Exp $ */
+/* $NetBSD: sys_ptrace_common.c,v 1.58.2.4 2019/10/15 18:50:44 martin Exp $ */
/*-
* Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -118,7 +118,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sys_ptrace_common.c,v 1.58.2.3 2019/10/15 18:38:39 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sys_ptrace_common.c,v 1.58.2.4 2019/10/15 18:50:44 martin Exp $");
#ifdef _KERNEL_OPT
#include "opt_ptrace.h"
@@ -704,12 +704,7 @@ ptrace_get_process_state(struct proc *t,
si = &t->p_sigctx.ps_info;
ps.pe_report_event = si->_reason._ptrace_state._pe_report_event;
- CTASSERT(sizeof(ps.pe_other_pid) ==
- sizeof(si->_reason._ptrace_state._option._pe_other_pid));
- CTASSERT(sizeof(ps.pe_lwp) ==
- sizeof(si->_reason._ptrace_state._option._pe_other_pid));
CTASSERT(sizeof(ps.pe_other_pid) == sizeof(ps.pe_lwp));
-
ps.pe_other_pid =
si->_reason._ptrace_state._option._pe_other_pid;
}