Re: [PATCH v34 11/24] x86/sgx: Add SGX enclave driver
From: Sean Christopherson
Date: Tue Jul 07 2020 - 00:46:29 EST
On Tue, Jul 07, 2020 at 05:39:04AM +0100, Matthew Wilcox wrote:
> although I think you have a simpler task.
>
> XA_STATE(xas, ..., start_index);
>
> for (;;) {
> struct page *page = xas_next(&xas);
>
> if (!page || (~page->vm_max_prot_bits & vm_prot_bits))
> return -EACCES;
> }
>
> return 0;
>
> should do the trick, I think.
Ah, neato. Thanks!