1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-11-22 07:20:00 +00:00

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
This commit is contained in:
Konstantin Belousov 2024-10-07 10:53:18 +03:00
parent 409c2fa385
commit e90b2b7d6c

View File

@ -36,6 +36,7 @@
#include <sys/ktr.h>
#include <sys/limits.h>
#include <sys/lock.h>
#include <sys/mman.h>
#include <sys/mutex.h>
#include <sys/reg.h>
#include <sys/syscallsubr.h>
@ -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)