git: 5dc4245028c0 - stable/14 - sys/user.h: report posix shm mappings
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 15 Oct 2024 15:05:35 UTC
The branch stable/14 has been updated by kib:
URL: https://cgit.FreeBSD.org/src/commit/?id=5dc4245028c05fe37ae79f183ad42d2f0ae6aa0c
commit 5dc4245028c05fe37ae79f183ad42d2f0ae6aa0c
Author: Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2024-10-07 01:49:51 +0000
Commit: Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2024-10-15 14:50:17 +0000
sys/user.h: report posix shm mappings
(cherry picked from commit a8c641bbcba7badad2d00206245cbfaf73a762b7)
---
sys/kern/kern_proc.c | 5 +++++
sys/sys/user.h | 1 +
2 files changed, 6 insertions(+)
diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c
index 8f5ffeea71d3..f89ffde8b5be 100644
--- a/sys/kern/kern_proc.c
+++ b/sys/kern/kern_proc.c
@@ -2722,6 +2722,11 @@ kern_proc_vmmap_out(struct proc *p, struct sbuf *sb, ssize_t maxlen, int flags)
kve->kve_vn_fileid = key;
kve->kve_vn_fsid_freebsd11 = seq;
}
+ if ((lobj->flags & OBJ_POSIXSHM) != 0) {
+ kve->kve_flags |= KVME_FLAG_POSIXSHM;
+ shm_get_path(lobj, kve->kve_path,
+ sizeof(kve->kve_path));
+ }
if (vp != NULL) {
vn_fullpath(vp, &fullpath, &freepath);
kve->kve_vn_type = vntype_to_kinfo(vp->v_type);
diff --git a/sys/sys/user.h b/sys/sys/user.h
index 4ca80741ad5a..7ae0779278a4 100644
--- a/sys/sys/user.h
+++ b/sys/sys/user.h
@@ -520,6 +520,7 @@ struct kinfo_lockf {
#define KVME_FLAG_GROWS_DOWN 0x00000020
#define KVME_FLAG_USER_WIRED 0x00000040
#define KVME_FLAG_SYSVSHM 0x00000080
+#define KVME_FLAG_POSIXSHM 0x00000100
#if defined(__amd64__)
#define KINFO_OVMENTRY_SIZE 1168