- if (copyinstr((const user_addr_t)src, (char *)dst, (vm_size_t)len, &actual)) {
+ /* copyin as many as 'len' bytes. */
+ int error = copyinstr((const user_addr_t)src, (char *)dst, (vm_size_t)len, &actual);
+
+ /*
+ * ENAMETOOLONG is returned when 'len' bytes have been copied in but the NUL terminator was
+ * not encountered. That does not require raising CPU_DTRACE_BADADDR, and we press on.
+ * Note that we do *not* stuff a NUL terminator when returning ENAMETOOLONG, that's left
+ * to the caller.
+ */
+ if (error && error != ENAMETOOLONG) {