ANDROID: vendor_hooks: Add hook in mmap_region()
Add hook in mmap_region() to record the vma and address information of monitored processes. Bug: 198385827 Change-Id: I0bde29113b47ca7f4a9f5d42a54188e791ca3b7e Signed-off-by: Jiewen Wang <jiewen.wang@vivo.com>
This commit is contained in:
parent
b0778aaff4
commit
878e0caa77
3 changed files with 6 additions and 0 deletions
|
|
@ -381,3 +381,4 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_udp_recvmsg);
|
|||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_tcp_recvmsg_stat);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_pci_d3_sleep);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_kmalloc_slab);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_mmap_region);
|
||||
|
|
|
|||
|
|
@ -120,6 +120,9 @@ DECLARE_HOOK(android_vh_mem_cgroup_css_offline,
|
|||
DECLARE_HOOK(android_vh_kmalloc_slab,
|
||||
TP_PROTO(unsigned int index, gfp_t flags, struct kmem_cache **s),
|
||||
TP_ARGS(index, flags, s));
|
||||
DECLARE_HOOK(android_vh_mmap_region,
|
||||
TP_PROTO(struct vm_area_struct *vma, unsigned long addr),
|
||||
TP_ARGS(vma, addr));
|
||||
/* macro versions of hooks are no longer required */
|
||||
|
||||
#endif /* _TRACE_HOOK_MM_H */
|
||||
|
|
|
|||
|
|
@ -1964,6 +1964,8 @@ out:
|
|||
vma_set_page_prot(vma);
|
||||
vm_write_end(vma);
|
||||
|
||||
trace_android_vh_mmap_region(vma, addr);
|
||||
|
||||
return addr;
|
||||
|
||||
unmap_and_free_vma:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue