On Wed, Jan 25, 2023 at 10:38:17PM +0100, Ilya Leoshkevich wrote: > + > + /* Sign-extend the kfunc arguments. */ > + if (insn->src_reg == BPF_PSEUDO_KFUNC_CALL) { > + m = bpf_jit_find_kfunc_model(fp, insn); > + if (!m) > + return -1; > + > + for (j = 0; j < m->nr_args; j++) { > + if (sign_extend(jit, BPF_REG_1 + j, > + m->arg_size[j], > + m->arg_flags[j])) > + return -1; > + } > + } Is this because s390 doesn't have subregisters? Could you give an example where it's necessary? I'm guessing a bpf prog compiled with alu32 and operates on signed int that is passed into a kfunc that expects 'int' in 64-bit reg? > > +bool bpf_jit_supports_kfunc_call(void) > +{ > + return true; > +} Timely :) Thanks for working it.