git: f939dccfd770 - main - linux: Make PTRACE_GETREGSET return proper buffer size
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 29 Oct 2021 15:04:33 UTC
The branch main has been updated by trasz: URL: https://cgit.FreeBSD.org/src/commit/?id=f939dccfd770df2f9070cd30aa52105b7afe1bde commit f939dccfd770df2f9070cd30aa52105b7afe1bde Author: Edward Tomasz Napierala <trasz@FreeBSD.org> AuthorDate: 2021-10-29 14:28:56 +0000 Commit: Edward Tomasz Napierala <trasz@FreeBSD.org> CommitDate: 2021-10-29 14:31:33 +0000 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 --- sys/amd64/linux/linux_ptrace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/amd64/linux/linux_ptrace.c b/sys/amd64/linux/linux_ptrace.c index d16e875ba5cf..275450d63b2d 100644 --- a/sys/amd64/linux/linux_ptrace.c +++ b/sys/amd64/linux/linux_ptrace.c @@ -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);