From nobody Tue Oct 08 06:50:43 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 4XN69H6Jz5z5Z3fl; Tue, 08 Oct 2024 06:50:43 +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 4XN69H4Prvz40pL; Tue, 8 Oct 2024 06:50:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728370243; 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=fSLiEUJQRK3GFcdnsSbPzixUpAj8D265DvbM7S6yi2E=; b=VZuU3co6xXIZV1zlLuqUK6yos2fRIMcTQOk6snSLKlaYbfvEq/3Z8OLyaGGfeIQOxQHtWn PjsQ94TH6Pqap7isQfnm/viH4mfLx53bZ2ouBKeEUd5t3twQ7LK2fHeV2SMnuxzuTzNCc7 pRQdCBjnWcmp2eOGI98hu+jIGmvaYRBya/zofKBmjJKCEuCGlsl0qJO+bK9Sw+8yfFFETU oTUPjKulLF2D7g65HGh/wi62TXu5GNu8WI0enKjL58fH1zF3tXfUtZ3M342jWzkX+AQcWJ 4m5wE8m57t1oA/ZOy4ddL4+nIl5jbHwSIXR0L0r+aM1BpDT3zbhkOLY24RSHTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728370243; 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=fSLiEUJQRK3GFcdnsSbPzixUpAj8D265DvbM7S6yi2E=; b=pAhB58X4gFM8BUq+pfIm4uMHWjp5wApOvb/6CCCUuPE1TR/20FL6O7hdvA9dA6nDrlJSk5 PGjC7fSVdQLzZVLKc22CyU+0ITD8nx/asMn1KaX8oSW7yniLB0Zh2SodhfQCsOHct+tk95 be/gxCyijzQ18pLF2Y38Hf56LDN6scPA/jC0OyGLhRLnOTMNzCfrQ6S0rNUDCrQq56uGck yHxm/uxcaQcRPyeg4D98J8/AsIz5/e14oLlgsIj29L7i6I3VQdOZyYHhJXO8pKfV1ZH8U4 uEebylbNziJioiUJdEPEETZl/JMsnJrBHUwRvVyxOulMk5/8xCDbcuTmKSyvFg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728370243; a=rsa-sha256; cv=none; b=LOyeNIHNmchzKG+UteEWyA9JCifMWBzs3h0ntGse0jfCVeakRyzkS2zA4eY/eXi40RT1px UMbMFNH7kb4RRbd8x7EIkpaH4NFc8ylN1KyRorW63a5yJIRSGBIC8X33nOe0yyPLuw4nte 2b+cQos6qQ2nfRXdVHsC/JBgmY9Gf8bbctHcfWqDJrkXbeEbODMBAW3KW14rfg0uREgmDm 2H/YPk5zP3/85FJIGYvWjORZnt/zthncH43TInImXkjo0b/LMK1pw+JPSL9C+ku9uf4m9k /6Ah7wUA4xBFB18c/dXWaFc76Qhz+sVshk0dbSNYYv2at6j4CuuSSinXHQWHPA== 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 4XN69H3tH2zKLN; Tue, 8 Oct 2024 06:50:43 +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 4986ohjQ026544; Tue, 8 Oct 2024 06:50:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4986ohNV026541; Tue, 8 Oct 2024 06:50:43 GMT (envelope-from git) Date: Tue, 8 Oct 2024 06:50:43 GMT Message-Id: <202410080650.4986ohNV026541@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: e90b2b7d6c17 - main - 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/main X-Git-Reftype: branch X-Git-Commit: e90b2b7d6c173e27dccdb894bb4e34ad30273e22 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=e90b2b7d6c173e27dccdb894bb4e34ad30273e22 commit e90b2b7d6c173e27dccdb894bb4e34ad30273e22 Author: Konstantin Belousov AuthorDate: 2024-10-07 07:53:18 +0000 Commit: Konstantin Belousov CommitDate: 2024-10-08 06:50:17 +0000 ptrace(PT_VM_ENTRY): report max protection Reviewed by: brooks, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D46971 --- 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 8ce4ea01fe6f..a3a7a22f4cd3 100644 --- a/sys/kern/sys_process.c +++ b/sys/kern/sys_process.c @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include @@ -505,7 +506,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)