[Toybox] [PATCH] taskset: fix buffer overflow from long mask
Jesse Rosenstock
jmr at google.com
Mon Jul 7 08:29:22 PDT 2025
On Mon, Jun 23, 2025 at 10:22 PM Rob Landley <rob at landley.net> wrote:
> Oh, and here's another fun one. If I tell a process to run on a specific
> processor and then try to ask ps -o cpu= what processor it's running on,
> toybox ps tells me but gnu ps always says "-".
You can use psr=, which both procps and toybox support.
procps has so many aliases for this that they missed one (with an
ancient HP-UX FIXME).
https://gitlab.com/procps-ng/procps/-/blob/21db82c7e30f/src/ps/output.c#L1700
I'm trying to add "cpu" support in
https://gitlab.com/procps-ng/procps/-/merge_requests/258
What to call this seems like something POSIX could standardize.
There's "cpu" (FreeBSD), "psr" (Solaris), "lastcpu" (DragonFly BSD),
"cpuid" (NetBSD/OpenBSD).
More information about the Toybox
mailing list