Re: [PATCH v2 0/4] Enable measuring the kernel's Source-based Code Coverage and MC/DC with Clang

2024-10-08 Thread Wentao Zhang
t; Another thing I noticed with this series is there is no entries added to > MAINTAINERS. Who is going to be responsible for maintaining this code? > We are going to add the following as the fifth patch in v3: diff --git a/MAINTAINERS b/MAINTAINERS index a097afd76..55438cb90 100644 --- a

Re: [PATCH v2 2/4] llvm-cov: add Clang's MC/DC support

2024-10-02 Thread Wentao Zhang
Hi Nathan, Thanks for your review! See some of my responses below inline. Other comments, including those to [1/4] and [4/4], are acknowledged and will be updated in v3. On 2024-10-01 20:10, Nathan Chancellor wrote: > ... > > maximum value supported by Clang is 32767. According to local experimen

Re: [PATCH v2 0/4] Enable measuring the kernel's Source-based Code Coverage and MC/DC with Clang

2024-10-01 Thread Wentao Zhang
Hi Nathan, Thanks for all the comments! On 2024-10-01 23:53, Nathan Chancellor wrote: > Hi Wentao, > > I took this series for a spin on next-20241001 with LLVM 19.1.0 using a > distribution configuration tailored for a local development VM using > QEMU. You'll notice on the rebase for 6.12-rc1 bu

Re: [PATCH v2 0/4] Enable measuring the kernel's Source-based Code Coverage and MC/DC with Clang

2024-09-05 Thread Wentao Zhang
On 2024-09-05 06:41, Peter Zijlstra wrote: > On Wed, Sep 04, 2024 at 11:32:41PM -0500, Wentao Zhang wrote: >> From: Wentao Zhang >> >> This series adds support for building x86-64 kernels with Clang's Source- >> based Code Coverage[1] in order to facilitate Modifie

[PATCH v2 4/4] x86: enable llvm-cov support

2024-09-04 Thread Wentao Zhang
Set ARCH_HAS_* options to "y" in kconfig and include section description in linker script. Signed-off-by: Wentao Zhang Reviewed-by: Chuck Wolber Tested-by: Chuck Wolber --- arch/x86/Kconfig | 2 ++ arch/x86/kernel/vmlinux.lds.S | 2 ++ 2 files changed, 4 insertions(+)

[PATCH v2 1/4] llvm-cov: add Clang's Source-based Code Coverage support

2024-09-04 Thread Wentao Zhang
] Link: https://lore.kernel.org/lkml/20210407211704.367039-1-mo...@google.com/ [2] Signed-off-by: Wentao Zhang Reviewed-by: Chuck Wolber Tested-by: Chuck Wolber --- Makefile | 3 + arch/Kconfig | 1 + include/asm-generic/vmlinux.lds.h | 36 + ker

[PATCH v2 2/4] llvm-cov: add Clang's MC/DC support

2024-09-04 Thread Wentao Zhang
https://en.wikipedia.org/wiki/Modified_condition%2Fdecision_coverage [1] Link: https://digital-library.theiet.org/content/journals/10.1049/sej.1994.0025 [2] Link: https://discourse.llvm.org/t/rfc-coverage-new-algorithm-and-file-format-for-mc-dc/76798 [3] Link: https://clang.llvm.org/docs/Sourc

[PATCH v2 3/4] x86: disable llvm-cov instrumentation

2024-09-04 Thread Wentao Zhang
ot;). Signed-off-by: Wentao Zhang Reviewed-by: Chuck Wolber Tested-by: Chuck Wolber --- arch/x86/crypto/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/x86/crypto/Makefile b/arch/x86/crypto/Makefile index 53b4a2778..57f3d4921 100644 --- a/arch/x86/crypto/Makefile +

[PATCH v2 0/4] Enable measuring the kernel's Source-based Code Coverage and MC/DC with Clang

2024-09-04 Thread Wentao Zhang
From: Wentao Zhang This series adds support for building x86-64 kernels with Clang's Source- based Code Coverage[1] in order to facilitate Modified Condition/Decision Coverage (MC/DC)[2] that provably correlates to source code for all levels of compiler optimization. The newly added kernel

[RFC PATCH 3/3] llvm-cov: add Clang's MC/DC support

2024-08-24 Thread Wentao Zhang
[2] [1] https://discourse.llvm.org/t/rfc-coverage-new-algorithm-and-file-format-for-mc-dc/76798 [2] https://clang.llvm.org/docs/SourceBasedCodeCoverage.html#mc-dc-instrumentation Signed-off-by: Wentao Zhang Signed-off-by: Chuck Wolber --- Makefile| 6 ++ kernel/llvm-cov/Kco

[RFC PATCH 2/3] kbuild, llvm-cov: disable instrumentation in odd or sensitive code

2024-08-24 Thread Wentao Zhang
Disable instrumentation in the same areas that were disabled for kernel/gcov/ Signed-off-by: Wentao Zhang Signed-off-by: Chuck Wolber --- arch/x86/boot/Makefile| 1 + arch/x86/boot/compressed/Makefile | 1 + arch/x86/entry/vdso/Makefile | 1 + arch/x86/platform/efi

[RFC PATCH 1/3] llvm-cov: add Clang's Source-based Code Coverage support

2024-08-24 Thread Wentao Zhang
/lkml/20210407211704.367039-1-mo...@google.com/ Signed-off-by: Wentao Zhang Signed-off-by: Chuck Wolber --- Makefile | 3 + arch/Kconfig | 1 + arch/x86/Kconfig | 1 + arch/x86/kernel/vmlinux.lds.S | 2 + include/asm

[RFC PATCH 0/3] Enable measuring the kernel's Source-based Code Coverage and MC/DC with Clang

2024-08-24 Thread Wentao Zhang
om/ [5] https://github.com/xlab-uiuc/linux-mcdc [6] https://lpc.events/event/18/contributions/1718/ [7] https://clang.llvm.org/docs/SourceBasedCodeCoverage.html#mc-dc-instrumentation Wentao Zhang (3): [RFC PATCH 1/3] llvm-cov: add Clang's Source-based Code Coverage support [RFC PATCH 2/3