Commit Graph

1068060 Commits

Author SHA1 Message Date
Neill Kapron
df4ee615e0 Revert "ANDROID: uid_sys_stat: split the global lock uid_lock to the fine-grained"
This reverts commit 08a2bdeaad.

Reason for revert: Likely causes "calls a sleeping function from atomic context" https://buganizer.corp.google.com/issues/281144729

Change-Id: Idd97ce620c0f399ec891e0474ee9876275c0f9c8
Signed-off-by: Neill Kapron <nkapron@google.com>
2023-05-09 04:53:38 +00:00
Wanwei Jiang
625a05a48a ANDROID: GKI: Update symbol list for Amlogic
2 function symbol(s) added
  'int __traceiter_android_vh_cma_drain_all_pages_bypass(void*, unsigned int, bool*)'
  'struct cgroup_subsys_state* css_next_descendant_pre(struct cgroup_subsys_state*, struct cgroup_subsys_state*)'

1 variable symbol(s) added
  'struct tracepoint __tracepoint_android_vh_cma_drain_all_pages_bypass'

Bug: 280418312
Change-Id: Ie99a46ddfefda163cbbfbd005390d15f7428fea6
Signed-off-by: Wanwei Jiang <wanwei.jiang@amlogic.com>
2023-05-09 03:20:56 +00:00
Ramji Jiyani
3cae1f44dd ANDROID: GKI: x86_64: Remove 80211 from protected modules
cfg80211 & mac80211 are being converted to vendor modules.
To be consistent for both arm64 & x86_64 remove them
from protected to unprotected; so they can be converted
to vendor modules for x86_64 as well.

This also helps keep things simpler for virtual_device;
so it doesn't have to maintain seperate list for these
architectures w.r.t. these modules.

Bug: 281137343
Test: TH
Change-Id: Ica028593f30528c361a6ab30da8cb5be5187d067
Signed-off-by: Ramji Jiyani <ramjiyani@google.com>
2023-05-08 22:27:40 +00:00
Ramji Jiyani
896a2f6ac8 ANDROID: GKI: Update owners for GKI modules lists
Add ramjiyani@ as per-file owner for:

android/abi_gki_protected_exports_*
android/gki_aarch64_protected_modules
android/gki_x86_64_protected_modules

Update required due to addition of multi arch support
caused renaming of these files with arch name in them.

Bug: 151893768
Test: TH
Change-Id: Ice5c054f90b3fc4f91bfe73f680082dc129c0310
Signed-off-by: Ramji Jiyani <ramjiyani@google.com>
2023-05-07 16:11:24 -07:00
Carlos Llamas
913110b790 FROMLIST: binder: fix UAF caused by faulty buffer cleanup
In binder_transaction_buffer_release() the 'failed_at' offset indicates
the number of objects to clean up. However, this function was changed by
commit 44d8047f1d ("binder: use standard functions to allocate fds"),
to release all the objects in the buffer when 'failed_at' is zero.

This introduced an issue when a transaction buffer is released without
any objects having been processed so far. In this case, 'failed_at' is
indeed zero yet it is misinterpreted as releasing the entire buffer.

This leads to use-after-free errors where nodes are incorrectly freed
and subsequently accessed. Such is the case in the following KASAN
report:

  ==================================================================
  BUG: KASAN: slab-use-after-free in binder_thread_read+0xc40/0x1f30
  Read of size 8 at addr ffff4faf037cfc58 by task poc/474

  CPU: 6 PID: 474 Comm: poc Not tainted 6.3.0-12570-g7df047b3f0aa #5
  Hardware name: linux,dummy-virt (DT)
  Call trace:
   dump_backtrace+0x94/0xec
   show_stack+0x18/0x24
   dump_stack_lvl+0x48/0x60
   print_report+0xf8/0x5b8
   kasan_report+0xb8/0xfc
   __asan_load8+0x9c/0xb8
   binder_thread_read+0xc40/0x1f30
   binder_ioctl+0xd9c/0x1768
   __arm64_sys_ioctl+0xd4/0x118
   invoke_syscall+0x60/0x188
  [...]

  Allocated by task 474:
   kasan_save_stack+0x3c/0x64
   kasan_set_track+0x2c/0x40
   kasan_save_alloc_info+0x24/0x34
   __kasan_kmalloc+0xb8/0xbc
   kmalloc_trace+0x48/0x5c
   binder_new_node+0x3c/0x3a4
   binder_transaction+0x2b58/0x36f0
   binder_thread_write+0x8e0/0x1b78
   binder_ioctl+0x14a0/0x1768
   __arm64_sys_ioctl+0xd4/0x118
   invoke_syscall+0x60/0x188
  [...]

  Freed by task 475:
   kasan_save_stack+0x3c/0x64
   kasan_set_track+0x2c/0x40
   kasan_save_free_info+0x38/0x5c
   __kasan_slab_free+0xe8/0x154
   __kmem_cache_free+0x128/0x2bc
   kfree+0x58/0x70
   binder_dec_node_tmpref+0x178/0x1fc
   binder_transaction_buffer_release+0x430/0x628
   binder_transaction+0x1954/0x36f0
   binder_thread_write+0x8e0/0x1b78
   binder_ioctl+0x14a0/0x1768
   __arm64_sys_ioctl+0xd4/0x118
   invoke_syscall+0x60/0x188
  [...]
  ==================================================================

In order to avoid these issues, let's always calculate the intended
'failed_at' offset beforehand. This is renamed and wrapped in a helper
function to make it clear and convenient.

Fixes: 32e9f56a96 ("binder: don't detect sender/target during buffer cleanup")
Reported-by: Zi Fan Tan <zifantan@google.com>
Link: https://b.corp.google.com/issues/275041864
Cc: stable@vger.kernel.org
Signed-off-by: Carlos Llamas <cmllamas@google.com>

Bug: 275041864
Link: https://lore.kernel.org/all/20230505203020.4101154-1-cmllamas@google.com
Change-Id: I4bcc8bde77a8118872237d100cccb5caf95d99a1
Signed-off-by: Carlos Llamas <cmllamas@google.com>
2023-05-06 01:45:34 +00:00
Liujie Xie
73042c1155 ANDROID: ABI: Update oplus symbol list
17 function symbol(s) added
  'int __traceiter_android_vh_binder_free_proc(void*, struct binder_proc*)'
  'int __traceiter_android_vh_binder_has_work_ilocked(void*, struct binder_thread*, bool, int*)'
  'int __traceiter_android_vh_binder_looper_state_registered(void*, struct binder_thread*, struct binder_proc*)'
  'int __traceiter_android_vh_binder_preset(void*, struct hlist_head*, struct mutex*)'
  'int __traceiter_android_vh_binder_proc_transaction_entry(void*, struct binder_proc*, struct binder_transaction*, struct binder_thread**, int, bool, bool, bool*)'
  'int __traceiter_android_vh_binder_proc_transaction_finish(void*, struct binder_proc*, struct binder_transaction*, struct task_struct*, bool, bool)'
  'int __traceiter_android_vh_binder_read_done(void*, struct binder_proc*, struct binder_thread*)'
  'int __traceiter_android_vh_binder_select_worklist_ilocked(void*, struct list_head**, struct binder_thread*, struct binder_proc*, int)'
  'int __traceiter_android_vh_binder_thread_read(void*, struct list_head**, struct binder_proc*, struct binder_thread*)'
  'int __traceiter_android_vh_binder_thread_release(void*, struct binder_proc*, struct binder_thread*)'
  'int __traceiter_android_vh_mutex_can_spin_on_owner(void*, struct mutex*, int*)'
  'int __traceiter_android_vh_mutex_opt_spin_finish(void*, struct mutex*, bool)'
  'int __traceiter_android_vh_mutex_opt_spin_start(void*, struct mutex*, bool*, int*)'
  'int __traceiter_android_vh_rwsem_can_spin_on_owner(void*, struct rw_semaphore*, bool*)'
  'int __traceiter_android_vh_rwsem_opt_spin_finish(void*, struct rw_semaphore*, bool)'
  'int __traceiter_android_vh_rwsem_opt_spin_start(void*, struct rw_semaphore*, bool*, int*, bool)'
  'int __traceiter_android_vh_rwsem_wake_finish(void*, struct rw_semaphore*)'

17 variable symbol(s) added
  'struct tracepoint __tracepoint_android_vh_binder_free_proc'
  'struct tracepoint __tracepoint_android_vh_binder_has_work_ilocked'
  'struct tracepoint __tracepoint_android_vh_binder_looper_state_registered'
  'struct tracepoint __tracepoint_android_vh_binder_preset'
  'struct tracepoint __tracepoint_android_vh_binder_proc_transaction_entry'
  'struct tracepoint __tracepoint_android_vh_binder_proc_transaction_finish'
  'struct tracepoint __tracepoint_android_vh_binder_read_done'
  'struct tracepoint __tracepoint_android_vh_binder_select_worklist_ilocked'
  'struct tracepoint __tracepoint_android_vh_binder_thread_read'
  'struct tracepoint __tracepoint_android_vh_binder_thread_release'
  'struct tracepoint __tracepoint_android_vh_mutex_can_spin_on_owner'
  'struct tracepoint __tracepoint_android_vh_mutex_opt_spin_finish'
  'struct tracepoint __tracepoint_android_vh_mutex_opt_spin_start'
  'struct tracepoint __tracepoint_android_vh_rwsem_can_spin_on_owner'
  'struct tracepoint __tracepoint_android_vh_rwsem_opt_spin_finish'
  'struct tracepoint __tracepoint_android_vh_rwsem_opt_spin_start'
  'struct tracepoint __tracepoint_android_vh_rwsem_wake_finish'

Bug: 193384408
Change-Id: I81b918a185ee810af97b56f1fc695af45119c1e8
Signed-off-by: Liujie Xie <xieliujie@oppo.com>
Signed-off-by: Carlos Llamas <cmllamas@google.com>
2023-05-06 00:25:54 +00:00
Liujie Xie
ad62172a4b ANDROID: vendor_hooks: Add hooks to select binder worklist
trace_android_vh_binder_proc_transaction_entry:
We need change binder thread so that this work can be added in
proc->todo, if we found the binder thread, skip native logic.

trace_android_vh_binder_select_worklist_ilocked:
we need this because we can't change list point in ”trace_android_vh_binder_thread_read“,
otherwise, If a work has beed added in our own defined list before,
current may goto retry and loop again and again.

Bug: 219898723
Change-Id: Ifdb3429c9ddac521bc75c1d21740ee7cc4b8f143
Signed-off-by: Liujie Xie <xieliujie@oppo.com>
(cherry picked from commit acefa91e51)
Signed-off-by: Carlos Llamas <cmllamas@google.com>
(cherry picked from commit d26c0e1c409179ea74aaa89f748006bd76000cc3)
2023-05-06 00:25:54 +00:00
Liujie Xie
ca14c8d469 ANDROID: vendor_hooks: Add hooks for binder
We want to add some hooks in the binder module so that we can reduce
block time until binder thread is available
Here are what new hooks do for:
1、android_vh_binder_looper_state_registered: choose a binder thread(do proc work) as a low-level thread.Only this thread has power to excute background binder transaction.
2、android_vh_binder_thread_read: let binder thread do works which come from
our list.
3、android_vh_binder_free_proc: free some pointers and variable.
4、android_vh_binder_thread_release: free the list that we create before.
5、android_vh_binder_has_work_ilocked: to check if our list has work.
6、android_vh_binder_read_done: because of we add hook in binder_has_work_ilocked,
7、android_vh_binder_preset: mark target proc's binder threads.
binder_has_work_ilocked may return true, so we try to wake up low-level thread immediately.

Bug: 212483521
Change-Id: Ic40f452cc4dcf8fc85422e23e6f1a7ad77547309
Signed-off-by: Liujie Xie <xieliujie@oppo.com>
(cherry picked from commit 8d6074509e4ec7e10acf6ee78277ff8cd19e49d0)
2023-05-06 00:25:54 +00:00
Liujie Xie
456a8d4c1f ANDROID: vendor_hooks: Add hooks for rwsem and mutex
Add hooks to apply oem's optimization of rwsem and mutex

Bug: 182237112
Signed-off-by: xieliujie <xieliujie@oppo.com>
(cherry picked from commit 80b4341d05)

Signed-off-by: xieliujie <xieliujie@oppo.com>
Change-Id: I36895c432e5b6d6bff8781b4a7872badb693284c
Signed-off-by: Carlos Llamas <cmllamas@google.com>
[cmllamas: completes the cherry-pick of original commit 80b4341d05
since commit 0902cc73b793 was only partial]
(cherry picked from commit d4528a28cb5be0c322031f333a6230fa3042931f)
2023-05-06 00:25:54 +00:00
Liujie Xie
c97f4f3ed5 ANDROID: vendor_hooks: Add hooks for binder proc transaction
We need pointers to proc and t, the current hooks in binder_proc_transaction
are unable to use.

Bug: 208910215
Change-Id: I730964f965a015e5f5a3e237d9b3bd084b5bd0d0
Signed-off-by: Liujie Xie <xieliujie@oppo.com>
(cherry picked from commit cb7e10d31b)
Signed-off-by: Carlos Llamas <cmllamas@google.com>
(cherry picked from commit 8968875ad63f4cda9f263e2a2a930524dd8fdbc7)
2023-05-06 00:25:54 +00:00
Liujie Xie
a945254842 ANDROID: vendor_hooks: Add hooks for mutex and rwsem optimistic spin
These hooks help us do the following things:
a) Record the number of mutex and rwsem optimistic spin.
b) Monitor the time of mutex and rwsem optimistic spin.
c) Make it possible if oems don't want mutex and rwsem to optimistic spin
for a long time.

Bug: 267565260
Change-Id: I2bee30fb17946be85e026213b481aeaeaee2459f
Signed-off-by: Liujie Xie <xieliujie@oppo.com>
(cherry picked from commit d01f7e1269)
(cherry picked from commit 05b5ff11ad98c5896b352b4c376a84b63684e06c)
2023-05-06 00:25:54 +00:00
Adrian Salido
50bae08f22 ANDROID: Update the ABI symbol list
Adding the following symbols:
  - __drmm_crtc_alloc_with_planes

Bug: 275278929
Change-Id: I5f6e650aa850eb2639abcf5c033e1ed43814d30f
Signed-off-by: Adrian Salido <salidoa@google.com>
2023-05-05 23:46:18 +00:00
Puma Hsu
358b59f1bc ANDROID: usb: Add vendor hook for usb suspend and resume
Add the hook that vendor can design and bypass the suspend/resume.
When the bypass is set, skip the orignal suspend/resume methods.

In mobile, a co-processor can be used with USB audio, and ACPU may
be able to sleep in such condition to improve power consumption.
We will need vendor hook to support this.

Bug: 192774581
Signed-off-by: Puma Hsu <pumahsu@google.com>
Change-Id: Ic62a8a1e662bbe3fb0aa17af7491daace0b9f18a
(cherry picked from commit 98085b5dd8)
2023-05-05 23:14:35 +00:00
JJ Lee
4cbf19a6f8 ANDROID: sound: usb: add vendor hook for cpu suspend support
Add vendor hook android_vh_sound_check_support_cpu_suspend
to allow ACPU to suspend during USB playback/capture,
if this is supported.

Bug: 192206510
Change-Id: Ia8d4c335db27de5fcefab13cab653fd1ae34f691
Signed-off-by: JJ Lee <leejj@google.com>
(cherry picked from commit e8516fd3af)
2023-05-05 23:14:35 +00:00
Albert Wang
3ac740c9c7 ANDROID: Update the ABI symbol list
Adding the following symbols:
  - __traceiter_android_rvh_usb_dev_suspend
  - __traceiter_android_vh_sound_usb_support_cpu_suspend
  - __traceiter_android_vh_usb_dev_resume
  - __tracepoint_android_rvh_usb_dev_suspend
  - __tracepoint_android_vh_sound_usb_support_cpu_suspend
  - __tracepoint_android_vh_usb_dev_resume

Bug: 255700946
Change-Id: I2860d50bf30714cfb627df710f3a4a9faa5f04b4
Signed-off-by: Albert Wang <albertccwang@google.com>
2023-05-05 23:14:35 +00:00
xieliujie
d03243dd76 ANDROID: ABI: Update oplus symbol list
1 function symbol(s) added
  'int __traceiter_sched_stat_runtime(void*, struct task_struct*, u64, u64)'

1 variable symbol(s) added
  'struct tracepoint __tracepoint_sched_stat_runtime'

Bug: 193384408
Change-Id: I76ddd3ec107c1474b53a3a0c4bd0fa4386ac6ac3
Signed-off-by: xieliujie <xieliujie@oppo.com>
2023-05-05 22:58:16 +00:00
Rick Yiu
f9688670ca ANDROID: sched: Add trace_android_rvh_setscheduler
Sync to android13-5.10. This vendor hook is declared already.

Bug: 245675204
Change-Id: Ib081b52542380d22317f225a50b553cda5f2634c
Signed-off-by: Rick Yiu <rickyiu@google.com>
2023-05-05 20:45:38 +00:00
xieliujie
8a73c29f3e ANDROID: ABI: Update oplus symbol list
4 function symbol(s) added
  'int __traceiter_android_vh_record_mutex_lock_starttime(void*, struct task_struct*, unsigned long)'
  'int __traceiter_android_vh_record_pcpu_rwsem_starttime(void*, struct task_struct*, unsigned long)'
  'int __traceiter_android_vh_record_rtmutex_lock_starttime(void*, struct task_struct*, unsigned long)'
  'int __traceiter_android_vh_record_rwsem_lock_starttime(void*, struct task_struct*, unsigned long)'

4 variable symbol(s) added
  'struct tracepoint __tracepoint_android_vh_record_mutex_lock_starttime'
  'struct tracepoint __tracepoint_android_vh_record_pcpu_rwsem_starttime'
  'struct tracepoint __tracepoint_android_vh_record_rtmutex_lock_starttime'
  'struct tracepoint __tracepoint_android_vh_record_rwsem_lock_starttime'

Bug: 193384408
Change-Id: Ib3c7341fe0799424d0232e5b422648f500563887
Signed-off-by: xieliujie <xieliujie@oppo.com>
2023-05-05 20:26:24 +00:00
Peifeng Li
3568391d31 ANDROID: vendor_hook: add hooks to protect locking-tsk in cpu scheduler
Providing vendor hooks to record the start time of holding the lock, which
protects rwsem/mutex locking-process from being preemptedfor a short time
in some cases.

- android_vh_record_mutex_lock_starttime
- android_vh_record_rtmutex_lock_starttime
- android_vh_record_rwsem_lock_starttime
- android_vh_record_pcpu_rwsem_starttime

Bug: 241191475

Signed-off-by: Peifeng Li <lipeifeng@oppo.com>
Change-Id: I0e967a1e8b77c32a1ad588acd54028fae2f90c4e
(cherry picked from commit f7294947672eb6b786f3c16b49e71e6a239101ad)
2023-05-05 20:26:24 +00:00
Yifan Hong
dad238bd8d ANDROID: Delete MODULES_ORDER.
This file is no longer useful after build.sh is deprecated.
The functionality of the list has been moved to
//common:kernel_aarch64 module_implicit_outs in Kleaf.

Bug: 257119427
Test: TH

Change-Id: Id7e2c9b09d8b4eb96a4f055ce5e01964f8b6361c
Signed-off-by: Yifan Hong <elsk@google.com>
2023-05-05 17:15:05 +00:00
Treehugger Robot
9494fdd610 Merge "Merge remote-tracking branch 'aosp/upstream-f2fs-stable-linux-5.15.y' into android14-5.15" into android14-5.15 2023-05-05 17:07:07 +00:00
zhangao
3b371a4431 ANDROID: GKI: Add symbol list for ZEKU
Add symbol list for ZEKU at the first time

470 function symbol(s) added
  'u64 __blkg_prfill_u64(struct seq_file*, struct blkg_policy_data*, u64)'
  'void* __devm_alloc_percpu(struct device*, size_t, size_t)'
  'void __free_iova(struct iova_domain*, struct iova*)'
  'struct net_device* __ip_dev_find(struct net*, __be32, bool)'
  'void __ip_select_ident(struct net*, struct iphdr*, int)'
  'void* __kmalloc_track_caller(size_t, gfp_t, unsigned long)'
  'int __media_device_register(struct media_device*, struct module*)'
  'void** __memcat_p(void**, void**)'
  'void __module_put_and_exit(struct module*, long)'
  'void __ndisc_fill_addr_option(struct sk_buff*, int, void*, int, int)'
  'int __netlink_dump_start(struct sock*, struct sk_buff*, const struct nlmsghdr*, struct netlink_dump_control*)'
  'bool __percpu_down_read(struct percpu_rw_semaphore*, bool)'
  'int __percpu_init_rwsem(struct percpu_rw_semaphore*, const char*, struct lock_class_key*)'
  'struct scsi_device* __scsi_add_device(struct Scsi_Host*, uint, uint, u64, void*)'
  'int __scsi_execute(struct scsi_device*, const unsigned char*, int, void*, unsigned int, unsigned char*, struct scsi_sense_hdr*, int, int, u64, req_flags_t, int*)'
  'struct scsi_device* __scsi_iterate_devices(struct Scsi_Host*, struct scsi_device*)'
  'int __serdev_device_driver_register(struct serdev_device_driver*, struct module*)'
  'int __sk_receive_skb(struct sock*, struct sk_buff*, int, unsigned int, bool)'
  'int __sock_queue_rcv_skb(struct sock*, struct sk_buff*)'
  'void __sock_recv_timestamp(struct msghdr*, struct sock*, struct sk_buff*)'
  'void __sock_recv_ts_and_drops(struct msghdr*, struct sock*, struct sk_buff*)'
  'void __sock_recv_wifi_status(struct msghdr*, struct sock*, struct sk_buff*)'
  'void __sock_tx_timestamp(__u16, __u8*)'
  'int __srcu_read_lock(struct srcu_struct*)'
  'void __srcu_read_unlock(struct srcu_struct*, int)'
  'int __traceiter_android_rvh_iommu_setup_dma_ops(void*, struct device*, u64, u64)'
  'int __traceiter_android_vh_mpam_set(void*, struct task_struct*, struct task_struct*)'
  'int __traceiter_android_vh_set_memory_nx(void*, unsigned long, int)'
  'int __traceiter_android_vh_set_module_permit_after_init(void*, const struct module*)'
  'int __traceiter_wbc_writepage(void*, struct writeback_control*, struct backing_dev_info*)'
  'struct tty_driver* __tty_alloc_driver(unsigned int, struct module*, unsigned long)'
  'int __v4l2_device_register_subdev_nodes(struct v4l2_device*, bool)'
  'void __wake_up_sync_key(struct wait_queue_head*, unsigned int, void*)'
  'struct proc_dir_entry* _proc_mkdir(const char*, umode_t, struct proc_dir_entry*, void*, bool)'
  'int _raw_spin_trylock_bh(raw_spinlock_t*)'
  'int access_process_vm(struct task_struct*, unsigned long, void*, int, unsigned int)'
  'void add_wait_queue_exclusive(struct wait_queue_head*, struct wait_queue_entry*)'
  'void addrconf_add_linklocal(struct inet6_dev*, const struct in6_addr*, u32)'
  'int addrconf_prefix_rcv_add_addr(struct net*, struct net_device*, const struct prefix_info*, struct inet6_dev*, const struct in6_addr*, int, u32, bool, bool, __u32, u32)'
  'void aes_encrypt(const struct crypto_aes_ctx*, u8*, const u8*)'
  'int aes_expandkey(struct crypto_aes_ctx*, const u8*, unsigned int)'
  'int alg_test(const char*, const char*, u32, u32)'
  'struct cpu_rmap* alloc_cpu_rmap(unsigned int, gfp_t)'
  'struct iova* alloc_iova(struct iova_domain*, unsigned long, unsigned long, bool)'
  'enum arm_smccc_conduit arm_smccc_1_1_get_conduit()'
  'arm_smccc_1_2_hvc'
  'arm_smccc_1_2_smc'
  'u32 arm_smccc_get_version()'
  'async_cookie_t async_schedule_node(async_func_t, void*, int)'
  'int bit_wait(struct wait_bit_key*, int)'
  'unsigned long* bitmap_alloc(unsigned int, gfp_t)'
  'int bitmap_allocate_region(unsigned long*, unsigned int, int)'
  'int bitmap_find_free_region(unsigned long*, unsigned int, int)'
  'void bitmap_release_region(unsigned long*, unsigned int, int)'
  'void blk_cleanup_queue(struct request_queue*)'
  'unsigned int blk_crypto_keyslot_index(struct blk_crypto_keyslot*)'
  'bool blk_crypto_register(struct blk_crypto_profile*, struct request_queue*)'
  'void blk_crypto_reprogram_all_keys(struct blk_crypto_profile*)'
  'struct request_queue* blk_mq_init_queue(struct blk_mq_tag_set*)'
  'int blk_mq_map_queues(struct blk_mq_queue_map*)'
  'void blk_pm_runtime_init(struct request_queue*, struct device*)'
  'void blk_queue_update_dma_alignment(struct request_queue*, int)'
  'void blk_queue_update_dma_pad(struct request_queue*, unsigned int)'
  'void blk_stat_enable_accounting(struct request_queue*)'
  'int blkcg_activate_policy(struct request_queue*, const struct blkcg_policy*)'
  'void blkcg_deactivate_policy(struct request_queue*, const struct blkcg_policy*)'
  'int blkcg_policy_register(struct blkcg_policy*)'
  'void blkcg_policy_unregister(struct blkcg_policy*)'
  'void blkcg_print_blkgs(struct seq_file*, struct blkcg*, u64(*)(struct seq_file*, struct blkg_policy_data*, int), const struct blkcg_policy*, int, bool)'
  'void blkg_conf_finish(struct blkg_conf_ctx*)'
  'int blkg_conf_prep(struct blkcg*, const struct blkcg_policy*, char*, struct blkg_conf_ctx*)'
  'void bsg_job_done(struct bsg_job*, int, unsigned int)'
  'void bsg_remove_queue(struct request_queue*)'
  'struct request_queue* bsg_setup_queue(struct device*, const char*, bsg_job_fn*, bsg_timeout_fn*, int)'
  'int cdc_parse_cdc_header(struct usb_cdc_parsed_header*, struct usb_interface*, u8*, int)'
  'void class_dev_iter_exit(struct class_dev_iter*)'
  'void class_dev_iter_init(struct class_dev_iter*, struct class*, struct device*, const struct device_type*)'
  'struct device* class_dev_iter_next(struct class_dev_iter*)'
  'int class_for_each_device(struct class*, struct device*, void*, int(*)(struct device*, void*))'
  'void cleanup_srcu_struct(struct srcu_struct*)'
  'bool clk_is_match(const struct clk*, const struct clk*)'
  'u64 clockevent_delta2ns(unsigned long, struct clock_event_device*)'
  'void clockevents_register_device(struct clock_event_device*)'
  'void config_group_init(struct config_group*)'
  'struct config_item* config_item_get(struct config_item*)'
  'void config_item_put(struct config_item*)'
  'int config_item_set_name(struct config_item*, const char*, ...)'
  'int configfs_register_group(struct config_group*, struct config_group*)'
  'int configfs_register_subsystem(struct configfs_subsystem*)'
  'void configfs_unregister_subsystem(struct configfs_subsystem*)'
  'int cpu_pm_unregister_notifier(struct notifier_block*)'
  'u16 crc16(u16, const u8*, size_t)'
  'u16 crc_ccitt(u16, const u8*, size_t)'
  'int crypto_ahash_final(struct ahash_request*)'
  'struct crypto_kpp* crypto_alloc_kpp(const char*, u32, u32)'
  'int crypto_authenc_extractkeys(struct crypto_authenc_keys*, const u8*, unsigned int)'
  'int crypto_ecdh_encode_key(char*, unsigned int, const struct ecdh*)'
  'unsigned int crypto_ecdh_key_len(const struct ecdh*)'
  'int crypto_get_default_rng()'
  'int crypto_has_ahash(const char*, u32, u32)'
  'void crypto_put_default_rng()'
  'void d_add(struct dentry*, struct inode*)'
  'struct dentry* d_alloc_name(struct dentry*, const char*)'
  'void debugfs_create_regset32(const char*, umode_t, struct dentry*, struct debugfs_regset32*)'
  'bool debugfs_initialized()'
  'void dev_add_pack(struct packet_type*)'
  'int dev_change_flags(struct net_device*, unsigned int, struct netlink_ext_ack*)'
  'void dev_close_many(struct list_head*, bool)'
  'struct net_device* dev_get_by_index_rcu(struct net*, int)'
  'unsigned int dev_get_flags(const struct net_device*)'
  'struct net_device* dev_getbyhwaddr_rcu(struct net*, unsigned short, const char*)'
  'struct net_device* dev_getfirstbyhwtype(struct net*, unsigned short)'
  'void dev_load(struct net*, const char*)'
  'int dev_mc_sync(struct net_device*, struct net_device*)'
  'bool dev_nit_active(struct net_device*)'
  'struct dev_pm_opp* dev_pm_opp_find_level_exact(struct device*, unsigned int)'
  'void dev_pm_opp_remove(struct device*, unsigned long)'
  'void dev_remove_pack(struct packet_type*)'
  'int dev_set_allmulti(struct net_device*, int)'
  'int dev_set_mac_address(struct net_device*, struct sockaddr*, struct netlink_ext_ack*)'
  'int dev_set_promiscuity(struct net_device*, int)'
  'int dev_uc_add(struct net_device*, const unsigned char*)'
  'int dev_uc_del(struct net_device*, const unsigned char*)'
  'int dev_uc_sync(struct net_device*, struct net_device*)'
  'bool dev_valid_name(const char*)'
  'int device_match_any(struct device*, const void*)'
  'int device_match_name(struct device*, const void*)'
  'int device_move(struct device*, struct device*, enum dpm_order)'
  'int device_property_read_u8_array(struct device*, const char*, u8*, size_t)'
  'void devm_led_classdev_unregister(struct device*, struct led_classdev*)'
  'void* devm_pci_remap_cfgspace(struct device*, resource_size_t, resource_size_t)'
  'int divider_determine_rate(struct clk_hw*, struct clk_rate_request*, const struct clk_div_table*, u8, unsigned long)'
  'struct sg_table* dma_alloc_noncontiguous(struct device*, size_t, enum dma_data_direction, gfp_t, unsigned long)'
  'struct page* dma_alloc_pages(struct device*, size_t, dma_addr_t*, enum dma_data_direction, gfp_t)'
  'long dma_buf_set_name(struct dma_buf*, const char*)'
  'void dma_free_noncontiguous(struct device*, size_t, struct sg_table*, enum dma_data_direction)'
  'void dma_free_pages(struct device*, size_t, struct page*, dma_addr_t, enum dma_data_direction)'
  'int dma_heap_bufferfd_alloc(struct dma_heap*, size_t, unsigned int, unsigned int)'
  'int dma_supported(struct device*, u64)'
  'int driver_attach(struct device_driver*)'
  'void dst_cache_destroy(struct dst_cache*)'
  'struct dst_entry* dst_cache_get(struct dst_cache*)'
  'int dst_cache_init(struct dst_cache*, gfp_t)'
  'void dst_cache_set_ip4(struct dst_cache*, struct dst_entry*, __be32)'
  'void dst_cache_set_ip6(struct dst_cache*, struct dst_entry*, const struct in6_addr*)'
  'struct elevator_queue* elevator_alloc(struct request_queue*, struct elevator_type*)'
  'int elv_register(struct elevator_type*)'
  'void elv_unregister(struct elevator_type*)'
  'struct extcon_dev* extcon_find_edev_by_node(struct device_node*)'
  'struct extcon_dev* extcon_get_extcon_dev(const char*)'
  'struct iova* find_iova(struct iova_domain*, unsigned long)'
  'void fqdir_exit(struct fqdir*)'
  'int fqdir_init(struct fqdir**, struct inet_frags*, struct net*)'
  'void free_irq_cpu_rmap(struct cpu_rmap*)'
  'int fwnode_property_read_u8_array(const struct fwnode_handle*, const char*, u8*, size_t)'
  'struct file_system_type* get_fs_type(const char*)'
  'unsigned int get_next_ino()'
  'int get_tree_single(struct fs_context*, int(*)(struct super_block*, struct fs_context*))'
  'int gre_add_protocol(const struct gre_protocol*, u8)'
  'int gre_del_protocol(const struct gre_protocol*, u8)'
  'u64 hashlen_string(const void*, const char*)'
  'int hid_add_device(struct hid_device*)'
  'struct hid_device* hid_allocate_device()'
  'void hid_destroy_device(struct hid_device*)'
  'bool hid_ignore(struct hid_device*)'
  'int hid_input_report(struct hid_device*, int, u8*, u32, int)'
  'int hid_parse_report(struct hid_device*, __u8*, unsigned int)'
  'struct icc_path* icc_get(struct device*, int, int)'
  'void icc_node_del(struct icc_node*)'
  'void icc_node_destroy(int)'
  'int inet6_csk_xmit(struct sock*, struct sk_buff*, struct flowi*)'
  'void inet_frag_destroy(struct inet_frag_queue*)'
  'struct inet_frag_queue* inet_frag_find(struct fqdir*, void*)'
  'void inet_frag_kill(struct inet_frag_queue*)'
  'int inet_frag_queue_insert(struct inet_frag_queue*, struct sk_buff*, int, int)'
  'void inet_frag_reasm_finish(struct inet_frag_queue*, struct sk_buff*, void*, bool)'
  'void* inet_frag_reasm_prepare(struct inet_frag_queue*, struct sk_buff*, struct sk_buff*)'
  'void inet_frags_fini(struct inet_frags*)'
  'int inet_frags_init(struct inet_frags*)'
  'int init_srcu_struct(struct srcu_struct*)'
  'void input_ff_destroy(struct input_dev*)'
  'int iova_cache_get()'
  'void iova_cache_put()'
  'int ip6_dst_hoplimit(struct dst_entry*)'
  'int ip_local_out(struct net*, struct sock*, struct sk_buff*)'
  'int ip_mc_join_group(struct sock*, struct ip_mreqn*)'
  'int ip_queue_xmit(struct sock*, struct sk_buff*, struct flowi*)'
  'struct rtable* ip_route_output_flow(struct net*, struct flowi4*, const struct sock*)'
  'struct net_device* ipv6_dev_find(struct net*, const struct in6_addr*, struct net_device*)'
  'bool ipv6_ext_hdr(u8)'
  'int irq_cpu_rmap_add(struct cpu_rmap*, int)'
  'int irq_set_affinity_notifier(unsigned int, struct irq_affinity_notify*)'
  'void iterate_supers_type(struct file_system_type*, void(*)(struct super_block*, void*), void*)'
  'int kernel_accept(struct socket*, struct socket**, int)'
  'int kernel_listen(struct socket*, int)'
  'void kfree_skb_partial(struct sk_buff*, bool)'
  'void kill_litter_super(struct super_block*)'
  'int kobject_set_name(struct kobject*, const char*, ...)'
  'int kstrtou16_from_user(const char*, size_t, unsigned int, u16*)'
  'u64 ktime_get_boot_fast_ns()'
  'void ktime_get_coarse_ts64(struct timespec64*)'
  'const char* kvasprintf_const(gfp_t, const char*, va_list)'
  'void linkwatch_fire_event(struct net_device*)'
  'void media_device_cleanup(struct media_device*)'
  'void media_device_init(struct media_device*)'
  'void media_device_unregister(struct media_device*)'
  'int media_entity_pads_init(struct media_entity*, u16, struct media_pad*)'
  'void* memscan(void*, int, size_t)'
  'int mmc_can_erase(struct mmc_card*)'
  'int mmc_can_trim(struct mmc_card*)'
  'int mmc_cmdq_disable(struct mmc_card*)'
  'int mmc_cmdq_enable(struct mmc_card*)'
  'int mmc_erase(struct mmc_card*, unsigned int, unsigned int, unsigned int)'
  'int mmc_hw_reset(struct mmc_host*)'
  'bool mmc_is_req_done(struct mmc_host*, struct mmc_request*)'
  'int mmc_register_driver(struct mmc_driver*)'
  'void mmc_retune_release(struct mmc_host*)'
  'int mmc_set_blocklen(struct mmc_card*, unsigned int)'
  'int mmc_start_request(struct mmc_host*, struct mmc_request*)'
  'void mmc_unregister_driver(struct mmc_driver*)'
  'void mmc_wait_for_req_done(struct mmc_host*, struct mmc_request*)'
  'int n_tty_ioctl_helper(struct tty_struct*, struct file*, unsigned int, unsigned long)'
  'void napi_gro_flush(struct napi_struct*, bool)'
  'void neigh_destroy(struct neighbour*)'
  'struct neighbour* neigh_lookup(struct neigh_table*, const void*, struct net_device*)'
  'int netdev_set_num_tc(struct net_device*, u8)'
  'int netdev_set_tc_queue(struct net_device*, u8, u16, u16)'
  'bool netlink_capable(const struct sk_buff*, int)'
  'bool netlink_net_capable(const struct sk_buff*, int)'
  'unsigned long nr_free_buffer_pages()'
  'struct __kernel_old_timeval ns_to_kernel_old_timeval(s64)'
  'struct clk* of_clk_get_from_provider(struct of_phandle_args*)'
  'struct dma_chan* of_dma_xlate_by_chan_id(struct of_phandle_args*, struct of_dma*)'
  'struct device_node* of_graph_get_port_parent(struct device_node*)'
  'struct device_node* of_graph_get_remote_endpoint(const struct device_node*)'
  'bool of_graph_is_present(const struct device_node*)'
  'int of_pci_get_max_link_speed(struct device_node*)'
  'enum usb_phy_interface of_usb_get_phy_mode(struct device_node*)'
  'void on_each_cpu_cond_mask(smp_cond_func_t, smp_call_func_t, void*, bool, const struct cpumask*)'
  'int out_of_line_wait_on_bit(void*, int, wait_bit_action_f*, unsigned int)'
  'int param_get_uint(char*, const struct kernel_param*)'
  'int param_set_uint(const char*, const struct kernel_param*)'
  'bool pci_ats_supported(struct pci_dev*)'
  'void pci_disable_ats(struct pci_dev*)'
  'int pci_enable_ats(struct pci_dev*, int)'
  'void pci_free_irq(struct pci_dev*, unsigned int, void*)'
  'int pci_request_irq(struct pci_dev*, unsigned int, irq_handler_t, irq_handler_t, void*, const char*, ...)'
  'int pci_request_regions(struct pci_dev*, const char*)'
  'const char* pci_speed_string(enum pci_bus_speed)'
  'void pci_stop_and_remove_bus_device(struct pci_dev*)'
  'void pci_walk_bus(struct pci_bus*, int(*)(struct pci_dev*, void*), void*)'
  'int pcie_capability_read_dword(struct pci_dev*, int, u32*)'
  'int pcim_enable_device(struct pci_dev*)'
  'int pcim_iomap_regions(struct pci_dev*, int, const char*)'
  'void* const* pcim_iomap_table(struct pci_dev*)'
  'void pcim_iounmap_regions(struct pci_dev*, int)'
  'void percpu_down_write(struct percpu_rw_semaphore*)'
  'void percpu_free_rwsem(struct percpu_rw_semaphore*)'
  'void percpu_up_write(struct percpu_rw_semaphore*)'
  'void* perf_aux_output_begin(struct perf_output_handle*, struct perf_event*)'
  'void perf_aux_output_end(struct perf_output_handle*, unsigned long)'
  'void perf_aux_output_flag(struct perf_output_handle*, u64)'
  'void* perf_get_aux(struct perf_output_handle*)'
  'int phy_pm_runtime_get_sync(struct phy*)'
  'int phy_pm_runtime_put_sync(struct phy*)'
  'int platform_msi_domain_alloc_irqs(struct device*, unsigned int, irq_write_msi_msg_t)'
  'void platform_msi_domain_free_irqs(struct device*)'
  'int pm_schedule_suspend(struct device*, unsigned int)'
  'struct proc_dir_entry* proc_create_net_data(const char*, umode_t, struct proc_dir_entry*, const struct seq_operations*, unsigned int, void*)'
  'struct proc_dir_entry* proc_create_net_single(const char*, umode_t, struct proc_dir_entry*, int(*)(struct seq_file*, void*), void*)'
  'int proc_dointvec_jiffies(struct ctl_table*, int, void*, size_t*, loff_t*)'
  'int proc_dointvec_minmax(struct ctl_table*, int, void*, size_t*, loff_t*)'
  'int proc_doulongvec_minmax(struct ctl_table*, int, void*, size_t*, loff_t*)'
  'void* pskb_put(struct sk_buff*, struct sk_buff*, int)'
  'int put_cmsg(struct msghdr*, int, int, int, void*)'
  'int radix_tree_maybe_preload(gfp_t)'
  'int radix_tree_tagged(const struct xarray*, unsigned int)'
  'int rcuwait_wake_up(struct rcuwait*)'
  'bool refcount_dec_if_one(refcount_t*)'
  'struct ctl_table_header* register_net_sysctl(struct net*, const char*, struct ctl_table*)'
  'int regulator_map_voltage_linear_range(struct regulator_dev*, int, int)'
  'struct iova* reserve_iova(struct iova_domain*, unsigned long, unsigned long)'
  'int reset_controller_register(struct reset_controller_dev*)'
  'void rhashtable_walk_enter(struct rhashtable*, struct rhashtable_iter*)'
  'void rhashtable_walk_exit(struct rhashtable_iter*)'
  'void* rhashtable_walk_next(struct rhashtable_iter*)'
  'int rhashtable_walk_start_check(struct rhashtable_iter*)'
  'void rhashtable_walk_stop(struct rhashtable_iter*)'
  'void rpmsg_destroy_ept(struct rpmsg_endpoint*)'
  'struct device* rpmsg_find_device(struct device*, struct rpmsg_channel_info*)'
  '__poll_t rpmsg_poll(struct rpmsg_endpoint*, struct file*, poll_table*)'
  'int rpmsg_sendto(struct rpmsg_endpoint*, void*, int, u32)'
  'void rproc_add_carveout(struct rproc*, struct rproc_mem_entry*)'
  'int rproc_elf_load_rsc_table(struct rproc*, const struct firmware*)'
  'int rproc_elf_load_segments(struct rproc*, const struct firmware*)'
  'int rproc_elf_sanity_check(struct rproc*, const struct firmware*)'
  'struct rproc_mem_entry* rproc_mem_entry_init(struct device*, void*, dma_addr_t, size_t, u32, int(*)(struct rproc*, struct rproc_mem_entry*), int(*)(struct rproc*, struct rproc_mem_entry*), const char*, ...)'
  'struct rproc_mem_entry* rproc_of_resm_mem_entry_init(struct device*, u32, size_t, u32, const char*, ...)'
  'irqreturn_t rproc_vq_interrupt(struct rproc*, int)'
  'bool rps_may_expire_flow(struct net_device*, u16, u32, u16)'
  'int rtnl_register_module(struct module*, int, int, rtnl_doit_func, rtnl_dumpit_func, unsigned int)'
  'int rtnl_unregister(int, int)'
  'void rtnl_unregister_all(int)'
  'int sbitmap_init_node(struct sbitmap*, unsigned int, int, gfp_t, int, bool, bool)'
  'void sched_clock_register(u64(*)(), int, unsigned long)'
  'int scsi_add_host_with_dma(struct Scsi_Host*, struct device*, struct device*)'
  'int scsi_change_queue_depth(struct scsi_device*, int)'
  'int scsi_device_quiesce(struct scsi_device*)'
  'int scsi_dma_map(struct scsi_cmnd*)'
  'struct Scsi_Host* scsi_host_alloc(struct scsi_host_template*, int)'
  'void scsi_host_put(struct Scsi_Host*)'
  'int scsi_is_host_device(const struct device*)'
  'void scsi_print_sense_hdr(const struct scsi_device*, const char*, const struct scsi_sense_hdr*)'
  'int scsi_register_driver(struct device_driver*)'
  'void scsi_remove_device(struct scsi_device*)'
  'void scsi_remove_host(struct Scsi_Host*)'
  'void scsi_report_bus_reset(struct Scsi_Host*, int)'
  'void scsi_scan_host(struct Scsi_Host*)'
  'void sdhci_adma_write_desc(struct sdhci_host*, void**, dma_addr_t, int, unsigned int)'
  'int sdhci_runtime_resume_host(struct sdhci_host*, int)'
  'int sdhci_runtime_suspend_host(struct sdhci_host*)'
  'void sdhci_set_uhs_signaling(struct sdhci_host*, unsigned int)'
  'void security_sk_classify_flow(struct sock*, struct flowi_common*)'
  'void security_sk_clone(const struct sock*, struct sock*)'
  'void security_sock_graft(struct sock*, struct socket*)'
  'struct hlist_node* seq_hlist_next(void*, struct hlist_head*, loff_t*)'
  'struct hlist_node* seq_hlist_start_head(struct hlist_head*, loff_t)'
  'void serdev_device_close(struct serdev_device*)'
  'int serdev_device_get_tiocm(struct serdev_device*)'
  'int serdev_device_open(struct serdev_device*)'
  'unsigned int serdev_device_set_baudrate(struct serdev_device*, unsigned int)'
  'void serdev_device_set_flow_control(struct serdev_device*, bool)'
  'int serdev_device_set_tiocm(struct serdev_device*, int, int)'
  'void serdev_device_wait_until_sent(struct serdev_device*, long)'
  'int serdev_device_write_buf(struct serdev_device*, const unsigned char*, size_t)'
  'void serdev_device_write_flush(struct serdev_device*)'
  'void setup_udp_tunnel_sock(struct net*, struct socket*, struct udp_tunnel_sock_cfg*)'
  'size_t sg_copy_buffer(struct scatterlist*, unsigned int, void*, size_t, off_t, bool)'
  'size_t sg_pcopy_from_buffer(struct scatterlist*, unsigned int, const void*, size_t, off_t)'
  'size_t sg_pcopy_to_buffer(struct scatterlist*, unsigned int, void*, size_t, off_t)'
  'size_t sg_zero_buffer(struct scatterlist*, unsigned int, size_t, off_t)'
  'int simple_statfs(struct dentry*, struct kstatfs*)'
  'void sk_common_release(struct sock*)'
  'int sk_filter_trim_cap(struct sock*, struct sk_buff*, unsigned int)'
  'void sk_reset_timer(struct sock*, struct timer_list*, unsigned long)'
  'void sk_setup_caps(struct sock*, struct dst_entry*)'
  'void sk_stop_timer(struct sock*, struct timer_list*)'
  'int skb_cow_data(struct sk_buff*, int, struct sk_buff**)'
  'void skb_dump(const char*, const struct sk_buff*, bool)'
  'bool skb_try_coalesce(struct sk_buff*, struct sk_buff*, bool*, int*)'
  'void skb_unlink(struct sk_buff*, struct sk_buff_head*)'
  'int smp_call_function_single_async(int, struct __call_single_data*)'
  'struct snd_card* snd_card_ref(int)'
  'int snd_soc_dapm_new_widgets(struct snd_soc_card*)'
  'struct snd_soc_component* snd_soc_rtdcom_lookup(struct snd_soc_pcm_runtime*, const char*)'
  'int sock_common_getsockopt(struct socket*, int, int, char*, int*)'
  'int sock_common_recvmsg(struct socket*, struct msghdr*, size_t, int)'
  'int sock_common_setsockopt(struct socket*, int, int, sockptr_t, unsigned int)'
  'int sock_diag_register(const struct sock_diag_handler*)'
  'void sock_diag_save_cookie(struct sock*, __u32*)'
  'void sock_diag_unregister(const struct sock_diag_handler*)'
  'unsigned long sock_i_ino(struct sock*)'
  'kuid_t sock_i_uid(struct sock*)'
  'int sock_no_bind(struct socket*, struct sockaddr*, int)'
  'int sock_no_connect(struct socket*, struct sockaddr*, int, int)'
  'int sock_no_getname(struct socket*, struct sockaddr*, int)'
  'int sock_no_ioctl(struct socket*, unsigned int, unsigned long)'
  'int sock_no_recvmsg(struct socket*, struct msghdr*, size_t, int)'
  'int sock_no_sendmsg(struct socket*, struct msghdr*, size_t)'
  'void sock_prot_inuse_add(struct net*, struct proto*, int)'
  'int sock_recv_errqueue(struct sock*, struct msghdr*, int, int, int)'
  'void sock_rfree(struct sk_buff*)'
  'struct sk_buff* sock_wmalloc(struct sock*, unsigned long, int, gfp_t)'
  'void synchronize_srcu(struct srcu_struct*)'
  'int sysfs_add_link_to_group(struct kobject*, const char*, struct kobject*, const char*)'
  'int sysfs_create_mount_point(struct kobject*, const char*)'
  'void sysfs_remove_link_from_group(struct kobject*, const char*, const char*)'
  'void sysfs_remove_mount_point(struct kobject*, const char*)'
  'int timer_reduce(struct timer_list*, unsigned long)'
  'int trace_set_clr_event(const char*, const char*, int)'
  'void tty_driver_flush_buffer(struct tty_struct*)'
  'void tty_driver_kref_put(struct tty_driver*)'
  'void tty_encode_baud_rate(struct tty_struct*, speed_t, speed_t)'
  'unsigned char tty_get_char_size(unsigned int)'
  'void tty_ldisc_deref(struct tty_ldisc*)'
  'void tty_ldisc_flush(struct tty_struct*)'
  'struct tty_ldisc* tty_ldisc_ref(struct tty_struct*)'
  'void tty_port_close(struct tty_port*, struct tty_struct*, struct file*)'
  'void tty_port_destroy(struct tty_port*)'
  'void tty_port_hangup(struct tty_port*)'
  'void tty_port_init(struct tty_port*)'
  'int tty_port_install(struct tty_port*, struct tty_driver*, struct tty_struct*)'
  'int tty_port_open(struct tty_port*, struct tty_struct*, struct file*)'
  'void tty_port_put(struct tty_port*)'
  'struct device* tty_port_register_device(struct tty_port*, struct tty_driver*, unsigned int, struct device*)'
  'void tty_port_tty_hangup(struct tty_port*, bool)'
  'void tty_port_tty_wakeup(struct tty_port*)'
  'int tty_register_driver(struct tty_driver*)'
  'int tty_set_termios(struct tty_struct*, struct ktermios*)'
  'int tty_standard_install(struct tty_driver*, struct tty_struct*)'
  'void tty_termios_copy_hw(struct ktermios*, struct ktermios*)'
  'void tty_unregister_device(struct tty_driver*, unsigned int)'
  'void tty_unregister_driver(struct tty_driver*)'
  'void tty_unthrottle(struct tty_struct*)'
  'void tty_vhangup(struct tty_struct*)'
  'void tty_wakeup(struct tty_struct*)'
  'void udp6_set_csum(bool, struct sk_buff*, const struct in6_addr*, const struct in6_addr*, int)'
  'void udp_set_csum(bool, struct sk_buff*, __be32, __be32, int)'
  'int udp_sock_create4(struct net*, struct udp_port_cfg*, struct socket**)'
  'int udp_sock_create6(struct net*, struct udp_port_cfg*, struct socket**)'
  'int udp_tunnel6_xmit_skb(struct dst_entry*, struct sock*, struct sk_buff*, struct net_device*, struct in6_addr*, struct in6_addr*, __u8, __u8, __be32, __be16, __be16, bool)'
  'void udp_tunnel_sock_release(struct socket*)'
  'void udp_tunnel_xmit_skb(struct rtable*, struct sock*, struct sk_buff*, __be32, __be32, __u8, __u8, __be16, __be16, __be16, bool, bool)'
  'void unregister_net_sysctl_table(struct ctl_table_header*)'
  'int usb_add_gadget(struct usb_gadget*)'
  'int usb_autopm_get_interface_async(struct usb_interface*)'
  'void usb_autopm_get_interface_no_resume(struct usb_interface*)'
  'void usb_autopm_put_interface_async(struct usb_interface*)'
  'int usb_clear_halt(struct usb_device*, int)'
  'const char* usb_decode_ctrl(char*, size_t, __u8, __u8, __u16, __u16, __u16)'
  'void usb_del_gadget(struct usb_gadget*)'
  'int usb_ep_dequeue(struct usb_ep*, struct usb_request*)'
  'int usb_ep_set_halt(struct usb_ep*)'
  'int usb_find_common_endpoints(struct usb_host_interface*, struct usb_endpoint_descriptor**, struct usb_endpoint_descriptor**, struct usb_endpoint_descriptor**, struct usb_endpoint_descriptor**)'
  'int usb_gadget_map_request_by_dev(struct device*, struct usb_request*, int)'
  'void usb_gadget_unmap_request_by_dev(struct device*, struct usb_request*, int)'
  'int usb_get_descriptor(struct usb_device*, unsigned char, unsigned char, void*, int)'
  'enum usb_dr_mode usb_get_dr_mode(struct device*)'
  'struct usb_interface* usb_get_intf(struct usb_interface*)'
  'enum usb_device_speed usb_get_maximum_speed(struct device*)'
  'enum usb_ssp_rate usb_get_maximum_ssp_rate(struct device*)'
  'enum usb_dr_mode usb_get_role_switch_default_mode(struct device*)'
  'int usb_get_status(struct usb_device*, int, int, int, void*)'
  'void usb_hcd_end_port_resume(struct usb_bus*, int)'
  'int usb_hcd_map_urb_for_dma(struct usb_hcd*, struct urb*, gfp_t)'
  'void usb_hcd_start_port_resume(struct usb_bus*, int)'
  'void usb_hcd_unmap_urb_for_dma(struct usb_hcd*, struct urb*)'
  'int usb_hub_clear_tt_buffer(struct urb*)'
  'void usb_initialize_gadget(struct device*, struct usb_gadget*, void(*)(struct device*))'
  'int usb_match_one_id(struct usb_interface*, const struct usb_device_id*)'
  'void usb_phy_set_charger_current(struct usb_phy*, unsigned int)'
  'void usb_put_intf(struct usb_interface*)'
  'void usb_sg_cancel(struct usb_sg_request*)'
  'int usb_sg_init(struct usb_sg_request*, struct usb_device*, unsigned int, unsigned int, struct scatterlist*, int, size_t, gfp_t)'
  'void usb_sg_wait(struct usb_sg_request*)'
  'ssize_t usb_show_dynids(struct usb_dynids*, char*)'
  'ssize_t usb_store_new_id(struct usb_dynids*, const struct usb_device_id*, struct device_driver*, const char*, size_t)'
  'int usb_unlink_urb(struct urb*)'
  'void usb_wakeup_notification(struct usb_device*, unsigned int)'
  'int uuid_parse(const char*, uuid_t*)'
  'int v4l2_fh_release(struct file*)'
  'void v4l2_subdev_init(struct v4l2_subdev*, const struct v4l2_subdev_ops*)'
  'const struct vring* virtqueue_get_vring(struct virtqueue*)'
  'u16 vlan_dev_vlan_id(const struct net_device*)'
  'void vlan_filter_drop_vids(struct vlan_info*, __be16)'
  'int vlan_filter_push_vids(struct vlan_info*, __be16)'
  'void vlan_ioctl_set(int(*)(struct net*, void*))'
  'void xhci_dbg_trace(struct xhci_hcd*, void(*)(struct va_format*), const char*, ...)'
  'void xhci_ring_free(struct xhci_hcd*, struct xhci_ring*)'
  'dma_addr_t xhci_trb_virt_to_dma(struct xhci_segment*, union xhci_trb*)'
  'int zlib_deflate(z_streamp, int)'
  'int zlib_deflateEnd(z_streamp)'
  'int zlib_deflateInit2(z_streamp, int, int, int, int, int)'
  'int zlib_deflateReset(z_streamp)'
  'int zlib_deflate_workspacesize(int, int)'
  'int zlib_inflate(z_streamp, int)'
  'int zlib_inflateIncomp(z_stream*)'
  'int zlib_inflateInit2(z_streamp, int)'
  'int zlib_inflateReset(z_streamp)'
  'int zlib_inflate_workspacesize()'

18 variable symbol(s) added
  'struct tracepoint __tracepoint_android_rvh_iommu_setup_dma_ops'
  'struct tracepoint __tracepoint_android_vh_mpam_set'
  'struct tracepoint __tracepoint_android_vh_set_memory_nx'
  'struct tracepoint __tracepoint_android_vh_set_module_permit_after_init'
  'struct tracepoint __tracepoint_wbc_writepage'
  'struct crypto_rng* crypto_default_rng'
  'struct flow_dissector flow_keys_dissector'
  'struct kobject* fs_kobj'
  'const struct in6_addr in6addr_any'
  'struct user_namespace init_user_ns'
  'const struct ipv6_stub* ipv6_stub'
  'kimage_vaddr'
  'struct neigh_table nd_tbl'
  'const unsigned char pcie_link_speed[16]'
  'const struct inode_operations simple_dir_inode_operations'
  'const struct file_operations simple_dir_operations'
  'const int sysctl_vals[10]'
  'struct ktermios tty_std_termios'

Bug: 280016748

Change-Id: I27e0473b25d483b81fad327e37d5bad812647ee7
Signed-off-by: zhangao <zhangao@zeku.com>
2023-05-05 11:15:40 +08:00
Jaegeuk Kim
0f8ada230c Merge remote-tracking branch 'aosp/upstream-f2fs-stable-linux-5.15.y' into android14-5.15
* aosp/upstream-f2fs-stable-linux-5.15.y:
  fscrypt: destroy keyring after security_sb_delete()
  fscrypt: optimize fscrypt_initialize()
  fscrypt: use WARN_ON_ONCE instead of WARN_ON
  fscrypt: new helper function - fscrypt_prepare_lookup_partial()
  fscrypt: check for NULL keyring in fscrypt_put_master_key_activeref()
  fscrypt: improve fscrypt_destroy_keyring() documentation

Bug: 273795759
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Change-Id: Iae53ebbdc231a66146ed39c2d83622233386a526
2023-05-04 16:51:42 -07:00
Alistair Delva
1971e2a1a6 ANDROID: GKI: Increase max 8250 uarts
Some boards need more than the default maximum of 4 uarts. This has no
impact unless 8250.nr_uarts is specified on the cmdline to increase
the number of runtime uarts from the GKI default of 0.

Bug: 280015873
Signed-off-by: Alistair Delva <adelva@google.com>
Change-Id: I5ba4e1dcce4f4e01b7d306fa3ab05319768eef00
2023-05-04 19:20:59 +00:00
Eric Biggers
3b772494fd fscrypt: destroy keyring after security_sb_delete()
fscrypt_destroy_keyring() must be called after all potentially-encrypted
inodes were evicted; otherwise it cannot safely destroy the keyring.
Since inodes that are in-use by the Landlock LSM don't get evicted until
security_sb_delete(), this means that fscrypt_destroy_keyring() must be
called *after* security_sb_delete().

This fixes a WARN_ON followed by a NULL dereference, only possible if
Landlock was being used on encrypted files.

Fixes: d7e7b9af10 ("fscrypt: stop using keyrings subsystem for fscrypt_master_key")
Cc: stable@vger.kernel.org
Reported-by: syzbot+93e495f6a4f748827c88@syzkaller.appspotmail.com
Link: https://lore.kernel.org/r/00000000000044651705f6ca1e30@google.com
Reviewed-by: Christian Brauner <brauner@kernel.org>
Link: https://lore.kernel.org/r/20230313221231.272498-2-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@google.com>
2023-05-04 10:49:03 -07:00
Hajun Sung
25ebcd7321 ANDROID: Update the ABI symbol list
Adding the following symbols:
  - __traceiter_hrtimer_expire_entry
  - __traceiter_hrtimer_expire_exit
  - __traceiter_workqueue_execute_end
  - __traceiter_workqueue_execute_start
  - __tracepoint_hrtimer_expire_entry
  - __tracepoint_hrtimer_expire_exit
  - __tracepoint_workqueue_execute_end
  - __tracepoint_workqueue_execute_start

