Skip to content

Commit

Permalink
linux: Make PTRACE_GETREGSET return proper buffer size
Browse files Browse the repository at this point in the history
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
  • Loading branch information
trasz committed Oct 29, 2021
1 parent c8c93b1 commit f939dcc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sys/amd64/linux/linux_ptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit f939dcc

Please sign in to comment.