Merge keystone/mirror-android12-5.10 into keystone/android12-5.10-keystone-qcom-dev
* keystone/mirror-android12-5.10: ANDROID: Configure out the macros in android_kabi and android_vendor ANDROID: kernel: fix debug_kinfo set twice crash issue Signed-off-by: deyaoren@google.com <deyaoren@google.com> Change-Id: I9b2b5e38f9d8920fc671fd74e68be34e0a3a7325
This commit is contained in:
commit
123191b0a8
@ -74,6 +74,23 @@ config ANDROID_VENDOR_HOOKS
|
||||
Allow vendor modules to attach to tracepoint "hooks" defined via
|
||||
DECLARE_HOOK or DECLARE_RESTRICTED_HOOK.
|
||||
|
||||
config ANDROID_STRUCT_PADDING
|
||||
bool "Android Struct Padding"
|
||||
default y
|
||||
help
|
||||
This option enables the padding that the Android GKI kernel adds
|
||||
to many different kernel structures to support an in-kernel stable ABI
|
||||
over the lifespan of support for the kernel as well as OEM additional
|
||||
fields that are needed by some of the Android kernel tracepoints.
|
||||
|
||||
Only disable this option if you have a system that needs the Android
|
||||
kernel drivers, but is NOT an Android GKI kernel image and you do NOT
|
||||
use the Android kernel tracepoints. If disabled it has the possibility
|
||||
to make the kernel static and runtime image slightly smaller but will
|
||||
NOT be supported by the Google Android kernel team.
|
||||
|
||||
If even slightly unsure, say Y.
|
||||
|
||||
endif # if ANDROID
|
||||
|
||||
endmenu
|
||||
|
@ -81,7 +81,6 @@ static int build_info_set(const char *str, const struct kernel_param *kp)
|
||||
}
|
||||
|
||||
Exit:
|
||||
vunmap(all_info_addr);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -83,7 +83,11 @@
|
||||
* number: the "number" of the padding variable in the structure. Start with
|
||||
* 1 and go up.
|
||||
*/
|
||||
#ifdef CONFIG_ANDROID_STRUCT_PADDING
|
||||
#define ANDROID_KABI_RESERVE(number) _ANDROID_KABI_RESERVE(number)
|
||||
#else
|
||||
#define ANDROID_KABI_RESERVE(number)
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
|
@ -26,10 +26,25 @@
|
||||
* Same as ANDROID_VENDOR_DATA but allocates an array of u64 with
|
||||
* the specified size
|
||||
*/
|
||||
#ifdef CONFIG_ANDROID_STRUCT_PADDING
|
||||
#define ANDROID_VENDOR_DATA(n) u64 android_vendor_data##n
|
||||
#define ANDROID_VENDOR_DATA_ARRAY(n, s) u64 android_vendor_data##n[s]
|
||||
|
||||
#define ANDROID_OEM_DATA(n) u64 android_oem_data##n
|
||||
#define ANDROID_OEM_DATA_ARRAY(n, s) u64 android_oem_data##n[s]
|
||||
|
||||
#define android_init_vendor_data(p, n) \
|
||||
memset(&p->android_vendor_data##n, 0, sizeof(p->android_vendor_data##n))
|
||||
#define android_init_oem_data(p, n) \
|
||||
memset(&p->android_oem_data##n, 0, sizeof(p->android_oem_data##n))
|
||||
#else
|
||||
#define ANDROID_VENDOR_DATA(n)
|
||||
#define ANDROID_VENDOR_DATA_ARRAY(n, s)
|
||||
#define ANDROID_OEM_DATA(n)
|
||||
#define ANDROID_OEM_DATA_ARRAY(n, s)
|
||||
|
||||
#define android_init_vendor_data(p, n)
|
||||
#define android_init_oem_data(p, n)
|
||||
#endif
|
||||
|
||||
#endif /* _ANDROID_VENDOR_H */
|
||||
|
@ -213,8 +213,10 @@ struct task_struct init_task
|
||||
#ifdef CONFIG_SECCOMP_FILTER
|
||||
.seccomp = { .filter_count = ATOMIC_INIT(0) },
|
||||
#endif
|
||||
#ifdef CONFIG_ANDROID_STRUCT_PADDING
|
||||
.android_vendor_data1 = {0, },
|
||||
.android_oem_data1 = {0, },
|
||||
#endif
|
||||
};
|
||||
EXPORT_SYMBOL(init_task);
|
||||
|
||||
|
@ -978,8 +978,10 @@ static struct task_struct *dup_task_struct(struct task_struct *orig, int node)
|
||||
#ifdef CONFIG_MEMCG
|
||||
tsk->active_memcg = NULL;
|
||||
#endif
|
||||
memset(&tsk->android_vendor_data1, 0, sizeof(tsk->android_vendor_data1));
|
||||
memset(&tsk->android_oem_data1, 0, sizeof(tsk->android_oem_data1));
|
||||
|
||||
android_init_vendor_data(tsk, 1);
|
||||
android_init_oem_data(tsk, 1);
|
||||
|
||||
trace_android_vh_dup_task_struct(tsk, orig);
|
||||
return tsk;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user