Well yes you don't get it with a parameter you get it with this helper function while in those contexts `bpf_get_current_pid_tgid`.
Edit to provide link: https://elixir.bootlin.com/linux/v4.6/source/samples/bpf/bpf...
Edit to provide link: https://elixir.bootlin.com/linux/v4.6/source/samples/bpf/bpf...
Furthermore, the process ID is not yet identified at early inbound stage of EBPD. We would be talking about being past the pre-inbound stage, post-table-lookup stage, and specifically just during the input-to-user land stage.