>>> On 02.09.16 at 13:47, <wei.l...@citrix.com> wrote:

Since this is a config option - why bother issuing a warning and
tainting the hypervisor?

> --- a/xen/common/gcov/gcov.c
> +++ b/xen/common/gcov/gcov.c
> @@ -23,6 +23,11 @@
>  #include <public/xen.h>
>  #include <public/gcov.h>
>  
> +const char __initconst warning_gcov[] =
> +    "WARNING: GCOV SUPPORT IS ENABLED\n"
> +    "This option is *ONLY* intended to aid testing of Xen.\n"
> +    "Please *DO NOT* use this in production.\n";

Note the type (const) difference between this and ...

> --- a/xen/drivers/char/console.c
> +++ b/xen/drivers/char/console.c
> @@ -792,6 +792,10 @@ void __init console_init_postirq(void)
>      console_init_ring();
>  }
>  
> +#ifdef CONFIG_GCOV
> +extern char warning_gcov[];
> +#endif

... this. That's one of the reasons declarations of stuff defined in
C sources should be put in a header, which then gets included by
both producer and consumer(s). But ...

> @@ -802,6 +806,11 @@ void __init console_endboot(void)
>          printk(" (Rate-limited: %s)", loglvl_str(xenlog_guest_upper_thresh));
>      printk("\n");
>  
> +#ifdef CONFIG_GCOV
> +    warning_add(warning_gcov);
> +    add_taint(TAINT_GCOV);
> +#endif

... (if we want this in the first place) how about

#ifdef CONFIG_GCOV
    {
        static const char __initconst warning_gcov[] = "...";

        warning_add(warning_gcov);
        add_taint(TAINT_GCOV);
    }
#endif

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

Reply via email to