mbox series

[V2,bpf-next,0/3] bpf: use 32bit safe version of u64_stats

Message ID 20211026214133.3114279-1-eric.dumazet@gmail.com (mailing list archive)
Headers show
Series bpf: use 32bit safe version of u64_stats | expand

Message

Eric Dumazet Oct. 26, 2021, 9:41 p.m. UTC
From: Eric Dumazet <edumazet@google.com>

Two first patches fix bugs added in 5.1 and 5.5

Third patch replaces the u64 fields in struct bpf_prog_stats
with u64_stats_t ones to avoid possible sampling errors,
in case of load/store stearing.

Eric Dumazet (3):
  bpf: avoid races in __bpf_prog_run() for 32bit arches
  bpf: fixes possible race in update_prog_stats() for 32bit arches
  bpf: use u64_stats_t in struct bpf_prog_stats

 include/linux/filter.h  | 15 ++++++++-------
 kernel/bpf/syscall.c    | 18 ++++++++++++------
 kernel/bpf/trampoline.c | 12 +++++++-----
 3 files changed, 27 insertions(+), 18 deletions(-)

Comments

Alexei Starovoitov Oct. 27, 2021, 6:17 p.m. UTC | #1
On Tue, Oct 26, 2021 at 2:41 PM Eric Dumazet <eric.dumazet@gmail.com> wrote:
>
> From: Eric Dumazet <edumazet@google.com>
>
> Two first patches fix bugs added in 5.1 and 5.5
>
> Third patch replaces the u64 fields in struct bpf_prog_stats
> with u64_stats_t ones to avoid possible sampling errors,
> in case of load/store stearing.

Applied to bpf-next. Thanks!