From nobody Fri Aug 19 09:18:55 2022 X-Original-To: bugs@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 4M8GQl5bdZz4YWpb for ; Fri, 19 Aug 2022 09:18:55 +0000 (UTC) (envelope-from bugzilla-noreply@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 4M8GQl3Wp4z3n2k for ; Fri, 19 Aug 2022 09:18:55 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (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 4M8GQl2bK0znJr for ; Fri, 19 Aug 2022 09:18:55 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 27J9Itcm082736 for ; Fri, 19 Aug 2022 09:18:55 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 27J9ItLa082735 for bugs@FreeBSD.org; Fri, 19 Aug 2022 09:18:55 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 265937] linprocfs: process size incorrect Date: Fri, 19 Aug 2022 09:18:55 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 12.3-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: ray@bellis.me.uk X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1660900735; 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=vrck6toworreRonqZjfPDdY6rwVUQWN0eMMpDQG0Yiw=; b=fgv028i2djGsNJnJa5apcSOmQgEOdDbkTDD2L5khqFWAsJt1Y7vNq5gcc2ULa3CSluCOAj 51p6g1+pE8P5pMUl4k57iWo7yqF3dryULbnPKCh56eQJ0NLpRDZ30BrwvguCsKsxDXAThu IBb+9J/uEWnq7MGQToMn9MWOvDoEAzrnJ6qQiK1fQ8bU4k3xzYfXgpeeflJgEqEgZadzzP hSuSuw/B9KYBjesUYWeJXQ7Kt3DD0saS8oYzDILr0bWOBKQV2fZiZPKbHchlFj+TAvh9ZW WYLpw22O1EOc9G/9ZFz1xUT4lOj/MDQQPmoj9EpKoazY9FegNSKbAlkmYvivmA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1660900735; a=rsa-sha256; cv=none; b=JlAveM/UBCMY29MTHU6fT787gvxFDpUdxjhIOkhYqdYNe7xQlQtN+7D9MEnZZabZS6L44h 2uuQgiGY7n2krEJmajXQed2q/OmVG0Zw5IVUptKMzmEcYmLSy6fgwVU5EHVYZFZuC6Xxjv kRoVS05aaf1+A03ZxVhorFGkQFWnH5YPhwXJCE5ZzYXWd2nZt+kDcpN3Iw5bnpkC4u3gzZ FYpSc4sMszb/J3eCAhUmCcD667raTIINXGg/1uiP6OVz6A+SF3yLXbimnH9yg97k3QdPne qJnbvjREpDGhC/BIc8ImtQ6E3WVo+cHBaQHso9zga6FCqwVACAmTfoFAr+Nk2A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D265937 Bug ID: 265937 Summary: linprocfs: process size incorrect Product: Base System Version: 12.3-RELEASE Hardware: amd64 OS: Any Status: New Severity: Affects Some People Priority: --- Component: kern Assignee: bugs@FreeBSD.org Reporter: ray@bellis.me.uk On our FreeBSD 12.3 systems, I've detected that the process size column in a `linprocfs` process status file (`/stat`) derived from the `ki_size` structure is reading four times higher than it should be, compared to values returned by e.g. `ps` and `top`. The reason appears to be the use of the P2K macro in this line: sys/compat/linprocfs/linprocfs.c:1019 ```C PS_ADD("vsize", "%ju", P2K((uintmax_t)kp.ki_size)); ``` https://github.com/freebsd/freebsd-src/blob/c8e7070ce3d98c3aa0b08249afe1d6d= 887f37f31/sys/compat/linprocfs/linprocfs.c#L1019 ki_size is calculated elsewhere from vm_map.size, but I could find nothing to say explicitly whether .size is counted in pages or kB. The issue is still present in the 14.x source. --=20 You are receiving this mail because: You are the assignee for the bug.=