Re: 4.4.11[01] build failure: undefined reference to `pvclock_pvti_cpu0_va'

From: Greg Kroah-Hartman
Date: Wed Jan 10 2018 - 10:03:30 EST


On Wed, Jan 10, 2018 at 12:32:52PM +0000, James Dingwall wrote:
> On Fri, Jan 05, 2018 at 09:50:53PM +0000, James Dingwall wrote:
> > Hi,
> >
> > I have just tried to build 4.4.110 but it failed with following message:
> >
> > arch/x86/built-in.o: In function `map_vdso':
> > vma.c:(.text+0x8a3): undefined reference to `pvclock_pvti_cpu0_va'
> > make: *** [Makefile:953: vmlinux] Error 1
> >
> > I found https://patchwork.kernel.org/patch/7906831/ which has a similar error and suggests that not enabling CONFIG_KVM_GUEST could be the cause, this is not set
> > in my .config. I suspect this commit from the patch could be the cause: 755bd549d9328d6d1e949a0a213f9a78e84d11fc. Comparing arch/x86/include/asm/pvclock.h to
> > 4.9.75 shows a different #ifdef condition:
> >
> > 4.4:
> >
> > #ifdef CONFIG_PARAVIRT_CLOCK
> > extern struct pvclock_vsyscall_time_info *pvclock_pvti_cpu0_va(void);
> > #else
> > static inline struct pvclock_vsyscall_time_info *pvclock_pvti_cpu0_va(void)
> > {
> > return NULL;
> > }
> > #endif
> >
> >
> > 4.9:
> >
> > #ifdef CONFIG_KVM_GUEST
> > extern struct pvclock_vsyscall_time_info *pvclock_pvti_cpu0_va(void);
> > #else
> > static inline struct pvclock_vsyscall_time_info *pvclock_pvti_cpu0_va(void)
> > {
> > return NULL;
> > }
> > #endif
> >
> > The #ifdef was changed by 8705d603edd49f1cff165cd3b7998f4c7f098d27 so perhaps that is required on the 4.4 stable branch?
>
> My .config still fails with 4.4.111, 516fa79e77f7c4490ded10e7e1c36758482bde5a doesn't seem to be the fix.
> cherry-picking 8705d603edd49f1cff165cd3b7998f4c7f098d27 makes the build work.

Thanks for letting me know, I've now queued that one up.

greg k-h