Skip to content

Commit

Permalink
Snap for 10862205 from 26d8266 to android14-6.1-keystone-qcom-release
Browse files Browse the repository at this point in the history
Change-Id: If4989cc61d9b250d10e99f68515fc1b2b695ca3b
  • Loading branch information
Android Build Coastguard Worker committed Sep 26, 2023
2 parents 6d6f7a7 + 26d8266 commit 86b3899
Show file tree
Hide file tree
Showing 7 changed files with 64 additions and 5 deletions.
28 changes: 28 additions & 0 deletions android/abi_gki_aarch64.stg
Original file line number Diff line number Diff line change
Expand Up @@ -313129,6 +313129,14 @@ function {
parameter_id: 0x18bd6530
parameter_id: 0x141e84b4
}
function {
id: 0x9bddb3a2
return_type_id: 0x6720d32f
parameter_id: 0x18bd6530
parameter_id: 0x1d19a9d5
parameter_id: 0x18a16691
parameter_id: 0x11cfee5a
}
function {
id: 0x9bddb929
return_type_id: 0x6720d32f
Expand Down Expand Up @@ -327128,6 +327136,15 @@ elf_symbol {
type_id: 0x9bc25990
full_name: "__traceiter_android_rvh_can_migrate_task"
}
elf_symbol {
id: 0xbbd04d50
name: "__traceiter_android_rvh_cgroup_force_kthread_migration"
is_defined: true
symbol_type: FUNCTION
crc: 0x94b3e68f
type_id: 0x9bddb3a2
full_name: "__traceiter_android_rvh_cgroup_force_kthread_migration"
}
elf_symbol {
id: 0xc93c7d6d
name: "__traceiter_android_rvh_check_preempt_tick"
Expand Down Expand Up @@ -330395,6 +330412,15 @@ elf_symbol {
type_id: 0x18ccbd2c
full_name: "__tracepoint_android_rvh_can_migrate_task"
}
elf_symbol {
id: 0xb208306e
name: "__tracepoint_android_rvh_cgroup_force_kthread_migration"
is_defined: true
symbol_type: OBJECT
crc: 0x0c180285
type_id: 0x18ccbd2c
full_name: "__tracepoint_android_rvh_cgroup_force_kthread_migration"
}
elf_symbol {
id: 0x60b5a917
name: "__tracepoint_android_rvh_check_preempt_tick"
Expand Down Expand Up @@ -385666,6 +385692,7 @@ interface {
symbol_id: 0x144db0a1
symbol_id: 0x192bbbd5
symbol_id: 0xadc13d20
symbol_id: 0xbbd04d50
symbol_id: 0xc93c7d6d
symbol_id: 0x9d00b8f0
symbol_id: 0x5e9397c4
Expand Down Expand Up @@ -386029,6 +386056,7 @@ interface {
symbol_id: 0xd7757253
symbol_id: 0x1e8a7e23
symbol_id: 0xfe3875f6
symbol_id: 0xb208306e
symbol_id: 0x60b5a917
symbol_id: 0x1dd402e6
symbol_id: 0x070d1e2a
Expand Down
20 changes: 20 additions & 0 deletions android/abi_gki_aarch64_qcom
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,7 @@
copy_from_kernel_nofault
copy_page
__copy_overflow
copy_page
_copy_to_iter
__cpu_active_mask
cpu_bit_bitmap
Expand Down Expand Up @@ -667,6 +668,7 @@
devm_rtc_allocate_device
__devm_rtc_register_device
devm_snd_soc_register_card
devm_snd_soc_register_component
devm_thermal_of_cooling_device_register
devm_thermal_of_zone_register
devm_usb_get_phy_by_node
Expand Down Expand Up @@ -854,8 +856,11 @@
drm_atomic_helper_commit_modeset_enables
drm_atomic_helper_commit_planes
__drm_atomic_helper_connector_destroy_state
drm_atomic_helper_connector_destroy_state
__drm_atomic_helper_connector_duplicate_state
drm_atomic_helper_connector_duplicate_state
__drm_atomic_helper_connector_reset
drm_atomic_helper_connector_reset
__drm_atomic_helper_crtc_destroy_state
__drm_atomic_helper_crtc_duplicate_state
drm_atomic_helper_dirtyfb
Expand Down Expand Up @@ -929,6 +934,7 @@
drm_dev_register
drm_dev_unregister
drm_display_mode_from_cea_vic
drm_do_get_edid
drm_edid_duplicate
drm_edid_get_monitor_name
drm_edid_is_valid
Expand Down Expand Up @@ -1331,6 +1337,7 @@
hci_uart_unregister_device
hci_unregister_cb
hci_unregister_dev
hdmi_audio_infoframe_init
hex2bin
hex_asc_upper
hex_dump_to_buffer
Expand Down Expand Up @@ -1900,9 +1907,13 @@
migrate_pages
migrate_swap
__migrate_task
mipi_dsi_attach
mipi_dsi_create_packet
mipi_dsi_dcs_set_display_brightness
mipi_dsi_dcs_set_tear_off
mipi_dsi_detach
mipi_dsi_device_register_full
mipi_dsi_device_unregister
mipi_dsi_host_register
mipi_dsi_host_unregister
misc_deregister
Expand Down Expand Up @@ -2980,6 +2991,8 @@
smp_call_function_single
smp_call_function_single_async
snapshot_get_image_size
snd_ctl_add
snd_ctl_new1
snd_ctl_remove
snd_hwdep_new
snd_info_create_card_entry
Expand All @@ -2988,7 +3001,12 @@
snd_info_register
snd_interval_refine
snd_jack_set_key
snd_pcm_add_chmap_ctls
snd_pcm_create_iec958_consumer_default
snd_pcm_fill_iec958_consumer
snd_pcm_fill_iec958_consumer_hw_params
snd_pcm_format_width
snd_pcm_hw_constraint_eld
_snd_pcm_hw_params_any
snd_pcm_set_managed_buffer
snd_pcm_std_chmaps
Expand Down Expand Up @@ -3269,6 +3287,7 @@
__traceiter_android_rvh_before_do_sched_yield
__traceiter_android_rvh_build_perf_domains
__traceiter_android_rvh_can_migrate_task
__traceiter_android_rvh_cgroup_force_kthread_migration
__traceiter_android_rvh_check_preempt_tick
__traceiter_android_rvh_check_preempt_wakeup
__traceiter_android_rvh_check_preempt_wakeup_ignore
Expand Down Expand Up @@ -3413,6 +3432,7 @@
__tracepoint_android_rvh_before_do_sched_yield
__tracepoint_android_rvh_build_perf_domains
__tracepoint_android_rvh_can_migrate_task
__tracepoint_android_rvh_cgroup_force_kthread_migration
__tracepoint_android_rvh_check_preempt_tick
__tracepoint_android_rvh_check_preempt_wakeup
__tracepoint_android_rvh_check_preempt_wakeup_ignore
Expand Down
1 change: 1 addition & 0 deletions drivers/android/vendor_hooks.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_ufs_update_sysfs);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_ufs_send_command);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_ufs_compl_command);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_cgroup_set_task);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_cgroup_force_kthread_migration);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_syscall_prctl_finished);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_ufs_send_uic_command);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_ufs_send_tm_command);
Expand Down
4 changes: 4 additions & 0 deletions include/trace/hooks/cgroup.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ DECLARE_HOOK(android_vh_cgroup_attach,
TP_PROTO(struct cgroup_subsys *ss, struct cgroup_taskset *tset),
TP_ARGS(ss, tset));

DECLARE_RESTRICTED_HOOK(android_rvh_cgroup_force_kthread_migration,
TP_PROTO(struct task_struct *tsk, struct cgroup *dst_cgrp, bool *force_migration),
TP_ARGS(tsk, dst_cgrp, force_migration), 1);

DECLARE_RESTRICTED_HOOK(android_rvh_cpuset_fork,
TP_PROTO(struct task_struct *p, bool *inherit_cpus),
TP_ARGS(p, inherit_cpus), 1);
Expand Down
3 changes: 2 additions & 1 deletion kernel/cgroup/cgroup-internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,8 @@ int cgroup_attach_task(struct cgroup *dst_cgrp, struct task_struct *leader,
void cgroup_attach_lock(bool lock_threadgroup);
void cgroup_attach_unlock(bool lock_threadgroup);
struct task_struct *cgroup_procs_write_start(char *buf, bool threadgroup,
bool *locked)
bool *locked,
struct cgroup *dst_cgrp);
__acquires(&cgroup_threadgroup_rwsem);
void cgroup_procs_write_finish(struct task_struct *task, bool locked)
__releases(&cgroup_threadgroup_rwsem);
Expand Down
2 changes: 1 addition & 1 deletion kernel/cgroup/cgroup-v1.c
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ static ssize_t __cgroup1_procs_write(struct kernfs_open_file *of,
if (!cgrp)
return -ENODEV;

task = cgroup_procs_write_start(buf, threadgroup, &locked);
task = cgroup_procs_write_start(buf, threadgroup, &locked, cgrp);
ret = PTR_ERR_OR_ZERO(task);
if (ret)
goto out_unlock;
Expand Down
11 changes: 8 additions & 3 deletions kernel/cgroup/cgroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -2921,10 +2921,12 @@ int cgroup_attach_task(struct cgroup *dst_cgrp, struct task_struct *leader,
}

struct task_struct *cgroup_procs_write_start(char *buf, bool threadgroup,
bool *threadgroup_locked)
bool *threadgroup_locked,
struct cgroup *dst_cgrp)
{
struct task_struct *tsk;
pid_t pid;
bool force_migration = false;

if (kstrtoint(strstrip(buf), 0, &pid) || pid < 0)
return ERR_PTR(-EINVAL);
Expand Down Expand Up @@ -2955,13 +2957,16 @@ struct task_struct *cgroup_procs_write_start(char *buf, bool threadgroup,
if (threadgroup)
tsk = tsk->group_leader;

if (tsk->flags & PF_KTHREAD)
trace_android_rvh_cgroup_force_kthread_migration(tsk, dst_cgrp, &force_migration);

/*
* kthreads may acquire PF_NO_SETAFFINITY during initialization.
* If userland migrates such a kthread to a non-root cgroup, it can
* become trapped in a cpuset, or RT kthread may be born in a
* cgroup with no rt_runtime allocated. Just say no.
*/
if (tsk->no_cgroup_migration || (tsk->flags & PF_NO_SETAFFINITY)) {
if (!force_migration && (tsk->no_cgroup_migration || (tsk->flags & PF_NO_SETAFFINITY))) {
tsk = ERR_PTR(-EINVAL);
goto out_unlock_threadgroup;
}
Expand Down Expand Up @@ -5148,7 +5153,7 @@ static ssize_t __cgroup_procs_write(struct kernfs_open_file *of, char *buf,
if (!dst_cgrp)
return -ENODEV;

task = cgroup_procs_write_start(buf, threadgroup, &threadgroup_locked);
task = cgroup_procs_write_start(buf, threadgroup, &threadgroup_locked, dst_cgrp);
ret = PTR_ERR_OR_ZERO(task);
if (ret)
goto out_unlock;
Expand Down

0 comments on commit 86b3899

Please sign in to comment.