Merge branch 'android11-5.4' into 'android11-5.4-lts'

Sync up with android11-5.4 for the following commits:

5d7dfa34c6 ANDROID: ABI: update allowed list for galaxy
7285ca6e97 ANDROID: Add vendor hooks when syscall prctl finished
4b22a63233 ANDROID: cgroup: Add vendor hook to the cgroup

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: If33e7c84994b66a445cd8e63cc988783c3b5661f
This commit is contained in:
Greg Kroah-Hartman 2021-03-10 11:58:30 +01:00
commit 4ad0e8069a
7 changed files with 700 additions and 440 deletions

File diff suppressed because it is too large Load diff

View file

@ -3,6 +3,7 @@
__alloc_disk_node
__alloc_pages_nodemask
__alloc_percpu
__alloc_percpu_gfp
__alloc_skb
__arch_clear_user
__arch_copy_from_user
@ -133,6 +134,7 @@
__request_module
__request_percpu_irq
__request_region
__sbitmap_queue_get
__scsi_device_lookup_by_target
__scsi_execute
__scsi_print_sense
@ -267,7 +269,13 @@
blk_execute_rq_nowait
blk_get_request
blk_lookup_devt
blk_mq_bio_list_merge
blk_mq_rq_cpu
blk_mq_run_hw_queue
blk_mq_sched_mark_restart_hctx
blk_mq_sched_request_inserted
blk_mq_sched_try_insert_merge
blk_mq_sched_try_merge
blk_put_request
blk_queue_bounce_limit
blk_queue_max_hw_sectors
@ -275,6 +283,7 @@
blk_rq_map_user
blk_rq_map_user_iov
blk_rq_unmap_user
blk_stat_enable_accounting
blk_verify_command
blkdev_get_by_dev
blkdev_get_by_path
@ -955,6 +964,17 @@
dw_pcie_read
dw_pcie_setup_rc
dw_pcie_write
elevator_alloc
elv_bio_merge_ok
elv_rb_add
elv_rb_del
elv_rb_find
elv_rb_former_request
elv_rb_latter_request
elv_register
elv_rqhash_add
elv_rqhash_del
elv_unregister
emergency_restart
enable_irq
enable_percpu_irq
@ -1233,6 +1253,7 @@
int_sqrt
int_to_scsilun
invalidate_mapping_pages
ioc_lookup_icq
iomem_resource
iommu_alloc_resv_region
iommu_attach_device
@ -1406,6 +1427,7 @@
kstrtoull
kstrtoull_from_user
kthread_bind
kthread_blkcg
kthread_cancel_delayed_work_sync
kthread_cancel_work_sync
kthread_create_on_node
@ -2011,6 +2033,14 @@
runqueues
save_stack_trace
save_stack_trace_tsk
sbitmap_add_wait_queue
sbitmap_any_bit_set
sbitmap_del_wait_queue
sbitmap_init_node
sbitmap_queue_clear
sbitmap_queue_init_node
sbitmap_queue_min_shallow_depth
sbitmap_queue_resize
sched_clock
sched_setscheduler
sched_setscheduler_nocheck
@ -2386,6 +2416,7 @@
thermal_zone_of_sensor_register
thermal_zone_of_sensor_unregister
time64_to_tm
timer_reduce
timespec64_to_jiffies
touch_softlockup_watchdog
trace_define_field

View file

@ -20,6 +20,8 @@
#include <trace/hooks/minidump.h>
#include <trace/hooks/wqlockup.h>
#include <trace/hooks/sysrqcrash.h>
#include <trace/hooks/cgroup.h>
#include <trace/hooks/sys.h>
/*
* Export tracepoints that act as a bare tracehook (ie: have no trace event
@ -69,3 +71,5 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_sysrq_crash);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_find_busiest_group);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_map_util_freq);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_em_pd_energy);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_cgroup_set_task);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_syscall_prctl_finished);

View file

@ -0,0 +1,17 @@
/* SPDX-License-Identifier: GPL-2.0 */
#undef TRACE_SYSTEM
#define TRACE_SYSTEM cgroup
#undef TRACE_INCLUDE_PATH
#define TRACE_INCLUDE_PATH trace/hooks
#if !defined(_TRACE_HOOK_CGROUP_H) || defined(TRACE_HEADER_MULTI_READ)
#define _TRACE_HOOK_CGROUP_H
#include <linux/tracepoint.h>
#include <trace/hooks/vendor_hooks.h>
struct task_struct;
DECLARE_HOOK(android_vh_cgroup_set_task,
TP_PROTO(int ret, struct task_struct *task),
TP_ARGS(ret, task));
#endif
#include <trace/define_trace.h>

17
include/trace/hooks/sys.h Normal file
View file

@ -0,0 +1,17 @@
/* SPDX-License-Identifier: GPL-2.0 */
#undef TRACE_SYSTEM
#define TRACE_SYSTEM sys
#undef TRACE_INCLUDE_PATH
#define TRACE_INCLUDE_PATH trace/hooks
#if !defined(_TRACE_HOOK_SYS_H) || defined(TRACE_HEADER_MULTI_READ)
#define _TRACE_HOOK_SYS_H
#include <linux/tracepoint.h>
#include <trace/hooks/vendor_hooks.h>
struct task_struct;
DECLARE_HOOK(android_vh_syscall_prctl_finished,
TP_PROTO(int option, struct task_struct *task),
TP_ARGS(option, task));
#endif
#include <trace/define_trace.h>

View file

@ -17,6 +17,7 @@
#include <linux/fs_parser.h>
#include <trace/events/cgroup.h>
#include <trace/hooks/cgroup.h>
#define cg_invalf(fc, fmt, ...) invalf(fc, fmt, ## __VA_ARGS__)
@ -522,6 +523,7 @@ static ssize_t __cgroup1_procs_write(struct kernfs_open_file *of,
goto out_finish;
ret = cgroup_attach_task(cgrp, task, threadgroup);
trace_android_vh_cgroup_set_task(ret, task);
out_finish:
cgroup_procs_write_finish(task);

View file

@ -75,6 +75,8 @@
#include "uid16.h"
#include <trace/hooks/sys.h>
#ifndef SET_UNALIGN_CTL
# define SET_UNALIGN_CTL(a, b) (-EINVAL)
#endif
@ -2644,6 +2646,7 @@ SYSCALL_DEFINE5(prctl, int, option, unsigned long, arg2, unsigned long, arg3,
error = -EINVAL;
break;
}
trace_android_vh_syscall_prctl_finished(option, me);
return error;
}