linux-integrity.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Roberto Sassu <roberto.sassu@huawei.com>
To: Mimi Zohar <zohar@linux.ibm.com>,
	"shuah@kernel.org" <shuah@kernel.org>,
	"ast@kernel.org" <ast@kernel.org>,
	"daniel@iogearbox.net" <daniel@iogearbox.net>,
	"andrii@kernel.org" <andrii@kernel.org>,
	"yhs@fb.com" <yhs@fb.com>,
	"kpsingh@kernel.org" <kpsingh@kernel.org>,
	"revest@chromium.org" <revest@chromium.org>,
	"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>
Cc: "linux-integrity@vger.kernel.org"
	<linux-integrity@vger.kernel.org>,
	"linux-security-module@vger.kernel.org" 
	<linux-security-module@vger.kernel.org>,
	"linux-kselftest@vger.kernel.org"
	<linux-kselftest@vger.kernel.org>,
	"bpf@vger.kernel.org" <bpf@vger.kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH v3 0/9] bpf-lsm: Extend interoperability with IMA
Date: Mon, 7 Mar 2022 10:31:52 +0000	[thread overview]
Message-ID: <54a2b65856e4439f9170dfd86bbeb975@huawei.com> (raw)
In-Reply-To: <9be81980b1849dc60b46ad0672b667b6b5365f2d.camel@linux.ibm.com>

> From: Mimi Zohar [mailto:zohar@linux.ibm.com]
> Sent: Sunday, March 6, 2022 8:24 PM
> On Wed, 2022-03-02 at 12:13 +0100, Roberto Sassu wrote:
> > Extend the interoperability with IMA, to give wider flexibility for the
> > implementation of integrity-focused LSMs based on eBPF.
> >
> > Patch 1 fixes some style issues.
> >
> > Patches 2-6 give the ability to eBPF-based LSMs to take advantage of the
> > measurement capability of IMA without needing to setup a policy in IMA
> > (those LSMs might implement the policy capability themselves).
> >
> > Patches 7-9 allow eBPF-based LSMs to evaluate files read by the kernel.
> 
> The tests seem to only work when neither a builtin IMA policy or a
> custom policy is previously loaded.

Hi Mimi

unfortunately yes. If there are more generic rules,
the number of samples differs from that expected.

For example, if you have an existing rule like:

measure func=BPRM_CHECK mask=MAY_EXEC

you will have:

test_test_ima:PASS:run_measured_process #1 0 nsec
test_test_ima:FAIL:num_samples_or_err unexpected
                num_samples_or_err: actual 2 != expected 1

Test #1 fails because also ima_setup.sh is measured.

Thanks

Roberto

HUAWEI TECHNOLOGIES Duesseldorf GmbH, HRB 56063
Managing Director: Li Peng, Zhong Ronghua

  reply	other threads:[~2022-03-07 11:08 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-02 11:13 [PATCH v3 0/9] bpf-lsm: Extend interoperability with IMA Roberto Sassu
2022-03-02 11:13 ` [PATCH v3 1/9] ima: Fix documentation-related warnings in ima_main.c Roberto Sassu
2022-03-06 19:24   ` Mimi Zohar
2022-03-02 11:13 ` [PATCH v3 2/9] ima: Always return a file measurement in ima_file_hash() Roberto Sassu
2022-03-06 19:31   ` Mimi Zohar
2022-03-02 11:13 ` [PATCH v3 3/9] bpf-lsm: Introduce new helper bpf_ima_file_hash() Roberto Sassu
2022-03-02 11:13 ` [PATCH v3 4/9] selftests/bpf: Move sample generation code to ima_test_common() Roberto Sassu
2022-03-02 11:14 ` [PATCH v3 5/9] selftests/bpf: Add test for bpf_ima_file_hash() Roberto Sassu
2022-03-02 11:14 ` [PATCH v3 6/9] selftests/bpf: Check if the digest is refreshed after a file write Roberto Sassu
2022-03-02 11:14 ` [PATCH v3 7/9] bpf-lsm: Make bpf_lsm_kernel_read_file() as sleepable Roberto Sassu
2022-03-02 11:14 ` [PATCH v3 8/9] selftests/bpf: Add test for bpf_lsm_kernel_read_file() Roberto Sassu
2022-03-02 11:14 ` [PATCH v3 9/9] selftests/bpf: Check that bpf_kernel_read_file() denies reading IMA policy Roberto Sassu
2022-03-02 22:20 ` [PATCH v3 0/9] bpf-lsm: Extend interoperability with IMA Alexei Starovoitov
2022-03-03 10:07   ` Roberto Sassu
2022-03-03 16:05   ` Mimi Zohar
2022-03-03 16:17     ` KP Singh
2022-03-03 16:29       ` Mimi Zohar
2022-03-03 18:14         ` KP Singh
2022-03-03 19:13           ` Mimi Zohar
2022-03-03 22:39             ` Alexei Starovoitov
2022-03-07  2:56               ` Mimi Zohar
2022-03-07 13:17                 ` KP Singh
2022-03-07 20:44                   ` Mimi Zohar
2022-03-06 19:23 ` Mimi Zohar
2022-03-07 10:31   ` Roberto Sassu [this message]
2022-03-11  3:20 ` patchwork-bot+netdevbpf

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=54a2b65856e4439f9170dfd86bbeb975@huawei.com \
    --to=roberto.sassu@huawei.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=kpsingh@kernel.org \
    --cc=linux-integrity@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=revest@chromium.org \
    --cc=shuah@kernel.org \
    --cc=yhs@fb.com \
    --cc=zohar@linux.ibm.com \
    /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).