I'm not sure it's such a code idea to support tailcalls from subprogs
in risc-v.
They're broken on x86-64 and so far several attempts to fix them
were not successful.
If we don't have a fix soon we will disable this feature completely
in the verifier.
In general tailcalling from subprogs is a niche use case.
If there are users they should transition to tail call from main prog only.
https://www.ietf.org/archive/id/draft-ietf-bpf-isa-00.html#program-local-functions discusses program-local functions called via BPF_CALL with src = 0x1.
And there's been a discussion on the Linux kernel mailing list about the interaction between them and tail calls. In https://lore.kernel.org/bpf/1c0c1ede-8595-4420-9f70-004645895a71@huaweicloud.com/T/#mf88008daa42ba22f7d624718ccb2f3871163109a, Alexei writes: