Module Name: src
Committed By: dsl
Date: Thu Dec 12 22:41:03 UTC 2013
Modified Files:
src/sys/arch/amd64/amd64: process_machdep.c
Log Message:
Since regs->fxstate is actually of type 'struct fxsave64' use a structure
copy instead of a 'not obviously incorrect' memcpy().
To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/amd64/amd64/process_machdep.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/arch/amd64/amd64/process_machdep.c
diff -u src/sys/arch/amd64/amd64/process_machdep.c:1.23 src/sys/arch/amd64/amd64/process_machdep.c:1.24
--- src/sys/arch/amd64/amd64/process_machdep.c:1.23 Sun Dec 1 01:05:16 2013
+++ src/sys/arch/amd64/amd64/process_machdep.c Thu Dec 12 22:41:03 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: process_machdep.c,v 1.23 2013/12/01 01:05:16 christos Exp $ */
+/* $NetBSD: process_machdep.c,v 1.24 2013/12/12 22:41:03 dsl Exp $ */
/*-
* Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -53,7 +53,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: process_machdep.c,v 1.23 2013/12/01 01:05:16 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: process_machdep.c,v 1.24 2013/12/12 22:41:03 dsl Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -130,7 +130,7 @@ process_read_fpregs(struct lwp *l, struc
l->l_md.md_flags |= MDL_USEDFPU;
}
- memcpy(®s->fxstate, frame, sizeof(*regs));
+ regs->fxstate = *frame;
return (0);
}