Netdev List
 help / color / mirror / Atom feed
* [PATCH v2 bpf-next 0/2] introduce bpf_find_vma
@ 2021-11-04  7:00 Song Liu
  2021-11-04  7:00 ` [PATCH v2 bpf-next 1/2] bpf: introduce helper bpf_find_vma Song Liu
  2021-11-04  7:00 ` [PATCH v2 bpf-next 2/2] selftests/bpf: add tests for bpf_find_vma Song Liu
  0 siblings, 2 replies; 11+ messages in thread
From: Song Liu @ 2021-11-04  7:00 UTC (permalink / raw)
  To: bpf, netdev; +Cc: ast, daniel, andrii, kernel-team, kpsingh, Song Liu

Changes v1 => v2:
1. Share irq_work with stackmap.c. (Daniel)
2. Add tests for illegal writes to task/vma from the callback function.
   (Daniel)
3. Other small fixes.

Add helper bpf_find_vma. This can be used in some profiling use cases. It
might also be useful for LSM.

Song Liu (2):
  bpf: introduce helper bpf_find_vma
  selftests/bpf: add tests for bpf_find_vma

 include/linux/bpf.h                           |   1 +
 include/uapi/linux/bpf.h                      |  20 +++
 kernel/bpf/mmap_unlock_work.h                 |  65 ++++++++++
 kernel/bpf/stackmap.c                         |  71 +++--------
 kernel/bpf/task_iter.c                        |  49 ++++++++
 kernel/bpf/verifier.c                         |  36 ++++++
 kernel/trace/bpf_trace.c                      |   2 +
 tools/include/uapi/linux/bpf.h                |  20 +++
 .../selftests/bpf/prog_tests/find_vma.c       | 115 ++++++++++++++++++
 tools/testing/selftests/bpf/progs/find_vma.c  |  70 +++++++++++
 .../selftests/bpf/progs/find_vma_fail1.c      |  30 +++++
 .../selftests/bpf/progs/find_vma_fail2.c      |  30 +++++
 12 files changed, 454 insertions(+), 55 deletions(-)
 create mode 100644 kernel/bpf/mmap_unlock_work.h
 create mode 100644 tools/testing/selftests/bpf/prog_tests/find_vma.c
 create mode 100644 tools/testing/selftests/bpf/progs/find_vma.c
 create mode 100644 tools/testing/selftests/bpf/progs/find_vma_fail1.c
 create mode 100644 tools/testing/selftests/bpf/progs/find_vma_fail2.c

--
2.30.2

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2021-11-04 21:11 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-04  7:00 [PATCH v2 bpf-next 0/2] introduce bpf_find_vma Song Liu
2021-11-04  7:00 ` [PATCH v2 bpf-next 1/2] bpf: introduce helper bpf_find_vma Song Liu
2021-11-04 16:46   ` Yonghong Song
2021-11-04 20:37   ` kernel test robot
2021-11-04 21:11     ` Song Liu
2021-11-04  7:00 ` [PATCH v2 bpf-next 2/2] selftests/bpf: add tests for bpf_find_vma Song Liu
2021-11-04 16:18   ` Song Liu
2021-11-04 17:07   ` Yonghong Song
2021-11-04 17:17     ` Song Liu
2021-11-04 17:24       ` Yonghong Song
2021-11-04 17:36       ` Song Liu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox