From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH v4 03/15] xen: arm: correctly handle vtimer traps from userspace Date: Fri, 27 Mar 2015 15:57:48 +0000 Message-ID: <55157DFC.6030503@linaro.org> References: <1427466798.13935.158.camel@citrix.com> <1427466824-31967-3-git-send-email-ian.campbell@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1427466824-31967-3-git-send-email-ian.campbell@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell , xen-devel@lists.xen.org Cc: tim@xen.org, stefano.stabellini@eu.citrix.com List-Id: xen-devel@lists.xenproject.org Hi Ian, On 27/03/15 14:33, Ian Campbell wrote: > Previously 32-bit userspace on 32-bit kernel and 64-bit userspace on > 64-bit kernel could access these registers irrespective of whether the > kernel had configured them to be allowed to. To fix this: > > - Userspace access to CNTP_CTL_EL0 and CNTP_TVAL_EL0 should be gated > on CNTKCTL_EL1.EL0PTEN. > - Userspace access to CNTPCT_EL0 should be gated on > CNTKCTL_EL1.EL0PCTEN. > > When we do not handle an access we now silently inject an undef even > in debug mode since the debugging messages are not helpful (we have > handled the access, by explicitly choosing not to). > > The usermode accessibility check is rather repetitive, so a helper > macro is introduced. > > Since HSR_EC_CP15_64 cannot be taken from a guest in AArch64 mode > except due to a hardware bug switch the associated check to a BUG_ON > (which will be switched to something more appropriate in a subsequent > patch) > > Fix a coding style issue in HSR_CPREG64(CNTPCT) while touching similar > code. > > Signed-off-by: Ian Campbell Reviewed-by: Julien Grall Regards, -- Julien Grall