Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Feb 2022 13:49:03 GMT
From:      Edward Tomasz Napierala <trasz@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: bb726462cbea - stable/13 - linux: Make PTRACE_GETREGSET return proper buffer size
Message-ID:  <202202211349.21LDn3mw092096@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by trasz:

URL: https://cgit.FreeBSD.org/src/commit/?id=bb726462cbea5f6b3ad9e4892cb59b19e45c229c

commit bb726462cbea5f6b3ad9e4892cb59b19e45c229c
Author:     Edward Tomasz Napierala <trasz@FreeBSD.org>
AuthorDate: 2021-10-29 14:28:56 +0000
Commit:     Edward Tomasz Napierala <trasz@FreeBSD.org>
CommitDate: 2022-02-21 13:36:23 +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
    
    (cherry picked from commit f939dccfd770df2f9070cd30aa52105b7afe1bde)
---
 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 f189bbc0bc79..5fa7dafdf2c7 100644
--- a/sys/amd64/linux/linux_ptrace.c
+++ b/sys/amd64/linux/linux_ptrace.c
@@ -574,7 +574,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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202202211349.21LDn3mw092096>