OSDN Git Service

x86/sgx: Improve comments for sgx_encl_lookup/alloc_backing()
authorKristen Carlson Accardi <kristen.c.accardi@intel.com>
Fri, 12 Aug 2022 18:18:03 +0000 (11:18 -0700)
committerBorislav Petkov <bp@suse.de>
Mon, 15 Aug 2022 09:51:49 +0000 (11:51 +0200)
commitee56a283988d739c25d2d00ffb22707cb487ab47
tree341e3274d56fcdb23438343093fe6a481075c9db
parent568035b01cfb107af8d2e4bd2fb9aea22cf5b868
x86/sgx: Improve comments for sgx_encl_lookup/alloc_backing()

Modify the comments for sgx_encl_lookup_backing() and for
sgx_encl_alloc_backing() to indicate that they take a reference
which must be dropped with a call to sgx_encl_put_backing().
Make sgx_encl_lookup_backing() static for now, and change the
name of sgx_encl_get_backing() to __sgx_encl_get_backing() to
make it more clear that sgx_encl_get_backing() is an internal
function.

Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lore.kernel.org/all/YtUs3MKLzFg+rqEV@zn.tnic/
arch/x86/kernel/cpu/sgx/encl.c
arch/x86/kernel/cpu/sgx/encl.h