Bug: 263076912
Signed-off-by: Hajun Sung <hajun.sung@samsung.com>
Change-Id: Iadd3440a7366ce1b78ef557b02670d7ff77b673a
2023-05-04 08:21:24 +09:00
Yunju Lee
11a15a4dcf ANDROID: Update the ABI symbol list
Adding the following symbols:
  - debugfs_create_file_unsafe
  - strnchr

Bug: 267758398
Change-Id: I10fe6db5fb6f4cf58f8e4b1760817ec5add9fd81
Signed-off-by: Yunju Lee <yunjulee@google.com>
2023-05-03 17:04:06 +00:00
Robin Peng
ee8644eacf ANDROID: Update the ABI symbol list
Adding the following symbols:
  - dmabuf_page_pool_get_size

Bug: 260174400
Change-Id: Iaa09256831aa65563fd5b8bc825a3f9d10722c4e
Signed-off-by: Robin Peng <robinpeng@google.com>
2023-05-03 02:49:24 +00:00
Peifeng Li
08a2bdeaad ANDROID: uid_sys_stat: split the global lock uid_lock to the fine-grained
locks for each hlist in hash_table.

Hash_table in uid_sys_stat is protected by a global lock named id_lock,
which causes some lock competition issue. Actually, uid_lock can be split to
several file-grained locks for each hlist in hash_table, which avoid
the unnecessary lock competition when get different-uid process info.

