Linux fsverity development list
 help / color / mirror / Atom feed
* [PATCH bpf-next 0/5] bpf: file verification with LSM and fsverity
@ 2023-10-13 18:26 Song Liu
  2023-10-13 18:26 ` [PATCH bpf-next 1/5] bpf: Add kfunc bpf_get_file_xattr Song Liu
                   ` (4 more replies)
  0 siblings, 5 replies; 24+ messages in thread
From: Song Liu @ 2023-10-13 18:26 UTC (permalink / raw)
  To: bpf, fsverity
  Cc: ast, daniel, andrii, martin.lau, kernel-team, ebiggers, tytso,
	roberto.sassu, Song Liu

This set enables file verification with BPF LSM and fsverity.

In this solution, fsverity is used to provide reliable and efficient hash
of files; and BPF LSM is used to implement signature verification (against
asymmetric keys), and to enforce access control.

This solution can be used to implement access control in complicated cases.
For example: only signed python binary and signed python script and access
special files/devices/ports.

Thanks,
Song

Song Liu (5):
  bpf: Add kfunc bpf_get_file_xattr
  bpf, fsverity: Add kfunc bpf_get_fsverity_digest
  selftests/bpf: Sort config in alphabetic order
  selftests/bpf: Add tests for filesystem kfuncs
  selftests/bpf: Add test that use fsverity and xattr to sign a file

 fs/verity/measure.c                           |  66 +++++++
 include/linux/bpf.h                           |  12 ++
 kernel/trace/bpf_trace.c                      |  44 +++++
 tools/testing/selftests/bpf/bpf_kfuncs.h      |  10 ++
 tools/testing/selftests/bpf/config            |   3 +-
 .../selftests/bpf/prog_tests/fs_kfuncs.c      | 132 ++++++++++++++
 .../bpf/prog_tests/verify_pkcs7_sig.c         | 163 +++++++++++++++++-
 .../selftests/bpf/progs/test_fsverity.c       |  46 +++++
 .../selftests/bpf/progs/test_get_xattr.c      |  39 +++++
 .../selftests/bpf/progs/test_sig_in_xattr.c   |  84 +++++++++
 .../bpf/progs/test_verify_pkcs7_sig.c         |   8 +-
 .../testing/selftests/bpf/verify_sig_setup.sh |  25 +++
 12 files changed, 623 insertions(+), 9 deletions(-)
 create mode 100644 tools/testing/selftests/bpf/prog_tests/fs_kfuncs.c
 create mode 100644 tools/testing/selftests/bpf/progs/test_fsverity.c
 create mode 100644 tools/testing/selftests/bpf/progs/test_get_xattr.c
 create mode 100644 tools/testing/selftests/bpf/progs/test_sig_in_xattr.c

--
2.34.1

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

end of thread, other threads:[~2023-11-02  1:19 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-13 18:26 [PATCH bpf-next 0/5] bpf: file verification with LSM and fsverity Song Liu
2023-10-13 18:26 ` [PATCH bpf-next 1/5] bpf: Add kfunc bpf_get_file_xattr Song Liu
2023-10-17 18:58   ` Andrii Nakryiko
2023-10-17 20:31     ` Song Liu
2023-10-17 21:52       ` Andrii Nakryiko
2023-10-17 22:16         ` Song Liu
2023-10-17 22:40           ` Andrii Nakryiko
2023-10-17 22:46             ` Song Liu
2023-10-18  1:42       ` Hou Tao
2023-10-17 19:10   ` Alexei Starovoitov
2023-11-02  1:19     ` KP Singh
2023-10-13 18:26 ` [PATCH bpf-next 2/5] bpf, fsverity: Add kfunc bpf_get_fsverity_digest Song Liu
2023-10-15  7:07   ` Eric Biggers
2023-10-16 20:10     ` Song Liu
2023-10-17  3:12       ` Eric Biggers
2023-10-17  5:35         ` Song Liu
2023-10-17  5:46           ` Eric Biggers
2023-10-17 14:16             ` Song Liu
2023-10-17 19:50   ` Andrii Nakryiko
2023-10-13 18:26 ` [PATCH bpf-next 3/5] selftests/bpf: Sort config in alphabetic order Song Liu
2023-10-13 18:26 ` [PATCH bpf-next 4/5] selftests/bpf: Add tests for filesystem kfuncs Song Liu
2023-10-13 18:26 ` [PATCH bpf-next 5/5] selftests/bpf: Add test that use fsverity and xattr to sign a file Song Liu
2023-10-17 19:08   ` Alexei Starovoitov
2023-10-17 20: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