[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191202182102.GF4063@linux.intel.com>
Date: Mon, 2 Dec 2019 10:21:03 -0800
From: Sean Christopherson <sean.j.christopherson@...el.com>
To: Haitao Huang <haitao.huang@...ux.intel.com>
Cc: linux-kernel@...r.kernel.org, x86@...nel.org,
linux-sgx@...r.kernel.org,
Jarkko Sakkinen <jarkko.sakkinen@...ux.intel.com>,
akpm@...ux-foundation.org, dave.hansen@...el.com,
nhorman@...hat.com, npmccallum@...hat.com, serge.ayoun@...el.com,
shay.katz-zamir@...el.com, haitao.huang@...el.com,
andriy.shevchenko@...ux.intel.com, tglx@...utronix.de,
kai.svahn@...el.com, bp@...en8.de, josh@...htriplett.org,
luto@...nel.org, kai.huang@...el.com, rientjes@...gle.com,
cedric.xing@...el.com, puiterwijk@...hat.com,
linux-security-module@...r.kernel.org,
Suresh Siddha <suresh.b.siddha@...el.com>
Subject: Re: [PATCH v24 12/24] x86/sgx: Linux Enclave Driver
On Mon, Dec 02, 2019 at 09:48:43AM -0600, Haitao Huang wrote:
> On Fri, 29 Nov 2019 17:13:14 -0600, Jarkko Sakkinen
> <jarkko.sakkinen@...ux.intel.com> wrote:
>
>
> >+
> >+ for (c = 0 ; c < addp.length; c += PAGE_SIZE) {
> >+ if (signal_pending(current)) {
> >+ ret = -ERESTARTSYS;
> >+ break;
> >+ }
>
> This IOC is not idempotent as pages EADDed at this point can not be
> re-EADDed again. So we can't return ERESTARTSYS
Ah, and now I remember why I opted for modifying the parameters directly
instead of including a "number processed" field. Andy pointed out the
ERESTARTSYS thing in the original multi-page add RFC[*], so presumably
updating the params and returning ERESTARTSYS is legal/acceptable.
[*] https://lkml.kernel.org/r/CALCETrUb4X9_L9RXKhmyNpfSCsbNodP=BfbfO8Fz_efq24jp8w@mail.gmail.com
Powered by blists - more mailing lists