Bug: 278138377
Signed-off-by: Peifeng Li <lipeifeng@oppo.com>
Change-Id: I04c564ce42b62d8cfb9ed29e99f310ba76244763
2023-05-02 22:46:13 +00:00
Badhri Jagan Sridharan
7c58a7d3b6 ANDROID: Update the TCPM ABI symbol list
6 function symbol(s) added
  'int __traceiter_android_rvh_typec_tcpci_get_vbus(void*, struct tcpci*, struct tcpci_data*, int*, int*)'
  'int __traceiter_android_vh_typec_store_partner_src_caps(void*, unsigned int*, u32(*)[0])'
  'int __traceiter_android_vh_typec_tcpci_override_toggling(void*, struct tcpci*, struct tcpci_data*, int*)'
  'int __traceiter_android_vh_typec_tcpm_get_timer(void*, const char*, enum typec_timer, unsigned int*)'
  'int __traceiter_android_vh_typec_tcpm_log(void*, const char*, bool*)'
  'int __traceiter_android_vh_typec_tcpm_modify_src_caps(void*, unsigned int*, u32(*)[0], bool*)'

6 variable symbol(s) added
  'struct tracepoint __tracepoint_android_rvh_typec_tcpci_get_vbus'
  'struct tracepoint __tracepoint_android_vh_typec_store_partner_src_caps'
  'struct tracepoint __tracepoint_android_vh_typec_tcpci_override_toggling'
  'struct tracepoint __tracepoint_android_vh_typec_tcpm_get_timer'
  'struct tracepoint __tracepoint_android_vh_typec_tcpm_log'
  'struct tracepoint __tracepoint_android_vh_typec_tcpm_modify_src_caps'

Bug: 271294543
Change-Id: I3082c0f72354bce7b2c5e957a428cb743d100cba
Signed-off-by: Kyle Tso <kyletso@google.com>
Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
2023-05-02 22:10:01 +00:00
Badhri Jagan Sridharan
a8403c07e3 ANDROID: usb: typec: tcpm: Add vendor hook for tcpm logs
Context: https://lore.kernel.org/lkml/CAPTae5LbWVc4Bdiwe69cwwxEGfSYvRv=419dUGR1u8n-WUkYAA@mail.gmail.com/t/

Logs in /sys/kernel/debug/usb/tcpm* are key to debug issues related to
USB charging or data. However, tcpm logbuffer logs do not wraparound
once full. Whereas we want it to wrap around so that we capture relevant
info in the bugreport when the user collects one. There is sentiment in
upstream to get rid of the logbuffer altogether and move to tracing.
But trace events are not default enabled in Android, so that implies,
even if user can somehow enable the trace event, user would have to
repro the issue and collect the bugreport. That would cause
inconvenience to the end user. The vendor hooks is needed till upstream
either allows wrapping around logs (or) Android has a generic way to
default enable trace events which can be captured in bugreport.

bypass_log is set to true by the handler if logging into logbuffer is
not needed.

Bug: 189792358
Bug: 271294543
Change-Id: Icacfed2264b6c49b8e803c62f8bd820a146c169a
Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
(cherry picked from commit bbc22694d4)
2023-05-02 22:10:01 +00:00
Kyle Tso
4f8b716aa9 ANDROID: usb: typec: tcpm: Add vendor hook to modify port src caps
Add a vendor hook to modify the port Source Capabilities. If the caps
are changed and the port state is feasible, start a Power Negotiation
AMS to update the current contract to the new one.

Bug: 201006190
Bug: 206108037
Bug: 271294543
Signed-off-by: Kyle Tso <kyletso@google.com>
Change-Id: I8b524242353781cb39b3ba85c6a75bd5a204ebcf
(cherry picked from commit b499bac439)
2023-05-02 22:10:01 +00:00
Kyle Tso
bf28ed028d ANDROID: usb: typec: tcpm: Add vendor hook to store partner source capabilities
Add a hook after receiving the source capabilities from the partner
port. Pass the address of the source capability array so that vendor
code is able to access them.

OOT bug:
Bug: 181629276
Bug: 169215197
Bug: 271294543
Signed-off-by: Kyle Tso <kyletso@google.com>
Change-Id: I11c4a7919c248690e63c3bfbebfa6b8d711175a6
(cherry picked from commit c8314fcb76)
2023-05-02 22:10:01 +00:00
Badhri Jagan Sridharan
fca91a7cfa ANDROID: usb: typec: tcpm: vendor hook for timer adjustments
linux/usb/pd.h has a bunch of timers for which the Type-C spec defines
a range of values. These values have to be tuned based on the latency
observed in a specific architecture. However, linux opensource sets
them to a specific value without providing a mechanism to set board
specific values. While a generic way is figured out, a vendor hook
is needed in the interim.

For instance, tCCDebounce can have a value between 100msec - 200msec.

Squashed <d98a1df78740eedcc4d3d4c8d44b39b73f81df2d>
"ANDROID: usb: typec: tcpm: Fixup the wait time for SNK_DISCOVERY"

OOT_bug:
Bug: 184308605
Bug: 168245874
Bug: 173252019
Bug: 271294543
Change-Id: I278b34654a7e48990b6ebe25fbe17e3aa4165098
Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
(cherry picked from commit 081a88febb)
2023-05-02 22:10:01 +00:00
Badhri Jagan Sridharan
636890621d ANDROID: usb: typec: tcpci: Add vendor hook to mask vbus present
This hook is for addressing hardware anomalies where
TCPC_POWER_STATUS_VBUS_PRES bit can return 0 even before falling
below sSinkDisconnect threshold.

Handler has to set bypass to override the value that would otherwise
be returned by this function.
Handler can set vbus or clear vbus to indicate vbus present or absent

Squashed <89f633a9f41259a168473917674dd5cb1bfb991d>
"ANDROID: usb: typec: tcpci: Migrate restricted vendor hook"

OOT_bug:
Bug: 183149028
Bug: 168245874
Bug: 173252019
Bug: 271294543
Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
Change-Id: I2ca994d49b37bf8600c5913b892fde9acd0dc896
(cherry picked from commit eeffe02c96)
2023-05-02 22:10:01 +00:00
Badhri Jagan Sridharan
9870606283 ANDROID: usb: typec: tcpci: Add vendor hooks for tcpci interface
Needed for controlling BC1.2 detection logic specific to the chip
architecture. Also, needed to implement additional logic to make debug
accessories specifically designed for Pixel work.
These are outside the purview of Type-C spec.

OOT_bug:
Bug: 169213252
Bug: 168245874
Bug: 173252019
Bug: 271294543
Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
Change-Id: I36fe75dddd8cd4e2054db01ed4fee7ea08dd8702
(cherry picked from commit b6325c997c)
2023-05-02 22:10:01 +00:00
Ulises Mendez Martinez
54e26291eb ANDROID: Unnest MAKE_GOALS from build configs
* This is in preparation for migrating these
as `kernel_build` attributes. i.e. these will
be removed as a follow-up.

Bug: 236012223
Change-Id: I168c44fd76f9f2732caf8f5c00bec4ed8c96ee65
(cherry picked from commit ccc4fb8185b50958354d8d511823491030988131)
Signed-off-by: Ulises Mendez Martinez <umendez@google.com>
2023-05-02 16:38:39 +00:00
Petri Gynther
d8a482963f ANDROID: Update the ABI symbol list
Adding the following symbols:
  - drm_add_edid_modes
  - drm_atomic_helper_connector_destroy_state
  - drm_atomic_helper_connector_duplicate_state
  - drm_atomic_helper_connector_reset
  - drm_connector_update_edid_property
  - drm_do_get_edid
  - drm_dp_aux_init
  - drm_dp_bw_code_to_link_rate
  - drm_dp_channel_eq_ok
  - drm_dp_clock_recovery_ok
  - drm_dp_dpcd_read
  - drm_dp_dpcd_read_link_status
  - drm_dp_dpcd_write
  - drm_dp_get_adjust_request_pre_emphasis
  - drm_dp_get_adjust_request_voltage
  - drm_dp_link_rate_to_bw_code
  - drm_dp_read_sink_count
  - drm_edid_get_monitor_name
  - drm_edid_to_sad
  - drm_match_cea_mode
  - drm_mode_copy
  - drm_mode_destroy
  - __traceiter_dwc3_readl
  - __tracepoint_dwc3_readl

