From nobody Tue Oct 15 15:05:30 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XScpz1dqqz5YYbc; Tue, 15 Oct 2024 15:05:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XScpy6dQrz46H5; Tue, 15 Oct 2024 15:05:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729004730; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ySIck+XowaQlgBv8td/efe5P8qI7GbkzHFr6WDtnzYA=; b=ktDsKWgx8QiHqj+xjAtpOgsbL6ZtLGZyEarYi59TOO+5AVOXseizKP7IvI8zQvdJB9dZGQ O1FKG5xxKQV5yfvj/WFZ9ATtI3YuaQjbjqgA0wRrZVLDlR/A5at/8M2JI9R+uufbdTNVy0 lygo9TSwE9kQuiLmHo9CcyehUpCRUsshN/JyhIpfNDt5jbI34DuNepEPsGUa1qvQjNQZg1 KNjhbAOy3LINYTGVxv/dbU/MML9FSrjL6+kw7ke0XQleoMCHWPS10dg1y9+k2KxinKZ4KR IR3e0sIJ2zQe/7iDY2wiXE2dpSt/Sadg9mR6tt2sk4r32Q6Y3hzwLHQQRWOh+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729004730; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ySIck+XowaQlgBv8td/efe5P8qI7GbkzHFr6WDtnzYA=; b=AuSeZx3UMS7y6UqhR2FxuSgVnK7lZ3oKL5+TfLbnZfcziFgIzxcqVOepuRHMaysSnBKx9m TCLghw3hAhqwdofaE7CjS6P3rVqBusc4xAjVxDRLlndXvhpLks7Kz14pkr2/evIjHcQJFM tAABJ8tJfl+snvhKDDdGnI8rMtrx21XmsouEo44UsLhFicuClGDeNRNV4ACt40McCz5r9O XwFYOIfjLMdC8UXjeikJ17Sf0pGrBek7NOv5aWmtaUrDoKKSVsumy32X+kl70ASuN3cnt8 ej8U7g81HJfzQUDbzTJ+oi1L8C11R9WP8yfB8x/J4Fat3trRNpOD9HcwVjcd4A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729004730; a=rsa-sha256; cv=none; b=PCmKTX2fd7n6yllv1bVk1Iqpqwfja7poT/h+DG0rv5vHKSHLJKAh4rCnbLVhAxX7I4YS24 1BbcpC165/IESv73tQexZX9C4HO1Hd5OyImXOsste2N/ucWw5cns8uc/jHMoDjB0Ot5Kau n3qB9uEy7kjykbR7DCzYfL4tFRGX7FsHCkY3Lpg5aJNG5uPx19gSt3vPamqijQ+EE6AGLn afoZMrjjw+6gB2xWkg7SlcImdH0k7L+ifNkfx+Jsngvz0BwDBACeXWXqo3K3aQgRmcJ8NN smm1bgszIztorPqrmkJEA/dFzeTD3B7BFYdjcEk9pA++eu646UP+qIbVvqxP5g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XScpy6CJhzR8Y; Tue, 15 Oct 2024 15:05:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FF5U1O089461; Tue, 15 Oct 2024 15:05:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FF5Uv0089458; Tue, 15 Oct 2024 15:05:30 GMT (envelope-from git) Date: Tue, 15 Oct 2024 15:05:30 GMT Message-Id: <202410151505.49FF5Uv0089458@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 32b3b01083ce - stable/14 - ptrace(PT_VM_ENTRY): report max protection List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 32b3b01083ce4e7d8df4200ecb2ef21e4a2763b7 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=32b3b01083ce4e7d8df4200ecb2ef21e4a2763b7 commit 32b3b01083ce4e7d8df4200ecb2ef21e4a2763b7 Author: Konstantin Belousov AuthorDate: 2024-10-07 07:53:18 +0000 Commit: Konstantin Belousov CommitDate: 2024-10-15 14:50:16 +0000 ptrace(PT_VM_ENTRY): report max protection (cherry picked from commit e90b2b7d6c173e27dccdb894bb4e34ad30273e22) --- sys/kern/sys_process.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/kern/sys_process.c b/sys/kern/sys_process.c index 647487f86b02..a45d5b065382 100644 --- a/sys/kern/sys_process.c +++ b/sys/kern/sys_process.c @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include @@ -517,7 +518,8 @@ ptrace_vm_entry(struct thread *td, struct proc *p, struct ptrace_vm_entry *pve) pve->pve_start = entry->start; pve->pve_end = entry->end - 1; pve->pve_offset = entry->offset; - pve->pve_prot = entry->protection; + pve->pve_prot = entry->protection | + PROT_MAX(entry->max_protection); /* Backing object's path needed? */ if (pve->pve_pathlen == 0)