Re: [PATCH bpf] xdp: use flags field to disambiguate broadcast redirect

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

 



On 4/20/24 3:24 AM, Toke Høiland-Jørgensen wrote:
  From reading the "waits for...NAPI being the relevant context here..." comment
in dev_map_free(), I wonder if moving synchronize_rcu() before
bpf_clear_redirect_map() would also work? Actually, does it need to call
bpf_clear_redirect_map(). The on-going xdp_do_redirect() should be the last one
using the map in ri->map anyway and no xdp prog can set it again to
  ri->map.
I think we do need to retain the current behaviour, because of the
decoupling between the helper and the return code. Otherwise, you could

Forgot there could be a disconnect here.

Applied. Thanks.

have a program that calls the bpf_redirect_map() helper, but returns a
different value (say, XDP_DROP). In this case, the map pointer will
stick around in struct bpf_redirect_info, and if a subsequent XDP
program then returns XDP_REDIRECT (*without*  calling
bpf_redirect_map()), it will use the stale pointer value and cause a





[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