selinux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Richard Haines <richard_c_haines@btinternet.com>
To: selinux@vger.kernel.org, paul@paul-moore.com
Cc: Richard Haines <richard_c_haines@btinternet.com>
Subject: [PATCH V2 0/2] selinux-testsuite: Add BPF tests
Date: Thu,  1 Aug 2019 12:12:12 +0100	[thread overview]
Message-ID: <20190801111212.5536-1-richard_c_haines@btinternet.com> (raw)

Patch 1 Runs basic checks for BPF with map_create, map_read, map_write,
prog_load and prog_run permissions.

Patch 2 Updates fdreceive to test BPF security_file_receive() path using
the common BPF code in tests/bpf.

If these are okay, I'll do the binder BPF tests for the
security_binder_transfer_file() path.

Are there any other SELinux BPF areas that need testing ??

Richard Haines (2):
  selinux-testsuite: Add BPF tests
  selinux-testsuite: Add BPF support to fdreceive test

 README.md                    |  4 +-
 defconfig                    |  5 ++
 policy/Makefile              |  4 ++
 policy/test_bpf.te           | 77 ++++++++++++++++++++++++++++
 policy/test_fdreceive_bpf.te | 60 ++++++++++++++++++++++
 tests/Makefile               |  4 ++
 tests/bpf/.gitignore         |  2 +
 tests/bpf/Makefile           | 12 +++++
 tests/bpf/bpf_common.c       | 99 ++++++++++++++++++++++++++++++++++++
 tests/bpf/bpf_test.c         | 83 ++++++++++++++++++++++++++++++
 tests/bpf/test               | 57 +++++++++++++++++++++
 tests/fdreceive/Makefile     | 18 ++++++-
 tests/fdreceive/client.c     | 72 ++++++++++++++++++++++----
 tests/fdreceive/test         | 51 +++++++++++++++++--
 tools/check-syntax           |  2 +-
 tools/chk_c_exclude          |  1 +
 16 files changed, 532 insertions(+), 19 deletions(-)
 create mode 100644 policy/test_bpf.te
 create mode 100644 policy/test_fdreceive_bpf.te
 create mode 100644 tests/bpf/.gitignore
 create mode 100644 tests/bpf/Makefile
 create mode 100644 tests/bpf/bpf_common.c
 create mode 100644 tests/bpf/bpf_test.c
 create mode 100755 tests/bpf/test
 create mode 100644 tools/chk_c_exclude

-- 
2.21.0


             reply	other threads:[~2019-08-01 14:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-01 11:12 Richard Haines [this message]
2019-08-09 15:27 ` [PATCH V2 0/2] selinux-testsuite: Add BPF tests Paul Moore
     [not found]   ` <28c7002e0482babaad5a56ea8ceeb26c11706364.camel@btinternet.com>
2019-08-12 22:34     ` Paul Moore

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190801111212.5536-1-richard_c_haines@btinternet.com \
    --to=richard_c_haines@btinternet.com \
    --cc=paul@paul-moore.com \
    --cc=selinux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).