Re: [PATCH v40 10/24] mm: Add 'mprotect' hook to struct vm_operations_struct

From: Dave Hansen
Date: Sat Nov 07 2020 - 14:16:31 EST


On 11/7/20 7:09 AM, Dr. Greg wrote:
> In all of these discussions there hasn't been a refutation of my point
> that the only reason this hook is needed is to stop the potential for
> anonymous code execution on SGX2 capable hardware. So we will assume,
> that while unspoken, this is the rationale for the hook.

Unspoken? See from the cover letter:

> 3. Enclave page permissions are dynamic (just like normal permissions) and
> can be adjusted at runtime with mprotect().

I explicitly chose not to name the instructions, nor the exact version
of the SGX ISA that introduces them. They're supported in the series,
and that's all that matters.

If you want to advocate for something different to be done, patches are
accepted.