linux-security-module.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH bpf-next 0/4] Make inode storage available to tracing prog
@ 2024-11-12  8:25 Song Liu
  2024-11-12  8:25 ` [PATCH bpf-next 1/4] bpf: lsm: Remove hook to bpf_task_storage_free Song Liu
                   ` (7 more replies)
  0 siblings, 8 replies; 53+ messages in thread
From: Song Liu @ 2024-11-12  8:25 UTC (permalink / raw)
  To: bpf, linux-fsdevel, linux-kernel, linux-security-module
  Cc: kernel-team, andrii, eddyz87, ast, daniel, martin.lau, viro,
	brauner, jack, kpsingh, mattbobrowski, amir73il, repnop, jlayton,
	josef, mic, gnoack, Song Liu

bpf inode local storage can be useful beyond LSM programs. For example,
bcc/libbpf-tools file* can use inode local storage to simplify the logic.
This set makes inode local storage available to tracing program.

1/4 is missing change for bpf task local storage. 2/4 move inode local
storage from security blob to inode.

Similar to task local storage in tracing program, it is necessary to add
recursion prevention logic for inode local storage. Patch 3/4 adds such
logic, and 4/4 add a test for the recursion prevention logic.

Song Liu (4):
  bpf: lsm: Remove hook to bpf_task_storage_free
  bpf: Make bpf inode storage available to tracing program
  bpf: Add recursion prevention logic for inode storage
  selftest/bpf: Test inode local storage recursion prevention

 fs/inode.c                                    |   1 +
 include/linux/bpf.h                           |   9 +
 include/linux/bpf_lsm.h                       |  29 ---
 include/linux/fs.h                            |   4 +
 kernel/bpf/Makefile                           |   3 +-
 kernel/bpf/bpf_inode_storage.c                | 185 +++++++++++++-----
 kernel/bpf/bpf_lsm.c                          |   4 -
 kernel/trace/bpf_trace.c                      |   8 +
 security/bpf/hooks.c                          |   7 -
 tools/testing/selftests/bpf/DENYLIST.s390x    |   1 +
 .../bpf/prog_tests/inode_local_storage.c      |  72 +++++++
 .../bpf/progs/inode_storage_recursion.c       |  90 +++++++++
 12 files changed, 320 insertions(+), 93 deletions(-)
 create mode 100644 tools/testing/selftests/bpf/prog_tests/inode_local_storage.c
 create mode 100644 tools/testing/selftests/bpf/progs/inode_storage_recursion.c

--
2.43.5

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

end of thread, other threads:[~2024-11-25 20:49 UTC | newest]

Thread overview: 53+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-12  8:25 [PATCH bpf-next 0/4] Make inode storage available to tracing prog Song Liu
2024-11-12  8:25 ` [PATCH bpf-next 1/4] bpf: lsm: Remove hook to bpf_task_storage_free Song Liu
2024-11-12  8:25 ` [PATCH bpf-next 2/4] bpf: Make bpf inode storage available to tracing program Song Liu
2024-11-13 10:19   ` Christian Brauner
2024-11-13 14:15     ` Song Liu
2024-11-13 18:29       ` Casey Schaufler
2024-11-13 19:00         ` Song Liu
2024-11-21  9:04       ` Christian Brauner
2024-11-14 21:11     ` Song Liu
2024-11-15 11:19       ` Jan Kara
2024-11-15 17:35         ` Song Liu
2024-11-19 14:21           ` Jeff Layton
2024-11-19 15:25             ` Amir Goldstein
2024-11-19 15:30               ` Amir Goldstein
2024-11-19 21:53                 ` Song Liu
2024-11-20  9:19                   ` Amir Goldstein
2024-11-20  9:28                   ` Christian Brauner
2024-11-20 11:19                     ` Amir Goldstein
2024-11-21  8:43                       ` Christian Brauner
2024-11-21 13:48                       ` Jeff Layton
2024-11-21  8:08                     ` Song Liu
2024-11-21  9:14         ` Christian Brauner
2024-11-23  0:08           ` Alexei Starovoitov
2024-11-12  8:25 ` [PATCH bpf-next 3/4] bpf: Add recursion avoid logic for inode storage Song Liu
2024-11-12  8:25 ` [PATCH bpf-next 3/4] bpf: Add recursion prevention " Song Liu
2024-11-12  8:25 ` [PATCH bpf-next 4/4] selftest/bpf: Add test for inode local storage recursion Song Liu
2024-11-12  8:26 ` [PATCH bpf-next 4/4] selftest/bpf: Test inode local storage recursion prevention Song Liu
2024-11-12  8:35 ` [PATCH bpf-next 0/4] Make inode storage available to tracing prog Song Liu
2024-11-12 18:09 ` Casey Schaufler
2024-11-12 18:44   ` Song Liu
2024-11-13  1:10     ` Casey Schaufler
2024-11-13  1:37       ` Song Liu
2024-11-13 18:06         ` Casey Schaufler
2024-11-13 18:57           ` Song Liu
2024-11-14 16:36             ` Dr. Greg
2024-11-14 17:29               ` Casey Schaufler
2024-11-14 18:08                 ` Song Liu
2024-11-14 21:49                   ` James Bottomley
2024-11-14 22:30                     ` Song Liu
2024-11-17 22:59                     ` Song Liu
2024-11-19 12:27                       ` Dr. Greg
2024-11-19 18:14                         ` Casey Schaufler
2024-11-19 22:35                           ` Song Liu
2024-11-20 16:54                           ` Dr. Greg
2024-11-21  8:28                             ` Song Liu
2024-11-21 16:02                               ` Dr. Greg
2024-11-21 18:11                                 ` Casey Schaufler
2024-11-23 17:01                                   ` Dr. Greg
2024-11-25 20:49                                     ` Casey Schaufler
2024-11-21 17:47                               ` Casey Schaufler
2024-11-21 18:28                                 ` Song Liu
2024-11-23 19:11                     ` Paul Moore
2024-11-14 17:51               ` Song Liu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).