From nobody Tue Oct 08 12:39:25 2024 X-Original-To: dev-commits-src-main@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 4XNFvf0f1Xz5ZNcm; Tue, 08 Oct 2024 12:39:26 +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 4XNFvd6Df0z4bbJ; Tue, 8 Oct 2024 12:39:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728391165; 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=OH7qx0B+Ym05vCWNoGr6v+7B0Otw1CI34ojjUIBfeUA=; b=FBv0F+n79pXDUqBORyKoqSz0HtSCvFT8k3dq1z25Iqj4eblfsGB9ynA53y6/6CySF3U69G O19ZnTn2zYcJu+FQ7Cpagj7qrnMGQ4OtHHww189r31PaTnsrEBxSKYB6KaE6TOVUuKm/7z xtoxHN/MGqNNcDjSSCRozZWXyoUWFzrVte8TEVYZNPP5fROBN7f0t3DU59v3PsIqDebWik hm4ZFp3sC6S5mxmAOW8Rsi71bTcxaYlP27PhKuWkp4T68HHKtqFfesZgeXqBPpXnQ2pZhT Mi3zDuh1JCrAZpV22oN4MTt6e+0dt8fJmC1gwRMRcb5VbbMs3BsZp01+G80qUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728391165; 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=OH7qx0B+Ym05vCWNoGr6v+7B0Otw1CI34ojjUIBfeUA=; b=FAc1SeoauArgzTG0zPSspc8yJ2ReobbP4eXT9SJp1Q4z8nn+Ne5k1B89sseLgncCYqIGAL SYqTpYJv+fd0Cs5vroPbqZpye+XM5IOtX8W9diIaFsfiQjHtzYQcmtW2NJW5vaLTd9Ozpq gOAApfso9qKuaqSA9GYEwK17/oWV6G8VBkBhknn08pKEhbafRsHa1IHwSn8axYCHiPO6Vl Ro253PfI/c6k69AF7NtnDQbpsXxCjse2+wFL1JZlUojE0soxTZGshU8p0IS0a1DQQvdu3/ HsV5lpEtgFOcvzWApqencuxCZa0Ya5ep2mcre81654AE7oMI+Oy/YlD8BP3Ufg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728391165; a=rsa-sha256; cv=none; b=TcMhkOKj5jwUHH1MHUlH6wpa8RjULn7sotXM+1+HN5YAz109BTHQ/IrkMu1Uv73bOoLSt1 Tap6zWcRJOIQzqbqDibv3QlZvWf6Z/c29quH9B0hBqriK7BfUpMfBb29BRdcPl84/s6nK3 d38Xkfbqcl9KpO4hhB2TR7xJVt6EiBRkqUp7lphLWEhcyScjBNMuJqs3u/z3QaoWC7pv0r U2SWVGsNd05NmbWBKlwp22xN9rUOHhb6CtSlgrZFQskvyiUnCVgDif1gcc1lcqKZVrbNaX sr9fF/X1EzUSCous3jy/cp5NtRe9j9p2bdNtdZz2z0ZV38hgRDoDqtWwP2q5mQ== 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 4XNFvd51mZzWPk; Tue, 8 Oct 2024 12:39:25 +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 498CdPfG012977; Tue, 8 Oct 2024 12:39:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 498CdPoG012974; Tue, 8 Oct 2024 12:39:25 GMT (envelope-from git) Date: Tue, 8 Oct 2024 12:39:25 GMT Message-Id: <202410081239.498CdPoG012974@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: a8c641bbcba7 - main - sys/user.h: report posix shm mappings List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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: a8c641bbcba7badad2d00206245cbfaf73a762b7 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=a8c641bbcba7badad2d00206245cbfaf73a762b7 commit a8c641bbcba7badad2d00206245cbfaf73a762b7 Author: Konstantin Belousov AuthorDate: 2024-10-07 01:49:51 +0000 Commit: Konstantin Belousov CommitDate: 2024-10-08 12:38:09 +0000 sys/user.h: report posix shm mappings Add flag KVME_FLAG_POSIXSHM. Fill kve_path with the path of the segment. Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D46970 --- 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 7dc58b1e9bc9..1e90116f1cb0 100644 --- a/sys/kern/kern_proc.c +++ b/sys/kern/kern_proc.c @@ -2721,6 +2721,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 2025dc5cb47b..5703dababbe3 100644 --- a/sys/sys/user.h +++ b/sys/sys/user.h @@ -518,6 +518,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