Re: [PATCH bpf-next v10 0/4] bpf: Add bpf_rcu_read_lock() support

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

 



Hello:

This series was applied to bpf/bpf-next.git (master)
by Alexei Starovoitov <ast@xxxxxxxxxx>:

On Wed, 23 Nov 2022 21:32:01 -0800 you wrote:
> Currently, without rcu attribute info in BTF, the verifier treats
> rcu tagged pointer as a normal pointer. This might be a problem
> for sleepable program where rcu_read_lock()/unlock() is not available.
> For example, for a sleepable fentry program, if rcu protected memory
> access is interleaved with a sleepable helper/kfunc, it is possible
> the memory access after the sleepable helper/kfunc might be invalid
> since the object might have been freed then. Even without
> a sleepable helper/kfunc, without rcu_read_lock() protection,
> it is possible that the rcu protected object might be release
> in the middle of bpf program execution which may cause incorrect
> result.
> 
> [...]

Here is the summary with links:
  - [bpf-next,v10,1/4] compiler_types: Define __rcu as __attribute__((btf_type_tag("rcu")))
    https://git.kernel.org/bpf/bpf-next/c/5a0f663f0189
  - [bpf-next,v10,2/4] bpf: Introduce might_sleep field in bpf_func_proto
    https://git.kernel.org/bpf/bpf-next/c/01685c5bddaa
  - [bpf-next,v10,3/4] bpf: Add kfunc bpf_rcu_read_lock/unlock()
    https://git.kernel.org/bpf/bpf-next/c/9bb00b2895cb
  - [bpf-next,v10,4/4] selftests/bpf: Add tests for bpf_rcu_read_lock()
    https://git.kernel.org/bpf/bpf-next/c/48671232fcb8

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html





[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