From nobody Mon Apr 10 16:37:26 2023 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 4PwF4k3ZNzz44S6M; Mon, 10 Apr 2023 16:37: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PwF4k2ytnz3tTJ; Mon, 10 Apr 2023 16:37:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681144646; 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=8a6JtifrVAGqYpgM5SJt1JuR15Pe9zsQUeOw1GybdNU=; b=oVFIm6BiGgof6tFGYxms0cWhW+hvEmMtiWTGpGNSFLiaRPelCKfxeqoIqaPgWDcyYZY1nK Bv31I21KhrYoPOeuiThGVppoWKwKx4tScXQ+hhZg/Kt3jyF+fyTPn89/tV0E7e+g1nu0Ni drzon+4O9+3ULvjoTfWDtNomCbUZjzPcoAEsZ0Dzl0VF85U6WOJJhfCAV8cFmyHdZRY7zV BbSOU+681HYV+ivXQzq3ff7GnqiAdPf3MhFlvQ7ZK4AAJsfrtOZ7SBGGe68S+Qh729juv1 oAIHYkyes7NJ3Wi2EvGpG6gaiwJ+1qjA2XBtEPIymMtgBm5/3GtTi5QdEKOTGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681144646; 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=8a6JtifrVAGqYpgM5SJt1JuR15Pe9zsQUeOw1GybdNU=; b=fgUouXzjM86t2mAqBIGyEkkfSeUEE7n6QZLmOBrcj7z+2yfcHx6PRIoyGK6UXN4r7dvhBR JOD0vjaiTQzgeZi20Ol/PeyOg5izp+a9zToIFjpDIB4KyX8PBUUVX4q/N9qtKDeMGzk6OB TAAdTKjBd2sbFHKNCJrql9mHx1Dcob9o8bRajHYNxbygnTmtMnfUM2dpKGA8NTmZMMXZdB 72AIxk8KMfbl1BjnjAVW/bPToynNsMDIFUrsZBEYUPyfqxVkWoBjylo2bW0BDTcJLW2Ewr KovP+4AoqRr41VqvAlV1k4OJASiQLI7RXdkvPh96xC27AXPbo18TsxAFKq///g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681144646; a=rsa-sha256; cv=none; b=mf6fE5/rlvHQUcSF1pxnlCF79auTatsNn2chAaoUllng30H9gAba2MdxdD/nbTcwhm4SQb wjeu6wj+yohDRR01Cj4R6P7ARvQ+LqaI3Fu6y0//qSUjnopQ6WD3lM2vO+YQaJR59ISoe3 ts44+VpsTvV5+nYHh8oDx9pQoVpQc5HmfYX/4exa52zWcki+p6X9yxZxXrmA+XAjjtX8j/ Cz0jXGnYaV0p7XdIkroqokTU7au4/lFWLKbJLeYba9DRFMBjVA50pQ8rTBwfSb84mR92g7 fbrsZnZes7+I2rr/T/r1nAnqv+NQDX+W2vfxQDYTcst3kyOZmnsZp7GakC3tiA== 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 4PwF4k1v1MzxnN; Mon, 10 Apr 2023 16:37:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 33AGbQPH059381; Mon, 10 Apr 2023 16:37:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33AGbQuh059380; Mon, 10 Apr 2023 16:37:26 GMT (envelope-from git) Date: Mon, 10 Apr 2023 16:37:26 GMT Message-Id: <202304101637.33AGbQuh059380@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Joseph Koshy Subject: git: de07f7f06e5e - main - procfs: Document the content of /proc/$PID/map. 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jkoshy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: de07f7f06e5e98a0035120bcdce63b355d999d25 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jkoshy: URL: https://cgit.FreeBSD.org/src/commit/?id=de07f7f06e5e98a0035120bcdce63b355d999d25 commit de07f7f06e5e98a0035120bcdce63b355d999d25 Author: Joseph Koshy AuthorDate: 2023-04-10 15:14:12 +0000 Commit: Joseph Koshy CommitDate: 2023-04-10 16:37:09 +0000 procfs: Document the content of /proc/$PID/map. Approved by: gnn (mentor) Differential Revision: https://reviews.freebsd.org/D39484 --- share/man/man5/procfs.5 | 90 +++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 88 insertions(+), 2 deletions(-) diff --git a/share/man/man5/procfs.5 b/share/man/man5/procfs.5 index 9e1d12cf3324..7fa00c53e62b 100644 --- a/share/man/man5/procfs.5 +++ b/share/man/man5/procfs.5 @@ -2,7 +2,7 @@ .\" Written by Garrett Wollman .\" This file is in the public domain. .\" -.Dd March 25, 2023 +.Dd April 10, 2023 .Dt PROCFS 5 .Os .Sh NAME @@ -69,7 +69,93 @@ in is only implemented on machines which have distinct general purpose and floating point register sets. .It Pa map -A map of the process' virtual memory. +A collection of lines describing the memory regions of the process, +where each line contains the following fields: +.Bl -tag -compact -width private-resident +.It start-address +The starting address for the region (inclusive). +.It end-address +The ending address for the region (exclusive). +.It resident +The number of resident pages. +.It private-resident +The number of resident pages that were private to the process. +.It obj +The virtual address of the +.Vt struct vm_object +kernel data structure describing the memory region. +.It access +A three character string comprising the characters +.Sq r , +.Sq w +and +.Sq x , +denoting read, write, and execute permissions respectively. +The lack of a permission is represented by +.Sq - . +.It ref_count +The number of references to the region. +.It shadow_count +The number of VM objects that this region is a shadow for. +.It flags +The flags for the object, see the flags named +.Sy OBJ_* +in +.In vm/vm_object.h . +.It copy-on-write +Whether the region is copy-on-write. +One of: +.Bl -tag -compact -width NCOW +.It COW +A copy-on-write region. +.It NCOW +A non-copy-on-write region. +.El +.It needs-copy +Whether the region needs a copy. +One of: +.Bl -tag -compact -width NNC +.It NC +The region needs a copy. +.It NNC +The region does not need a copy. +.El +.It type +The type of the region. +One of: +.Bl -tag -compact -width unknown +.It dead +A region associated with a dead VM object. +.It device +A region backed by device memory. +.It none +A region not backed by anything. +.It phys +A region backed by physical memory. +.It swap +A region backed by swap. +.It unknown +A region of unknown type. +.It vnode +A region backed by a file. +.El +.It fullpath +The path to the file backing the memory region, or +.Sq - +if there is no such file. +.It cred +One of: +.Bl -tag -compact -width NCH +.It CH +The region is being charged to the user specified in the +.Sq charged-uid +field. +.It NCH +The region is not being charged to any user. +.El +.It charged-uid +The UID of the user being charged, or -1 if no user is being charged. +.El .It Pa mem The complete virtual memory image of the process. Only those address which exist in the process can be accessed.