ANDROID: fs: add vendor hook in ksys_umount

Add a vendor hook to notify ksys_unmount to vendor module

Bug: 351175506
Change-Id: I08ec02dee00459bc99a59976ea61e945a6879c2f
Signed-off-by: Sooyong Suk <s.suk@samsung.corp-partner.google.com>
This commit is contained in:
Sooyong Suk 2024-07-23 13:39:01 +09:00 committed by Matthias Männich
parent c94375dfb7
commit fe38da361c
3 changed files with 6 additions and 0 deletions

View File

@ -541,3 +541,4 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_ogki_kmem_cache_create_usercopy);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_customize_thp_pcp_order);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_customize_thp_gfp_orders);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_init_adjust_zone_wmark);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_ksys_umount);

View File

@ -36,6 +36,7 @@
#include "pnode.h"
#include "internal.h"
#include <trace/hooks/blk.h>
#include <trace/hooks/fs.h>
/* Maximum number of mounts in a mount namespace */
static unsigned int sysctl_mount_max __read_mostly = 100000;
@ -1910,6 +1911,7 @@ static int ksys_umount(char __user *name, int flags)
if (flags & ~(MNT_FORCE | MNT_DETACH | MNT_EXPIRE | UMOUNT_NOFOLLOW))
return -EINVAL;
trace_android_rvh_ksys_umount(name, flags);
if (!(flags & UMOUNT_NOFOLLOW))
lookup_flags |= LOOKUP_FOLLOW;
ret = user_path_at(AT_FDCWD, name, lookup_flags, &path);

View File

@ -9,6 +9,9 @@
#include <trace/hooks/vendor_hooks.h>
DECLARE_RESTRICTED_HOOK(android_rvh_ksys_umount,
TP_PROTO(char __user *name, int flags),
TP_ARGS(name, flags), 1);
DECLARE_HOOK(android_vh_f2fs_file_open,
TP_PROTO(struct inode *inode, struct file *filp),
TP_ARGS(inode, filp));