misc: pkvm_smc: Add an allow list for SMCs
Filter SMCs based on allow list, where they can be further filtered
based on arguments (some arguments might hold addresses that aren't
allowed for example)
The driver has list of different trusted OS services as defined by
trusty[1].
The list is hardcoded in the driver, we can improve this to generate
them dynamically.
The current implemention relies on binary search of all IDs, alternatively
we can use switch cases per service then binary search function IDs, or
even tweak the search for some services to further split the function ID
space.
[1] https://android.googlesource.com/trusty/lk/trusty/+/refs/heads/master/lib/sm/include/lib/sm/smcall.h
Signed-off-by: Mostafa Saleh <smostafa@google.com>
1 file changed