kcov: don't instrument lib/find_bit.c
Subsystems (2)
PATCH 1/1 kcov: don't instrument lib/find_bit.c
From: Andrey Konovalov <[email protected]>
This file produces large amounts of flaky coverage not useful for the KCOV's intended use case (guiding the fuzzing process).
---
I noticed this while running one of the syzkaller's programs.
In one run of the program, the number of KCOV entries amounts to ~300k, with the top ones:
117285 /home/user/src/lib/find_bit.c:137 (discriminator 10) 116752 /home/user/src/lib/find_bit.c:137 (discriminator 3) 2455 /home/user/src/lib/vsprintf.c:2559 2033 /home/user/src/fs/kernfs/dir.c:317 1662 /home/user/src/fs/kernfs/kernfs-internal.h:72 ...
In another run (that triggers exactly the same behavior in the kernel), the amount of entries drops to ~110k:
7141 /home/user/src/lib/find_bit.c:137 (discriminator 10)
7110 /home/user/src/lib/find_bit.c:137 (discriminator 3)
2455 /home/user/src/lib/vsprintf.c:2559
2033 /home/user/src/fs/kernfs/dir.c:317
1662 /home/user/src/fs/kernfs/kernfs-internal.h:72
...With this patch applied, the amount of KCOV entries for the same program remains somewhat stable at ~100k.
--- lib/Makefile | 1 + 1 file changed, 1 insertion(+)
lib/Makefile +1 -0
@@ -14,6 +14,7 @@ KCOV_INSTRUMENT_list_debug.o := n KCOV_INSTRUMENT_debugobjects.o := n KCOV_INSTRUMENT_dynamic_debug.o := n KCOV_INSTRUMENT_fault-inject.o := n +KCOV_INSTRUMENT_find_bit.o := n # string.o implements standard library functions like memset/memcpy etc. # Use -ffreestanding to ensure that the compiler does not try to "optimize"
Signature · 1 line
2.25.1
Quoted 7 lines · On Tue, 23 Jul 2024 at 00:37, <[email protected]> wrote:
From: Andrey Konovalov <[email protected]>
This file produces large amounts of flaky coverage not useful for the KCOV's intended use case (guiding the fuzzing process).
Signed-off-by Andrey Konovalov <[email protected]>
Quoted 49 lines
---
I noticed this while running one of the syzkaller's programs.
In one run of the program, the number of KCOV entries amounts to ~300k, with the top ones:
117285 /home/user/src/lib/find_bit.c:137 (discriminator 10) 116752 /home/user/src/lib/find_bit.c:137 (discriminator 3) 2455 /home/user/src/lib/vsprintf.c:2559 2033 /home/user/src/fs/kernfs/dir.c:317 1662 /home/user/src/fs/kernfs/kernfs-internal.h:72 ...In another run (that triggers exactly the same behavior in the kernel), the amount of entries drops to ~110k:
7141 /home/user/src/lib/find_bit.c:137 (discriminator 10) 7110 /home/user/src/lib/find_bit.c:137 (discriminator 3) 2455 /home/user/src/lib/vsprintf.c:2559 2033 /home/user/src/fs/kernfs/dir.c:317 1662 /home/user/src/fs/kernfs/kernfs-internal.h:72 ...With this patch applied, the amount of KCOV entries for the same program remains somewhat stable at ~100k.
--- lib/Makefile | 1 + 1 file changed, 1 insertion(+)lib/Makefile +1
-1@@ -14,6 +14,7 @@ KCOV_INSTRUMENT_list_debug.o := n KCOV_INSTRUMENT_debugobjects.o := n KCOV_INSTRUMENT_dynamic_debug.o := n KCOV_INSTRUMENT_fault-inject.o := n +KCOV_INSTRUMENT_find_bit.o := n # string.o implements standard library functions like memset/memcpy etc. # Use -ffreestanding to ensure that the compiler does not try to "optimize" --2.25.1
--
You received this message because you are subscribed to the Google Groups "kasan-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/kasan-dev/20240722223726.194658-1-andrey.konovalov%40linux.dev.