Re: [PATCH] bpf: defer printk() inside __bpf_prog_run()

From: Tetsuo Handa
Date: Tue Jun 25 2024 - 20:02:34 EST


On 2024/06/26 8:56, Alexei Starovoitov wrote:
> You are missing the point. The bug has nothing to do with bpf.

The bug is caused by calling tracing hooks with rq lock held.
If tracing hooks do not exist, this bug does not exist.

> It can happen without any bpf loaded. Exactly the same way.
> should_fail_usercopy() is called on all user accesses.

Not all callers of e.g. should_fail_usercopy() are holding rq lock.