From 63ac93df54cd459cfecfc28db459efb55f78bb02 Mon Sep 17 00:00:00 2001 From: manu Date: Sat, 23 Sep 2006 22:11:59 +0000 Subject: Add sysctl tracing to emulations. While we are there, fix a bug in FreeBSD sysctl emulation: use copyin for moving data to the kernel --- sys/compat/linux/common/linux_sysctl.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'sys/compat/linux/common/linux_sysctl.c') diff --git a/sys/compat/linux/common/linux_sysctl.c b/sys/compat/linux/common/linux_sysctl.c index 5a8b7a20bce..ad26747c5cd 100644 --- a/sys/compat/linux/common/linux_sysctl.c +++ b/sys/compat/linux/common/linux_sysctl.c @@ -1,4 +1,4 @@ -/* $NetBSD: linux_sysctl.c,v 1.19 2006/03/08 03:55:31 jonathan Exp $ */ +/* $NetBSD: linux_sysctl.c,v 1.20 2006/09/23 22:12:00 manu Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -41,7 +41,9 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: linux_sysctl.c,v 1.19 2006/03/08 03:55:31 jonathan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_sysctl.c,v 1.20 2006/09/23 22:12:00 manu Exp $"); + +#include "opt_ktrace.h" #include #include @@ -51,6 +53,9 @@ __KERNEL_RCSID(0, "$NetBSD: linux_sysctl.c,v 1.19 2006/03/08 03:55:31 jonathan E #include #include #include +#ifdef KTRACE +#include +#endif #include #include @@ -149,6 +154,10 @@ linux_sys___sysctl(struct lwp *l, void *v, register_t *retval) if (error) return (error); +#ifdef KTRACE + if (KTRPOINT(l->l_proc, KTR_MIB)) + ktrmib(l, name, ls.nlen); +#endif /* * wire old so that copyout() is less likely to fail? */ -- cgit