Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern Repair damage done in systrace commit. Since argsiz...



details:   https://anonhg.NetBSD.org/src/rev/49236207e396
branches:  trunk
changeset: 532952:49236207e396
user:      fvdl <fvdl%NetBSD.org@localhost>
date:      Tue Jun 18 08:01:30 2002 +0000

description:
Repair damage done in systrace commit. Since argsize is nog longer
passed, assume it's sy_narg * sizeof (register_t). The code
made this assumption implicitly anyway. Fixes compat_*32 tracing.

diffstat:

 sys/kern/kern_ktrace.c |  11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diffs (34 lines):

diff -r 69313137eda1 -r 49236207e396 sys/kern/kern_ktrace.c
--- a/sys/kern/kern_ktrace.c    Tue Jun 18 07:56:12 2002 +0000
+++ b/sys/kern/kern_ktrace.c    Tue Jun 18 08:01:30 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_ktrace.c,v 1.56 2002/06/17 16:22:50 christos Exp $        */
+/*     $NetBSD: kern_ktrace.c,v 1.57 2002/06/18 08:01:30 fvdl Exp $    */
 
 /*
  * Copyright (c) 1989, 1993
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_ktrace.c,v 1.56 2002/06/17 16:22:50 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_ktrace.c,v 1.57 2002/06/18 08:01:30 fvdl Exp $");
 
 #include "opt_ktrace.h"
 
@@ -119,10 +119,13 @@
        struct ktr_header kth;
        struct ktr_syscall *ktp;
        register_t *argp;
-       int argsize = p->p_emul->e_sysent[code].sy_argsize;
-       size_t len = sizeof(struct ktr_syscall) + argsize;
+       int argsize;
+       size_t len;
        int i;
 
+       argsize = p->p_emul->e_sysent[code].sy_narg * sizeof (register_t);
+       len = sizeof(struct ktr_syscall) + argsize;
+
        p->p_traceflag |= KTRFAC_ACTIVE;
        ktrinitheader(&kth, p, KTR_SYSCALL);
        ktp = malloc(len, M_TEMP, M_WAITOK);



Home | Main Index | Thread Index | Old Index