aboutsummaryrefslogtreecommitdiff
path: root/i386
diff options
context:
space:
mode:
Diffstat (limited to 'i386')
-rw-r--r--i386/i386/i386asm.sym2
-rw-r--r--i386/i386/locore.S4
2 files changed, 6 insertions, 0 deletions
diff --git a/i386/i386/i386asm.sym b/i386/i386/i386asm.sym
index 417c040d..9f4ebe55 100644
--- a/i386/i386/i386asm.sym
+++ b/i386/i386/i386asm.sym
@@ -171,3 +171,5 @@ offset shared_info si evtchn_mask EVTMASK
offset shared_info si vcpu_info[0].arch.cr2 CR2
#endif /* MACH_PV_PAGETABLES */
#endif /* MACH_XEN */
+
+offset mach_msg_header msgh msgh_size
diff --git a/i386/i386/locore.S b/i386/i386/locore.S
index 8a1054a6..162bb13a 100644
--- a/i386/i386/locore.S
+++ b/i386/i386/locore.S
@@ -1314,6 +1314,7 @@ ENTRY(copyinmsg)
movl 8+S_ARG0,%esi /* get user start address */
movl 8+S_ARG1,%edi /* get kernel destination address */
movl 8+S_ARG2,%ecx /* get count */
+ movl %ecx,%edx /* save count */
movl $USER_DS,%eax /* use user data segment for accesses */
mov %ax,%ds
@@ -1325,6 +1326,9 @@ ENTRY(copyinmsg)
movsl /* move longwords */
xorl %eax,%eax /* return 0 for success */
+ movl 8+S_ARG1,%edi
+ movl %edx,%es:MSGH_MSGH_SIZE(%edi) /* set msgh_size */
+
copyinmsg_ret:
mov %ss,%di /* restore DS to kernel segment */
mov %di,%ds