The man page gives the following signature
int procctl(idtype_t idtype, id_t id, int cmd, void *arg);
(note the name of the last argument, 'arg').
In the following descriptions 'arg' is used for PROC_ASLR_CTL, PROC_ASLR_STATUS, PROC_SPROTECT.
PROC_REAP_ACQUIRE seems not to use the 4th argument.
Then the 7 following descriptions starting with PROC_REAP_STATUS use 'data'
PROC_PDEATHSIG_STATUS switches back to 'arg'. And the last two are 'data' again.
I see that syscalls.master calls the last argument 'data', so there seems to be a mix of the signature given in the man page and the one in syscalls.master.
I think that it would be clearer to use 'arg' consistently.
Thanks a lot for the report!
procctl(2) in -current seems to have settled on "data" throughout instead, except that PROC_PDEATHSIG_CTL and PROC_PDEATHSIG_STATUS still use "arg".
A commit references this bug:
Date: Sat Jul 11 18:04:09 UTC 2020
New revision: 363104
procctl(2): consistently refer to the last agrument as 'data'
Some older references called it 'arg'
Also fix a syntax error that was underlining an entire sentence.
Reported by: Paul Floyd <email@example.com>, PauAmma (research)
MFC after: 2 weeks
Sponsored by: Klara Inc.
This was MFC'd back to 12.2, so closing.