ANDROID: GKI: Move GKI module headers to generated includes

Change build time generated GKI module headers location
From :- kernel/module/gki_module_*.h
To :- include/generated/gki_module_*.h

This prevents the kernel source from being contaminated.
By placing the header files in a generated directory,
the default filters that ignore certain files will work
without any special handling required.

Bug: 286529877
Test: Manual verification & TH
Change-Id: Ie247d1c132ddae54906de2e2850e95d7ae9edd50
Signed-off-by: Ramji Jiyani <ramjiyani@google.com>
(cherry picked from commit e9cba885543fc50a5b59ff7234d02b74a380573c)
This commit is contained in:
Ramji Jiyani 2023-07-20 18:15:27 -07:00 committed by Treehugger Robot
parent 15a4b0d726
commit 0abc74db1a
2 changed files with 6 additions and 6 deletions

View file

@ -25,12 +25,12 @@ obj-$(CONFIG_MODULE_UNLOAD_TAINT_TRACKING) += tracking.o
# ANDROID: GKI: Generate headerfiles required for gki_module.o
#
# Dependencies on generated files need to be listed explicitly
$(obj)/gki_module.o: $(obj)/gki_module_protected_exports.h \
$(obj)/gki_module_unprotected.h
$(obj)/gki_module.o: include/generated/gki_module_protected_exports.h \
include/generated/gki_module_unprotected.h
ALL_KMI_SYMBOLS := all_kmi_symbols
$(obj)/gki_module_unprotected.h: $(ALL_KMI_SYMBOLS) \
include/generated/gki_module_unprotected.h: $(ALL_KMI_SYMBOLS) \
$(srctree)/scripts/gen_gki_modules_headers.sh
$(Q)$(CONFIG_SHELL) $(srctree)/scripts/gen_gki_modules_headers.sh $@ \
"$(srctree)" \
@ -48,7 +48,7 @@ else
ABI_PROTECTED_EXPORTS_FILE := $(wildcard $(srctree)/android/abi_gki_protected_exports_$(ARCH))
endif
$(obj)/gki_module_protected_exports.h: $(ABI_PROTECTED_EXPORTS_FILE) \
include/generated/gki_module_protected_exports.h: $(ABI_PROTECTED_EXPORTS_FILE) \
$(srctree)/scripts/gen_gki_modules_headers.sh
$(Q)$(CONFIG_SHELL) $(srctree)/scripts/gen_gki_modules_headers.sh $@ \
"$(srctree)" \

View file

@ -16,8 +16,8 @@
* gki_module_protected_exports.h -- Symbols protected from _export_ by unsigned modules
* gki_module_unprotected.h -- Symbols allowed to _access_ by unsigned modules
*/
#include "gki_module_protected_exports.h"
#include "gki_module_unprotected.h"
#include <generated/gki_module_protected_exports.h>
#include <generated/gki_module_unprotected.h>
#define MAX_STRCMP_LEN (max(MAX_UNPROTECTED_NAME_LEN, MAX_PROTECTED_EXPORTS_NAME_LEN))