diff options
author | Ira Weiny <[email protected]> | 2021-03-24 11:22:46 -0700 |
---|---|---|
committer | Borislav Petkov <[email protected]> | 2021-03-25 09:50:32 +0100 |
commit | 633b0616cfe085679471a4c0fae02e8c3a1a9866 (patch) | |
tree | 908486d7ae417a5619a1fbb3a529136d3defcc75 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | f33dece70e11ce82a09cb1ea2d7c32347b82c67e (diff) |
x86/sgx: Remove unnecessary kmap() from sgx_ioc_enclave_init()
kmap() is inefficient and is being replaced by kmap_local_page(), if
possible. There is no readily apparent reason why initp_page needs to be
allocated and kmap'ed() except that 'sigstruct' needs to be page-aligned
and 'token' 512 byte-aligned.
Rather than change it to kmap_local_page(), use kmalloc() instead
because kmalloc() can give this alignment when allocating PAGE_SIZE
bytes.
Remove the alloc_page()/kmap() and replace with kmalloc(PAGE_SIZE, ...)
to get a page aligned kernel address.
In addition, add a comment to document the alignment requirements so that
others don't attempt to 'fix' this again.
[ bp: Massage commit message. ]
Signed-off-by: Ira Weiny <[email protected]>
Signed-off-by: Borislav Petkov <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions