[PATCH bpf-next v4 0/2] Fix bpf_strnstr len error

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

 



From: Rong Tao <rongtao@xxxxxxxx>

Fix bpf_strnstr() wrong 'len' parameter, bpf_strnstr("open", "open", 4)
should return 0 instead of -ENOENT.

Rong Tao (2):
  bpf/helpers: bpf_strnstr: Exact match length
  selftests/bpf: Add tests for bpf_strnstr

 kernel/bpf/helpers.c                                   | 10 +++++++++-
 .../selftests/bpf/progs/string_kfuncs_success.c        |  8 ++++++--
 2 files changed, 15 insertions(+), 3 deletions(-)

---
v4: Add comment and more selftests;
v3: Fix selftests/bpf error in v2, sorry about that;
    https://lore.kernel.org/lkml/tencent_69BD268FBA201219240B51661D5E96A8D80A@xxxxxx/
v2: Follow Andrii Nakryiko's advise, fix the 'wrong fix';
    https://lore.kernel.org/lkml/tencent_DF4DA83EEBFB9246E5E3357BB40911CCA005@xxxxxx/
v1: https://lore.kernel.org/lkml/tencent_65E5988AD52BEC280D22964189505CD6ED06@xxxxxx/
-- 
2.51.0





[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