linux: Make PTRACE_GETREGSET return proper buffer size

This fixes Chrome warning:

[1022/152319.328632:ERROR:ptracer.cc(476)] Unexpected registers size 0 != 216, 68

Reviewed By:	emaste
Sponsored By:	EPSRC
Differential Revision: https://reviews.freebsd.org/D32616
This commit is contained in:
Edward Tomasz Napierala 2021-10-29 15:28:56 +01:00
parent c8c93b1516
commit f939dccfd7

View file

@ -540,7 +540,7 @@ linux_ptrace_getregset_prstatus(struct thread *td, pid_t pid, l_ulong data)
return (error);
}
iov.iov_len -= len;
iov.iov_len = len;
error = copyout(&iov, (void *)data, sizeof(iov));
if (error != 0) {
linux_msg(td, "iov copyout error %d", error);