Re: [BUG] Deadlock triggered by bpfsnoop funcgraph feature

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

 




On 30/8/25 02:08, Alexei Starovoitov wrote:
> On Thu, Aug 28, 2025 at 7:21 PM Leon Hwang <hffilwlqm@xxxxxxxxx> wrote:
>>
>>
>>>
>>>> Independently it would be good to make noinstr/notrace to include __cpuidle
>>>> functions. I think right now it's allowed to attach to default_idle()
>>>> which is causing issues.
>>
>> Nope.
>> ./bpfsnoop -k 'default_idle' -k '__cpuidle' --show-func-proto
>> void default_idle();
> 
> hmm. indeed.
> 
> Jiri,
> 
> why do we still have this in selftest ?
> 
> static bool skip_entry(char *name)
> {
>         /*
>          * We attach to almost all kernel functions and some of them
>          * will cause 'suspicious RCU usage' when fprobe is attached
>          * to them. Filter out the current culprits - arch_cpu_idle
>          * default_idle and rcu_* functions.
>          */
>         if (!strcmp(name, "arch_cpu_idle"))
>                 return true;
>         if (!strcmp(name, "default_idle"))
>                 return true;

After removing "arch_cpu_idle" and "default_idle", it's OK to run the
selftest:

./test_progs -t kprobe_multi_test
#155/1   kprobe_multi_test/skel_api:OK
#155/2   kprobe_multi_test/link_api_addrs:OK
#155/3   kprobe_multi_test/link_api_syms:OK
#155/4   kprobe_multi_test/attach_api_pattern:OK
#155/5   kprobe_multi_test/attach_api_addrs:OK
#155/6   kprobe_multi_test/attach_api_syms:OK
#155/7   kprobe_multi_test/attach_api_fails:OK
#155/8   kprobe_multi_test/attach_override:OK
#155/9   kprobe_multi_test/session:OK
#155/10  kprobe_multi_test/session_cookie:OK
#155/11  kprobe_multi_test/unique_match:OK
#155/12  kprobe_multi_test/kprobe_session_return_0:OK
#155/13  kprobe_multi_test/kprobe_session_return_1:OK
#155/14  kprobe_multi_test/kprobe_session_return_2:OK
#155     kprobe_multi_test:OK
#156/1   kprobe_multi_testmod_test/testmod_attach_api_syms:OK
#156/2   kprobe_multi_testmod_test/testmod_attach_api_addrs:OK
#156     kprobe_multi_testmod_test:OK
Summary: 2/16 PASSED, 0 SKIPPED, 0 FAILED

Thanks,
Leon





[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