Re: [RFC PATCH v4 2/4] x86/sgx: Implement support for MADV_WILLNEED

jarkko
2023-03-12T01:25:14Z

On Tue, Mar 07, 2023 at 11:32:15PM +0000, Huang, Kai wrote:
> And in following mmap()s in which we want to map a small range of enclave:
>
> encl_addr = mmap(encl_addr, MAP_SHARED|MAP_FIXED, encl_fd,
> (encl_addr - encl_base) >> PAGE_SHIFT);
>
> ?
>
> Anything wrong above?

I'm not sure I fully comprehended your response because it was
honestly a bit scattered so please correct me if I'm missing
something but: why a process would want to map a small range
of an enclave?

You anyway most likely want to enter to the enclave. Is this
for ptrace()?

BR, Jarkko