[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 4/4] xen/ubsan: Introduce and use CONFIG_UBSAN
On 03/10/17 19:07, Andrew Cooper wrote: > TODO at some future point: Fix the following known issues: > > Clang 3.9 - linker error in shadow/multi.c with fetch_type_names[]. With > UBSAN enabled, it appears that dead code elimination doesn't remove the > single reference to fetch_type_names[] which lives behind DEBUG_TRACE_DUMP. FYI, the linking error is: prelink.o: In function `_sh_propagate': /local/xen.git/xen/arch/x86/mm/shadow/multi.c:731: undefined reference to `fetch_type_names' And this patch works around the error: diff --git a/xen/arch/x86/mm/shadow/multi.c b/xen/arch/x86/mm/shadow/multi.c index 28030ac..7a7ad3d 100644 --- a/xen/arch/x86/mm/shadow/multi.c +++ b/xen/arch/x86/mm/shadow/multi.c @@ -75,15 +75,11 @@ typedef enum { ft_demand_write = FETCH_TYPE_DEMAND | FETCH_TYPE_WRITE, } fetch_type_t; -extern const char *const fetch_type_names[]; - -#if defined(DEBUG_TRACE_DUMP) && CONFIG_PAGING_LEVELS == GUEST_PAGING_LEVELS -const char *const fetch_type_names[] = { +static const char *const fetch_type_names[] = { [ft_prefetch] = "prefetch", [ft_demand_read] = "demand read", [ft_demand_write] = "demand write", }; -#endif /**************************************************************************/ /* Hash table mapping from guest pagetables to shadows However, this goes against the intended purpose of c/s 89173c1051a0 ~Andrew _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |