Re: [PATCH bpf-next v3 3/3] bpf: Add a selftest for bpf_ima_inode_hash

2020-11-27 Thread KP Singh
On Fri, Nov 27, 2020 at 5:29 AM Andrii Nakryiko wrote: > > On Tue, Nov 24, 2020 at 7:16 AM KP Singh wrote: > > > > From: KP Singh > > [...] > > > +cleanup() { > > +local tmp_dir="$1" > > +local mount_img="${tmp_dir}/test.img" > > +local mount_dir="${tmp_dir}/mnt" > > +

Re: [PATCH bpf-next v3 3/3] bpf: Add a selftest for bpf_ima_inode_hash

2020-11-26 Thread Andrii Nakryiko
On Tue, Nov 24, 2020 at 7:16 AM KP Singh wrote: > > From: KP Singh > > The test does the following: > > - Mounts a loopback filesystem and appends the IMA policy to measure > executions only on this file-system. Restricting the IMA policy to a > particular filesystem prevents a system-wide

Re: [PATCH bpf-next v3 3/3] bpf: Add a selftest for bpf_ima_inode_hash

2020-11-26 Thread KP Singh
[...] > > + exit(errno); > > Running test_progs-no-alu32, the test failed as: > > root@arch-fb-vm1:~/net-next/net-next/tools/testing/selftests/bpf > ./test_progs-no_alu32 -t test_ima Note to self: Also start testing test_progs-no_alu32 > > sh: ./ima_setup.sh: No such file or

Re: [PATCH bpf-next v3 3/3] bpf: Add a selftest for bpf_ima_inode_hash

2020-11-25 Thread Yonghong Song
On 11/24/20 7:12 AM, KP Singh wrote: From: KP Singh The test does the following: - Mounts a loopback filesystem and appends the IMA policy to measure executions only on this file-system. Restricting the IMA policy to a particular filesystem prevents a system-wide IMA policy change. -

Re: [PATCH bpf-next v3 3/3] bpf: Add a selftest for bpf_ima_inode_hash

2020-11-25 Thread Mimi Zohar
On Tue, 2020-11-24 at 15:12 +, KP Singh wrote: > From: KP Singh > > The test does the following: > > - Mounts a loopback filesystem and appends the IMA policy to measure > executions only on this file-system. Restricting the IMA policy to a > particular filesystem prevents a system-wide

Re: [PATCH bpf-next v3 3/3] bpf: Add a selftest for bpf_ima_inode_hash

2020-11-24 Thread Mimi Zohar
On Wed, 2020-11-25 at 03:55 +0100, KP Singh wrote: > On Wed, Nov 25, 2020 at 3:20 AM Mimi Zohar wrote: > > > > On Tue, 2020-11-24 at 15:12 +, KP Singh wrote: > > > diff --git a/tools/testing/selftests/bpf/ima_setup.sh > > > b/tools/testing/selftests/bpf/ima_setup.sh > > > new file mode

Re: [PATCH bpf-next v3 3/3] bpf: Add a selftest for bpf_ima_inode_hash

2020-11-24 Thread KP Singh
On Wed, Nov 25, 2020 at 3:20 AM Mimi Zohar wrote: > > On Tue, 2020-11-24 at 15:12 +, KP Singh wrote: > > diff --git a/tools/testing/selftests/bpf/ima_setup.sh > > b/tools/testing/selftests/bpf/ima_setup.sh > > new file mode 100644 > > index ..15490ccc5e55 > > --- /dev/null > >

Re: [PATCH bpf-next v3 3/3] bpf: Add a selftest for bpf_ima_inode_hash

2020-11-24 Thread Mimi Zohar
On Tue, 2020-11-24 at 15:12 +, KP Singh wrote: > diff --git a/tools/testing/selftests/bpf/ima_setup.sh > b/tools/testing/selftests/bpf/ima_setup.sh > new file mode 100644 > index ..15490ccc5e55 > --- /dev/null > +++ b/tools/testing/selftests/bpf/ima_setup.sh > @@ -0,0 +1,80 @@ >

Re: [PATCH bpf-next v3 3/3] bpf: Add a selftest for bpf_ima_inode_hash

2020-11-24 Thread Yonghong Song
On 11/24/20 7:12 AM, KP Singh wrote: From: KP Singh The test does the following: - Mounts a loopback filesystem and appends the IMA policy to measure executions only on this file-system. Restricting the IMA policy to a particular filesystem prevents a system-wide IMA policy change. -

[PATCH bpf-next v3 3/3] bpf: Add a selftest for bpf_ima_inode_hash

2020-11-24 Thread KP Singh
From: KP Singh The test does the following: - Mounts a loopback filesystem and appends the IMA policy to measure executions only on this file-system. Restricting the IMA policy to a particular filesystem prevents a system-wide IMA policy change. - Executes an executable copied to this