bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH bpf-next v3 0/4] Fixes for ima selftest
@ 2020-12-03  0:58 KP Singh
  2020-12-03  0:58 ` [PATCH bpf-next v3 1/4] selftests/bpf: Update ima_setup.sh for busybox KP Singh
                   ` (4 more replies)
  0 siblings, 5 replies; 19+ messages in thread
From: KP Singh @ 2020-12-03  0:58 UTC (permalink / raw)
  To: bpf; +Cc: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko

From: KP Singh <kpsingh@google.com>

# v2 -> v3

* Added missing tags.
* Indentation fixes + some other fixes suggested by Andrii.
* Re-indent file to tabs.

# What?

* Fixes to work in busybox shell (tested on the one used by BPF CI).
* Ensure that securityfs is mounted before updating the ima policy
* Add missing config deps.


KP Singh (4):
  selftests/bpf: Update ima_setup.sh for busybox
  selftests/bpf: Ensure securityfs mount before writing ima policy
  selftests/bpf: Add config dependency on BLK_DEV_LOOP
  selftests/bpf: Indent ima_setup.sh with tabs.

 tools/testing/selftests/bpf/config       |   1 +
 tools/testing/selftests/bpf/ima_setup.sh | 107 +++++++++++++----------
 2 files changed, 64 insertions(+), 44 deletions(-)

-- 
2.29.2.576.ga3fc446d84-goog


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

* [PATCH bpf-next v3 1/4] selftests/bpf: Update ima_setup.sh for busybox
  2020-12-03  0:58 [PATCH bpf-next v3 0/4] Fixes for ima selftest KP Singh
@ 2020-12-03  0:58 ` KP Singh
  2020-12-03  5:52   ` Andrii Nakryiko
  2020-12-03  0:58 ` [PATCH bpf-next v3 2/4] selftests/bpf: Ensure securityfs mount before writing ima policy KP Singh
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 19+ messages in thread
From: KP Singh @ 2020-12-03  0:58 UTC (permalink / raw)
  To: bpf; +Cc: Andrii Nakryiko, Alexei Starovoitov, Daniel Borkmann

From: KP Singh <kpsingh@google.com>

* losetup on busybox does not output the name of loop device on using
  -f with --show. It also dosn't support -j to find the loop devices
  for a given backing file. losetup is updated to use "-a" which is
  available on busybox.
* blkid does not support options (-s and -o) to only display the uuid.
* Not all environments have mkfs.ext4, the test requires a loop device
  with a backing image file which could formatted with any filesystem.
  Update to using mkfs.ext2 which is available on busybox.

Fixes: 34b82d3ac105 ("bpf: Add a selftest for bpf_ima_inode_hash")
Reported-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: KP Singh <kpsingh@google.com>
---
 tools/testing/selftests/bpf/ima_setup.sh | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/tools/testing/selftests/bpf/ima_setup.sh b/tools/testing/selftests/bpf/ima_setup.sh
index 15490ccc5e55..137f2d32598f 100755
--- a/tools/testing/selftests/bpf/ima_setup.sh
+++ b/tools/testing/selftests/bpf/ima_setup.sh
@@ -3,6 +3,7 @@
 
 set -e
 set -u
+set -o pipefail
 
 IMA_POLICY_FILE="/sys/kernel/security/ima/policy"
 TEST_BINARY="/bin/true"
@@ -23,13 +24,15 @@ setup()
 
         dd if=/dev/zero of="${mount_img}" bs=1M count=10
 
-        local loop_device="$(losetup --find --show ${mount_img})"
+        losetup -f "${mount_img}"
+        local loop_device=$(losetup -a | grep ${mount_img:?} | cut -d ":" -f1)
 
-        mkfs.ext4 "${loop_device}"
+        mkfs.ext2 "${loop_device:?}"
         mount "${loop_device}" "${mount_dir}"
 
         cp "${TEST_BINARY}" "${mount_dir}"
-        local mount_uuid="$(blkid -s UUID -o value ${loop_device})"
+        local mount_uuid="$(blkid ${loop_device} | sed 's/.*UUID="\([^"]*\)".*/\1/')"
+
         echo "measure func=BPRM_CHECK fsuuid=${mount_uuid}" > ${IMA_POLICY_FILE}
 }
 
@@ -38,7 +41,8 @@ cleanup() {
         local mount_img="${tmp_dir}/test.img"
         local mount_dir="${tmp_dir}/mnt"
 
-        local loop_devices=$(losetup -j ${mount_img} -O NAME --noheadings)
+        local loop_devices=$(losetup -a | grep ${mount_img:?} | cut -d ":" -f1)
+
         for loop_dev in "${loop_devices}"; do
                 losetup -d $loop_dev
         done
-- 
2.29.2.576.ga3fc446d84-goog


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

* [PATCH bpf-next v3 2/4] selftests/bpf: Ensure securityfs mount before writing ima policy
  2020-12-03  0:58 [PATCH bpf-next v3 0/4] Fixes for ima selftest KP Singh
  2020-12-03  0:58 ` [PATCH bpf-next v3 1/4] selftests/bpf: Update ima_setup.sh for busybox KP Singh
