When the M_SWAP column is enabled, it shows swap usage of processes. However, without cap_sys_ptrace, htop cannot show the swap usage of processes owned by other users. The SWAP column will simply show 0 bytes for other users' processes. If the cap_sys_ptrace file capability is added to the htop binary, then any user can see the amount of swap used by all processes. The ebuild for htop ought to add that file capability to the binary so that the M_SWAP column will work as intended. Gentoo users that wish to not add that file capability, could do so by disabling the filecaps USE flag on the package. Reproducible: Always Steps to Reproduce: 1. As root, run some memory heavy processes so that swap is utilized by them. Virtual machines (e.g. qemu) are a good candidate. 2. As an unprivileged user, run htop and enable the M_SWAP column 3. Note that the SWAP column will show 0 for the root processes that are using SWAP 4. As root, run htop and enable the M_SWAP column 5. Not that now the SWAP column will show actual swap usage for root (and all other) processes Actual Results: The SWAP column doesn't show correct swap usage for all processes. Expected Results: The SWAP column should show correct swap usage for all processes.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5325dae5e32f45af0a3c9805d7e37ba3b594f1b6 commit 5325dae5e32f45af0a3c9805d7e37ba3b594f1b6 Author: Lars Wendler <polynomial-c@gentoo.org> AuthorDate: 2022-05-21 08:20:22 +0000 Commit: Lars Wendler <polynomial-c@gentoo.org> CommitDate: 2022-05-21 08:34:59 +0000 sys-process/htop: Added live ebuild Introducing cap_sys_ptrace file capability for htop Bug: https://bugs.gentoo.org/846635 Signed-off-by: Lars Wendler <polynomial-c@gentoo.org> sys-process/htop/htop-9999.ebuild | 113 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 113 insertions(+)
Instead of being put in the non-live ebuilds it was reversed in 20d5319d31378762c32b0b2344e24f37ffbaccd2. Was that a mistake or do we not want it? I we do not want it then can this bug be closed?
(In reply to Filip Kobierski from comment #2) > Instead of being put in the non-live ebuilds it was reversed in > 20d5319d31378762c32b0b2344e24f37ffbaccd2. > Was that a mistake or do we not want it? > I we do not want it then can this bug be closed? Pretty sure that was accidental. From looking at commit history, I suspect I had the commit in a branch and rebased it and it got lost then.
If I were to add it again which version should I target? Latest for sure but should I also add it to latest stable? If so, should I destabilize it? Also, should this bug be confirmed?
(In reply to Filip Kobierski from comment #4) > If I were to add it again which version should I target? > Latest for sure but should I also add it to latest stable? No. Just in a new revision and live. > If so, should I destabilize it? > > Also, should this bug be confirmed? I guess. We don't really do UNCO/CONF in Gentoo.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=58e83c9f75f8ce452c0376065d69c482a1ec3d7a commit 58e83c9f75f8ce452c0376065d69c482a1ec3d7a Author: Filip Kobierski <fkobi@pm.me> AuthorDate: 2025-05-09 13:46:13 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2025-05-21 21:24:20 +0000 sys-process/htop: sync live Closes: https://bugs.gentoo.org/846635 Closes: https://bugs.gentoo.org/954884 Signed-off-by: Filip Kobierski <fkobi@pm.me> Part-of: https://github.com/gentoo/gentoo/pull/41975 Closes: https://github.com/gentoo/gentoo/pull/41975 Signed-off-by: Sam James <sam@gentoo.org> sys-process/htop/htop-9999.ebuild | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) Additionally, it has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=097c98f7da21c2ca3445cc0b50d8d87e0c5f62f0 commit 097c98f7da21c2ca3445cc0b50d8d87e0c5f62f0 Author: Filip Kobierski <fkobi@pm.me> AuthorDate: 2025-05-09 11:37:46 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2025-05-21 21:24:19 +0000 sys-process/htop: add 3.4.1-r1 fixing two bugs - README was a symlink to REAME.md - copied stuff from 5325dae5e32f45af0a3c9805d7e37ba3b594f1b6 Bug: https://bugs.gentoo.org/846635 Bug: https://bugs.gentoo.org/954884 Signed-off-by: Filip Kobierski <fkobi@pm.me> Part-of: https://github.com/gentoo/gentoo/pull/41975 Signed-off-by: Sam James <sam@gentoo.org> sys-process/htop/htop-3.4.1-r1.ebuild | 107 ++++++++++++++++++++++++++++++++++ 1 file changed, 107 insertions(+)