diff --git a/android/abi_gki_aarch64.xml b/android/abi_gki_aarch64.xml index 1f89d3ac2614..78ce1e136f6f 100644 --- a/android/abi_gki_aarch64.xml +++ b/android/abi_gki_aarch64.xml @@ -979,9 +979,11 @@ + + @@ -996,6 +998,7 @@ + @@ -2279,6 +2282,7 @@ + @@ -3159,6 +3163,7 @@ + @@ -17771,6 +17776,7 @@ + @@ -17782,7 +17788,6 @@ - @@ -23179,6 +23184,12 @@ + + + + + + @@ -23917,6 +23928,14 @@ + + + + + + + + @@ -23949,14 +23968,6 @@ - - - - - - - - @@ -31508,11 +31519,25 @@ + + + + + + + + + + + + + + @@ -46875,6 +46900,15 @@ + + + + + + + + + @@ -55664,17 +55698,6 @@ - - - - - - - - - - - @@ -56534,42 +56557,42 @@ - + - + - + - + - + - + - + @@ -56953,14 +56976,6 @@ - - - - - - - - @@ -90385,14 +90400,6 @@ - - - - - - - - @@ -92459,7 +92466,7 @@ - + @@ -94176,6 +94183,14 @@ + + + + + + + + @@ -109984,268 +109999,9 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -110322,7 +110078,7 @@ - + @@ -110368,27 +110124,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - + @@ -110573,13 +110344,6 @@ - - - - - - - @@ -110587,10 +110351,6 @@ - - - - @@ -111511,32 +111271,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -113349,24 +113083,249 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - + + + + + + + - + + + + + + + + + @@ -114591,7 +114550,37 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -114599,7 +114588,7 @@ - + @@ -115458,7 +115447,7 @@ - + @@ -115622,7 +115611,7 @@ - + @@ -116320,6 +116309,92 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -116398,149 +116473,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -116552,7 +116484,7 @@ - + @@ -116785,42 +116717,23 @@ - + - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - + @@ -119559,6 +119472,25 @@ + + + + + + + + + + + + + + + + + + + @@ -120362,282 +120294,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -120691,91 +120347,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -120790,6 +120361,24 @@ + + + + + + + + + + + + + + + + + + @@ -120892,6 +120481,29 @@ + + + + + + + + + + + + + + + + + + + + + + + @@ -121162,6 +120774,334 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -121176,7 +121116,7 @@ - + @@ -121205,7 +121145,7 @@ - + @@ -121797,7 +121737,7 @@ - + @@ -122485,7 +122425,7 @@ - + @@ -122757,7 +122697,7 @@ - + @@ -123535,7 +123475,6 @@ - @@ -123561,12 +123500,12 @@ - + - + @@ -124050,70 +123989,70 @@ - + - + - + - + - + - + - + - + - + - + - + @@ -124121,13 +124060,13 @@ - + - + @@ -124136,13 +124075,13 @@ - + - + @@ -124179,25 +124118,25 @@ - + - + - + - + @@ -124207,7 +124146,7 @@ - + @@ -124220,6 +124159,237 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -124227,6 +124397,17 @@ + + + + + + + + + + + @@ -124269,7 +124450,7 @@ - + @@ -124277,8 +124458,27 @@ + + + + + + + + + + + + + + + + + + + @@ -124754,7 +124954,7 @@ - + @@ -124786,7 +124986,7 @@ - + @@ -124794,7 +124994,7 @@ - + @@ -124822,7 +125022,7 @@ - + @@ -125106,7 +125306,7 @@ - + @@ -125226,7 +125426,7 @@ - + @@ -125746,6 +125946,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -125761,6 +125999,7 @@ + diff --git a/android/abi_gki_aarch64_sony b/android/abi_gki_aarch64_sony new file mode 100644 index 000000000000..47428a566c02 --- /dev/null +++ b/android/abi_gki_aarch64_sony @@ -0,0 +1,40 @@ +[abi_symbol_list] + devm_gpiod_get_from_of_node + devm_gpiod_unhinge + devm_kstrdup_const + devm_mfd_add_devices + down_timeout + filp_close + filp_open + find_vpid + input_mt_destroy_slots + led_trigger_blink_oneshot + nr_irqs + pid_task + rdev_get_id + regcache_drop_region + regmap_async_complete + regmap_multi_reg_write + regmap_multi_reg_write + regmap_multi_reg_write_bypassed + regmap_raw_write + regmap_raw_write_async + regulator_bulk_enable + regulator_disable_regmap + regulator_enable_regmap + regulator_get_voltage_sel_regmap + regulator_is_enabled_regmap + regulator_map_voltage_linear + regulator_set_voltage_sel_regmap + request_any_context_irq + snd_compr_stop_error + snd_pcm_format_physical_width + snd_soc_component_disable_pin + snd_soc_component_force_enable_pin + snd_soc_component_set_sysclk + snd_soc_get_volsw_range + snd_soc_info_volsw_range + snd_soc_put_volsw_range + spi_bus_type + strncat + thermal_zone_device_unregister diff --git a/build.config.gki.aarch64 b/build.config.gki.aarch64 index 58ea308926f0..2c8a87684413 100644 --- a/build.config.gki.aarch64 +++ b/build.config.gki.aarch64 @@ -15,6 +15,7 @@ android/abi_gki_aarch64_hikey960 android/abi_gki_aarch64_oneplus android/abi_gki_aarch64_oplus android/abi_gki_aarch64_qcom +android/abi_gki_aarch64_sony android/abi_gki_aarch64_sunxi android/abi_gki_aarch64_unisoc android/abi_gki_aarch64_vivo diff --git a/include/trace/hooks/sched.h b/include/trace/hooks/sched.h index 4e2be4d70658..a2f5b45dd6f9 100644 --- a/include/trace/hooks/sched.h +++ b/include/trace/hooks/sched.h @@ -10,7 +10,6 @@ * Following tracepoints are not exported in tracefs and provide a * mechanism for vendor modules to hook and extend functionality */ -#if defined(CONFIG_TRACEPOINTS) && defined(CONFIG_ANDROID_VENDOR_HOOKS) struct task_struct; DECLARE_RESTRICTED_HOOK(android_rvh_select_task_rq_fair, TP_PROTO(struct task_struct *p, int prev_cpu, int sd_flag, int wake_flags, int *new_cpu), @@ -70,22 +69,9 @@ struct sched_group; DECLARE_RESTRICTED_HOOK(android_rvh_find_busiest_group, TP_PROTO(struct sched_group *busiest, struct rq *dst_rq, int *out_balance), TP_ARGS(busiest, dst_rq, out_balance), 1); -#else -#define trace_android_rvh_select_task_rq_fair(p, prev_cpu, sd_flag, wake_flags, new_cpu) -#define trace_android_rvh_select_task_rq_rt(p, prev_cpu, sd_flag, wake_flags, new_cpu) -#define trace_android_rvh_select_fallback_rq(cpu, p, dest_cpu) -#define trace_android_vh_scheduler_tick(rq) -#define trace_android_rvh_enqueue_task(rq, p) -#define trace_android_rvh_dequeue_task(rq, p) -#define trace_android_rvh_can_migrate_task(p, dst_cpu, can_migrate) -#define trace_android_rvh_find_lowest_rq(p, local_cpu_mask, lowest_cpu) -#define trace_android_rvh_prepare_prio_fork(p) -#define trace_android_rvh_finish_prio_fork(p) -#define trace_android_rvh_rtmutex_prepare_setprio(p, pi_task) -#define trace_android_rvh_set_user_nice(p, nice) -#define trace_android_rvh_setscheduler(p) -#define trace_android_rvh_find_busiest_group(busiest, dst_rq, out_balance) -#endif + +/* macro versions of hooks are no longer required */ + #endif /* _TRACE_HOOK_SCHED_H */ /* This part must be outside protection */ #include diff --git a/include/trace/hooks/vendor_hooks.h b/include/trace/hooks/vendor_hooks.h index 8a3fdb9222e5..eea881975d35 100644 --- a/include/trace/hooks/vendor_hooks.h +++ b/include/trace/hooks/vendor_hooks.h @@ -9,6 +9,8 @@ #include +#if defined(CONFIG_TRACEPOINTS) && defined(CONFIG_ANDROID_VENDOR_HOOKS) + #define DECLARE_HOOK DECLARE_TRACE #ifdef TRACE_HEADER_MULTI_READ @@ -74,3 +76,10 @@ PARAMS(__data, args)) #endif /* TRACE_HEADER_MULTI_READ */ + +#else /* !CONFIG_TRACEPOINTS || !CONFIG_ANDROID_VENDOR_HOOKS */ +/* suppress trace hooks */ +#define DECLARE_HOOK DECLARE_EVENT_NOP +#define DECLARE_RESTRICTED_HOOK(name, proto, args, cond) \ + DECLARE_EVENT_NOP(name, PARAMS(proto), PARAMS(args)) +#endif diff --git a/mm/mprotect.c b/mm/mprotect.c index 65d317058e9e..9b0b9fbcfe06 100644 --- a/mm/mprotect.c +++ b/mm/mprotect.c @@ -43,6 +43,8 @@ static unsigned long change_pte_range(struct vm_area_struct *vma, pmd_t *pmd, spinlock_t *ptl; unsigned long pages = 0; int target_node = NUMA_NO_NODE; + bool anon_writable = + vma_is_anonymous(vma) && (vma->vm_flags & VM_WRITE); /* * Can be called with only the mmap_sem for reading by @@ -119,7 +121,11 @@ static unsigned long change_pte_range(struct vm_area_struct *vma, pmd_t *pmd, (pte_soft_dirty(ptent) || !(vma->vm_flags & VM_SOFTDIRTY))) { ptent = pte_mkwrite(ptent); + } else if (anon_writable && + page_mapcount(pte_page(ptent)) == 1) { + ptent = pte_mkwrite(ptent); } + ptep_modify_prot_commit(vma, addr, pte, oldpte, ptent); pages++; } else if (IS_ENABLED(CONFIG_MIGRATION)) {