Bug: 272184398
Change-Id: I0a0f02ac9fd16702308dedd59d3550e3195269d4
Signed-off-by: Petri Gynther <pgynther@google.com>
2023-05-02 01:57:23 +00:00
Paul Lawrence
9e9e157a6b ANDROID: fuse-bpf: Simplify and fix setting bpf program
Fix case when an existing bpf prog is being removed
Tidy up code

Bug: 279363668
Test: Boots, can copy file to /sdcardfs/Android/data, fuse_test passes
Signed-off-by: Paul Lawrence <paullawrence@google.com>
(cherry picked from https://android-review.googlesource.com/q/commit:64366661e8a9a6d691e5ab6499872d495aed5266)
Merged-In: If0e682f43cbeb62764a7a2be543b90cb974b0aa0
Change-Id: If0e682f43cbeb62764a7a2be543b90cb974b0aa0
2023-05-01 18:49:58 +00:00
Weizhao Ouyang
dbfbd63968 ANDROID: fuse-bpf: Fix bpf_test_xattr testcase error
Skipped selinux xattr checking.

Bug: 279996548
Test: fuse_test compiles and passes
Change-Id: I56ac1d5fe3865310a99c091e9688e70aa515e96f
Signed-off-by: Weizhao Ouyang <o451686892@gmail.com>
2023-05-01 18:25:28 +00:00
Badhri Jagan Sridharan
593678ca92 FROMGIT: usb: gadget: udc: core: Prevent redundant calls to pullup
usb_gadget_connect calls gadget->ops->pullup without checking whether
gadget->connected was previously set. Make this symmetric to
usb_gadget_disconnect by returning early if gadget->connected is
already set.

Bug: 279501392
Bug: 276227797
Fixes: 5a1da544e5 ("usb: gadget: core: do not try to disconnect gadget if it is not connected")
Cc: stable@vger.kernel.org
Change-Id: I60b23114c0df7b282bcb1ce638683960305992c5
Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
Link: https://lore.kernel.org/r/20230407030741.3163220-2-badhri@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit a3afbf5cc8
 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git/ usb-next)
2023-05-01 18:17:17 +00:00
Badhri Jagan Sridharan
b142000da9 BACKPORT: FROMGIT: usb: gadget: udc: core: Invoke usb_gadget_connect only when started
usb_udc_connect_control does not check to see if the udc has already
been started. This causes gadget->ops->pullup to be called through
usb_gadget_connect when invoked from usb_udc_vbus_handler even before
usb_gadget_udc_start is called. Guard this by checking for udc->started
in usb_udc_connect_control before invoking usb_gadget_connect.

Guarding udc->vbus, udc->started, gadget->connect, gadget->deactivate
related functions with connect_lock. usb_gadget_connect_locked,
usb_gadget_disconnect_locked, usb_udc_connect_control_locked,
usb_gadget_udc_start_locked, usb_gadget_udc_stop_locked are called with
this lock held as they can be simulataneously invoked from different code
paths.

Adding an additional check to make sure udc is started(udc->started)
before pullup callback is invoked.

Bug: 276227797
Fixes: 628ef0d273 ("usb: udc: add usb_udc_vbus_handler")
Cc: stable@vger.kernel.org
Change-Id: Iee7ac5fdf880be5565b9f178708240d619141237
Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
Link: https://lore.kernel.org/r/20230407030741.3163220-1-badhri@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 0db213ea8e
 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git/ usb-next)
2023-05-01 18:17:17 +00:00
Peter Collingbourne
f62ca752d1 FROMLIST: arm64: mte: Do not set PG_mte_tagged if tags were not initialized
The mte_sync_page_tags() function sets PG_mte_tagged if it initializes
page tags. Then we return to mte_sync_tags(), which sets PG_mte_tagged
again. At best, this is redundant. However, it is possible for
mte_sync_page_tags() to return without having initialized tags for the
page, i.e. in the case where check_swap is true (non-compound page),
is_swap_pte(old_pte) is false and pte_is_tagged is false. So at worst,
we set PG_mte_tagged on a page with uninitialized tags. This can happen
if, for example, page migration causes a PTE for an untagged page to
be replaced. If the userspace program subsequently uses mprotect() to
enable PROT_MTE for that page, the uninitialized tags will be exposed
to userspace.

Fix it by removing the redundant call to set_page_mte_tagged().

Fixes: e059853d14 ("arm64: mte: Fix/clarify the PG_mte_tagged semantics")
Signed-off-by: Peter Collingbourne <pcc@google.com>
Cc: <stable@vger.kernel.org> # 6.1
Link: https://linux-review.googlesource.com/id/Ib02d004d435b2ed87603b858ef7480f7b1463052
Link: https://lore.kernel.org/all/20230420214327.2357985-1-pcc@google.com/
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Bug: 263910115
Change-Id: Ib02d004d435b2ed87603b858ef7480f7b1463052
2023-04-29 10:52:30 +00:00
Peter Collingbourne
132feb89b3 BACKPORT: FROMLIST: arm64: Also reset KASAN tag if page is not PG_mte_tagged
Consider the following sequence of events:

1) A page in a PROT_READ|PROT_WRITE VMA is faulted.
2) Page migration allocates a page with the KASAN allocator,
   causing it to receive a non-match-all tag, and uses it
   to replace the page faulted in 1.
3) The program uses mprotect() to enable PROT_MTE on the page faulted in 1.

As a result of step 3, we are left with a non-match-all tag for a page
with tags accessible to userspace, which can lead to the same kind of
tag check faults that commit e74a684680 ("arm64: Reset KASAN tag in
copy_highpage with HW tags only") intended to fix.

The general invariant that we have for pages in a VMA with VM_MTE_ALLOWED
is that they cannot have a non-match-all tag. As a result of step 2, the
invariant is broken. This means that the fix in the referenced commit
was incomplete and we also need to reset the tag for pages without
PG_mte_tagged.

Fixes: e5b8d92189 ("arm64: mte: reset the page tag in page->flags")
Cc: <stable@vger.kernel.org> # 5.15
Link: https://linux-review.googlesource.com/id/I7409cdd41acbcb215c2a7417c1e50d37b875beff
Link: https://lore.kernel.org/all/20230420210945.2313627-1-pcc@google.com/
Signed-off-by: Peter Collingbourne <pcc@google.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Bug: 263910115
Change-Id: I7409cdd41acbcb215c2a7417c1e50d37b875beff
[pcc: resolved merge conflict]
2023-04-29 08:54:06 +00:00
xieliujie
83cfe3cd4a ANDROID: ABI: Update oplus symbol list
1 function symbol(s) added
  'int __traceiter_android_vh_sched_stat_runtime_rt(void*, struct task_struct*, u64)'

1 variable symbol(s) added
  'struct tracepoint __tracepoint_android_vh_sched_stat_runtime_rt'

Bug: 193384408
Change-Id: Ic8f9149260e947f5fc4f83baae2857d1aa7c0422
Signed-off-by: xieliujie <xieliujie@oppo.com>
2023-04-28 23:05:18 +00:00
Liujie Xie
e1f430a487 ANDROID: vendor_hooks: Add hooks to record the time of the process in various states
These hooks will do the following works:
a) record the time of the process in various states
b) Make corresponding optimization strategies in different hooks

Bug: 205938967

Signed-off-by: Liujie Xie <xieliujie@oppo.com>
Change-Id: Ia3c47bbf0aadd17337ce18fd910343b1b8c3ef93
(cherry picked from commit a61d61bab7)
Signed-off-by: Carlos Llamas <cmllamas@google.com>
(cherry picked from commit b7a1174cc5dfc68cf769547b91958df407e55981)
2023-04-28 23:05:18 +00:00
xieliujie
71f62a14d5 ANDROID: ABI: Update oplus symbol list
1 function symbol(s) added
  'int __traceiter_android_vh_map_util_freq_new(void*, unsigned long, unsigned long, unsigned long, unsigned long*, struct cpufreq_policy*, bool*)'

1 variable symbol(s) added
  'struct tracepoint __tracepoint_android_vh_map_util_freq_new'

Bug: 193384408
Change-Id: I7393e670e3da6ab9f03d1b3877100532a3066c03
Signed-off-by: xieliujie <xieliujie@oppo.com>
2023-04-28 23:02:59 +00:00
xieliujie
5491cac560 ANDROID: sched: Add vendor hooks to compute new cpu freq.
add vendor hooks to compute new cpu freq for oem feature.

Bug: 280021175

Signed-off-by: xieliujie <xieliujie@oppo.com>
Change-Id: I2b8e1f76f3b9792148f153190b862face679ebbd
2023-04-28 23:02:59 +00:00
xieliujie
65b61b57dc ANDROID: ABI: Update oplus symbol list
1 function symbol(s) added
  'int __traceiter_android_vh_futex_sleep_start(void*, struct task_struct*)'

1 variable symbol(s) added
  'struct tracepoint __tracepoint_android_vh_futex_sleep_start'

Bug: 193384408
Change-Id: I1151b9bbbe7df35a71f85caf4b9f53811d288617
Signed-off-by: xieliujie <xieliujie@oppo.com>
2023-04-28 22:58:52 +00:00
Liujie Xie
08d7a5f89e ANDROID: vendor_hooks: Add hooks for futex
We want to use this hook to record the sleeping time due to Futex

Bug: 210947226

Signed-off-by: Liujie Xie <xieliujie@oppo.com>
Change-Id: I637f889dce42937116d10979e0c40fddf96cd1a2
(cherry picked from commit a7ab784f60)
2023-04-28 22:58:52 +00:00