ANDROID: GKI: enable KMI enforcement

Add android/abi_gki_aarch64.stg as initial ABI representation of the
KMI and start enforcing KMI. Kernel is not trimmed yet, the trimming
will be enabled after adding symbols lists.

This is not KMI freeze. While this is hard enforcement in the code
base, we still allow controlled changes to the ABI.

Test: TH
Bug: 269323432
Change-Id: Ic3a126a6d60242ae713ae396bb239af5b3e58c53
Signed-off-by: Aleksei Vetrov <vvvvvv@google.com>
This commit is contained in:
Aleksei Vetrov 2023-02-16 14:03:19 +00:00
parent a42f6e7d0a
commit ad1cfe4df1
3 changed files with 355478 additions and 10 deletions

View File

@ -12,41 +12,53 @@ package(
],
)
_aarch64_additional_kmi_symbol_lists = [
# keep sorted
"android/abi_gki_aarch64_qcom",
"android/abi_gki_aarch64_virtual_device",
]
define_common_kernels(target_configs = {
"kernel_aarch64": {
"module_implicit_outs": COMMON_GKI_MODULES_LIST,
"additional_kmi_symbol_lists": [], # Temporarily disable vendor symbol lists. This will be reverted before freezing the KMI.
# TODO(b/269346251): re-enable strict mode
"kmi_symbol_list_strict_mode": False,
"module_implicit_outs": COMMON_GKI_MODULES_LIST,
"kmi_symbol_list": "android/abi_gki_aarch64",
"additional_kmi_symbol_lists": _aarch64_additional_kmi_symbol_lists,
# TODO(b/269587270): re-enable trimming
"trim_nonlisted_kmi": False,
},
"kernel_aarch64_16k": {
"module_implicit_outs": COMMON_GKI_MODULES_LIST,
"additional_kmi_symbol_lists": [], # Temporarily disable vendor symbol lists. This will be reverted before freezing the KMI.
"kmi_symbol_list_strict_mode": False,
"module_implicit_outs": COMMON_GKI_MODULES_LIST,
# TODO(b/269587270): re-enable trimming
"trim_nonlisted_kmi": False,
},
"kernel_aarch64_debug": {
"module_implicit_outs": COMMON_GKI_MODULES_LIST,
"additional_kmi_symbol_lists": [], # Temporarily disable vendor symbol lists. This will be reverted before freezing the KMI.
# TODO(b/269346251): re-enable strict mode
"kmi_symbol_list_strict_mode": False,
"module_implicit_outs": COMMON_GKI_MODULES_LIST,
"kmi_symbol_list": "android/abi_gki_aarch64",
"additional_kmi_symbol_lists": _aarch64_additional_kmi_symbol_lists,
# TODO(b/269587270): re-enable trimming
"trim_nonlisted_kmi": False,
},
"kernel_riscv64": {
"module_implicit_outs": COMMON_GKI_MODULES_LIST,
"additional_kmi_symbol_lists": [], # Temporarily disable vendor symbol lists. This will be reverted before freezing the KMI.
"kmi_symbol_list_strict_mode": False,
"module_implicit_outs": COMMON_GKI_MODULES_LIST,
# TODO(b/269587270): re-enable trimming
"trim_nonlisted_kmi": False,
},
"kernel_x86_64": {
"kmi_symbol_list_strict_mode": False,
"module_implicit_outs": COMMON_GKI_MODULES_LIST,
"additional_kmi_symbol_lists": [], # Temporarily disable vendor symbol lists. This will be reverted before freezing the KMI.
# TODO(b/269587270): re-enable trimming
"trim_nonlisted_kmi": False,
},
"kernel_x86_64_debug": {
"kmi_symbol_list_strict_mode": False,
"module_implicit_outs": COMMON_GKI_MODULES_LIST,
"additional_kmi_symbol_lists": [], # Temporarily disable vendor symbol lists. This will be reverted before freezing the KMI.
# TODO(b/269587270): re-enable trimming
"trim_nonlisted_kmi": False,
},
})

4
android/abi_gki_aarch64 Normal file
View File

@ -0,0 +1,4 @@
[abi_symbol_list]
# commonly used symbols
module_layout
__put_task_struct

355452
android/abi_gki_aarch64.stg Normal file

File diff suppressed because it is too large Load Diff