Files
android_kernel_xiaomi_sm8450/include/trace/hooks/user.h
heshuai1 c9b8fa644f ANDROID: user: Add vendor hook to user for GKI purpose
Add the vendor hook to user.c, because of some speical cases related to
our feature, we need to initialize the variables defined by ourselves in
user_struct, so we add the hook at alloc_uid to make sure we can go to
our own logic when the user_struct is about to initialize.

Bug: 187458531

Signed-off-by: heshuai1 <heshuai1@xiaomi.com>
Change-Id: I078484aac2c3d396aba5971d6d0f491652f3781c
2021-06-10 01:35:22 +00:00

24 lines
619 B
C

/* SPDX-License-Identifier: GPL-2.0 */
#undef TRACE_SYSTEM
#define TRACE_SYSTEM user
#undef TRACE_INCLUDE_PATH
#define TRACE_INCLUDE_PATH trace/hooks
#if !defined(_TRACE_HOOK_USER_H) || defined(TRACE_HEADER_MULTI_READ)
#define _TRACE_HOOK_USER_H
#include <linux/tracepoint.h>
#include <trace/hooks/vendor_hooks.h>
struct user_struct;
DECLARE_HOOK(android_vh_alloc_uid,
TP_PROTO(struct user_struct *user),
TP_ARGS(user));
DECLARE_HOOK(android_vh_free_user,
TP_PROTO(struct user_struct *up),
TP_ARGS(up));
#endif /* _TRACE_HOOK_USER_H */
/* This part must be outside protection */
#include <trace/define_trace.h>