From mboxrd@z Thu Jan 1 00:00:00 1970 From: Glauber Costa Subject: Re: [patch 10/16] x86: vdso: pvclock gettime support Date: Thu, 1 Nov 2012 18:41:46 +0400 Message-ID: <50928A2A.70104@parallels.com> References: <20121031224656.417434866@redhat.com> <20121031224824.293748067@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Cc: , , , , , , To: Marcelo Tosatti Return-path: Received: from mx2.parallels.com ([64.131.90.16]:54250 "EHLO mx2.parallels.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1761754Ab2KAOly (ORCPT ); Thu, 1 Nov 2012 10:41:54 -0400 In-Reply-To: <20121031224824.293748067@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: 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