aboutsummaryrefslogtreecommitdiff
path: root/x86_64
diff options
context:
space:
mode:
authorLuca Dariz <luca@orpolo.org>2023-02-27 21:44:58 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2023-02-27 22:35:33 +0100
commit4592eb3b02b6e6bd78bd493cf64edcd6fb65a694 (patch)
tree51f15a363abe1141543352d2e3f62ba68e447059 /x86_64
parentf05dda2af441bdf12fe40192c517c0ac171961ca (diff)
downloadgnumach-4592eb3b02b6e6bd78bd493cf64edcd6fb65a694.tar.gz
gnumach-4592eb3b02b6e6bd78bd493cf64edcd6fb65a694.tar.bz2
gnumach-4592eb3b02b6e6bd78bd493cf64edcd6fb65a694.zip
fix copyin/outmsg header for ! USER32
* x86_64/copy_user.c: fix copyin/out, we already have a pointer to user/kernel buffers Message-Id: <20230227204501.2492152-3-luca@orpolo.org>
Diffstat (limited to 'x86_64')
-rw-r--r--x86_64/copy_user.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/x86_64/copy_user.c b/x86_64/copy_user.c
index dd9fe2d7..86d23525 100644
--- a/x86_64/copy_user.c
+++ b/x86_64/copy_user.c
@@ -192,7 +192,7 @@ int copyinmsg (const void *userbuf, void *kernelbuf, const size_t usize)
/* The 64 bit interface ensures the header is the same size, so it does not need any resizing. */
_Static_assert(sizeof(mach_msg_header_t) == sizeof(mach_msg_user_header_t),
"mach_msg_header_t and mach_msg_user_header_t expected to be of the same size");
- if (copyin(&umsg, &kmsg, sizeof(mach_msg_header_t)))
+ if (copyin(umsg, kmsg, sizeof(mach_msg_header_t)))
return 1;
#endif
@@ -290,7 +290,7 @@ int copyoutmsg (const void *kernelbuf, void *userbuf, const size_t ksize)
sizeof(kmsg->msgh_seqno) + sizeof(kmsg->msgh_id)))
return 1;
#else
- if (copyout(&kmsg, &umsg, sizeof(mach_msg_header_t)))
+ if (copyout(kmsg, umsg, sizeof(mach_msg_header_t)))
return 1;
#endif /* USER32 */