Skip to content

Sleepable local storage

KP Singh bpf 3 versions – Applied

Status from this message: Applied, Thanks

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest2 patches 2 repliesApplied
  2. v22 patches 8 repliesSuperseded
  3. v12 patches 25 repliesSuperseded

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/2bpf: Allow bpf_local_storage to be used by sleepable programsinclude/linux/bpf_local_storage.h kernel/bpf/bpf_inode_storage.c kernel/bpf/bpf_local_storage.c +3 more+62 -161 reply
2/2bpf/selftests: Update local storage selftest for sleepable programstools/testing/selftests/bpf/prog_tests/test_local_storage.c tools/testing/selftests/bpf/progs/local_storage.c+11 -330 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchMartin KaFai Lau
1/2A-b
2/2A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 bpf-next 0/2] Sleepable local storage

Local storage is currently unusable in sleepable helpers. One of the important use cases of local_storage is to attach security (or performance) contextual information to kernel objects in LSM / tracing programs to be used later in the life-cyle of the object.

Sometimes this context can only be gathered from sleepable programs (because it needs accesing __user pointers or helpers like bpf_ima_inode_hash). Allowing local storage to be used from sleepable programs allows such context to be managed with the benefits of local_storage.

# v2 -> v3

* Fixed some RCU issues pointed by Martin
* Added Martin's ack

# v1 -> v2

* Generalize RCU checks (will send a separate patch for updating non local storage code where this can be used).
* Add missing RCU lock checks from v1

KP Singh (2):
bpf: Allow bpf_local_storage to be used by sleepable programs bpf/selftests: Update local storage selftest for sleepable programs

 include/linux/bpf_local_storage.h             |  5 ++
 kernel/bpf/bpf_inode_storage.c                |  6 ++-
 kernel/bpf/bpf_local_storage.c                | 50 ++++++++++++++-----
 kernel/bpf/bpf_task_storage.c                 |  6 ++-
 kernel/bpf/verifier.c                         |  3 ++
 net/core/bpf_sk_storage.c                     |  8 ++-
 .../bpf/prog_tests/test_local_storage.c       | 20 +++-----
 .../selftests/bpf/progs/local_storage.c       | 24 ++-------
 8 files changed, 73 insertions(+), 49 deletions(-)
Signature · 1 line
2.34.1.448.ga2b2bfdf31-goog