From: Ian Campbell Subject: Re: ARM fixes for my improved privcmd patch. Date: Wed, 19 Dec 2012 12:22:25 +0000 Message-ID: <1355919745.14620.363.camel@zakaz.uk.xensource.com> References: <50CB5B32.50406@citrix.com> <1355763448.14620.111.camel@zakaz.uk.xensource.com> <50CF587B.5090602@citrix.com> <1355829451.14620.188.camel@zakaz.uk.xensource.com> <50D05358.30303@citrix.com> <1355830856.14620.206.camel@zakaz.uk.xensource.com> <50D074F5.6060202@citrix.com> <20121218160704.GA3543@phenom.dumpdata.com> <50D0C528.4090602@citrix.com> <1355914793.14620.319.camel@zakaz.uk.xensource.com> <50D1AEBD.1090202@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <50D1AEBD.1090202@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: Mats Petersson Cc: "xen-devel@lists.xensource.com" , Konrad Rzeszutek Wilk List-Id: xen-devel@lists.xenproject.org On Wed, 2012-12-19 at 12:10 +0000, Mats Petersson wrote: > >> + only likely to return EFAULT or some other "things are very > >> + bad" error code, which the rest of the calling code won't > >> + be able to fix up. So we just exit with the error we got. > > It expect it is more important to accumulate the individual errors from > > remap_pte_fn into err_ptr. > Yes, but since that exits on error with EFAULT, the calling code won't > "accept" the errors, and thus the whole house of cards fall apart at > this point. > > There should probably be a task to fix this up properly, hence the > comment. But right now, any error besides ENOENT is "unacceptable" by > the callers of this code. If you want me to add this to the comment, I'm > happy to. But as long as remap_pte_fn returns EFAULT on error, nothing > will work after an error. Are you sure? privcmd.c has some special casing for ENOENT but it looks like it should just pass through other errors back to userspace. In any case surely this needs fixing? On the X86 side err_ptr is the result of the mmupdate hypercall which can already be other than ENOENT, including EFAULT, ESRCH etc. Ian.