The man page for copystr
says:
The copystr() function copies a NUL-terminated string, at most len bytes long, from kernel-space address kfaddr to kernel-space address kdaddr.
But it looks like you are trying to copy from userspace. In that case I think you are looking for copyin
or copyinstr
.