Annotate symbols correctly

Currently, tagging a symbol with #apex (# systemapi or # llndk) is not
required when the symbol is in a non-NDK library. However, this is
considered dangerous because such a symbol will automatically be
promoted to NDK APIs when the library is promoted to an NDK library.
When that happens, the native API council won't be able to notice the
promotion because promoting a non-NDK library into an NDK library
doesn't require an update of the map.txt file, but Android.bp only.

To prevent that, we should mandate those tags for Mainline APIs
regardless of whether the library the API belongs to is an NDK library
or not.

Upcoming changes in build/soong will enforce this. This change is to
prepare for the enforcement.

Note that this is a build-time only change. There's no behavior change
at runtime.

Bug: 184712170
Test: m
Change-Id: I168fbdcf0a2a9b4e987a5410db941c0b4e4d9c35
This commit is contained in:
Jiyong Park 2022-09-26 22:15:00 +09:00
parent 5cfe912553
commit 6d1bbcddc6

View file

@ -1,56 +1,56 @@
LIBSELINUX_R {
global:
fgetfilecon;
fgetfilecon_raw;
freecon;
fsetfilecon;
getcon;
getfilecon;
getpeercon;
getpidcon;
is_selinux_enabled;
lgetfilecon;
lsetfilecon;
security_compute_create;
security_get_initial_context;
security_getenforce;
security_load_policy;
security_policyvers;
security_setenforce;
selabel_close;
selabel_lookup;
selabel_lookup_best_match;
selabel_open;
selinux_android_file_context_handle;
selinux_android_hw_service_context_handle;
selinux_android_load_policy;
selinux_android_load_policy_from_fd;
selinux_android_restorecon;
selinux_android_restorecon_pkgdir;
selinux_android_seapp_context_init;
selinux_android_service_context_handle;
selinux_android_set_sehandle;
selinux_android_setcon;
selinux_android_setcontext;
selinux_android_vendor_service_context_handle;
selinux_check_access;
selinux_log_callback;
selinux_set_callback;
selinux_status_open;
selinux_status_updated;
selinux_vendor_log_callback;
set_selinuxmnt;
setcon;
setexeccon;
setfilecon;
setfscreatecon;
setsockcreatecon;
setsockcreatecon_raw;
string_to_security_class;
fgetfilecon; # llndk systemapi
fgetfilecon_raw; # llndk systemapi
freecon; # llndk systemapi
fsetfilecon; # llndk systemapi
getcon; # llndk systemapi
getfilecon; # llndk systemapi
getpeercon; # llndk systemapi
getpidcon; # llndk systemapi
is_selinux_enabled; # llndk systemapi
lgetfilecon; # llndk systemapi
lsetfilecon; # llndk systemapi
security_compute_create; # llndk systemapi
security_get_initial_context; # llndk systemapi
security_getenforce; # llndk systemapi
security_load_policy; # llndk systemapi
security_policyvers; # llndk systemapi
security_setenforce; # llndk systemapi
selabel_close; # llndk systemapi
selabel_lookup; # llndk systemapi
selabel_lookup_best_match; # llndk systemapi
selabel_open; # llndk systemapi
selinux_android_file_context_handle; # llndk systemapi
selinux_android_hw_service_context_handle; # llndk systemapi
selinux_android_load_policy; # llndk systemapi
selinux_android_load_policy_from_fd; # llndk systemapi
selinux_android_restorecon; # llndk systemapi
selinux_android_restorecon_pkgdir; # llndk systemapi
selinux_android_seapp_context_init; # llndk systemapi
selinux_android_service_context_handle; # llndk systemapi
selinux_android_set_sehandle; # llndk systemapi
selinux_android_setcon; # llndk systemapi
selinux_android_setcontext; # llndk systemapi
selinux_android_vendor_service_context_handle; # llndk systemapi
selinux_check_access; # llndk systemapi
selinux_log_callback; # llndk systemapi
selinux_set_callback; # llndk systemapi
selinux_status_open; # llndk systemapi
selinux_status_updated; # llndk systemapi
selinux_vendor_log_callback; # llndk systemapi
set_selinuxmnt; # llndk systemapi
setcon; # llndk systemapi
setexeccon; # llndk systemapi
setfilecon; # llndk systemapi
setfscreatecon; # llndk systemapi
setsockcreatecon; # llndk systemapi
setsockcreatecon_raw; # llndk systemapi
string_to_security_class; # llndk systemapi
local: *;
};
LIBSELINUX_S { # introduced=S
selinux_android_context_with_level;
selinux_android_keystore2_key_context_handle;
selinux_android_context_with_level; # llndk systemapi
selinux_android_keystore2_key_context_handle; # llndk systemapi
};