Commit bc00a39
committed
kext: source stat memory/threads/state from daemon proc_taskinfo
procfs_pctx_get read vsize/rss via a VM-map walk and thread count via a
thread walk, both of which need task_for_pid and so returned 0 for the
SIP/hardened processes whose task port is denied — ps aux showed VSZ,
RSS and thread counts of 0 for most processes. Take these from the
daemon's proc_taskinfo (proc_pidinfo, no task port) instead, and refine
the coarse BSD p_stat into Linux's running/sleeping split via the count
of running threads so idle processes read 'S'. Falls back to the
in-kernel walk when no daemon is connected. Fixes stat, statm, status
and status_linux together.1 parent 462de30 commit bc00a39
1 file changed
Lines changed: 23 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1744 | 1744 | | |
1745 | 1745 | | |
1746 | 1746 | | |
1747 | | - | |
1748 | 1747 | | |
1749 | 1748 | | |
1750 | | - | |
| 1749 | + | |
| 1750 | + | |
| 1751 | + | |
| 1752 | + | |
| 1753 | + | |
| 1754 | + | |
| 1755 | + | |
| 1756 | + | |
| 1757 | + | |
| 1758 | + | |
| 1759 | + | |
| 1760 | + | |
| 1761 | + | |
| 1762 | + | |
| 1763 | + | |
| 1764 | + | |
| 1765 | + | |
| 1766 | + | |
| 1767 | + | |
| 1768 | + | |
| 1769 | + | |
| 1770 | + | |
| 1771 | + | |
1751 | 1772 | | |
1752 | 1773 | | |
1753 | 1774 | | |
| |||
0 commit comments