bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 2/7] x86_64: expand and shrink messages in copy{in, out}msg r


From: Luca
Subject: Re: [PATCH 2/7] x86_64: expand and shrink messages in copy{in, out}msg routines
Date: Wed, 18 Jan 2023 07:45:15 +0100

Luca Dariz, le lun. 16 janv. 2023 11:58:52 +0100, a ecrit:
+static inline int copyin_address(const rpc_vm_offset_t *uaddr, vm_offset_t 
*kaddr)
+{
+#ifdef __x86_64
+  return copyin_32to64(uaddr, kaddr);
+#else /* __x86_64__ */
+  return copyin(uaddr, kaddr, sizeof(*uaddr));
+#endif /* __x86_64__ */
+}
+
+static inline int copyout_address(const vm_offset_t *kaddr, rpc_vm_offset_t 
*uaddr)
+{
+#ifdef __x86_64
+  return copyout_64to32(kaddr, uaddr);
+#else /* __x86_64__ */
+  return copyout(kaddr, uaddr, sizeof(*kaddr));
+#endif /* __x86_64__ */
+}

These were to be USER32 rather than __86_64, to properly handle the case
of 64-on-64.

Ah you're right, thanks!

Luca




reply via email to

[Prev in Thread] Current Thread [Next in Thread]