| /linux/kernel/ |
| H A D | kcov.c | 2 #define pr_fmt(fmt) "kcov: " fmt 25 #include <linux/kcov.h> 36 * kcov descriptor (one per opened debugfs file). 48 struct kcov { struct 70 * Sequence is incremented each time kcov is reenabled, used by argument 83 struct kcov *kcov; member 98 struct kcov *saved_kcov; 119 static struct kcov_remote *kcov_remote_add(struct kcov *kcov, u64 handle) in kcov_remote_add() argument 129 remote->kcov = kcov; in kcov_remote_add() 356 static void kcov_start(struct task_struct *t, struct kcov *kcov, in kcov_start() argument [all …]
|
| /linux/Documentation/translations/zh_CN/dev-tools/ |
| H A D | kcov.rst | 5 :Original: Documentation/dev-tools/kcov.rst 8 KCOV: 用于模糊测试的代码覆盖率 11 KCOV 以一种适用于覆盖率引导的模糊测试的形式收集和暴露内核代码覆盖率信息。 12 一个正在运行的内核的覆盖率数据可以通过 ``kcov`` 调试文件导出。覆盖率的收集是基 13 于任务启用的,因此 KCOV 可以精确捕获单个系统调用的覆盖率。 15 要注意的是 KCOV 不是为了收集尽可能多的覆盖率数据。而是为了收集相对稳定的覆盖率 19 除了收集代码覆盖率,KCOV 还收集操作数比较的覆盖率。见 "操作数比较收集" 一节 22 除了从系统调用处理器收集覆盖率数据,KCOV 还从后台内核或软中断任务中执行的内核 28 KCOV 依赖编译器插桩,要求 GCC 6.1.0 及更高版本或者内核支持的任意版本的 Clang。 32 为了启用 KCOV,需要使用如下参数配置内核:: [all …]
|
| H A D | index.rst | 23 kcov
|
| /linux/Documentation/dev-tools/ |
| H A D | kcov.rst | 1 KCOV: code coverage for fuzzing 4 KCOV collects and exposes kernel code coverage information in a form suitable 6 the ``kcov`` debugfs file. Coverage collection is enabled on a task basis, and 7 thus KCOV can capture precise coverage of a single system call. 9 Note that KCOV does not aim to collect as much coverage as possible. It aims 15 Besides collecting code coverage, KCOV can also collect comparison operands. 18 Besides collecting coverage data from syscall handlers, KCOV can also collect 26 KCOV relies on compiler instrumentation and requires GCC 6.1.0 or later 31 To enable KCOV, configure the kernel with:: 46 The following program demonstrates how to use KCOV to collect coverage for a [all …]
|
| H A D | index.rst | 26 kcov
|
| H A D | testing-overview.rst | 75 used with the kernel to get global or per-module coverage. Unlike KCOV, it 79 Documentation/dev-tools/kcov.rst is a feature which can be built in to the
|
| /linux/include/linux/ |
| H A D | kcov.h | 6 #include <uapi/linux/kcov.h> 15 /* KCOV was initialized, but tracing mode hasn't been chosen yet. */ 24 /* The process owns a KCOV remote reference. */ 43 /* See Documentation/dev-tools/kcov.rst for usage details. */ 60 * work around for kcov's lack of nested remote coverage sections support in
|
| H A D | sched.h | 1503 /* See kernel/kcov.c for more details. */ 1514 /* KCOV descriptor wired with this task or NULL: */ 1515 struct kcov *kcov; member 1517 /* KCOV common handle for remote coverage collection: */ 1520 /* KCOV sequence number: */
|
| /linux/scripts/ |
| H A D | Makefile.kcov | 2 kcov-flags-y += -fsanitize-coverage=trace-pc 3 kcov-flags-$(CONFIG_KCOV_ENABLE_COMPARISONS) += -fsanitize-coverage=trace-cmp 5 kcov-rflags-y += -Cpasses=sancov-module 6 kcov-rflags-y += -Cllvm-args=-sanitizer-coverage-level=3 7 kcov-rflags-y += -Cllvm-args=-sanitizer-coverage-trace-pc 8 kcov-rflags-$(CONFIG_KCOV_ENABLE_COMPARISONS) += -Cllvm-args=-sanitizer-coverage-trace-compares 10 export CFLAGS_KCOV := $(kcov-flags-y) 11 export RUSTFLAGS_KCOV := $(kcov-rflags-y)
|
| /linux/arch/x86/kernel/ |
| H A D | Makefile | 47 # Disable KCOV to prevent crashes during kexec: load_segments() invalidates 48 # the GS base, which KCOV relies on for per-CPU data. 50 # As KCOV and KEXEC compatibility should be preserved (e.g. syzkaller is 52 # KCOV for KEXEC kernels is not an option. Selectively disabling KCOV 54 # adding more checks to KCOV would slow it down. 56 # As a compromise solution, disable KCOV instrumentation for the whole
|
| /linux/arch/powerpc/mm/nohash/ |
| H A D | Makefile | 13 # Disable kcov instrumentation on sensitive code 14 # This is necessary for booting with kcov enabled on book3e machines
|
| /linux/Documentation/features/debug/kcov/ |
| H A D | arch-support.txt | 2 # Feature name: kcov 4 # description: arch supports kcov for coverage-guided fuzzing
|
| /linux/include/uapi/linux/ |
| H A D | kcov.h | 8 * Argument for KCOV_REMOTE_ENABLE ioctl, see Documentation/dev-tools/kcov.rst 30 * In new KCOV version the mode is chosen by calling
|
| /linux/arch/arm64/kernel/ |
| H A D | Makefile | 22 # It's not safe to invoke KCOV when portions of the kernel environment aren't 24 # inhibit KCOV instrumentation, disable it for the entire compilation unit.
|
| /linux/arch/powerpc/kexec/ |
| H A D | Makefile | 14 # Disable GCOV, KCOV & sanitizers in odd or sensitive code
|
| /linux/Documentation/translations/zh_TW/dev-tools/ |
| H A D | index.rst | 35 - kcov
|
| H A D | testing-overview.rst | 78 Documentation/dev-tools/kcov.rst 是能夠構建在內核之中,用於在每個任務
|
| /linux/arch/um/ |
| H A D | Kconfig.debug | 19 depends on !KCOV
|
| /linux/arch/x86/mm/ |
| H A D | Makefile | 7 # See the "Disable KCOV" comment in arch/x86/kernel/Makefile.
|
| /linux/lib/ |
| H A D | Kconfig.debug | 2213 config KCOV config 2221 KCOV exposes kernel code coverage information in a form suitable 2224 For more details, see Documentation/dev-tools/kcov.rst. 2227 bool "Enable comparison operands collection by KCOV" 2228 depends on KCOV 2231 KCOV also exposes operands of every comparison in the instrumented 2238 depends on KCOV 2249 depends on KCOV 2252 KCOV uses preallocated per-cpu areas to collect coverage from 2258 depends on KCOV [all …]
|
| /linux/drivers/usb/usbip/ |
| H A D | usbip_common.h | 21 #include <linux/kcov.h>
|
| /linux/net/nfc/ |
| H A D | rawsock.c | 15 #include <linux/kcov.h>
|
| /linux/arch/powerpc/kernel/ |
| H A D | setup_64.c | 351 * If we are using kcov it will call in_task() in its instrumentation, in early_setup() 355 * printk(), which can trigger both stack protector and kcov. in early_setup()
|
| /linux/net/nfc/nci/ |
| H A D | hci.c | 17 #include <linux/kcov.h>
|
| /linux/tools/objtool/ |
| H A D | check.c | 1250 /* KCOV */ 1403 * Many compilers cannot disable KCOV or sanitizer calls with a function in annotate_call_site() 1631 * GCOV/KCOV dead code can jump to the end of in add_jump_destinations() 2519 * Many compilers cannot disable KCOV with a function attribute. in is_profiling_func() 4666 * KCOV and such which we have no hope of annotating. in __validate_ibt_insn()
|