From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Tosatti Subject: Re: [patch 10/16] x86: vdso: pvclock gettime support Date: Thu, 1 Nov 2012 19:42:43 -0200 Message-ID: <20121101214243.GC19712@amt.cnet> References: <20121031224656.417434866@redhat.com> <20121031224824.293748067@redhat.com> <50928A2A.70104@parallels.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm@vger.kernel.org, johnstul@us.ibm.com, jeremy@goop.org, zamsden@gmail.com, gleb@redhat.com, avi@redhat.com, pbonzini@redhat.com To: Glauber Costa Return-path: Received: from mx1.redhat.com ([209.132.183.28]:23401 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2992568Ab2KAWlA (ORCPT ); Thu, 1 Nov 2012 18:41:00 -0400 Content-Disposition: inline In-Reply-To: <50928A2A.70104@parallels.com> Sender: kvm-owner@vger.kernel.org List-ID: On Thu, Nov 01, 2012 at 06:41:46PM +0400, Glauber Costa wrote: > On 11/01/2012 02:47 AM, Marcelo Tosatti wrote: > > +#ifdef CONFIG_PARAVIRT_CLOCK > > + > > +static notrace const struct pvclock_vsyscall_time_info *get_pvti(int cpu) > > +{ > > + const aligned_pvti_t *pvti_base; > > + int idx = cpu / (PAGE_SIZE/PVTI_SIZE); > > + int offset = cpu % (PAGE_SIZE/PVTI_SIZE); > > + > > + BUG_ON(PVCLOCK_FIXMAP_BEGIN + idx > PVCLOCK_FIXMAP_END); > > + > > + pvti_base = (aligned_pvti_t *)__fix_to_virt(PVCLOCK_FIXMAP_BEGIN+idx); > > + > > + return &pvti_base[offset].info; > > +} > > + > Does BUG_ON() really do what you believe it does while in userspace > context? We're not running with the kernel descriptors, so this will > probably just kill the process without any explanation A coredump is generated which can be used to trace back to ud2a instruction at the vdso code.