# Re: \[PATCH v23 12/24\] x86/sgx: Linux Enclave Driver

- From: Jarkko Sakkinen \<hidden\>
- Date: 2019-10-31 21:13:06 
- List: linux-security-module
- Page: https://ratatoskr.run/linux-security-module/2019/10/5762082
- Thread: https://ratatoskr.run/linux-security-module/2019/10/5758735/t.md

```text
On Wed, Oct 30, 2019 at 02:30:45AM -0700, Sean Christopherson wrote:
> Why?  The number of pages processed is effectively returned via the params
> on any error, e.g. wouldn't it be more appropriate to return -ERESTARTSYS?
> And I don't see any reason to add an arbitrary cap on the number of pages,
> e.g. SGX plays nice with the scheduler and signals, and restricting the
> number of EPC pages available to a process via cgroups (returning -ENOMEM)
> is a better solution for managing EPC.

Returning -ENOMEM does not tell you from which page to retry.

/Jarkko
```
