Re: [RFC PATCH v2 1/6] kcov: add per-task dataflow tracking for function arguments/return values

Yunseong Kim <[email protected]> Fri, 12 Jun 2026 09:55:25 +0200
Newsgroups org.kernel.vger.workflows,dev.linux.lists.llvm,org.kernel.vger.linux-doc,org.kernel.vger.linux-kbuild,org.kernel.vger.linux-kernel,org.kernel.vger.rust-for-linux
Message-ID <[email protected]>
Hi Peter,

> On Wed, Jun 03, 2026 at 07:43:28PM +0200, Yunseong Kim wrote:
>> diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
>> index e2f976c3301b..abd1a94589aa 100644
>> --- a/lib/Kconfig.debug
>> +++ b/lib/Kconfig.debug
>> @@ -2261,6 +2261,28 @@ config KCOV_SELFTEST
>>  	  On test failure, causes the kernel to panic. Recommended to be
>>  	  enabled, ensuring critical functionality works as intended.
>>  
>> +
> 
> ^ This line...
> 
>> +config KCOV_DATAFLOW_ARGS
>> +	bool "Enable KCOV dataflow: function argument capture"
>> +	depends on KCOV
>> +	depends on $(cc-option,-fsanitize-coverage=dataflow-args)
>> +	help
>> +	  Captures function arguments at entry via /sys/kernel/debug/kcov_dataflow.
>> +	  Struct pointer arguments are auto-expanded using compiler DebugInfo
>> +	  metadata, recording individual field values at runtime.
>> +	  Enable per-module with: KCOV_DATAFLOW_file.o := y in the Makefile.
>> +	  Requires clang with -fsanitize-coverage=dataflow-args support.
>> +
>> +config KCOV_DATAFLOW_RET
>> +	bool "Enable KCOV dataflow: return value capture"
>> +	depends on KCOV
>> +	depends on $(cc-option,-fsanitize-coverage=dataflow-ret)
>> +	help
>> +	  Captures function return values via /sys/kernel/debug/kcov_dataflow.
>> +	  Struct pointer returns are auto-expanded using compiler DebugInfo
>> +	  metadata, recording individual field values at runtime.
>> +	  Enable per-module with: KCOV_DATAFLOW_file.o := y in the Makefile.
>> +	  Requires clang with -fsanitize-coverage=dataflow-ret support.
> 
> Probably wants to be here...

Thank you for code review. I updated at v2 patch.

> 
>>  config DEBUG_AID_FOR_SYZBOT
>>         bool "Additional debug code for syzbot"
>>         default n
>>
>> -- 
>> 2.43.0
>>

Best regards,
Yunseong