Subject: port-amd64/34594: ifdefed by KTRACE or SYSTRACE in linux32_syscall.c
To: None <port-amd64-maintainer@netbsd.org, gnats-admin@netbsd.org,>
From: None <kiyohara@kk.iij4u.or.jp>
List: netbsd-bugs
Date: 09/24/2006 11:30:00
>Number: 34594
>Category: port-amd64
>Synopsis: ifdefed by KTRACE or SYSTRACE in linux32_syscall.c
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: port-amd64-maintainer
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Sun Sep 24 11:30:00 +0000 2006
>Originator: KIYOHARA Takashi
>Release: NetBSD-current
>Organization:
>Environment:
NetBSD sins.soum.co.jp 4.99.1 NetBSD 4.99.1 (SINS) #0: Thu Sep 14 17:50:48 JST 2006 lance@sins.soum.co.jp:/sys/arch/amd64/compile/SINS amd64
>Description:
We nesessary ifdefed 'goto out;' by KTRACE or SYSTRACE in sys/arch/amd64/amd64/linux32_syscall.c. However label 'out' ifdefed KTRACE or SYSTRACE. Please Fix.
--- sys/arch/amd64/amd64/linux32_syscall.c ---
#if defined(KTRACE) || defined(SYSTRACE)
if (
#ifdef KTRACE
KTRPOINT(p, KTR_SYSCALL) ||
#endif
#ifdef SYSTRACE
ISSET(p->p_flag, P_SYSTRACE)
#else
0
#endif
) {
for (i = 0; i < (argsize >> 2); i++)
args64[i] = args[i] & 0xffffffff;
/* XXX we need to pass argsize << 1 here? */
if ((error = trace_enter(l, code, code, NULL, args64)) != 0)
goto out;
}
#endif
>How-To-Repeat:
>Fix:
Index: sys/arch/amd64/amd64/linux32_syscall.c
===================================================================
RCS file: /cvsroot/src/sys/arch/amd64/amd64/linux32_syscall.c,v
retrieving revision 1.6
diff -u -r1.6 linux32_syscall.c
--- sys/arch/amd64/amd64/linux32_syscall.c 19 Jul 2006 21:11:39 -0000
1.6
+++ sys/arch/amd64/amd64/linux32_syscall.c 14 Sep 2006 08:02:46 -0000
@@ -224,7 +224,9 @@
printf("linux syscall %d bogus argument size %ld",
code, argsize);
error = ENOSYS;
+#if defined(KTRACE) || defined(SYSTRACE)
goto out;
+#endif
break;
}
}