On 04/12/2025 11:00 am, Grygorii Strashko wrote: > Hi Andrew, > > On 04.12.25 12:02, Andrew Cooper wrote: >> On 03/12/2025 10:24 pm, Grygorii Strashko wrote: >>> From: Grygorii Strashko <[email protected]> >>> >>> Added CONFIG_COVERAGE_EXTENDED to enable coverage for .init and lib >>> code. >>> When enabled - Xen .init data will not be freed. >>> >>> Signed-off-by: Grygorii Strashko <[email protected]> >>> --- >>> xen/Kconfig.debug | 10 ++++++++++ >>> xen/Rules.mk | 13 +++++++++++++ >>> xen/arch/arm/setup.c | 2 ++ >>> xen/arch/x86/setup.c | 4 ++++ >>> xen/common/libelf/Makefile | 4 +++- >>> xen/common/libfdt/Makefile | 4 +++- >>> 6 files changed, 35 insertions(+), 2 deletions(-) >>> >>> diff --git a/xen/Kconfig.debug b/xen/Kconfig.debug >>> index d900d926c555..3e04e1a3992b 100644 >>> --- a/xen/Kconfig.debug >>> +++ b/xen/Kconfig.debug >>> @@ -44,6 +44,16 @@ config COVERAGE >>> If unsure, say N here. >>> +config COVERAGE_EXTENDED >>> + bool "Extended Code coverage support" >>> + depends on COVERAGE >>> + default y >>> + help >>> + Enable Extended code coverage support which include .init and >>> libs code. >>> + The .init sections are not freed in this case. >>> + >>> + If unsure, say N here. >> >> IMO this is unhelpful. Noone wants to opt for the model we've got right >> now. >> >> Instead, I think we want: >> >> config RELAX_INIT_CHECK >> bool >> >> and have CONFIG_COVERAGE select it. There's no need for any user >> visible option here. >> > > So It will be always enabled if CONFIG_COVERAGE=y, Right?
Correct. Now I come to think of it, IIRC UBSAN is also excluded on init objects for related reasons. (At a later point), we can see about giving it a similar treatment. ~Andrew
