Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F142238113
D28658.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D28658.diff
View Options
diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c
--- a/sys/kern/kern_proc.c
+++ b/sys/kern/kern_proc.c
@@ -2514,7 +2514,7 @@
vm_offset_t addr;
unsigned int last_timestamp;
int error;
- bool super;
+ bool guard, super;
PROC_LOCK_ASSERT(p, MA_OWNED);
@@ -2584,6 +2584,8 @@
if (entry->eflags & MAP_ENTRY_USER_WIRED)
kve->kve_flags |= KVME_FLAG_USER_WIRED;
+ guard = (entry->eflags & MAP_ENTRY_GUARD) != 0;
+
last_timestamp = map->timestamp;
vm_map_unlock_read(map);
@@ -2620,7 +2622,8 @@
vput(vp);
}
} else {
- kve->kve_type = KVME_TYPE_NONE;
+ kve->kve_type = guard ? KVME_TYPE_GUARD :
+ KVME_TYPE_NONE;
kve->kve_ref_count = 0;
kve->kve_shadow_count = 0;
}
diff --git a/sys/sys/user.h b/sys/sys/user.h
--- a/sys/sys/user.h
+++ b/sys/sys/user.h
@@ -465,6 +465,7 @@
#define KVME_TYPE_DEAD 6
#define KVME_TYPE_SG 7
#define KVME_TYPE_MGTDEVICE 8
+#define KVME_TYPE_GUARD 9
#define KVME_TYPE_UNKNOWN 255
#define KVME_PROT_READ 0x00000001
diff --git a/usr.bin/procstat/procstat.1 b/usr.bin/procstat/procstat.1
--- a/usr.bin/procstat/procstat.1
+++ b/usr.bin/procstat/procstat.1
@@ -25,7 +25,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd November 24, 2020
+.Dd February 13, 2021
.Dt PROCSTAT 1
.Os
.Sh NAME
@@ -674,6 +674,8 @@
swap
.It vn
vnode
+.It gd
+guard (pseudo-type)
.El
.Pp
The following mapping flags may be displayed:
diff --git a/usr.bin/procstat/procstat_vm.c b/usr.bin/procstat/procstat_vm.c
--- a/usr.bin/procstat/procstat_vm.c
+++ b/usr.bin/procstat/procstat_vm.c
@@ -155,6 +155,10 @@
str = "md";
lstr = "managed_device";
break;
+ case KVME_TYPE_GUARD:
+ str = "gd";
+ lstr = "guard";
+ break;
case KVME_TYPE_UNKNOWN:
default:
str = "??";
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Jan 18, 4:33 PM (15 h, 58 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27712152
Default Alt Text
D28658.diff (1 KB)
Attached To
Mode
D28658: procstat: distinguish vm map guards in procstat vm output.
Attached
Detach File
Event Timeline
Log In to Comment