Re: [RFC v2 09/13] mm: Restrict memory encryption to anonymous VMA's
From: Alison Schofield <alison.schofield@intel.com>
Date: 2018-12-05 05:27:47
Also in:
keyrings, linux-mm
From: Alison Schofield <alison.schofield@intel.com>
Date: 2018-12-05 05:27:47
Also in:
keyrings, linux-mm
On Tue, Dec 04, 2018 at 10:10:44AM +0100, Peter Zijlstra wrote:
quoted
+ * Encrypted mprotect is only supported on anonymous mappings. + * All VMA's in the requested range must be anonymous. If this + * test fails on any single VMA, the entire mprotect request fails. + */ +bool mem_supports_encryption(struct vm_area_struct *vma, unsigned long end)That's a 'weird' interface and cannot do what the comment says it should do.
More please? With MKTME, only anonymous memory supports encryption. Is it the naming that's weird, or you don't see it doing what it says?
quoted
+ struct vm_area_struct *test_vma = vma;That variable is utterly pointless.
Got it. Will fix. Thanks