svn commit: r302627 - in stable/11/sys: amd64/cloudabi64 arm64/cloudabi64
Ed Schouten
ed at FreeBSD.org
Tue Jul 12 08:07:29 UTC 2016
Author: ed
Date: Tue Jul 12 06:25:28 2016
New Revision: 302627
URL: https://svnweb.freebsd.org/changeset/base/302627
Log:
MFC r302448:
Don't forget to set sa->narg for CloudABI system calls.
It turns out that this value is not used within the system call code
under normal conditions, except when using tracing tools like ktrace.
If we forget to set this value, it is set to random garbage. This may
cause ktrace to hang indefinitely, making it impossible to kill.
Approved by: re@
Reported by: Michael Plass
PR: 210800
Modified:
stable/11/sys/amd64/cloudabi64/cloudabi64_sysvec.c
stable/11/sys/arm64/cloudabi64/cloudabi64_sysvec.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/sys/amd64/cloudabi64/cloudabi64_sysvec.c
==============================================================================
--- stable/11/sys/amd64/cloudabi64/cloudabi64_sysvec.c Tue Jul 12 06:12:58 2016 (r302626)
+++ stable/11/sys/amd64/cloudabi64/cloudabi64_sysvec.c Tue Jul 12 06:25:28 2016 (r302627)
@@ -96,6 +96,7 @@ cloudabi64_fetch_syscall_args(struct thr
if (sa->code >= CLOUDABI64_SYS_MAXSYSCALL)
return (ENOSYS);
sa->callp = &cloudabi64_sysent[sa->code];
+ sa->narg = sa->callp->sy_narg;
/* Fetch system call arguments. */
sa->args[0] = frame->tf_rdi;
Modified: stable/11/sys/arm64/cloudabi64/cloudabi64_sysvec.c
==============================================================================
--- stable/11/sys/arm64/cloudabi64/cloudabi64_sysvec.c Tue Jul 12 06:12:58 2016 (r302626)
+++ stable/11/sys/arm64/cloudabi64/cloudabi64_sysvec.c Tue Jul 12 06:25:28 2016 (r302627)
@@ -77,6 +77,7 @@ cloudabi64_fetch_syscall_args(struct thr
if (sa->code >= CLOUDABI64_SYS_MAXSYSCALL)
return (ENOSYS);
sa->callp = &cloudabi64_sysent[sa->code];
+ sa->narg = sa->callp->sy_narg;
/* Fetch system call arguments. */
for (i = 0; i < MAXARGS; i++)
More information about the svn-src-stable
mailing list