@ 2020-12-03  0:58 ` KP Singh
  2020-12-03  5:53   ` Andrii Nakryiko
  2020-12-03  0:58 ` [PATCH bpf-next v3 3/4] selftests/bpf: Add config dependency on BLK_DEV_LOOP KP Singh
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 19+ messages in thread
From: KP Singh @ 2020-12-03  0:58 UTC (permalink / raw)
  To: bpf; +Cc: Andrii Nakryiko, Alexei Starovoitov, Daniel Borkmann

From: KP Singh <kpsingh@google.com>

SecurityFS may not be mounted even if it is enabled in the kernel
config.

Fixes: 34b82d3ac105 ("bpf: Add a selftest for bpf_ima_inode_hash")
Reported-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: KP Singh <kpsingh@google.com>
---
 tools/testing/selftests/bpf/ima_setup.sh | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/tools/testing/selftests/bpf/ima_setup.sh b/tools/testing/selftests/bpf/ima_setup.sh
index 137f2d32598f..b1ee4bf06996 100755
--- a/tools/testing/selftests/bpf/ima_setup.sh
+++ b/tools/testing/selftests/bpf/ima_setup.sh
@@ -14,6 +14,20 @@ usage()
         exit 1
 }
 
+ensure_mount_securityfs()
+{
+        local securityfs_dir=$(grep "securityfs" /proc/mounts | awk '{print $2}')
+
+        if [ -z "${securityfs_dir}" ]; then
+                securityfs_dir=/sys/kernel/security
+                mount -t securityfs security "${securityfs_dir}"
+        fi
+
+        if [ ! -d "${securityfs_dir}" ]; then
+                echo "${securityfs_dir}: securityfs is not mounted" && exit 1
+        fi
+}
+
 setup()
 {
         local tmp_dir="$1"
@@ -33,6 +47,7 @@ setup()
         cp "${TEST_BINARY}" "${mount_dir}"
         local mount_uuid="$(blkid ${loop_device} | sed 's/.*UUID="\([^"]*\)".*/\1/')"
 
+        ensure_mount_securityfs
         echo "measure func=BPRM_CHECK fsuuid=${mount_uuid}" > ${IMA_POLICY_FILE}
 }
 
-- 
2.29.2.576.ga3fc446d84-goog


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

* [PATCH bpf-next v3 3/4] selftests/bpf: Add config dependency on BLK_DEV_LOOP
  2020-12-03  0:58 [PATCH bpf-next v3 0/4] Fixes for ima selftest KP Singh
  2020-12-03  0:58 ` [PATCH bpf-next v3 1/4] selftests/bpf: Update ima_setup.sh for busybox KP Singh
  2020-12-03  0:58 ` [PATCH bpf-next v3 2/4] selftests/bpf: Ensure securityfs mount before writing ima policy KP Singh
@ 2020-12-03  0:58 ` KP Singh
  2020-12-03  5:56   ` Andrii Nakryiko
  2020-12-03  0:58 ` [PATCH bpf-next v3 4/4] selftests/bpf: Indent ima_setup.sh with tabs KP Singh
  2020-12-03  5:43 ` [PATCH bpf-next v3 0/4] Fixes for ima selftest Andrii Nakryiko
  4 siblings, 1 reply; 19+ messages in thread
From: KP Singh @ 2020-12-03  0:58 UTC (permalink / raw)
  To: bpf; +Cc: Andrii Nakryiko, Alexei Starovoitov, Daniel Borkmann

From: KP Singh <kpsingh@google.com>

The ima selftest restricts its scope to a test filesystem image
mounted on a loop device and prevents permanent ima policy changes for
the whole system.

Fixes: 34b82d3ac105 ("bpf: Add a selftest for bpf_ima_inode_hash")
Reported-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: KP Singh <kpsingh@google.com>
---
 tools/testing/selftests/bpf/config | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/testing/selftests/bpf/config b/tools/testing/selftests/bpf/config
index 365bf9771b07..37e1f303fc11 100644
--- a/tools/testing/selftests/bpf/config
+++ b/tools/testing/selftests/bpf/config
@@ -43,3 +43,4 @@ CONFIG_IMA=y
 CONFIG_SECURITYFS=y
 CONFIG_IMA_WRITE_POLICY=y
 CONFIG_IMA_READ_POLICY=y
+CONFIG_BLK_DEV_LOOP=y
-- 
2.29.2.576.ga3fc446d84-goog


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

* [PATCH bpf-next v3 4/4] selftests/bpf: Indent ima_setup.sh with tabs.
  2020-12-03  0:58 [PATCH bpf-next v3 0/4] Fixes for ima selftest KP Singh
                   ` (2 preceding siblings ...)
  2020-12-03  0:58 ` [PATCH bpf-next v3 3/4] selftests/bpf: Add config dependency on BLK_DEV_LOOP KP Singh
@ 2020-12-03  0:58 ` KP Singh
  2020-12-03  5:46   ` Andrii Nakryiko
  2020-12-03  5:43 ` [PATCH bpf-next v3 0/4] Fixes for ima selftest Andrii Nakryiko
  4 siblings, 1 reply; 19+ messages in thread
From: KP Singh @ 2020-12-03  0:58 UTC (permalink / raw)
  To: bpf; +Cc: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko

From: KP Singh <kpsingh@google.com>

Signed-off-by: KP Singh <kpsingh@google.com>
---
 tools/testing/selftests/bpf/ima_setup.sh | 108 +++++++++++------------
 1 file changed, 54 insertions(+), 54 deletions(-)

diff --git a/tools/testing/selftests/bpf/ima_setup.sh b/tools/testing/selftests/bpf/ima_setup.sh
index b1ee4bf06996..2bfc646bc230 100755
--- a/tools/testing/selftests/bpf/ima_setup.sh
+++ b/tools/testing/selftests/bpf/ima_setup.sh
@@ -10,90 +10,90 @@ TEST_BINARY="/bin/true"
 
 usage()
 {
-        echo "Usage: $0 <setup|cleanup|run> <existing_tmp_dir>"
-        exit 1
+	echo "Usage: $0 <setup|cleanup|run> <existing_tmp_dir>"
+	exit 1
 }
 
 ensure_mount_securityfs()
 {
-        local securityfs_dir=$(grep "securityfs" /proc/mounts | awk '{print $2}')
+	local securityfs_dir=$(grep "securityfs" /proc/mounts | awk '{print $2}')
 
-        if [ -z "${securityfs_dir}" ]; then
-                securityfs_dir=/sys/kernel/security
-                mount -t securityfs security "${securityfs_dir}"
-        fi
+	if [ -z "${securityfs_dir}" ]; then
+		securityfs_dir=/sys/kernel/security
+		mount -t securityfs security "${securityfs_dir}"
+	fi
 
-        if [ ! -d "${securityfs_dir}" ]; then
-                echo "${securityfs_dir}: securityfs is not mounted" && exit 1
-        fi
+	if [ ! -d "${securityfs_dir}" ]; then
+		echo "${securityfs_dir}: securityfs is not mounted" && exit 1
+	fi
 }
 
 setup()
 {
-        local tmp_dir="$1"
-        local mount_img="${tmp_dir}/test.img"
-        local mount_dir="${tmp_dir}/mnt"
-        local copied_bin_path="${mount_dir}/$(basename ${TEST_BINARY})"
-        mkdir -p ${mount_dir}
+	local tmp_dir="$1"
+	local mount_img="${tmp_dir}/test.img"
+	local mount_dir="${tmp_dir}/mnt"
+	local copied_bin_path="${mount_dir}/$(basename ${TEST_BINARY})"
+	mkdir -p ${mount_dir}
 
-        dd if=/dev/zero of="${mount_img}" bs=1M count=10
+	dd if=/dev/zero of="${mount_img}" bs=1M count=10
 
-        losetup -f "${mount_img}"
-        local loop_device=$(losetup -a | grep ${mount_img:?} | cut -d ":" -f1)
+	losetup -f "${mount_img}"
+	local loop_device=$(losetup -a | grep ${mount_img:?} | cut -d ":" -f1)
 
-        mkfs.ext2 "${loop_device:?}"
-        mount "${loop_device}" "${mount_dir}"
+	mkfs.ext2 "${loop_device:?}"
+	mount "${loop_device}" "${mount_dir}"
 
-        cp "${TEST_BINARY}" "${mount_dir}"
-        local mount_uuid="$(blkid ${loop_device} | sed 's/.*UUID="\([^"]*\)".*/\1/')"
+	cp "${TEST_BINARY}" "${mount_dir}"
+	local mount_uuid="$(blkid ${loop_device} | sed 's/.*UUID="\([^"]*\)".*/\1/')"
 
-        ensure_mount_securityfs
-        echo "measure func=BPRM_CHECK fsuuid=${mount_uuid}" > ${IMA_POLICY_FILE}
+	ensure_mount_securityfs
+	echo "measure func=BPRM_CHECK fsuuid=${mount_uuid}" > ${IMA_POLICY_FILE}
 }
 
 cleanup() {
-        local tmp_dir="$1"
-        local mount_img="${tmp_dir}/test.img"
-        local mount_dir="${tmp_dir}/mnt"
+	local tmp_dir="$1"
+	local mount_img="${tmp_dir}/test.img"
+	local mount_dir="${tmp_dir}/mnt"
 
-        local loop_devices=$(losetup -a | grep ${mount_img:?} | cut -d ":" -f1)
+	local loop_devices=$(losetup -a | grep ${mount_img:?} | cut -d ":" -f1)
 
-        for loop_dev in "${loop_devices}"; do
-                losetup -d $loop_dev
-        done
+	for loop_dev in "${loop_devices}"; do
+		losetup -d $loop_dev
+	done
 
-        umount ${mount_dir}
-        rm -rf ${tmp_dir}
+	umount ${mount_dir}
+	rm -rf ${tmp_dir}
 }
 
 run()
 {
-        local tmp_dir="$1"
-        local mount_dir="${tmp_dir}/mnt"
-        local copied_bin_path="${mount_dir}/$(basename ${TEST_BINARY})"
+	local tmp_dir="$1"
+	local mount_dir="${tmp_dir}/mnt"
+	local copied_bin_path="${mount_dir}/$(basename ${TEST_BINARY})"
 
-        exec "${copied_bin_path}"
+	exec "${copied_bin_path}"
 }
 
 main()
 {
-        [[ $# -ne 2 ]] && usage
-
-        local action="$1"
-        local tmp_dir="$2"
-
-        [[ ! -d "${tmp_dir}" ]] && echo "Directory ${tmp_dir} doesn't exist" && exit 1
-
-        if [[ "${action}" == "setup" ]]; then
-                setup "${tmp_dir}"
-        elif [[ "${action}" == "cleanup" ]]; then
-                cleanup "${tmp_dir}"
-        elif [[ "${action}" == "run" ]]; then
-                run "${tmp_dir}"
-        else
-                echo "Unknown action: ${action}"
-                exit 1
-        fi
+	[[ $# -ne 2 ]] && usage
+
+	local action="$1"
+	local tmp_dir="$2"
+
+	[[ ! -d "${tmp_dir}" ]] && echo "Directory ${tmp_dir} doesn't exist" && exit 1
+
+	if [[ "${action}" == "setup" ]]; then
+		setup "${tmp_dir}"
+	elif [[ "${action}" == "cleanup" ]]; then
+		cleanup "${tmp_dir}"
+	elif [[ "${action}" == "run" ]]; then
+		run "${tmp_dir}"
+	else
+		echo "Unknown action: ${action}"
+		exit 1
+	fi
 }
 
 main "$@"
-- 
2.29.2.576.ga3fc446d84-goog


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

* Re: [PATCH bpf-next v3 0/4] Fixes for ima selftest
  2020-12-03  0:58 [PATCH bpf-next v3 0/4] Fixes for ima selftest KP Singh
                   ` (3 preceding siblings ...)
  2020-12-03  0:58 ` [PATCH bpf-next v3 4/4] selftests/bpf: Indent ima_setup.sh with tabs KP Singh
@ 2020-12-03  5:43 ` Andrii Nakryiko
  2020-12-03 11:00   ` KP Singh
  4 siblings, 1 reply; 19+ messages in thread
From: Andrii Nakryiko @ 2020-12-03  5:43 UTC (permalink / raw)
  To: KP Singh; +Cc: bpf, Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko

On Wed, Dec 2, 2020 at 4:58 PM KP Singh <kpsingh@chromium.org> wrote:
>
> From: KP Singh <kpsingh@google.com>
>
> # v2 -> v3
>
> * Added missing tags.
> * Indentation fixes + some other fixes suggested by Andrii.
> * Re-indent file to tabs.
>
> # What?
>
> * Fixes to work in busybox shell (tested on the one used by BPF CI).
> * Ensure that securityfs is mounted before updating the ima policy
> * Add missing config deps.
>

KP, please take a look at other cover letters to get a better idea of
how they usually look like. It has to be a human-readable overview of
why the patch set was posted and what problem it is solving. List of
action items without any context is not the best format.

>
> KP Singh (4):
>   selftests/bpf: Update ima_setup.sh for busybox
>   selftests/bpf: Ensure securityfs mount before writing ima policy
>   selftests/bpf: Add config dependency on BLK_DEV_LOOP
>   selftests/bpf: Indent ima_setup.sh with tabs.
>
>  tools/testing/selftests/bpf/config       |   1 +
>  tools/testing/selftests/bpf/ima_setup.sh | 107 +++++++++++++----------
>  2 files changed, 64 insertions(+), 44 deletions(-)
>
> --
> 2.29.2.576.ga3fc446d84-goog
>

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

* Re: [PATCH bpf-next v3 4/4] selftests/bpf: Indent ima_setup.sh with tabs.
  2020-12-03  0:58 ` [PATCH bpf-next v3 4/4] selftests/bpf: Indent ima_setup.sh with tabs KP Singh
@ 2020-12-03  5:46   ` Andrii Nakryiko
  2020-12-03 11:02     ` KP Singh
  0 siblings, 1 reply; 19+ messages in thread
From: Andrii Nakryiko @ 2020-12-03  5:46 UTC (permalink / raw)
  To: KP Singh; +Cc: bpf, Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko

On Wed, Dec 2, 2020 at 4:58 PM KP Singh <kpsingh@chromium.org> wrote:
>
> From: KP Singh <kpsingh@google.com>
>

Commit message is missing completely.

> Signed-off-by: KP Singh <kpsingh@google.com>
> ---
>  tools/testing/selftests/bpf/ima_setup.sh | 108 +++++++++++------------
>  1 file changed, 54 insertions(+), 54 deletions(-)
>

[...]

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

* Re: [PATCH bpf-next v3 1/4] selftests/bpf: Update ima_setup.sh for busybox
  2020-12-03  0:58 ` [PATCH bpf-next v3 1/4] selftests/bpf: Update ima_setup.sh for busybox KP Singh
@ 2020-12-03  5:52   ` Andrii Nakryiko
  2020-12-03 10:59     ` KP Singh
  0 siblings, 1 reply; 19+ messages in thread
From: Andrii Nakryiko @ 2020-12-03  5:52 UTC (permalink / raw)
  To: KP Singh; +Cc: bpf, Andrii Nakryiko, Alexei Starovoitov, Daniel Borkmann

On Wed, Dec 2, 2020 at 4:58 PM KP Singh <kpsingh@chromium.org> wrote:
>
> From: KP Singh <kpsingh@google.com>
>
> * losetup on busybox does not output the name of loop device on using
>   -f with --show. It also dosn't support -j to find the loop devices

typo: doesn't

>   for a given backing file. losetup is updated to use "-a" which is
>   available on busybox.
> * blkid does not support options (-s and -o) to only display the uuid.

... so parse it from full blkid output.

> * Not all environments have mkfs.ext4, the test requires a loop device
>   with a backing image file which could formatted with any filesystem.
>   Update to using mkfs.ext2 which is available on busybox.

This one is great. It explains the problem, and what solution was
implemented, from the high-level. I'd just drop the " *" marks, it
makes it more pleasant to read as if it was written for humans, not
machines.

> Fixes: 34b82d3ac105 ("bpf: Add a selftest for bpf_ima_inode_hash")
> Reported-by: Andrii Nakryiko <andrii@kernel.org>
> Signed-off-by: KP Singh <kpsingh@google.com>
> ---
>  tools/testing/selftests/bpf/ima_setup.sh | 12 ++++++++----
>  1 file changed, 8 insertions(+), 4 deletions(-)
>

Acked-by: Andrii Nakryiko <andrii@kernel.org>

> diff --git a/tools/testing/selftests/bpf/ima_setup.sh b/tools/testing/selftests/bpf/ima_setup.sh
> index 15490ccc5e55..137f2d32598f 100755
> --- a/tools/testing/selftests/bpf/ima_setup.sh
> +++ b/tools/testing/selftests/bpf/ima_setup.sh
> @@ -3,6 +3,7 @@
>

[...]

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

* Re: [PATCH bpf-next v3 2/4] selftests/bpf: Ensure securityfs mount before writing ima policy
  2020-12-03  0:58 ` [PATCH bpf-next v3 2/4] selftests/bpf: Ensure securityfs mount before writing ima policy KP Singh
@ 2020-12-03  5:53   ` Andrii Nakryiko
  0 siblings, 0 replies; 19+ messages in thread
From: Andrii Nakryiko @ 2020-12-03  5:53 UTC (permalink / raw)
  To: KP Singh; +Cc: bpf, Andrii Nakryiko, Alexei Starovoitov, Daniel Borkmann

On Wed, Dec 2, 2020 at 4:58 PM KP Singh <kpsingh@chromium.org> wrote:
>
> From: KP Singh <kpsingh@google.com>
>
> SecurityFS may not be mounted even if it is enabled in the kernel
> config.
>
> Fixes: 34b82d3ac105 ("bpf: Add a selftest for bpf_ima_inode_hash")
> Reported-by: Andrii Nakryiko <andrii@kernel.org>
> Signed-off-by: KP Singh <kpsingh@google.com>
> ---

Acked-by: Andrii Nakryiko <andrii@kernel.org>

>  tools/testing/selftests/bpf/ima_setup.sh | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
>
> diff --git a/tools/testing/selftests/bpf/ima_setup.sh b/tools/testing/selftests/bpf/ima_setup.sh
> index 137f2d32598f..b1ee4bf06996 100755
> --- a/tools/testing/selftests/bpf/ima_setup.sh
> +++ b/tools/testing/selftests/bpf/ima_setup.sh
> @@ -14,6 +14,20 @@ usage()
>          exit 1
>  }
>
> +ensure_mount_securityfs()
> +{
> +        local securityfs_dir=$(grep "securityfs" /proc/mounts | awk '{print $2}')
> +
> +        if [ -z "${securityfs_dir}" ]; then
> +                securityfs_dir=/sys/kernel/security
> +                mount -t securityfs security "${securityfs_dir}"
> +        fi
> +
> +        if [ ! -d "${securityfs_dir}" ]; then
> +                echo "${securityfs_dir}: securityfs is not mounted" && exit 1
> +        fi
> +}
> +
>  setup()
>  {
>          local tmp_dir="$1"
> @@ -33,6 +47,7 @@ setup()
>          cp "${TEST_BINARY}" "${mount_dir}"
>          local mount_uuid="$(blkid ${loop_device} | sed 's/.*UUID="\([^"]*\)".*/\1/')"
>
> +        ensure_mount_securityfs
>          echo "measure func=BPRM_CHECK fsuuid=${mount_uuid}" > ${IMA_POLICY_FILE}
>  }
>
> --
> 2.29.2.576.ga3fc446d84-goog
>

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

* Re: [PATCH bpf-next v3 3/4] selftests/bpf: Add config dependency on BLK_DEV_LOOP
  2020-12-03  0:58 ` [PATCH bpf-next v3 3/4] selftests/bpf: Add config dependency on BLK_DEV_LOOP KP Singh
@ 2020-12-03  5:56   ` Andrii Nakryiko
  2020-12-03 10:56     ` KP Singh
  0 siblings, 1 reply; 19+ messages in thread
From: Andrii Nakryiko @ 2020-12-03  5:56 UTC (permalink / raw)
  To: KP Singh; +Cc: bpf, Andrii Nakryiko, Alexei Starovoitov, Daniel Borkmann

On Wed, Dec 2, 2020 at 4:58 PM KP Singh <kpsingh@chromium.org> wrote:
>
> From: KP Singh <kpsingh@google.com>
>
> The ima selftest restricts its scope to a test filesystem image
> mounted on a loop device and prevents permanent ima policy changes for
> the whole system.
>
> Fixes: 34b82d3ac105 ("bpf: Add a selftest for bpf_ima_inode_hash")
> Reported-by: Andrii Nakryiko <andrii@kernel.org>
> Signed-off-by: KP Singh <kpsingh@google.com>
> ---
>  tools/testing/selftests/bpf/config | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/tools/testing/selftests/bpf/config b/tools/testing/selftests/bpf/config
> index 365bf9771b07..37e1f303fc11 100644
> --- a/tools/testing/selftests/bpf/config
> +++ b/tools/testing/selftests/bpf/config
> @@ -43,3 +43,4 @@ CONFIG_IMA=y
>  CONFIG_SECURITYFS=y
>  CONFIG_IMA_WRITE_POLICY=y
>  CONFIG_IMA_READ_POLICY=y
> +CONFIG_BLK_DEV_LOOP=y
> --


You mentioned also that CONFIG_LSM="selinux,bpf,integrity" is needed,
no? Let's add that as well?

> 2.29.2.576.ga3fc446d84-goog
>

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

* Re: [PATCH bpf-next v3 3/4] selftests/bpf: Add config dependency on BLK_DEV_LOOP
  2020-12-03  5:56   ` Andrii Nakryiko
@ 2020-12-03 10:56     ` KP Singh
  2020-12-03 17:35       ` KP Singh
  0 siblings, 1 reply; 19+ messages in thread
From: KP Singh @ 2020-12-03 10:56 UTC (permalink / raw)
  To: Andrii Nakryiko; +Cc: bpf, Andrii Nakryiko, Alexei Starovoitov, Daniel Borkmann

On Thu, Dec 3, 2020 at 6:56 AM Andrii Nakryiko
<andrii.nakryiko@gmail.com> wrote:
>
> On Wed, Dec 2, 2020 at 4:58 PM KP Singh <kpsingh@chromium.org> wrote:
> >
> > From: KP Singh <kpsingh@google.com>
> >
> > The ima selftest restricts its scope to a test filesystem image
> > mounted on a loop device and prevents permanent ima policy changes for
> > the whole system.
> >
> > Fixes: 34b82d3ac105 ("bpf: Add a selftest for bpf_ima_inode_hash")
> > Reported-by: Andrii Nakryiko <andrii@kernel.org>
> > Signed-off-by: KP Singh <kpsingh@google.com>
> > ---
> >  tools/testing/selftests/bpf/config | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/tools/testing/selftests/bpf/config b/tools/testing/selftests/bpf/config
> > index 365bf9771b07..37e1f303fc11 100644
> > --- a/tools/testing/selftests/bpf/config
> > +++ b/tools/testing/selftests/bpf/config
> > @@ -43,3 +43,4 @@ CONFIG_IMA=y
> >  CONFIG_SECURITYFS=y
> >  CONFIG_IMA_WRITE_POLICY=y
> >  CONFIG_IMA_READ_POLICY=y
> > +CONFIG_BLK_DEV_LOOP=y
> > --
>
>
> You mentioned also that CONFIG_LSM="selinux,bpf,integrity" is needed,
> no? Let's add that as well?

I did not add it because we did not do it when we added "bpf" to the list and

I also don't think selinux is really required here which might be worse in
some cases (e.g. when the required config options for
SELinux are not selected).

Also, when one selects CONFIG_BPF_LSM or CONFIG_IMA from make
menuconfig / nconfig, we get "bpf" and "integrity" appended by default:

We can add a comment that says that says:

  "Please ensure "bpf" and "integrity" are present in CONFIG_LSM"

Now, I was not sure if adding a comment would break any scripts that people
have that parse this file, so I avoided it. But overriding the string
completely
might not be a good idea.

>
> > 2.29.2.576.ga3fc446d84-goog
> >

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

* Re: [PATCH bpf-next v3 1/4] selftests/bpf: Update ima_setup.sh for busybox
  2020-12-03  5:52   ` Andrii Nakryiko
@ 2020-12-03 10:59     ` KP Singh
  2020-12-03 19:18       ` Andrii Nakryiko
  0 siblings, 1 reply; 19+ messages in thread
From: KP Singh @ 2020-12-03 10:59 UTC (permalink / raw)
  To: Andrii Nakryiko; +Cc: bpf, Andrii Nakryiko, Alexei Starovoitov, Daniel Borkmann

On Thu, Dec 3, 2020 at 6:52 AM Andrii Nakryiko
<andrii.nakryiko@gmail.com> wrote:
>
> On Wed, Dec 2, 2020 at 4:58 PM KP Singh <kpsingh@chromium.org> wrote:
> >
> > From: KP Singh <kpsingh@google.com>
> >
> > * losetup on busybox does not output the name of loop device on using
> >   -f with --show. It also dosn't support -j to find the loop devices
>
> typo: doesn't

Fixed.

>
> >   for a given backing file. losetup is updated to use "-a" which is
> >   available on busybox.
> > * blkid does not support options (-s and -o) to only display the uuid.
>
> ... so parse it from full blkid output.

Done.

>
> > * Not all environments have mkfs.ext4, the test requires a loop device
> >   with a backing image file which could formatted with any filesystem.
> >   Update to using mkfs.ext2 which is available on busybox.
>
> This one is great. It explains the problem, and what solution was
> implemented, from the high-level. I'd just drop the " *" marks, it
> makes it more pleasant to read as if it was written for humans, not
> machines.

I tend to use "* " for bullet points from the markdown syntax
(as we use it heavily internally) I can avoid if you prefer / don't like it.


>
> > Fixes: 34b82d3ac105 ("bpf: Add a selftest for bpf_ima_inode_hash")
> > Reported-by: Andrii Nakryiko <andrii@kernel.org>
> > Signed-off-by: KP Singh <kpsingh@google.com>
> > ---
> >  tools/testing/selftests/bpf/ima_setup.sh | 12 ++++++++----
> >  1 file changed, 8 insertions(+), 4 deletions(-)
> >
>
> Acked-by: Andrii Nakryiko <andrii@kernel.org>
>
> > diff --git a/tools/testing/selftests/bpf/ima_setup.sh b/tools/testing/selftests/bpf/ima_setup.sh
> > index 15490ccc5e55..137f2d32598f 100755
> > --- a/tools/testing/selftests/bpf/ima_setup.sh
> > +++ b/tools/testing/selftests/bpf/ima_setup.sh
> > @@ -3,6 +3,7 @@
> >
>
> [...]

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

* Re: [PATCH bpf-next v3 0/4] Fixes for ima selftest
  2020-12-03  5:43 ` [PATCH bpf-next v3 0/4] Fixes for ima selftest Andrii Nakryiko
@ 2020-12-03 11:00   ` KP Singh
  0 siblings, 0 replies; 19+ messages in thread
From: KP Singh @ 2020-12-03 11:00 UTC (permalink / raw)
  To: Andrii Nakryiko; +Cc: bpf, Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko

On Thu, Dec 3, 2020 at 6:44 AM Andrii Nakryiko
<andrii.nakryiko@gmail.com> wrote:
>
> On Wed, Dec 2, 2020 at 4:58 PM KP Singh <kpsingh@chromium.org> wrote:
> >
> > From: KP Singh <kpsingh@google.com>
> >
> > # v2 -> v3
> >
> > * Added missing tags.
> > * Indentation fixes + some other fixes suggested by Andrii.
> > * Re-indent file to tabs.
> >
> > # What?
> >
> > * Fixes to work in busybox shell (tested on the one used by BPF CI).
> > * Ensure that securityfs is mounted before updating the ima policy
> > * Add missing config deps.
> >
>
> KP, please take a look at other cover letters to get a better idea of
> how they usually look like. It has to be a human-readable overview of
> why the patch set was posted and what problem it is solving. List of
> action items without any context is not the best format.

Sure, I thought the individual commit messages were sufficient context
but I can add a better one here.

>
> >
> > KP Singh (4):
> >   selftests/bpf: Update ima_setup.sh for busybox
> >   selftests/bpf: Ensure securityfs mount before writing ima policy
> >   selftests/bpf: Add config dependency on BLK_DEV_LOOP
> >   selftests/bpf: Indent ima_setup.sh with tabs.
> >
> >  tools/testing/selftests/bpf/config       |   1 +
> >  tools/testing/selftests/bpf/ima_setup.sh | 107 +++++++++++++----------
> >  2 files changed, 64 insertions(+), 44 deletions(-)
> >
> > --
> > 2.29.2.576.ga3fc446d84-goog
> >

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

* Re: [PATCH bpf-next v3 4/4] selftests/bpf: Indent ima_setup.sh with tabs.
  2020-12-03  5:46   ` Andrii Nakryiko
@ 2020-12-03 11:02     ` KP Singh
  2020-12-03 19:09       ` Alexei Starovoitov
  0 siblings, 1 reply; 19+ messages in thread
From: KP Singh @ 2020-12-03 11:02 UTC (permalink / raw)
  To: Andrii Nakryiko; +Cc: bpf, Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko

On Thu, Dec 3, 2020 at 6:46 AM Andrii Nakryiko
<andrii.nakryiko@gmail.com> wrote:
>
> On Wed, Dec 2, 2020 at 4:58 PM KP Singh <kpsingh@chromium.org> wrote:
> >
> > From: KP Singh <kpsingh@google.com>
> >
>
> Commit message is missing completely.

I thought the subject is enough in this case to explain that we are
re-indenting the file.

I can explain that this was missed because checkpatch.pl did not
complain about shell
scripts and that we would like to be consistent with the other shells scripts.

>
> > Signed-off-by: KP Singh <kpsingh@google.com>
> > ---
> >  tools/testing/selftests/bpf/ima_setup.sh | 108 +++++++++++------------
> >  1 file changed, 54 insertions(+), 54 deletions(-)
> >
>
> [...]

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

* Re: [PATCH bpf-next v3 3/4] selftests/bpf: Add config dependency on BLK_DEV_LOOP
  2020-12-03 10:56     ` KP Singh
@ 2020-12-03 17:35       ` KP Singh
  2020-12-03 18:06         ` Andrii Nakryiko
  0 siblings, 1 reply; 19+ messages in thread
From: KP Singh @ 2020-12-03 17:35 UTC (permalink / raw)
  To: Andrii Nakryiko; +Cc: bpf, Andrii Nakryiko, Alexei Starovoitov, Daniel Borkmann

On Thu, Dec 3, 2020 at 11:56 AM KP Singh <kpsingh@chromium.org> wrote:
>
> On Thu, Dec 3, 2020 at 6:56 AM Andrii Nakryiko
> <andrii.nakryiko@gmail.com> wrote:
> >
> > On Wed, Dec 2, 2020 at 4:58 PM KP Singh <kpsingh@chromium.org> wrote:
> > >
> > > From: KP Singh <kpsingh@google.com>
> > >
> > > The ima selftest restricts its scope to a test filesystem image
> > > mounted on a loop device and prevents permanent ima policy changes for
> > > the whole system.
> > >
> > > Fixes: 34b82d3ac105 ("bpf: Add a selftest for bpf_ima_inode_hash")
> > > Reported-by: Andrii Nakryiko <andrii@kernel.org>
> > > Signed-off-by: KP Singh <kpsingh@google.com>
> > > ---
> > >  tools/testing/selftests/bpf/config | 1 +
> > >  1 file changed, 1 insertion(+)
> > >
> > > diff --git a/tools/testing/selftests/bpf/config b/tools/testing/selftests/bpf/config
> > > index 365bf9771b07..37e1f303fc11 100644
> > > --- a/tools/testing/selftests/bpf/config
> > > +++ b/tools/testing/selftests/bpf/config
> > > @@ -43,3 +43,4 @@ CONFIG_IMA=y
> > >  CONFIG_SECURITYFS=y
> > >  CONFIG_IMA_WRITE_POLICY=y
> > >  CONFIG_IMA_READ_POLICY=y
> > > +CONFIG_BLK_DEV_LOOP=y
> > > --
> >
> >
> > You mentioned also that CONFIG_LSM="selinux,bpf,integrity" is needed,
> > no? Let's add that as well?
>
> I did not add it because we did not do it when we added "bpf" to the list and
>
> I also don't think selinux is really required here which might be worse in
> some cases (e.g. when the required config options for
> SELinux are not selected).
>
> Also, when one selects CONFIG_BPF_LSM or CONFIG_IMA from make
> menuconfig / nconfig, we get "bpf" and "integrity" appended by default:
>
> We can add a comment that says that says:
>
>   "Please ensure "bpf" and "integrity" are present in CONFIG_LSM"
>
> Now, I was not sure if adding a comment would break any scripts that people
> have that parse this file, so I avoided it. But overriding the string
> completely
> might not be a good idea.

If it's okay, I can send the v4 out now and we can add the comment or CONFIG_LSM
in a separate patch?

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

* Re: [PATCH bpf-next v3 3/4] selftests/bpf: Add config dependency on BLK_DEV_LOOP
  2020-12-03 17:35       ` KP Singh
@ 2020-12-03 18:06         ` Andrii Nakryiko
  0 siblings, 0 replies; 19+ messages in thread
From: Andrii Nakryiko @ 2020-12-03 18:06 UTC (permalink / raw)
  To: KP Singh; +Cc: bpf, Andrii Nakryiko, Alexei Starovoitov, Daniel Borkmann

On Thu, Dec 3, 2020 at 9:35 AM KP Singh <kpsingh@chromium.org> wrote:
>
> On Thu, Dec 3, 2020 at 11:56 AM KP Singh <kpsingh@chromium.org> wrote:
> >
> > On Thu, Dec 3, 2020 at 6:56 AM Andrii Nakryiko
> > <andrii.nakryiko@gmail.com> wrote:
> > >
> > > On Wed, Dec 2, 2020 at 4:58 PM KP Singh <kpsingh@chromium.org> wrote:
> > > >
> > > > From: KP Singh <kpsingh@google.com>
> > > >
> > > > The ima selftest restricts its scope to a test filesystem image
> > > > mounted on a loop device and prevents permanent ima policy changes for
> > > > the whole system.
> > > >
> > > > Fixes: 34b82d3ac105 ("bpf: Add a selftest for bpf_ima_inode_hash")
> > > > Reported-by: Andrii Nakryiko <andrii@kernel.org>
> > > > Signed-off-by: KP Singh <kpsingh@google.com>
> > > > ---
> > > >  tools/testing/selftests/bpf/config | 1 +
> > > >  1 file changed, 1 insertion(+)
> > > >
> > > > diff --git a/tools/testing/selftests/bpf/config b/tools/testing/selftests/bpf/config
> > > > index 365bf9771b07..37e1f303fc11 100644
> > > > --- a/tools/testing/selftests/bpf/config
> > > > +++ b/tools/testing/selftests/bpf/config
> > > > @@ -43,3 +43,4 @@ CONFIG_IMA=y
> > > >  CONFIG_SECURITYFS=y
> > > >  CONFIG_IMA_WRITE_POLICY=y
> > > >  CONFIG_IMA_READ_POLICY=y
> > > > +CONFIG_BLK_DEV_LOOP=y
> > > > --
> > >
> > >
> > > You mentioned also that CONFIG_LSM="selinux,bpf,integrity" is needed,
> > > no? Let's add that as well?
> >
> > I did not add it because we did not do it when we added "bpf" to the list and
> >
> > I also don't think selinux is really required here which might be worse in
> > some cases (e.g. when the required config options for
> > SELinux are not selected).
> >
> > Also, when one selects CONFIG_BPF_LSM or CONFIG_IMA from make
> > menuconfig / nconfig, we get "bpf" and "integrity" appended by default:
> >
> > We can add a comment that says that says:
> >
> >   "Please ensure "bpf" and "integrity" are present in CONFIG_LSM"
> >
> > Now, I was not sure if adding a comment would break any scripts that people

Any infra I'm in charge of is not using this config in an automated
fashion, so adding

# CONFIG_LSM="bpf,integrity"

would work just fine. But I can't know if anyone else relies on this.
But # comments are part of Kconfig "spec", so probably is ok to add.

> > have that parse this file, so I avoided it. But overriding the string
> > completely
> > might not be a good idea.
>
> If it's okay, I can send the v4 out now and we can add the comment or CONFIG_LSM
> in a separate patch?

Sure.

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

* Re: [PATCH bpf-next v3 4/4] selftests/bpf: Indent ima_setup.sh with tabs.
  2020-12-03 11:02     ` KP Singh
@ 2020-12-03 19:09       ` Alexei Starovoitov
  2020-12-03 19:17         ` KP Singh
  0 siblings, 1 reply; 19+ messages in thread
From: Alexei Starovoitov @ 2020-12-03 19:09 UTC (permalink / raw)
  To: KP Singh
  Cc: Andrii Nakryiko, bpf, Alexei Starovoitov, Daniel Borkmann,
	Andrii Nakryiko

On Thu, Dec 3, 2020 at 3:02 AM KP Singh <kpsingh@chromium.org> wrote:
>
> On Thu, Dec 3, 2020 at 6:46 AM Andrii Nakryiko
> <andrii.nakryiko@gmail.com> wrote:
> >
> > On Wed, Dec 2, 2020 at 4:58 PM KP Singh <kpsingh@chromium.org> wrote:
> > >
> > > From: KP Singh <kpsingh@google.com>
> > >
> >
> > Commit message is missing completely.
>
> I thought the subject is enough in this case to explain that we are
> re-indenting the file.

If there is nothing to add just copy paste the subject into commit log.

> I can explain that this was missed because checkpatch.pl did not
> complain about shell
> scripts and that we would like to be consistent with the other shells scripts.

checkpatch is a guidance. It's not a must have requirement.
It works both ways. Sometimes we ignore checkpatch complaints.
Sometimes we ask for things that checkpatch doesn't know about.

Please respin at your earliest convenience. CI is suffering at the moment.
It needs to be unbroken soon.

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

* Re: [PATCH bpf-next v3 4/4] selftests/bpf: Indent ima_setup.sh with tabs.
  2020-12-03 19:09       ` Alexei Starovoitov
@ 2020-12-03 19:17         ` KP Singh
  0 siblings, 0 replies; 19+ messages in thread
From: KP Singh @ 2020-12-03 19:17 UTC (permalink / raw)
  To: Alexei Starovoitov
  Cc: Andrii Nakryiko, bpf, Alexei Starovoitov, Daniel Borkmann,
	Andrii Nakryiko

On Thu, Dec 3, 2020 at 8:10 PM Alexei Starovoitov
<alexei.starovoitov@gmail.com> wrote:
>
> On Thu, Dec 3, 2020 at 3:02 AM KP Singh <kpsingh@chromium.org> wrote:
> >
> > On Thu, Dec 3, 2020 at 6:46 AM Andrii Nakryiko
> > <andrii.nakryiko@gmail.com> wrote:
> > >
> > > On Wed, Dec 2, 2020 at 4:58 PM KP Singh <kpsingh@chromium.org> wrote:
> > > >
> > > > From: KP Singh <kpsingh@google.com>
> > > >
> > >
> > > Commit message is missing completely.
> >
> > I thought the subject is enough in this case to explain that we are
> > re-indenting the file.
>
> If there is nothing to add just copy paste the subject into commit log.
>
> > I can explain that this was missed because checkpatch.pl did not
> > complain about shell
> > scripts and that we would like to be consistent with the other shells scripts.
>
> checkpatch is a guidance. It's not a must have requirement.
> It works both ways. Sometimes we ignore checkpatch complaints.
> Sometimes we ask for things that checkpatch doesn't know about.

Agreed, I, personally, just missed it because my editor did a weird thing
and I was relying too much on checkpatch.

>
> Please respin at your earliest convenience. CI is suffering at the moment.
> It needs to be unbroken soon.

Done. I was aware of the CI being broken :) thus this shabby work on the cover
letter and commit message (not really an excuse though).

Also, as mentioned previously, we will script and allow users to run the tests
in a CI equivalent environment so that it spares us of this pain. That's next
on my TODO list.

- KP

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

* Re: [PATCH bpf-next v3 1/4] selftests/bpf: Update ima_setup.sh for busybox
  2020-12-03 10:59     ` KP Singh
@ 2020-12-03 19:18       ` Andrii Nakryiko
  0 siblings, 0 replies; 19+ messages in thread
From: Andrii Nakryiko @ 2020-12-03 19:18 UTC (permalink / raw)
  To: KP Singh; +Cc: bpf, Andrii Nakryiko, Alexei Starovoitov, Daniel Borkmann

On Thu, Dec 3, 2020 at 3:00 AM KP Singh <kpsingh@chromium.org> wrote:
>
> On Thu, Dec 3, 2020 at 6:52 AM Andrii Nakryiko
> <andrii.nakryiko@gmail.com> wrote:
> >
> > On Wed, Dec 2, 2020 at 4:58 PM KP Singh <kpsingh@chromium.org> wrote:
> > >
> > > From: KP Singh <kpsingh@google.com>
> > >
> > > * losetup on busybox does not output the name of loop device on using
> > >   -f with --show. It also dosn't support -j to find the loop devices
> >
> > typo: doesn't
>
> Fixed.
>
> >
> > >   for a given backing file. losetup is updated to use "-a" which is
> > >   available on busybox.
> > > * blkid does not support options (-s and -o) to only display the uuid.
> >
> > ... so parse it from full blkid output.
>
> Done.
>
> >
> > > * Not all environments have mkfs.ext4, the test requires a loop device
> > >   with a backing image file which could formatted with any filesystem.
> > >   Update to using mkfs.ext2 which is available on busybox.
> >
> > This one is great. It explains the problem, and what solution was
> > implemented, from the high-level. I'd just drop the " *" marks, it
> > makes it more pleasant to read as if it was written for humans, not
> > machines.
>
> I tend to use "* " for bullet points from the markdown syntax
> (as we use it heavily internally) I can avoid if you prefer / don't like it.

A list of bullet points don't read as a coherent text. It's not the
end of the world, but it's also not a common style here either.

>
>
> >
> > > Fixes: 34b82d3ac105 ("bpf: Add a selftest for bpf_ima_inode_hash")
> > > Reported-by: Andrii Nakryiko <andrii@kernel.org>
> > > Signed-off-by: KP Singh <kpsingh@google.com>
> > > ---
> > >  tools/testing/selftests/bpf/ima_setup.sh | 12 ++++++++----
> > >  1 file changed, 8 insertions(+), 4 deletions(-)
> > >
> >
> > Acked-by: Andrii Nakryiko <andrii@kernel.org>
> >
> > > diff --git a/tools/testing/selftests/bpf/ima_setup.sh b/tools/testing/selftests/bpf/ima_setup.sh
> > > index 15490ccc5e55..137f2d32598f 100755
> > > --- a/tools/testing/selftests/bpf/ima_setup.sh
> > > +++ b/tools/testing/selftests/bpf/ima_setup.sh
> > > @@ -3,6 +3,7 @@
> > >
> >
> > [...]

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

end of thread, other threads:[~2020-12-03 19:19 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-03  0:58 [PATCH bpf-next v3 0/4] Fixes for ima selftest KP Singh
2020-12-03  0:58 ` [PATCH bpf-next v3 1/4] selftests/bpf: Update ima_setup.sh for busybox KP Singh
2020-12-03  5:52   ` Andrii Nakryiko
2020-12-03 10:59     ` KP Singh
2020-12-03 19:18       ` Andrii Nakryiko
2020-12-03  0:58 ` [PATCH bpf-next v3 2/4] selftests/bpf: Ensure securityfs mount before writing ima policy KP Singh
2020-12-03  5:53   ` Andrii Nakryiko
2020-12-03  0:58 ` [PATCH bpf-next v3 3/4] selftests/bpf: Add config dependency on BLK_DEV_LOOP KP Singh
2020-12-03  5:56   ` Andrii Nakryiko
2020-12-03 10:56     ` KP Singh
2020-12-03 17:35       ` KP Singh
2020-12-03 18:06         ` Andrii Nakryiko
2020-12-03  0:58 ` [PATCH bpf-next v3 4/4] selftests/bpf: Indent ima_setup.sh with tabs KP Singh
2020-12-03  5:46   ` Andrii Nakryiko
2020-12-03 11:02     ` KP Singh
2020-12-03 19:09       ` Alexei Starovoitov
2020-12-03 19:17         ` KP Singh
2020-12-03  5:43 ` [PATCH bpf-next v3 0/4] Fixes for ima selftest Andrii Nakryiko
2020-12-03 11:00   ` KP Singh

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).