linux-stable/tools
Roberto Sassu 12fabae03c selftests/bpf: Fix IMA test
Commit 62622dab0a ("ima: return IMA digest value only when IMA_COLLECTED
flag is set") caused bpf_ima_inode_hash() to refuse to give non-fresh
digests. IMA test #3 assumed the old behavior, that bpf_ima_inode_hash()
still returned also non-fresh digests.

Correct the test by accepting both cases. If the samples returned are 1,
assume that the commit above is applied and that the returned digest is
fresh. If the samples returned are 2, assume that the commit above is not
applied, and check both the non-fresh and fresh digest.

Fixes: 62622dab0a ("ima: return IMA digest value only when IMA_COLLECTED flag is set")
Reported-by: David Vernet <void@manifault.com>
Signed-off-by: Roberto Sassu <roberto.sassu@huawei.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Reviewed-by: Matt Bobrowski <mattbobrowski@google.com>
Link: https://lore.kernel.org/bpf/20230308103713.1681200-1-roberto.sassu@huaweicloud.com
2023-03-08 11:15:39 -08:00
..
accounting
arch bpf-next-for-netdev 2023-03-06 20:36:39 -08:00
bootconfig tools/bootconfig: fix single & used for logical condition 2023-02-22 08:27:35 +09:00
bpf tools/resolve_btfids: Add /libsubcmd to .gitignore 2023-03-06 16:23:01 +01:00
build tools build: Add test echo-cmd 2023-02-03 13:54:22 -03:00
certs
cgroup
counter
debugging
edid
firewire
firmware
gpio
hv
iio
include bpf-next-for-netdev 2023-03-06 20:36:39 -08:00
io_uring
kvm/kvm_stat
laptop
leds
lib libbpf: USDT arm arg parsing support 2023-03-07 15:35:53 -08:00
memory-model
mm tools/mm: allow users to provide additional cflags/ldflags 2023-02-02 22:33:24 -08:00
net/ynl tools: net: add __pycache__ to gitignore 2023-02-24 11:55:47 -08:00
objtool - Daniel Verkamp has contributed a memfd series ("mm/memfd: add 2023-02-23 17:09:35 -08:00
pci
pcmcia
perf - Daniel Verkamp has contributed a memfd series ("mm/memfd: add 2023-02-23 17:09:35 -08:00
power platform-drivers-x86 for v6.3-1 2023-02-21 17:32:50 -08:00
rcu
scripts selftests/bpf: Fix cross compilation with CLANG_CROSS_FLAGS 2023-02-22 13:04:55 -08:00
spi
testing selftests/bpf: Fix IMA test 2023-03-08 11:15:39 -08:00
thermal
time
tracing tracing updates for 6.3: 2023-02-23 10:20:49 -08:00
usb
verification
virtio tools/virtio: enable to build with retpoline 2023-02-20 19:26:59 -05:00
wmi
Makefile