BPF_PSEUDO_CALL function calls are not allowed while holding a lock

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi -

I'd like to be able to hold a BPF spinlock and call a static function elsewhere in my BPF program.

Depending on whether the compiler chooses to inline a function or not, I'll get a verifier error like:

	573: (85) call pc+126
	function calls are not allowed while holding a lock

I think that's considered a BPF_PSEUDO_CALL.

I can get around it by sprinkling __attribute__((always_inline)) all over the place, subject to the compiler actually inlining my functions.

Would it be possible for the verifier to maintain the env->cur_state->active_lock.ptr state or something across those calls?

Thanks,
Barret




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux