From nobody Tue Oct 15 15:05:36 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 4XScq504YWz5YYWc; Tue, 15 Oct 2024 15:05:37 +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 4XScq44Rwcz46Yp; Tue, 15 Oct 2024 15:05:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729004736; 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=Z8Tai0L7piEueI/cy9P7grBJPBkr7JgXWHtL28NNs38=; b=CdoOVbYfXPsD6hN9d/eW67fVX1lOGGbjGequwObKZ1cI59KAhc5XCAzID0tpCQ0z59EtEs 7PS1MG6lB2Z6RPo3UOVdSQSoUEsomU/Qp/Fols4qVLe1lx2JU0vkg6NNzHkmWjkCf/3m/Y zrskHcyxfv4gEXZZVp0u4tmkd6KZz94VqzifqeDzgIIx6H5wGD2hm0M+IBw+FX9aU6Zm+P wSEqSdu3Qh8QybyWeWe9CzxfhoT2uxvLiZrT4dF8PZt7FdkzPpIwoYUl47vmTLmgBTt1OC mFwYa2V0K9nB6eiwrm+jGZWn9BD0aiUihZGQBUZvVebfFxzasK1QloPmw+M4Lg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729004736; 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=Z8Tai0L7piEueI/cy9P7grBJPBkr7JgXWHtL28NNs38=; b=WM5Axbh6sYr+z7mc7f/94FHv5z0dU2Ws4j/SDiDnKT/QnINmvQpuY9kbVG64SoihOXTNNQ /HfEVTlMraxQK1POjaRbOlylruTaOaFx294+chT+RVm7lZOH2H9lQduwz36ZYFZngOX3RO fRFbICr6rYLdg/YTew4MILISEaqxQCLO/BGf0unFfbMS+qlpdUjuyrRhT6txTNh+AUMZ/1 wZZm4goP8I1obGsxufiR3geB4O4xLQOENV+qdFa31QCrN99REn40P77qTwIlEXCJc6W7FU ji6VwY+ZprJVLSfc7V5Rjm2PKAKvrvTAg3rOghSogJv85TICc+LTF15bG+duug== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729004736; a=rsa-sha256; cv=none; b=r+Ado88ps9JBHi7FgNvghCSy2xCKYG0mhJwM7HBM9r0EqxrIDBGOvi8u8bjfVZgDkCFYPY cOvQ/DC+lekwwF/Wt86xXweDw8qNYLtt1SUvTFY2lRC+HotV8TGKnJfHMl+TO03gHN6U9/ 7inwG82H8ObwMNWaeesxz6gulsa8L6qcfXMKi3XBeT5qzr2KOAomWA955As9AFMzmlsArP DuPe+FfufyR0eCGdEiKC6eCf+CFTmrqVgfBhtaKpx0HJz5gJsWDwR128O6WQpttkoxjeMd kgm/FK4CK0ep+9tKQhyUzcX4We6mU/QT8Hxci9WaI/rQ2CLTQ17EbcfNj4HCaA== 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 4XScq43gYPzRhm; Tue, 15 Oct 2024 15:05:36 +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 49FF5aS6089716; Tue, 15 Oct 2024 15:05:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FF5aJH089713; Tue, 15 Oct 2024 15:05:36 GMT (envelope-from git) Date: Tue, 15 Oct 2024 15:05:36 GMT Message-Id: <202410151505.49FF5aJH089713@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: dd7b4456983b - stable/14 - sysctl vm.objects: report objects backing posix shm segments 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/stable/14 X-Git-Reftype: branch X-Git-Commit: dd7b4456983be8a7630aa23b0637b0954579abf0 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=dd7b4456983be8a7630aa23b0637b0954579abf0 commit dd7b4456983be8a7630aa23b0637b0954579abf0 Author: Konstantin Belousov AuthorDate: 2024-10-07 01:55:16 +0000 Commit: Konstantin Belousov CommitDate: 2024-10-15 14:50:17 +0000 sysctl vm.objects: report objects backing posix shm segments (cherry picked from commit b0b18b57a55b429cf3f625883da5dcb541b14960) --- sys/sys/user.h | 1 + sys/vm/vm_object.c | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/sys/sys/user.h b/sys/sys/user.h index 7ae0779278a4..945a51f6c3de 100644 --- a/sys/sys/user.h +++ b/sys/sys/user.h @@ -584,6 +584,7 @@ struct kinfo_vmentry { #define kve_obj kve_type_spec._kve_obj #define KVMO_FLAG_SYSVSHM 0x0001 +#define KVMO_FLAG_POSIXSHM 0x0002 /* * The "vm.objects" sysctl provides a list of all VM objects in the system diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index 1dbebf139683..d0f367815469 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -2612,6 +2612,11 @@ vm_object_list_handler(struct sysctl_req *req, bool swap_only) kvo->kvo_vn_fileid = key; kvo->kvo_vn_fsid_freebsd11 = seq; } + if ((obj->flags & OBJ_POSIXSHM) != 0) { + kvo->kvo_flags |= KVMO_FLAG_POSIXSHM; + shm_get_path(obj, kvo->kvo_path, + sizeof(kvo->kvo_path)); + } if (vp != NULL) { vn_fullpath(vp, &fullpath, &freepath); vn_lock(vp, LK_SHARED | LK_RETRY);