Commit Graph

1067661 Commits

Author SHA1 Message Date
Sebastian Ene
6e8704fc7a ANDROID: KVM: arm64: Clear the PTEs which are not refcounted on unmap path
With coalescing we don't refcount default PTE entries. Fix an issue
which clears out non-refcounted PTE entries on the unmap path.

Bug: 279165129
Change-Id: Ie4fdabcc420d54c1338272d38abbe393fc5ce75c
Signed-off-by: Sebastian Ene <sebastianene@google.com>
2023-04-21 16:56:37 +00:00
Wanwei Jiang
b53185721e ANDROID: GKI: Update symbol list for Amlogic
1 function symbol(s) added
  'int v4l2_ctrl_add_handler(struct v4l2_ctrl_handler*, struct v4l2_ctrl_handler*, bool(*)(const struct v4l2_ctrl*), bool)'

Bug: 279005287
Change-Id: I2138206b8a88cb00e76d5fc398f2e2ce6a8c37f6
Signed-off-by: Wanwei Jiang <wanwei.jiang@amlogic.com>
2023-04-21 15:48:04 +00:00
Jiantao Zhang
d711563536 BACKPORT: USB: gadget: Fix use-after-free during usb config switch
In the process of switching USB config from rndis to other config,
if the hardware does not support the ->pullup callback, or the
hardware encounters a low probability fault, both of them may cause
the ->pullup callback to fail, which will then cause a system panic
(use after free).

The gadget drivers sometimes need to be unloaded regardless of the
hardware's behavior.

Analysis as follows:
=======================================================================
(1) write /config/usb_gadget/g1/UDC "none"

gether_disconnect+0x2c/0x1f8
rndis_disable+0x4c/0x74
composite_disconnect+0x74/0xb0
configfs_composite_disconnect+0x60/0x7c
usb_gadget_disconnect+0x70/0x124
usb_gadget_unregister_driver+0xc8/0x1d8
gadget_dev_desc_UDC_store+0xec/0x1e4

(2) rm /config/usb_gadget/g1/configs/b.1/f1

rndis_deregister+0x28/0x54
rndis_free+0x44/0x7c
usb_put_function+0x14/0x1c
config_usb_cfg_unlink+0xc4/0xe0
configfs_unlink+0x124/0x1c8
vfs_unlink+0x114/0x1dc

(3) rmdir /config/usb_gadget/g1/functions/rndis.gs4

panic+0x1fc/0x3d0
do_page_fault+0xa8/0x46c
do_mem_abort+0x3c/0xac
el1_sync_handler+0x40/0x78
0xffffff801138f880
rndis_close+0x28/0x34
eth_stop+0x74/0x110
dev_close_many+0x48/0x194
rollback_registered_many+0x118/0x814
unregister_netdev+0x20/0x30
gether_cleanup+0x1c/0x38
rndis_attr_release+0xc/0x14
kref_put+0x74/0xb8
configfs_rmdir+0x314/0x374

If gadget->ops->pullup() return an error, function rndis_close() will be
called, then it will causes a use-after-free problem.
=======================================================================

Fixes: 0a55187a1e ("USB: gadget core: Issue ->disconnect() callback from usb_gadget_disconnect()")
Signed-off-by: Jiantao Zhang <water.zhangjiantao@huawei.com>
Signed-off-by: TaoXue <xuetao09@huawei.com>
Link: https://lore.kernel.org/r/20221121130805.10735-1-water.zhangjiantao@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Bug: 273510696
Bug: 275027942
Change-Id: I702f324c5852d3b2448081b092fef464f8691989
(cherry picked from commit afdc12887f)
[ray: Resolved minor conflict in drivers/usb/gadget/udc/core.c]
Signed-off-by: Ray Chi <raychi@google.com>
(cherry picked from commit 2ce4ee5f2e02702ce61b07a170eeb9ffede0601a)
2023-04-21 08:44:29 +00:00
Rick Yiu
e34090d715 ANDROID: Update the ABI symbol list
Adding the following symbols:
  - resched_curr
  - reweight_task
  - __traceiter_android_rvh_prepare_prio_fork
  - __traceiter_android_rvh_setscheduler
  - __traceiter_android_rvh_set_user_nice
  - __tracepoint_android_rvh_prepare_prio_fork
  - __tracepoint_android_rvh_setscheduler
  - __tracepoint_android_rvh_set_user_nice

Bug: 245675204
Change-Id: I5ff30450746ed2e31f9d214aefa531d1cffc1b5e
Signed-off-by: Rick Yiu <rickyiu@google.com>
2023-04-20 15:29:39 +00:00
ziwei.dai
71cf9c9835 BACKPORT: FROMGIT: rcu: Avoid freeing new kfree_rcu() memory after old grace period
Memory passed to kvfree_rcu() that is to be freed is tracked by a
per-CPU kfree_rcu_cpu structure, which in turn contains pointers
to kvfree_rcu_bulk_data structures that contain pointers to memory
that has not yet been handed to RCU, along with an kfree_rcu_cpu_work
structure that tracks the memory that has already been handed to RCU.
These structures track three categories of memory: (1) Memory for
kfree(), (2) Memory for kvfree(), and (3) Memory for both that arrived
during an OOM episode.  The first two categories are tracked in a
cache-friendly manner involving a dynamically allocated page of pointers
(the aforementioned kvfree_rcu_bulk_data structures), while the third
uses a simple (but decidedly cache-unfriendly) linked list through the
rcu_head structures in each block of memory.

On a given CPU, these three categories are handled as a unit, with that
CPU's kfree_rcu_cpu_work structure having one pointer for each of the
three categories.  Clearly, new memory for a given category cannot be
placed in the corresponding kfree_rcu_cpu_work structure until any old
memory has had its grace period elapse and thus has been removed.  And
the kfree_rcu_monitor() function does in fact check for this.

Except that the kfree_rcu_monitor() function checks these pointers one
at a time.  This means that if the previous kfree_rcu() memory passed
to RCU had only category 1 and the current one has only category 2, the
kfree_rcu_monitor() function will send that current category-2 memory
along immediately.  This can result in memory being freed too soon,
that is, out from under unsuspecting RCU readers.

To see this, consider the following sequence of events, in which:

o       Task A on CPU 0 calls rcu_read_lock(), then uses "from_cset",
        then is preempted.

o       CPU 1 calls kfree_rcu(cset, rcu_head) in order to free "from_cset"
        after a later grace period.  Except that "from_cset" is freed
        right after the previous grace period ended, so that "from_cset"
        is immediately freed.  Task A resumes and references "from_cset"'s
        member, after which nothing good happens.

In full detail:

CPU 0                                   CPU 1
----------------------                  ----------------------
count_memcg_event_mm()
|rcu_read_lock()  <---
|mem_cgroup_from_task()
 |// css_set_ptr is the "from_cset" mentioned on CPU 1
 |css_set_ptr = rcu_dereference((task)->cgroups)
 |// Hard irq comes, current task is scheduled out.

                                        cgroup_attach_task()
                                        |cgroup_migrate()
                                        |cgroup_migrate_execute()
                                        |css_set_move_task(task, from_cset, to_cset, true)
                                        |cgroup_move_task(task, to_cset)
                                        |rcu_assign_pointer(.., to_cset)
                                        |...
                                        |cgroup_migrate_finish()
                                        |put_css_set_locked(from_cset)
                                        |from_cset->refcount return 0
                                        |kfree_rcu(cset, rcu_head) // free from_cset after new gp
                                        |add_ptr_to_bulk_krc_lock()
                                        |schedule_delayed_work(&krcp->monitor_work, ..)

                                        kfree_rcu_monitor()
                                        |krcp->bulk_head[0]'s work attached to krwp->bulk_head_free[]
                                        |queue_rcu_work(system_wq, &krwp->rcu_work)
                                        |if rwork->rcu.work is not in WORK_STRUCT_PENDING_BIT state,
                                        |call_rcu(&rwork->rcu, rcu_work_rcufn) <--- request new gp

                                        // There is a perious call_rcu(.., rcu_work_rcufn)
                                        // gp end, rcu_work_rcufn() is called.
                                        rcu_work_rcufn()
                                        |__queue_work(.., rwork->wq, &rwork->work);

                                        |kfree_rcu_work()
                                        |krwp->bulk_head_free[0] bulk is freed before new gp end!!!
                                        |The "from_cset" is freed before new gp end.

// the task resumes some time later.
 |css_set_ptr->subsys[(subsys_id) <--- Caused kernel crash, because css_set_ptr is freed.

This commit therefore causes kfree_rcu_monitor() to refrain from moving
kfree_rcu() memory to the kfree_rcu_cpu_work structure until the RCU
grace period has completed for all three categories.

v2: Use helper function instead of inserted code block at kfree_rcu_monitor().

Fixes: 34c8817455 ("rcu: Support kfree_bulk() interface in kfree_rcu()")
Fixes: 5f3c8d6204 ("rcu/tree: Maintain separate array for vmalloc ptrs")
Reported-by: Mukesh Ojha <quic_mojha@quicinc.com>
Signed-off-by: Ziwei Dai <ziwei.dai@unisoc.com>
Reviewed-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>

Bug: 275289142
Link: https://lore.kernel.org/rcu/1680266529-28429-1-git-send-email-ziwei.dai@unisoc.com/T/#m9d1d6a4542548acddee133a2807511bccf2b01b6
(cherry picked from commit e222f9a512539c3f4093a55d16624d9da614800b
 https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git dev.2023.03.30a)
[ziwei.dai: Added missing need_offload_krc() function ]

Change-Id: I63b618ed8454cb2826f04e8789c762be8f1ba1e1
Signed-off-by: Ziwei Dai <ziwei.dai@unisoc.com>
(cherry picked from commit 6ccb91c80a501c800cc48a3fcbb5473f1ec72c02)
2023-04-20 01:04:33 +00:00
Rick Yiu
9f74d5ca93 ANDROID: Update the ABI symbol list
Adding the following symbols:
  - __traceiter_android_rvh_attach_entity_load_avg
  - __traceiter_android_rvh_detach_entity_load_avg
  - __traceiter_android_rvh_remove_entity_load_avg
  - __traceiter_android_rvh_update_blocked_fair
  - __traceiter_android_rvh_update_load_avg
  - __tracepoint_android_rvh_attach_entity_load_avg
  - __tracepoint_android_rvh_detach_entity_load_avg
  - __tracepoint_android_rvh_remove_entity_load_avg
  - __tracepoint_android_rvh_update_blocked_fair
  - __tracepoint_android_rvh_update_load_avg

Bug: 201260585
Change-Id: I92da6f88f6dec03f4034aace3da091876102e006
Signed-off-by: Rick Yiu <rickyiu@google.com>
2023-04-19 23:55:10 +00:00
Lucas Wei
4e1ff0060f ANDROID: Update the ABI symbol list
Add the following symbols:
 - __arm_smccc_sve_check

Bug: 232434016
Change-Id: I8eb7bdfbffcfc46ed5e5ab845aa8e9d892c8d30e
Signed-off-by: Lucas Wei <lucaswei@google.com>
2023-04-19 17:29:33 +00:00
Qinglin Li
87bcc73a79 ANDROID: GKI: wifi drivers need ABI Symbol list for Amlogic SOC
rtl8852be wifi drivers need ABI Symbol list for Amlogic SOC

1 function symbol(s) added
  'void cfg80211_ch_switch_started_notify(struct net_device*, struct cfg80211_chan_def*, unsigned int, u8, bool)'

Bug: 278600971
Change-Id: I6782e9f7539a521dd300ed73b73289920d43722c
Signed-off-by: Qinglin Li <qinglin.li@amlogic.com>
2023-04-18 16:07:36 +00:00
Greg Kroah-Hartman
37a4d9f014 ANDROID: enable CONFIG_USB_XHCI_PCI_RENESAS in gki_defconfig
More platforms are using the Renesas XHCI controller, so enable it in
the configuration so that we do not have to export a bunch of internal
xhci controller functions that should not be part of any stable api.

Bug: 278153046
Change-Id: I9d8aa6a1783f0bb3bf0d794c7101d1762dd96b3d
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2023-04-18 08:05:08 +00:00
Benedict Wong
e7b6eb419e FROMLIST: xfrm: Skip checking of already-verified secpath entries
This change fixes a bug where inbound packets to nested IPsec tunnels
fails to pass policy checks due to the inner tunnel's policy checks
not having a reference to the outer policy/template. This causes the
policy check to fail, since the first entries in the secpath correlate
to the outer tunnel, while the templates being verified are for the
inner tunnel.

In order to ensure that the appropriate policy and template context is
searchable, the policy checks must be done incrementally between each
decryption step. As such, this marks secpath entries as having been
successfully matched, skipping them (treating as optional) on subsequent
policy checks

By skipping the immediate error return in the case where the secpath
entry had previously been validated, this change allows secpath entries
that matched a policy/template previously, while still requiring that
each searched template find a match in the secpath.

For security:
- All templates must have matching secpath entries
  - Unchanged by current patch; templates that do not match any secpath
    entry still return -1. This patch simply allows skipping earlier
    blocks of verified secpath entries
- All entries (except trailing transport mode entries) must have a
  matching template
  - Unvalidated entries, including transport-mode entries still return
    the errored index if it does not match the correct template.

Bug: 236423446
Bug: 277711867
Test: Tested against Android Kernel Unit Tests
Test: Tested against Android CTS
Link: https://lore.kernel.org/netdev/20220824221252.4130836-2-benedictwong@google.com/
[benedictwong: fixed minor style issues]
Signed-off-by: Benedict Wong <benedictwong@google.com>
(cherry picked from commit 970e02667c)
Merged-In: Ic32831cb00151d0de2e465f18ec37d5f7b680e54
Change-Id: Ic32831cb00151d0de2e465f18ec37d5f7b680e54
2023-04-17 22:31:20 +00:00
Kelvin Zhang
5e02a46709 Revert "Fix XFRM-I support for nested ESP tunnels"
This reverts commit 0b892d8fe9

After manual bisection, I found that 0b892d8fe9 is the culprit of the failed android.net.cts.IpSecManagerTunnelTest .

Bug: 277711867
Signed-off-by: Kelvin Zhang <zhangkelvin@google.com>
(cherry picked from https://android-review.googlesource.com/q/commit:f2aef35478ac3939f739b81fe23f57afc64c397a)
Merged-In: Ife350047225fb5d825ec92c5d087313c70965acf
Change-Id: Ife350047225fb5d825ec92c5d087313c70965acf
2023-04-17 22:31:20 +00:00
Benedict Wong
9bf7728b3b FROMLIST: xfrm: Ensure policy checked for nested ESP tunnels
This change ensures that all nested XFRM packets have their policy
checked before decryption of the next layer, so that policies are
verified at each intermediate step of the decryption process.

Notably, raw ESP/AH packets do not perform policy checks inherently,
whereas all other encapsulated packets (UDP, TCP encapsulated) do policy
checks after calling xfrm_input handling in the respective encapsulation
layer.

This is necessary especially for nested tunnels, as the IP addresses,
protocol and ports may all change, thus not matching the previous
policies. In order to ensure that packets match the relevant inbound
templates, the xfrm_policy_check should be done before handing off to
the inner XFRM protocol to decrypt and decapsulate.

In order to prevent double-checking packets both here and in the
encapsulation layers, this check is currently limited to nested
tunnel-mode transforms and checked prior to decapsulation of inner
tunnel layers (prior to hitting a nested tunnel's xfrm_input, there
is no great way to detect a nested tunnel). This is primarily a
performance consideration, as a general blanket check at the end of
xfrm_input would suffice, but may result in multiple policy checks.

Bug: 236423446
Bug: 277711867

Test: Tested against Android Kernel Unit Tests
Link: https://lore.kernel.org/netdev/20220824221252.4130836-3-benedictwong@google.com/
Signed-off-by: Benedict Wong <benedictwong@google.com>
(cherry picked from commit b5bf2997c3)
Merged-In: I20c5abf39512d7f6cf438c0921a78a84e281b4e9
Change-Id: I20c5abf39512d7f6cf438c0921a78a84e281b4e9
2023-04-17 18:10:29 +00:00
Christian Brauner
4187fa3fbe UPSTREAM: fs: drop peer group ids under namespace lock
commit cb2239c198 upstream.

When cleaning up peer group ids in the failure path we need to make sure
to hold on to the namespace lock. Otherwise another thread might just
turn the mount from a shared into a non-shared mount concurrently.

Link: https://lore.kernel.org/lkml/00000000000088694505f8132d77@google.com
Fixes: 2a1867219c ("fs: add mount_setattr()")
Reported-by: syzbot+8ac3859139c685c4f597@syzkaller.appspotmail.com
Cc: stable@vger.kernel.org # 5.12+
Message-Id: <20230330-vfs-mount_setattr-propagation-fix-v1-1-37548d91533b@kernel.org>
Signed-off-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bug: 275196365
Change-Id: I0075d0057b61ed4a32a87a394c966ff0235cccdc
Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org>
2023-04-17 06:08:10 +00:00
Arve Hjønnevåg
12d161b7ae FROMLIST: sched/wait: Fix a kthread_park race with wait_woken()
kthread_park and wait_woken have a similar race that kthread_stop and
wait_woken used to have before it was fixed in
cb6538e740. Extend that fix to also cover
kthread_park.

Bug: 274686101
Link: https://lore.kernel.org/lkml/20230406194053.876844-1-arve@android.com/
Change-Id: Iaec960d7e30862f4ccac5c98dd43d32bbcf9a72b
Signed-off-by: Arve Hjønnevåg <arve@android.com>
(cherry picked from commit 69eba53950444890063b1e0469a61b69f8301767)
2023-04-14 21:07:17 +00:00
Badhri Jagan Sridharan
3d9d54cf37 ANDROID: Update the ABI symbol list typec mux
2 function symbol(s) added
  'void* typec_mux_get_drvdata(struct typec_mux*)'
  'struct typec_mux* typec_mux_register(struct device*, const struct typec_mux_desc*)'

Bug: 260915739
Change-Id: Ic3113c5cb932002c55674a565d3db9539669238d
Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
2023-04-14 15:22:31 +00:00
Badhri Jagan Sridharan
0d708da1f5 ANDROID: Update the ABI symbol list typec port management
2 function symbol(s) added
  'void tcpm_port_clean(struct tcpm_port*)'
  'bool tcpm_port_is_toggling(struct tcpm_port*)'

Bug: 215766959
Change-Id: Iffaa5ac3a4af04d70d473d11de975c887450f702
Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
2023-04-13 21:26:14 +00:00
Qinglin Li
9d04dbf3ec ANDROID: GKI: Add usb and pcie ABI Symbol list for Amlogic SOC
Add usb and pcie ABI Symbol list for Amlogic SOC

31 function symbol(s) added
  'int __uio_register_device(struct module*, struct device*, struct uio_info*)'
  'void* devm_pci_remap_cfg_resource(struct device*, struct resource*)'
  'struct usb_phy* devm_usb_get_phy(struct device*, enum usb_phy_type)'
  'void dw_pcie_host_deinit(struct pcie_port*)'
  'int dw_pcie_wait_for_link(struct dw_pcie*)'
  'int generic_file_open(struct inode*, struct file*)'
  'ssize_t generic_file_splice_read(struct file*, loff_t*, struct pipe_inode_info*, size_t, unsigned int)'
  'void generic_fillattr(struct user_namespace*, struct inode*, struct kstat*)'
  'int get_tree_bdev(struct fs_context*, int(*)(struct super_block*, struct fs_context*))'
  'loff_t inode_get_bytes(struct inode*)'
  'void inode_set_bytes(struct inode*, loff_t)'
  'void invalidate_bdev(struct block_device*)'
  'ssize_t iter_file_splice_write(struct pipe_inode_info*, struct file*, loff_t*, size_t, unsigned int)'
  'void kill_block_super(struct super_block*)'
  'struct nls_table* load_nls_default()'
  'char* mangle_path(char*, const char*, const char*)'
  'struct pci_bus* pci_find_next_bus(const struct pci_bus*)'
  'void pci_lock_rescan_remove()'
  'void pci_stop_and_remove_bus_device_locked(struct pci_dev*)'
  'void pci_unlock_rescan_remove()'
  'int posix_acl_chmod(struct user_namespace*, struct inode*, umode_t)'
  'void* proc_get_parent_data(const struct inode*)'
  'int sb_set_blocksize(struct super_block*, int)'
  'int sync_blockdev(struct block_device*)'
  'int sync_filesystem(struct super_block*)'
  'void uio_unregister_device(struct uio_info*)'
  'void unload_nls(struct nls_table*)'
  'int usb_add_phy_dev(struct usb_phy*)'
  'int usb_gadget_probe_driver(struct usb_gadget_driver*)'
  'int usb_gadget_unregister_driver(struct usb_gadget_driver*)'
  'int vfs_fsync(struct file*, int)'

Bug: 276863283
Change-Id: I42d5006236004fade1b03772ee1151b3de491ab1
Signed-off-by: Qinglin Li <qinglin.li@amlogic.com>
2023-04-13 18:50:28 +00:00
Qinglin Li
f9bf714530 ANDROID: GKI: Add file system ABI Symbol list for Amlogic SOC
Add file system ABI Symbol list for Amlogic SOC

69 function symbol(s) added
  'int __fs_parse(struct p_log*, const struct fs_parameter_spec*, struct fs_parameter*, struct fs_parse_result*)'
  'struct buffer_head* __getblk_gfp(struct block_device*, sector_t, unsigned int, gfp_t)'
  'void __lock_buffer(struct buffer_head*)'
  'void __mark_inode_dirty(struct inode*, int)'
  'int __set_page_dirty_buffers(struct page*)'
  'void __wait_on_buffer(struct buffer_head*)'
  'struct dentry* d_find_alias(struct inode*)'
  'void d_instantiate(struct dentry*, struct inode*)'
  'struct dentry* d_make_root(struct inode*)'
  'struct dentry* d_obtain_alias(struct inode*)'
  'struct dentry* d_splice_alias(struct inode*, struct dentry*)'
  'char* dentry_path_raw(const struct dentry*, char*, int)'
  'void discard_new_inode(struct inode*)'
  'void dput(struct dentry*)'
  'void drop_nlink(struct inode*)'
  'void end_buffer_read_sync(struct buffer_head*, int)'
  'int fiemap_fill_next_extent(struct fiemap_extent_info*, u64, u64, u64, u32)'
  'int fiemap_prep(struct inode*, struct fiemap_extent_info*, u64, u64*, u32)'
  'int file_remove_privs(struct file*)'
  'int file_update_time(struct file*)'
  'int fs_param_is_string(struct p_log*, const struct fs_parameter_spec*, struct fs_parameter*, struct fs_parse_result*)'
  'int fs_param_is_u32(struct p_log*, const struct fs_parameter_spec*, struct fs_parameter*, struct fs_parse_result*)'
  'sector_t generic_block_bmap(struct address_space*, sector_t, get_block_t*)'
  'struct dentry* generic_fh_to_dentry(struct super_block*, struct fid*, int, int, struct inode*(*)(struct super_block*, u64, u32))'
  'struct dentry* generic_fh_to_parent(struct super_block*, struct fid*, int, int, struct inode*(*)(struct super_block*, u64, u32))'
  'int generic_file_fsync(struct file*, loff_t, loff_t, int)'
  'int generic_permission(struct user_namespace*, struct inode*, int)'
  'ssize_t generic_read_dir(struct file*, char*, size_t, loff_t*)'
  'int generic_write_end(struct file*, struct address_space*, loff_t, unsigned int, unsigned int, struct page*, void*)'
  'struct inode* iget5_locked(struct super_block*, unsigned long, int(*)(struct inode*, void*), int(*)(struct inode*, void*), void*)'
  'void iget_failed(struct inode*)'
  'void ihold(struct inode*)'
  'struct inode* ilookup(struct super_block*, unsigned long)'
  'void inc_nlink(struct inode*)'
  'void init_special_inode(struct inode*, umode_t, dev_t)'
  'void inode_dio_wait(struct inode*)'
  'void inode_init_once(struct inode*)'
  'void inode_init_owner(struct user_namespace*, struct inode*, const struct inode*, umode_t)'
  'int inode_needs_sync(struct inode*)'
  'int inode_newsize_ok(const struct inode*, loff_t)'
  'void inode_nohighmem(struct inode*)'
  'int insert_inode_locked(struct inode*)'
  'void invalidate_inode_buffers(struct inode*)'
  'bool is_bad_inode(struct inode*)'
  'void kfree_link(void*)'
  'void ll_rw_block(int, int, int, struct buffer_head**)'
  'struct nls_table* load_nls(char*)'
  'void logfc(struct fc_log*, const char*, char, const char*, ...)'
  'void make_bad_inode(struct inode*)'
  'void mark_buffer_dirty(struct buffer_head*)'
  'void mpage_readahead(struct readahead_control*, get_block_t*)'
  'int mpage_readpage(struct page*, get_block_t*)'
  'int mpage_writepages(struct address_space*, struct writeback_control*, get_block_t*)'
  'struct inode* new_inode(struct super_block*)'
  'int register_filesystem(struct file_system_type*)'
  'void set_bh_page(struct buffer_head*, struct page*, unsigned long)'
  'void set_nlink(struct inode*, unsigned int)'
  'void setattr_copy(struct user_namespace*, struct inode*, const struct iattr*)'
  'int setattr_prepare(struct user_namespace*, struct dentry*, struct iattr*)'
  'int submit_bh(int, int, struct buffer_head*)'
  'int sync_dirty_buffer(struct buffer_head*)'
  'int sync_inode_metadata(struct inode*, int)'
  'int sync_mapping_buffers(struct address_space*)'
  'void unlock_buffer(struct buffer_head*)'
  'void unlock_new_inode(struct inode*)'
  'int unregister_filesystem(struct file_system_type*)'
  'int utf16s_to_utf8s(const wchar_t*, int, enum utf16_endian, u8*, int)'
  'int utf8_to_utf32(const u8*, int, unicode_t*)'
  'int write_inode_now(struct inode*, int)'

1 variable symbol(s) added
  'struct kmem_cache* names_cachep'

Bug: 276863283
Change-Id: I5addeb8f83362c80e87a33726297d72bccc2f2ed
Signed-off-by: Qinglin Li <qinglin.li@amlogic.com>
2023-04-13 18:50:28 +00:00
Qinglin Li
42dd91524e ANDROID: GKI: Add kernel base and lib ABI Symbol list for Amlogic SOC
Add kernel base and lib ABI Symbol list for Amlogic SOC

62 function symbol(s) added
  'void __devm_release_region(struct device*, struct resource*, resource_size_t, resource_size_t)'
  'int __kfifo_from_user(struct __kfifo*, const void*, unsigned long, unsigned int*)'
  'unsigned int __kfifo_in_r(struct __kfifo*, const void*, unsigned int, size_t)'
  'unsigned int __kfifo_out_r(struct __kfifo*, void*, unsigned int, size_t)'
  'int __kfifo_to_user(struct __kfifo*, void*, unsigned long, unsigned int*)'
  'int __traceiter_android_vh_iommu_iovad_free_iova(void*, struct iova_domain*, dma_addr_t, size_t)'
  'int __traceiter_android_vh_sched_show_task(void*, struct task_struct*)'
  'unsigned long _find_last_bit(const unsigned long*, unsigned long)'
  'int default_wake_function(wait_queue_entry_t*, unsigned int, int, void*)'
  'int des_expand_key(struct des_ctx*, const u8*, unsigned int)'
  'void dev_pm_clear_wake_irq(struct device*)'
  'struct device* dev_pm_domain_attach_by_id(struct device*, unsigned int)'
  'int dev_pm_set_wake_irq(struct device*, int)'
  'int device_get_phy_mode(struct device*)'
  'char* devm_kvasprintf(struct device*, gfp_t, const char*, va_list)'
  'int down_timeout(struct semaphore*, long)'
  'size_t fault_in_iov_iter_readable(const struct iov_iter*, size_t)'
  'void flush_signals(struct task_struct*)'
  'bool fwnode_device_is_available(const struct fwnode_handle*)'
  'struct fwnode_handle* fwnode_graph_get_next_endpoint(const struct fwnode_handle*, struct fwnode_handle*)'
  'struct fwnode_handle* fwnode_graph_get_port_parent(const struct fwnode_handle*)'
  'struct fwnode_handle* fwnode_graph_get_remote_endpoint(const struct fwnode_handle*)'
  'struct fwnode_handle* fwnode_graph_get_remote_port_parent(const struct fwnode_handle*)'
  'int fwnode_graph_parse_endpoint(const struct fwnode_handle*, struct fwnode_endpoint*)'
  'struct fwnode_handle* fwnode_handle_get(struct fwnode_handle*)'
  'int fwnode_property_get_reference_args(const struct fwnode_handle*, const char*, const char*, unsigned int, unsigned int, struct fwnode_reference_args*)'
  'int fwnode_property_read_u64_array(const struct fwnode_handle*, const char*, u64*, size_t)'
  'phys_addr_t gen_pool_virt_to_phys(struct gen_pool*, unsigned long)'
  'int get_device_system_crosststamp(int(*)(ktime_t*, struct system_counterval_t*, void*), void*, struct system_time_snapshot*, struct system_device_crosststamp*)'
  'void* ioremap_cache(phys_addr_t, size_t)'
  'void iov_iter_init(struct iov_iter*, unsigned int, const struct iovec*, unsigned long, size_t)'
  'size_t iov_iter_zero(size_t, struct iov_iter*)'
  'unsigned int irq_create_fwspec_mapping(struct irq_fwspec*)'
  'void irq_domain_free_irqs_parent(struct irq_domain*, unsigned int, unsigned int)'
  'void kernel_sigaction(int, __sighandler_t)'
  'int kill_pid(struct pid*, int, int)'
  'void lockref_get(struct lockref*)'
  'char* next_arg(char*, char**, char**)'
  'int nla_append(struct sk_buff*, int, const void*)'
  'int param_get_charp(char*, const struct kernel_param*)'
  'int param_get_string(char*, const struct kernel_param*)'
  'int param_set_charp(const char*, const struct kernel_param*)'
  'int param_set_copystring(const char*, const struct kernel_param*)'
  'int platform_get_irq_byname_optional(struct platform_device*, const char*)'
  'struct rb_node* rb_last(const struct rb_root*)'
  'u64 read_sanitised_ftr_reg(u32)'
  'int register_module_notifier(struct notifier_block*)'
  'struct perf_event** register_wide_hw_breakpoint(struct perf_event_attr*, perf_overflow_handler_t, void*)'
  'int regmap_irq_chip_get_base(struct regmap_irq_chip_data*)'
  'int release_resource(struct resource*)'
  'size_t sg_copy_from_buffer(struct scatterlist*, unsigned int, const void*, size_t)'
  'size_t sg_copy_to_buffer(struct scatterlist*, unsigned int, void*, size_t)'
  'int sg_nents(struct scatterlist*)'
  'ssize_t show_class_attr_string(struct class*, struct class_attribute*, char*)'
  'void show_regs(struct pt_regs*)'
  'int smpboot_register_percpu_thread(struct smp_hotplug_thread*)'
  'void stack_trace_print(const unsigned long*, unsigned int, int)'
  'char* strchrnul(const char*, int)'
  'void symbol_put_addr(void*)'
  'int unregister_module_notifier(struct notifier_block*)'
  'void unregister_wide_hw_breakpoint(struct perf_event**)'
  'void yield()'

12 variable symbol(s) added
  'struct tracepoint __tracepoint_android_vh_iommu_iovad_free_iova'
  'struct tracepoint __tracepoint_android_vh_sched_show_task'
  'struct cma* dma_contiguous_default_area'
  'const char hex_asc[17]'
  'u64 jiffies_64'
  'int overflowgid'
  'int overflowuid'
  'const struct kernel_param_ops param_ops_short'
  'const struct kernel_param_ops param_ops_ullong'
  'const struct kernel_param_ops param_ops_ushort'
  'struct workqueue_struct* pm_wq'
  'const uuid_t uuid_null'

Bug: 276863283
Change-Id: I22fc86f1e769c06744948a8b60254b1172364e3f
Signed-off-by: Qinglin Li <qinglin.li@amlogic.com>
2023-04-13 18:50:28 +00:00
Qinglin Li
6c73bb759c ANDROID: GKI: Add mmc gpio pwm etc ABI Symbol list for Amlogic SOC
Add mmc gpio pwm etc ABI Symbol list for Amlogic SOC

71 function symbol(s) added
  'int __device_reset(struct device*, bool)'
  'int __mmc_claim_host(struct mmc_host*, struct mmc_ctx*, atomic_t*)'
  'void dev_pm_opp_free_cpufreq_table(struct device*, struct cpufreq_frequency_table**)'
  'struct opp_table* dev_pm_opp_get_opp_table(struct device*)'
  'int dev_pm_opp_init_cpufreq_table(struct device*, struct cpufreq_frequency_table**)'
  'int dev_pm_opp_of_add_table_indexed(struct device*, int)'
  'void dev_pm_opp_put_opp_table(struct opp_table*)'
  'int devm_clk_hw_register_clkdev(struct device*, struct clk_hw*, const char*, const char*)'
  'struct pwm_device* devm_of_pwm_get(struct device*, struct device_node*, const char*)'
  'struct pwm_device* devm_pwm_get(struct device*, const char*)'
  'int extcon_dev_register(struct extcon_dev*)'
  'int extcon_set_state(struct extcon_dev*, unsigned int, bool)'
  'struct gpio_desc* gpiod_get_index(struct device*, const char*, unsigned int, enum gpiod_flags)'
  'int hwspin_lock_register(struct hwspinlock_device*, struct device*, const struct hwspinlock_ops*, int, int)'
  'int hwspin_lock_unregister(struct hwspinlock_device*)'
  'void iio_buffer_init(struct iio_buffer*)'
  'void iio_buffer_put(struct iio_buffer*)'
  'int iio_device_attach_buffer(struct iio_dev*, struct iio_buffer*)'
  's64 iio_get_time_ns(const struct iio_dev*)'
  'int iio_push_to_buffers(struct iio_dev*, const void*)'
  'void led_trigger_blink_oneshot(struct led_trigger*, unsigned long*, unsigned long*, int)'
  'void led_trigger_event(struct led_trigger*, enum led_brightness)'
  'int led_trigger_register(struct led_trigger*)'
  'void led_trigger_register_simple(const char*, struct led_trigger**)'
  'void led_trigger_unregister(struct led_trigger*)'
  'void led_trigger_unregister_simple(struct led_trigger*)'
  'bool mmc_card_is_blockaddr(struct mmc_card*)'
  'void mmc_detect_change(struct mmc_host*, unsigned long)'
  'void mmc_release_host(struct mmc_host*)'
  'void mmc_set_data_timeout(struct mmc_data*, const struct mmc_card*)'
  'int mmc_sw_reset(struct mmc_host*)'
  'int mmc_switch(struct mmc_card*, u8, u8, u8, unsigned int)'
  'void mmc_wait_for_req(struct mmc_host*, struct mmc_request*)'
  'struct reset_control* of_reset_control_array_get(struct device_node*, bool, bool, bool)'
  'int pwm_adjust_config(struct pwm_device*)'
  'int pwm_apply_state(struct pwm_device*, const struct pwm_state*)'
  'int regulator_list_voltage(struct regulator*, unsigned int)'
  'int regulator_map_voltage_iterate(struct regulator_dev*, int, int)'
  'int rtc_add_group(struct rtc_device*, const struct attribute_group*)'
  'unsigned int sdio_align_size(struct sdio_func*, unsigned int)'
  'void sdio_claim_host(struct sdio_func*)'
  'int sdio_claim_irq(struct sdio_func*, sdio_irq_handler_t*)'
  'int sdio_disable_func(struct sdio_func*)'
  'int sdio_enable_func(struct sdio_func*)'
  'unsigned char sdio_f0_readb(struct sdio_func*, unsigned int, int*)'
  'void sdio_f0_writeb(struct sdio_func*, unsigned char, unsigned int, int*)'
  'mmc_pm_flag_t sdio_get_host_pm_caps(struct sdio_func*)'
  'u8 sdio_readb(struct sdio_func*, unsigned int, int*)'
  'u32 sdio_readl(struct sdio_func*, unsigned int, int*)'
  'int sdio_readsb(struct sdio_func*, void*, unsigned int, int)'
  'u16 sdio_readw(struct sdio_func*, unsigned int, int*)'
  'int sdio_register_driver(struct sdio_driver*)'
  'void sdio_release_host(struct sdio_func*)'
  'int sdio_release_irq(struct sdio_func*)'
  'void sdio_retune_crc_disable(struct sdio_func*)'
  'void sdio_retune_crc_enable(struct sdio_func*)'
  'void sdio_retune_hold_now(struct sdio_func*)'
  'void sdio_retune_release(struct sdio_func*)'
  'int sdio_set_host_pm_flags(struct sdio_func*, mmc_pm_flag_t)'
  'void sdio_unregister_driver(struct sdio_driver*)'
  'void sdio_writeb(struct sdio_func*, u8, unsigned int, int*)'
  'void sdio_writel(struct sdio_func*, u32, unsigned int, int*)'
  'int sdio_writesb(struct sdio_func*, unsigned int, void*, int)'
  'void sdio_writew(struct sdio_func*, u16, unsigned int, int*)'
  'struct spi_device* spi_alloc_device(struct spi_controller*)'
  'struct spi_controller* spi_busnum_to_master(u16)'
  'int spi_mem_adjust_op_size(struct spi_mem*, struct spi_mem_op*)'
  'bool spi_mem_default_supports_op(struct spi_mem*, const struct spi_mem_op*)'
  'bool spi_mem_supports_op(struct spi_mem*, const struct spi_mem_op*)'
  'struct spi_device* spi_new_device(struct spi_controller*, struct spi_board_info*)'
  'void uart_insert_char(struct uart_port*, unsigned int, unsigned int, unsigned int, unsigned int)'

Bug: 276863283
Change-Id: I1df1316a23a6dcaf69b6244cb9d63b5c64fcd37a
Signed-off-by: Qinglin Li <qinglin.li@amlogic.com>
2023-04-13 18:50:28 +00:00
Qinglin Li
77fd1bdf70 ANDROID: GKI: Add net and memory ABI Symbol list for Amlogic SOC
Add net and memory ABI Symbol list for Amlogic SOC

66 function symbol(s) added
  'struct net_device* __dev_get_by_name(struct net*, const char*)'
  'ssize_t __generic_file_write_iter(struct kiocb*, struct iov_iter*)'
  'int __ipv6_addr_type(const struct in6_addr*)'
  'struct sk_buff* __pskb_copy_fclone(struct sk_buff*, int, gfp_t, bool)'
  'struct net_device* devm_alloc_etherdev_mqs(struct device*, int, unsigned int, unsigned int)'
  'int eth_header(struct sk_buff*, struct net_device*, unsigned short, const void*, const void*, unsigned int)'
  'int eth_header_parse(const struct sk_buff*, unsigned char*)'
  'int filemap_fdatawait_range(struct address_space*, loff_t, loff_t)'
  'int filemap_fdatawrite(struct address_space*)'
  'int filemap_fdatawrite_range(struct address_space*, loff_t, loff_t)'
  'int filemap_flush(struct address_space*)'
  'int filemap_write_and_wait_range(struct address_space*, loff_t, loff_t)'
  'int flow_block_cb_setup_simple(struct flow_block_offload*, struct list_head*, flow_setup_cb_t*, void*, void*, bool)'
  'void flow_rule_match_basic(const struct flow_rule*, struct flow_match_basic*)'
  'void flow_rule_match_ipv4_addrs(const struct flow_rule*, struct flow_match_ipv4_addrs*)'
  'void flow_rule_match_ports(const struct flow_rule*, struct flow_match_ports*)'
  'void flow_rule_match_vlan(const struct flow_rule*, struct flow_match_vlan*)'
  'int generic_file_mmap(struct file*, struct vm_area_struct*)'
  'int get_kernel_pages(const struct kvec*, int, int, struct page**)'
  'unsigned long get_pfnblock_flags_mask(const struct page*, unsigned long, unsigned long)'
  'struct page* grab_cache_page_write_begin(struct address_space*, unsigned long, unsigned int)'
  'char* iwe_stream_add_event(struct iw_request_info*, char*, char*, struct iw_event*, int)'
  'char* iwe_stream_add_point(struct iw_request_info*, char*, char*, struct iw_event*, char*)'
  'char* iwe_stream_add_value(struct iw_request_info*, char*, char*, char*, struct iw_event*, int)'
  'void mod_node_page_state(struct pglist_data*, enum node_stat_item, long)'
  'void netdev_printk(const char*, const struct net_device*, const char*, ...)'
  'void netdev_rss_key_fill(void*, size_t)'
  'int of_get_phy_mode(struct device_node*, phy_interface_t*)'
  'struct page* page_pool_alloc_pages(struct page_pool*, gfp_t)'
  'struct page_pool* page_pool_create(const struct page_pool_params*)'
  'void page_pool_destroy(struct page_pool*)'
  'void page_pool_put_page(struct page_pool*, struct page*, unsigned int, bool)'
  'void page_pool_release_page(struct page_pool*, struct page*)'
  'struct page* pagecache_get_page(struct address_space*, unsigned long, int, gfp_t)'
  'int pagecache_write_begin(struct file*, struct address_space*, loff_t, unsigned int, unsigned int, struct page**, void**)'
  'int pagecache_write_end(struct file*, struct address_space*, loff_t, unsigned int, unsigned int, struct page*, void*)'
  'struct page* read_cache_page(struct address_space*, unsigned long, int(*)(void*, struct page*), void*)'
  'bool rfkill_set_sw_state(struct rfkill*, bool)'
  'void* skb_pull_rcsum(struct sk_buff*, unsigned int)'
  'void skb_scrub_packet(struct sk_buff*, bool)'
  'void truncate_inode_pages_final(struct address_space*)'
  'void truncate_pagecache(struct inode*, loff_t)'
  'void truncate_setsize(struct inode*, loff_t)'
  'void unpin_user_pages(struct page**, unsigned long)'
  'int vm_insert_page(struct vm_area_struct*, unsigned long, struct page*)'
  'void vm_unmap_aliases()'
  'unsigned long vmalloc_to_pfn(const void*)'
  'void wireless_send_event(struct net_device*, unsigned int, union iwreq_data*, const char*)'
  'bool xdp_rxq_info_is_reg(struct xdp_rxq_info*)'
  'void xdp_rxq_info_unreg_mem_model(struct xdp_rxq_info*)'
  'struct xdp_buff* xp_alloc(struct xsk_buff_pool*)'
  'int xp_dma_map(struct xsk_buff_pool*, struct device*, unsigned long, struct page**, u32)'
  'void xp_dma_sync_for_cpu_slow(struct xdp_buff_xsk*)'
  'void xp_dma_sync_for_device_slow(struct xsk_buff_pool*, dma_addr_t, size_t)'
  'void xp_dma_unmap(struct xsk_buff_pool*, unsigned long)'
  'void xp_free(struct xdp_buff_xsk*)'
  'dma_addr_t xp_raw_get_dma(struct xsk_buff_pool*, u64)'
  'void xp_set_rxq_info(struct xsk_buff_pool*, struct xdp_rxq_info*)'
  'void xsk_clear_rx_need_wakeup(struct xsk_buff_pool*)'
  'struct xsk_buff_pool* xsk_get_pool_from_qid(struct net_device*, u16)'
  'void xsk_set_rx_need_wakeup(struct xsk_buff_pool*)'
  'void xsk_set_tx_need_wakeup(struct xsk_buff_pool*)'
  'void xsk_tx_completed(struct xsk_buff_pool*, u32)'
  'bool xsk_tx_peek_desc(struct xsk_buff_pool*, struct xdp_desc*)'
  'void xsk_tx_release(struct xsk_buff_pool*)'
  'bool xsk_uses_need_wakeup(struct xsk_buff_pool*)'

2 variable symbol(s) added
  'void* high_memory'
  'struct backing_dev_info noop_backing_dev_info'

Bug: 276863283
Change-Id: I5fe6034fb0580e8c9cb81fa0128b6785069c3f3d
Signed-off-by: Qinglin Li <qinglin.li@amlogic.com>
2023-04-13 18:50:28 +00:00
Qinglin Li
2da1dda224 ANDROID: GKI: Add net ABI Symbol list for Amlogic SOC
Add net ABI Symbol list for Amlogic SOC

54 function symbol(s) added
  'int __of_mdiobus_register(struct mii_bus*, struct device_node*, struct module*)'
  'int genphy_aneg_done(struct phy_device*)'
  'int genphy_read_status(struct phy_device*)'
  'int genphy_restart_aneg(struct phy_device*)'
  'int genphy_resume(struct phy_device*)'
  'int genphy_soft_reset(struct phy_device*)'
  'int genphy_suspend(struct phy_device*)'
  'int genphy_update_link(struct phy_device*)'
  'struct mdio_device* mdio_device_create(struct mii_bus*, int)'
  'void mdio_device_free(struct mdio_device*)'
  'struct mii_bus* mdiobus_alloc_size(size_t)'
  'void mdiobus_free(struct mii_bus*)'
  'struct phy_device* mdiobus_get_phy(struct mii_bus*, int)'
  'int mdiobus_read(struct mii_bus*, int, u32)'
  'void mdiobus_unregister(struct mii_bus*)'
  'int mdiobus_write(struct mii_bus*, int, u32, u16)'
  'void netdev_alert(const struct net_device*, const char*, ...)'
  'struct mii_bus* of_mdio_find_bus(struct device_node*)'
  'bool of_phy_is_fixed_link(struct device_node*)'
  'void phy_attached_info(struct phy_device*)'
  'int phy_drivers_register(struct phy_driver*, int, struct module*)'
  'void phy_drivers_unregister(struct phy_driver*, int)'
  'void phy_error(struct phy_device*)'
  'int phy_init_eee(struct phy_device*, bool)'
  'void phy_print_status(struct phy_device*)'
  'void phy_trigger_machine(struct phy_device*)'
  'int phylink_connect_phy(struct phylink*, struct phy_device*)'
  'struct phylink* phylink_create(struct phylink_config*, struct fwnode_handle*, phy_interface_t, const struct phylink_mac_ops*)'
  'void phylink_destroy(struct phylink*)'
  'void phylink_disconnect_phy(struct phylink*)'
  'int phylink_ethtool_get_eee(struct phylink*, struct ethtool_eee*)'
  'void phylink_ethtool_get_pauseparam(struct phylink*, struct ethtool_pauseparam*)'
  'void phylink_ethtool_get_wol(struct phylink*, struct ethtool_wolinfo*)'
  'int phylink_ethtool_ksettings_get(struct phylink*, struct ethtool_link_ksettings*)'
  'int phylink_ethtool_ksettings_set(struct phylink*, const struct ethtool_link_ksettings*)'
  'int phylink_ethtool_nway_reset(struct phylink*)'
  'int phylink_ethtool_set_eee(struct phylink*, struct ethtool_eee*)'
  'int phylink_ethtool_set_pauseparam(struct phylink*, struct ethtool_pauseparam*)'
  'int phylink_ethtool_set_wol(struct phylink*, struct ethtool_wolinfo*)'
  'int phylink_get_eee_err(struct phylink*)'
  'int phylink_mii_ioctl(struct phylink*, struct ifreq*, int)'
  'int phylink_of_phy_connect(struct phylink*, struct device_node*, u32)'
  'void phylink_resume(struct phylink*)'
  'void phylink_set_pcs(struct phylink*, struct phylink_pcs*)'
  'void phylink_set_port_modes(unsigned long*)'
  'int phylink_speed_down(struct phylink*, bool)'
  'int phylink_speed_up(struct phylink*)'
  'void phylink_start(struct phylink*)'
  'void phylink_stop(struct phylink*)'
  'void phylink_suspend(struct phylink*, bool)'
  'void ptp_clock_event(struct ptp_clock*, struct ptp_clock_event*)'
  'int ptp_clock_index(struct ptp_clock*)'
  'struct ptp_clock* ptp_clock_register(struct ptp_clock_info*, struct device*)'
  'int ptp_clock_unregister(struct ptp_clock*)'

Bug: 276863283
Change-Id: I11ada9bfd5d7c7b97bd50aba19fc37d1f2eb3f02
Signed-off-by: Qinglin Li <qinglin.li@amlogic.com>
2023-04-13 18:50:28 +00:00
Qinglin Li
9ff310d286 ANDROID: GKI: Add media gpu and sound ABI Symbol list for Amlogic SOC
Add media gpu and sound ABI Symbol list for Amlogic SOC

49 function symbol(s) added
  'void __drm_atomic_helper_connector_reset(struct drm_connector*, struct drm_connector_state*)'
  'unsigned long _snd_pcm_stream_lock_irqsave(struct snd_pcm_substream*)'
  'void drm_atomic_helper_async_commit(struct drm_device*, struct drm_atomic_state*)'
  'void drm_atomic_helper_commit_tail_rpm(struct drm_atomic_state*)'
  'int drm_atomic_helper_resume(struct drm_device*, struct drm_atomic_state*)'
  'struct drm_atomic_state* drm_atomic_helper_suspend(struct drm_device*)'
  'int drm_atomic_set_mode_for_crtc(struct drm_crtc_state*, const struct drm_display_mode*)'
  'int drm_connector_attach_content_protection_property(struct drm_connector*, bool)'
  'int drm_connector_attach_content_type_property(struct drm_connector*)'
  'int drm_connector_attach_max_bpc_property(struct drm_connector*, int, int)'
  'int drm_connector_attach_vrr_capable_property(struct drm_connector*)'
  'void drm_connector_set_vrr_capable_property(struct drm_connector*, bool)'
  'struct drm_crtc* drm_crtc_from_index(struct drm_device*, int)'
  'struct drm_framebuffer* drm_framebuffer_lookup(struct drm_device*, struct drm_file*, uint32_t)'
  'int drm_gem_handle_delete(struct drm_file*, u32)'
  'void drm_hdcp_update_content_protection(struct drm_connector*, u64)'
  'struct drm_display_mode* drm_mode_create(struct drm_device*)'
  'void drm_mode_get_hv_timing(const struct drm_display_mode*, int*, int*)'
  'int drm_property_add_enum(struct drm_property*, uint64_t, const char*)'
  'void drm_property_destroy(struct drm_device*, struct drm_property*)'
  'void drm_self_refresh_helper_update_avg_times(struct drm_atomic_state*, unsigned int, unsigned int)'
  'void hdmi_avi_infoframe_init(struct hdmi_avi_infoframe*)'
  'int hdmi_drm_infoframe_init(struct hdmi_drm_infoframe*)'
  'ssize_t hdmi_drm_infoframe_pack(struct hdmi_drm_infoframe*, void*, size_t)'
  'int hdmi_infoframe_unpack(union hdmi_infoframe*, const void*, size_t)'
  'ssize_t hdmi_spd_infoframe_pack(struct hdmi_spd_infoframe*, void*, size_t)'
  'int hdmi_vendor_infoframe_init(struct hdmi_vendor_infoframe*)'
  'ssize_t hdmi_vendor_infoframe_pack(struct hdmi_vendor_infoframe*, void*, size_t)'
  'int snd_pcm_kernel_ioctl(struct snd_pcm_substream*, unsigned int, void*)'
  'int snd_pcm_lib_default_mmap(struct snd_pcm_substream*, struct vm_area_struct*)'
  'unsigned int snd_pcm_rate_to_rate_bit(unsigned int)'
  'int snd_pcm_stop(struct snd_pcm_substream*, snd_pcm_state_t)'
  'int snd_pcm_stop_xrun(struct snd_pcm_substream*)'
  'void snd_pcm_stream_unlock_irqrestore(struct snd_pcm_substream*, unsigned long)'
  'int snd_soc_add_card_controls(struct snd_soc_card*, const struct snd_kcontrol_new*, int)'
  'void snd_soc_jack_free_gpios(struct snd_soc_jack*, int, struct snd_soc_jack_gpio*)'
  'int snd_soc_of_get_slot_mask(struct device_node*, const char*, unsigned int*)'
  'int snd_soc_of_parse_audio_simple_widgets(struct snd_soc_card*, const char*)'
  'int snd_soc_of_parse_tdm_slot(struct device_node*, unsigned int*, unsigned int*, unsigned int*, unsigned int*)'
  'int v4l2_ctrl_subscribe_event(struct v4l2_fh*, const struct v4l2_event_subscription*)'
  'int v4l2_device_register_subdev(struct v4l2_device*, struct v4l2_subdev*)'
  'void v4l2_device_unregister_subdev(struct v4l2_subdev*)'
  'void v4l2_event_queue_fh(struct v4l2_fh*, const struct v4l2_event*)'
  'int v4l2_event_subscribe(struct v4l2_fh*, const struct v4l2_event_subscription*, unsigned int, const struct v4l2_subscribed_event_ops*)'
  'int v4l2_event_unsubscribe(struct v4l2_fh*, const struct v4l2_event_subscription*)'
  'void v4l2_i2c_subdev_init(struct v4l2_subdev*, struct i2c_client*, const struct v4l2_subdev_ops*)'
  'int v4l2_m2m_ioctl_create_bufs(struct file*, void*, struct v4l2_create_buffers*)'
  'int v4l2_m2m_ioctl_expbuf(struct file*, void*, struct v4l2_exportbuffer*)'
  'int v4l2_src_change_event_subscribe(struct v4l2_fh*, const struct v4l2_event_subscription*)'

2 variable symbol(s) added
  'const struct vm_operations_struct drm_gem_cma_vm_ops'
  'const struct vb2_mem_ops vb2_dma_contig_memops'

Bug: 276863283
Change-Id: I609bdb9c65d7db391550fd85507d8c961d1034e7
Signed-off-by: Qinglin Li <qinglin.li@amlogic.com>
2023-04-13 18:50:28 +00:00
Vincent Donnefort
086eb3eacb ANDROID: CONFIG_PKVM_MODULE_PATH to /lib/modules/
Android places by default the modules into /lib/modules/ instead of using
the default path /lib/modules/<uname>.

Bug: 254835242
Change-Id: I49ed4be25c29302fc9b99a9f2ef5f1c84df3adc9
Signed-off-by: Vincent Donnefort <vdonnefort@google.com>
2023-04-13 11:27:05 +01:00
Vincent Donnefort
b147bc4b64 ANDROID: KVM: arm64: Add a fallback for pKVM module loading
Fallback to the default module path (/lib/modules/<uname>) if module
loading failed for the selected path in CONFIG_PKVM_MODULE_PATH. This
intends to follow the same mechanism as Android init.

Bug: 254835242
Change-Id: Ia7764d57fe71521e4a1fe6d2c85ba057790069a8
Signed-off-by: Vincent Donnefort <vdonnefort@google.com>
2023-04-13 11:19:33 +01:00
Vincent Donnefort
09ed60476a ANDROID: KVM: arm64: Add a custom module path for pKVM module loading
Currently, no module path will be given to modprobe when loading a pKVM
module, the module must then be found in /lib/modules/<uname>. Add
CONFIG_PKVM_MODULE_PATH to allow setting a different path from the
kernel config.

Bug: 254835242
Change-Id: I4f355518628b44ac03de2cee3d7a90e1ad5bf1e2
Signed-off-by: Vincent Donnefort <vdonnefort@google.com>
2023-04-13 11:19:33 +01:00
Yu Zhao
18580efd2f UPSTREAM: mm: multi-gen LRU: simplify arch_has_hw_pte_young() check
Scanning page tables when hardware does not set the accessed bit has
no real use cases.

Link: https://lkml.kernel.org/r/20221222041905.2431096-9-yuzhao@google.com
Change-Id: If6c1232a5d5f8f7e3ce3e076f7e865c18ee2a6c0
Signed-off-by: Yu Zhao <yuzhao@google.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Michael Larabel <Michael@MichaelLarabel.com>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Mike Rapoport <rppt@kernel.org>
Cc: Roman Gushchin <roman.gushchin@linux.dev>
Cc: Suren Baghdasaryan <surenb@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
(cherry picked from commit f386e93140)
Bug: 274865848
Signed-off-by: T.J. Mercier <tjmercier@google.com>
2023-04-12 16:01:20 +00:00
Yu Zhao
4c26a5c7ca UPSTREAM: mm: support POSIX_FADV_NOREUSE
This patch adds POSIX_FADV_NOREUSE to vma_has_recency() so that the LRU
algorithm can ignore access to mapped files marked by this flag.

The advantages of POSIX_FADV_NOREUSE are:
1. Unlike MADV_SEQUENTIAL and MADV_RANDOM, it does not alter the
   default readahead behavior.
2. Unlike MADV_SEQUENTIAL and MADV_RANDOM, it does not split VMAs and
   therefore does not take mmap_lock.
3. Unlike MADV_COLD, setting it has a negligible cost, regardless of
   how many pages it affects.

Its limitations are:
1. Like POSIX_FADV_RANDOM and POSIX_FADV_SEQUENTIAL, it currently does
   not support range. IOW, its scope is the entire file.
2. It currently does not ignore access through file descriptors.
   Specifically, for the active/inactive LRU, given a file page shared
   by two users and one of them having set POSIX_FADV_NOREUSE on the
   file, this page will be activated upon the second user accessing
   it. This corner case can be covered by checking POSIX_FADV_NOREUSE
   before calling folio_mark_accessed() on the read path. But it is
   considered not worth the effort.

There have been a few attempts to support POSIX_FADV_NOREUSE, e.g., [1].
This time the goal is to fill a niche: a few desktop applications, e.g.,
large file transferring and video encoding/decoding, want fast file
streaming with mmap() rather than direct IO.  Among those applications, an
SVT-AV1 regression was reported when running with MGLRU [2].  The
following test can reproduce that regression.

  kb=$(awk '/MemTotal/ { print $2 }' /proc/meminfo)
  kb=$((kb - 8*1024*1024))

  modprobe brd rd_nr=1 rd_size=$kb
  dd if=/dev/zero of=/dev/ram0 bs=1M

  mkfs.ext4 /dev/ram0
  mount /dev/ram0 /mnt/
  swapoff -a

  fallocate -l 8G /mnt/swapfile
  mkswap /mnt/swapfile
  swapon /mnt/swapfile

  wget http://ultravideo.cs.tut.fi/video/Bosphorus_3840x2160_120fps_420_8bit_YUV_Y4M.7z
  7z e -o/mnt/ Bosphorus_3840x2160_120fps_420_8bit_YUV_Y4M.7z
  SvtAv1EncApp --preset 12 -w 3840 -h 2160 \
               -i /mnt/Bosphorus_3840x2160.y4m

For MGLRU, the following change showed a [9-11]% increase in FPS,
which makes it on par with the active/inactive LRU.

  patch Source/App/EncApp/EbAppMain.c <<EOF
  31a32
  > #include <fcntl.h>
  35d35
  < #include <fcntl.h> /* _O_BINARY */
  117a118
  >             posix_fadvise(config->mmap.fd, 0, 0, POSIX_FADV_NOREUSE);
  EOF

[1] https://lore.kernel.org/r/1308923350-7932-1-git-send-email-andrea@betterlinux.com/
[2] https://openbenchmarking.org/result/2209259-PTS-MGLRU8GB57

Link: https://lkml.kernel.org/r/20221230215252.2628425-2-yuzhao@google.com
Change-Id: Iee2a7df5ccd86162089e007e32f9fa9b2b9f198b
Signed-off-by: Yu Zhao <yuzhao@google.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Andrea Righi <andrea.righi@canonical.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Michael Larabel <Michael@MichaelLarabel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
(cherry picked from commit 17e810229c)
Bug: 274865848
Signed-off-by: T.J. Mercier <tjmercier@google.com>
2023-04-12 16:01:20 +00:00
Yu Zhao
3b9ab09cf5 BACKPORT: mm: add vma_has_recency()
Add vma_has_recency() to indicate whether a VMA may exhibit temporal
locality that the LRU algorithm relies on.

This function returns false for VMAs marked by VM_SEQ_READ or
VM_RAND_READ.  While the former flag indicates linear access, i.e., a
special case of spatial locality, both flags indicate a lack of temporal
locality, i.e., the reuse of an area within a relatively small duration.

"Recency" is chosen over "locality" to avoid confusion between temporal
and spatial localities.

Before this patch, the active/inactive LRU only ignored the accessed bit
from VMAs marked by VM_SEQ_READ.  After this patch, the active/inactive
LRU and MGLRU share the same logic: they both ignore the accessed bit if
vma_has_recency() returns false.

For the active/inactive LRU, the following fio test showed a [6, 8]%
increase in IOPS when randomly accessing mapped files under memory
pressure.

  kb=$(awk '/MemTotal/ { print $2 }' /proc/meminfo)
  kb=$((kb - 8*1024*1024))

  modprobe brd rd_nr=1 rd_size=$kb
  dd if=/dev/zero of=/dev/ram0 bs=1M

  mkfs.ext4 /dev/ram0
  mount /dev/ram0 /mnt/
  swapoff -a

  fio --name=test --directory=/mnt/ --ioengine=mmap --numjobs=8 \
      --size=8G --rw=randrw --time_based --runtime=10m \
      --group_reporting

The discussion that led to this patch is here [1].  Additional test
results are available in that thread.

[1] https://lore.kernel.org/r/Y31s%2FK8T85jh05wH@google.com/

Link: https://lkml.kernel.org/r/20221230215252.2628425-1-yuzhao@google.com
Change-Id: I3e0dfa1ca2a3c14fb0239b8f612c697e1d8d6a64
Signed-off-by: Yu Zhao <yuzhao@google.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Andrea Righi <andrea.righi@canonical.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Michael Larabel <Michael@MichaelLarabel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
(cherry picked from commit 8788f67814)
[TJ: #include <linux/mm_inline.h>, folio -> page renames]
Bug: 274865848
Signed-off-by: T.J. Mercier <tjmercier@google.com>
2023-04-12 16:01:20 +00:00
Juergen Gross
23811798a3 UPSTREAM: mm: introduce arch_has_hw_nonleaf_pmd_young()
When running as a Xen PV guests commit eed9a328aa ("mm: x86: add
CONFIG_ARCH_HAS_NONLEAF_PMD_YOUNG") can cause a protection violation in
pmdp_test_and_clear_young():

 BUG: unable to handle page fault for address: ffff8880083374d0
 #PF: supervisor write access in kernel mode
 #PF: error_code(0x0003) - permissions violation
 PGD 3026067 P4D 3026067 PUD 3027067 PMD 7fee5067 PTE 8010000008337065
 Oops: 0003 [#1] PREEMPT SMP NOPTI
 CPU: 7 PID: 158 Comm: kswapd0 Not tainted 6.1.0-rc5-20221118-doflr+ #1
 RIP: e030:pmdp_test_and_clear_young+0x25/0x40

This happens because the Xen hypervisor can't emulate direct writes to
page table entries other than PTEs.

This can easily be fixed by introducing arch_has_hw_nonleaf_pmd_young()
similar to arch_has_hw_pte_young() and test that instead of
CONFIG_ARCH_HAS_NONLEAF_PMD_YOUNG.

Link: https://lkml.kernel.org/r/20221123064510.16225-1-jgross@suse.com
Fixes: eed9a328aa ("mm: x86: add CONFIG_ARCH_HAS_NONLEAF_PMD_YOUNG")
Change-Id: Ib88d54891c619feccc7eb40a14d5ba6e349912d6
Signed-off-by: Juergen Gross <jgross@suse.com>
Reported-by: Sander Eikelenboom <linux@eikelenboom.it>
Acked-by: Yu Zhao <yuzhao@google.com>
Tested-by: Sander Eikelenboom <linux@eikelenboom.it>
Acked-by: David Hildenbrand <david@redhat.com>	[core changes]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
(cherry picked from commit 4aaf269c76)
Bug: 274865848
Signed-off-by: T.J. Mercier <tjmercier@google.com>
2023-04-12 16:01:20 +00:00
Juergen Gross
7f400d66ad BACKPORT: mm: add dummy pmd_young() for architectures not having it
In order to avoid #ifdeffery add a dummy pmd_young() implementation as a
fallback.  This is required for the later patch "mm: introduce
arch_has_hw_nonleaf_pmd_young()".

Link: https://lkml.kernel.org/r/fd3ac3cd-7349-6bbd-890a-71a9454ca0b3@suse.com
Change-Id: I3e62702e3eed4b2adb2b49c2bce7aecc349a337c
Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Yu Zhao <yuzhao@google.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Sander Eikelenboom <linux@eikelenboom.it>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
(cherry picked from commit 6617da8fb5)
[TJ: loongarch is not present]
Bug: 274865848
Signed-off-by: T.J. Mercier <tjmercier@google.com>
2023-04-12 16:01:20 +00:00
Carlos Llamas
f9e7e861b5 ANDROID: 4/12/2023 KMI update
Set KMI_GENERATION=4 for 4/12 KMI update

function symbol 'struct block_device* I_BDEV(struct inode*)' changed
  CRC changed from 0x6d0d2bcc to 0xf2df037e

function symbol 'void* PDE_DATA(const struct inode*)' changed
  CRC changed from 0xbb8786db to 0x3c36f860

function symbol 'void __ClearPageMovable(struct page*)' changed
  CRC changed from 0x6cd6821a to 0xafefd4e

... 2828 omitted; 2831 symbols have only CRC changes

type 'struct dentry_operations' changed
  member changed from 'void(* d_canonical_path)(const struct path*, struct path*)' to 'int(* d_canonical_path)(const struct path*, struct path*)'
    type changed from 'void(*)(const struct path*, struct path*)' to 'int(*)(const struct path*, struct path*)'
      pointed-to type changed from 'void(const struct path*, struct path*)' to 'int(const struct path*, struct path*)'
        return type changed from 'void' to 'int'

Bug: 277759776
Change-Id: I5f3ed46e6804dcf0db745d4e6dc7c3a317f64648
Signed-off-by: Todd Kjos <tkjos@google.com>
Signed-off-by: Carlos Llamas <cmllamas@google.com>
2023-04-11 22:13:26 +00:00
Paul Lawrence
3f5c9f5cf5 ANDROID: fuse: Support errors from fuse daemon in canonical path
Previously errors from the daemon in FUSE_CANONICAL_PATH were simply
ignored. In order to block inotifys, it is useful to be able to return
errors from this opcode.

Bug: 238619640
Test: inotify no longer works on /storage/emulated/0/Android/media but
      does on child folders
Signed-off-by: Paul Lawrence <paullawrence@google.com>
Change-Id: Icb15c090c6286c174338471a787712f8388de316
2023-04-11 20:43:00 +00:00
Jim Wylder
aacdf4e7ea ANDROID: Update the ABI symbol list
Add the following symbols:
  - gpiod_get_direction
  - irq_domain_simple_ops
  - regmap_get_max_register

Bug: 275412100
Change-Id: I25479fa4134130698f5e52274c66f73861486095
Signed-off-by: Jim Wylder <jwylder@google.com>
2023-04-11 19:02:03 +00:00
Will Deacon
18c78ecd82 ANDROID: arm64: Implement hypervisor workaround for SoCs with DMA beyond the PoC
SoCs featuring peripherals that can issue non-coherent DMA traffic
beyond the point of coherency (PoC) present multiple challenges for the
DMA-API implementation in Linux. Many of these challenges can be
overcome by suitable configuration of the interconnect, however the
presence of a cacheable alias for non-cacheable buffers can still lead
to coherence issues arising when stale clean lines are back-snooped from
the cache hierarchy to satisfy a non-cacheable transaction at the PoC.

Removing all cacheable aliases on a case-by-cases basis is both
error-prone and expensive. Instead, leverage the stage-2 identity
mapping installed by pKVM to enforce consistent cacheability for all
stage-1 aliases.

Bug: 240786634
Change-Id: I78b0aa51fe3e23811bbd25481173086aa957c4bf
Signed-off-by: Will Deacon <willdeacon@google.com>
2023-04-11 18:13:47 +00:00
Varad Gokhale
148ab83891 ANDROID: Update the ABI symbol list
Adding the following symbols:
  - i3c_generic_ibi_alloc_pool
  - i3c_generic_ibi_free_pool
  - i3c_generic_ibi_get_free_slot
  - i3c_generic_ibi_recycle_slot
  - i3c_master_add_i3c_dev_locked
  - i3c_master_defslvs_locked
  - i3c_master_disec_locked
  - i3c_master_do_daa
  - i3c_master_enec_locked
  - i3c_master_entdaa_locked
  - i3c_master_get_free_addr
  - i3c_master_queue_ibi
  - i3c_master_register
  - i3c_master_set_info
  - i3c_master_unregister

Bug: 277319736

Change-Id: I2908c0f02bc7deee742bd0f992fd181238d0ef06
Signed-off-by: Varad Gokhale <gokv@google.com>
2023-04-11 17:21:46 +00:00
Peter Collingbourne
a4758044f9 FROMLIST: kasan: call clear_page with a match-all tag instead of changing page tag
Instead of changing the page's tag solely in order to obtain a pointer
with a match-all tag and then changing it back again, just convert the
pointer that we get from kmap_atomic() into one with a match-all tag
before passing it to clear_page().

On a certain microarchitecture, this has been observed to cause a
measurable improvement in microbenchmark performance, presumably as a
result of being able to avoid the atomic operations on the page tag.

Link: https://lore.kernel.org/r/20230216195924.3287772-1-pcc@google.com
Signed-off-by: Peter Collingbourne <pcc@google.com>
Link: https://linux-review.googlesource.com/id/I0249822cc29097ca7a04ad48e8eb14871f80e711
Reviewed-by: Andrey Konovalov <andreyknvl@gmail.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com>
Cc: Evgenii Stepanov <eugenis@google.com>
Cc: Peter Collingbourne <pcc@google.com>
Cc: Vincenzo Frascino <vincenzo.frascino@arm.com>
Cc: Will Deacon <will@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Change-Id: I0249822cc29097ca7a04ad48e8eb14871f80e711
Bug: 268383694
2023-04-11 16:04:36 +00:00
Chungkai Mei
b436639db2 ANDROID: Update the ABI symbol list
Add the following symbols:
  - __traceiter_android_rvh_find_busiest_group
  - __tracepoint_android_rvh_find_busiest_group

Bug: 261703915
Test: Build
Change-Id: I61656b386a983c25018b2f645917e0aa4cb779ed
Signed-off-by: Chungkai Mei <chungkai@google.com>
2023-04-11 15:56:30 +00:00
Wanwei Jiang
9f7633af27 ANDROID: GKI: Add Initial ABI Symbol list for Amlogic SOC
Add Initial ABI Symbol list for Amlogic SOC

50 function symbol(s) added
  'int __bitmap_and(unsigned long*, const unsigned long*, const unsigned long*, unsigned int)'
  'void __bitmap_shift_left(unsigned long*, const unsigned long*, unsigned int, unsigned int)'
  'void __bitmap_shift_right(unsigned long*, const unsigned long*, unsigned int, unsigned int)'
  'ssize_t __blockdev_direct_IO(struct kiocb*, struct inode*, struct block_device*, struct iov_iter*, get_block_t*, dio_iodone_t*, dio_submit_t*, int)'
  'struct buffer_head* __bread_gfp(struct block_device*, sector_t, unsigned int, gfp_t)'
  'void __brelse(struct buffer_head*)'
  'void balance_dirty_pages_ratelimited(struct address_space*)'
  'void bitmap_free(const unsigned long*)'
  'unsigned long* bitmap_zalloc(unsigned int, gfp_t)'
  'void blk_finish_plug(struct blk_plug*)'
  'void blk_start_plug(struct blk_plug*)'
  'int blkdev_issue_discard(struct block_device*, sector_t, sector_t, gfp_t, unsigned long)'
  'int block_truncate_page(struct address_space*, loff_t, get_block_t*)'
  'int block_write_begin(struct address_space*, loff_t, unsigned int, unsigned int, struct page**, get_block_t*)'
  'int block_write_end(struct file*, struct address_space*, loff_t, unsigned int, unsigned int, struct page*, void*)'
  'int block_write_full_page(struct page*, get_block_t*, struct writeback_control*)'
  'void cec_notifier_set_phys_addr(struct cec_notifier*, u16)'
  'void cec_notifier_set_phys_addr_from_edid(struct cec_notifier*, const struct edid*)'
  'void cfg80211_assoc_failure(struct net_device*, struct cfg80211_assoc_failure*)'
  'void cfg80211_ft_event(struct net_device*, struct cfg80211_ft_event_params*)'
  'void cfg80211_gtk_rekey_notify(struct net_device*, const u8*, const u8*, gfp_t)'
  'void cfg80211_pmksa_candidate_notify(struct net_device*, int, const u8*, bool, gfp_t)'
  'void cfg80211_rx_unprot_mlme_mgmt(struct net_device*, const u8*, size_t)'
  'void cfg80211_tdls_oper_request(struct net_device*, const u8*, enum nl80211_tdls_operation, u16, gfp_t)'
  'void class_remove_file_ns(struct class*, const struct class_attribute*, const void*)'
  'void clean_bdev_aliases(struct block_device*, sector_t, sector_t)'
  'void clear_inode(struct inode*)'
  'void clear_nlink(struct inode*)'
  'struct clk* clk_get_sys(const char*, const char*)'
  'int clk_hw_set_parent(struct clk_hw*, struct clk_hw*)'
  'int clk_mux_determine_rate_flags(struct clk_hw*, struct clk_rate_request*, unsigned long)'
  'unsigned int clk_mux_index_to_val(u32*, unsigned int, u8)'
  'int clk_mux_val_to_index(struct clk_hw*, u32*, unsigned int, unsigned int)'
  'struct clk* clk_register_composite(struct device*, const char*, const char* const*, int, struct clk_hw*, const struct clk_ops*, struct clk_hw*, const struct clk_ops*, struct clk_hw*, const struct clk_ops*, unsigned long)'
  'long copy_from_kernel_nofault(void*, const void*, size_t)'
  'size_t copy_page_from_iter_atomic(struct page*, unsigned int, size_t, struct iov_iter*)'
  'int cpufreq_boost_enabled()'
  'int cpufreq_generic_suspend(struct cpufreq_policy*)'
  'void create_empty_buffers(struct page*, unsigned long, unsigned long)'
  'int crypto_ahash_digest(struct ahash_request*)'
  'struct crypto_ahash* crypto_alloc_ahash(const char*, u32, u32)'
  'struct crypto_async_request* crypto_dequeue_request(struct crypto_queue*)'
  'int crypto_enqueue_request(struct crypto_queue*, struct crypto_async_request*)'
  'void crypto_init_queue(struct crypto_queue*, unsigned int)'
  'int crypto_sha1_finup(struct shash_desc*, const u8*, unsigned int, u8*)'
  'int crypto_sha1_update(struct shash_desc*, const u8*, unsigned int)'
  'void crypto_unregister_ahash(struct ahash_alg*)'
  'void crypto_unregister_skcipher(struct skcipher_alg*)'
  'struct timespec64 current_time(struct inode*)'
  'int current_umask()'

5 variable symbol(s) added
  'struct super_block* blockdev_superblock'
  'const struct clk_ops clk_divider_ops'
  'const struct clk_ops clk_gate_ops'
  'const struct clk_ops clk_mux_ops'
  'const struct clk_ops clk_mux_ro_ops'

Bug: 276863283
Change-Id: I361d2e276d88ab5f870a31786fc88c948f7b6fb9
Signed-off-by: Wanwei Jiang <wanwei.jiang@amlogic.com>
2023-04-11 15:40:43 +00:00
Neill Kapron
26d5939276 ANDROID: GKI: Enable CONFIG_USB_CONFIGFS_F_UAC2
Enable UAC2 function driver in x86 gki_defconfig for feature parity with
arm64 gki_defconfig.

Bug: 277271545
Change-Id: I4c602a2e791ecc03dc7d63c131dbe0982f1998c8
Signed-off-by: Neill Kapron <nkapron@google.com>
(cherry picked from commit a6ef8539c18177fbd541cc577ddd6562c9c343a1)
2023-04-10 22:42:56 +00:00
Peter Collingbourne
bdc9f35c77 UPSTREAM: Revert "kasan: drop skip_kasan_poison variable in free_pages_prepare"
This reverts commit 487a32ec24.

should_skip_kasan_poison() reads the PG_skip_kasan_poison flag from
page->flags.  However, this line of code in free_pages_prepare():

	page->flags &= ~PAGE_FLAGS_CHECK_AT_PREP;

clears most of page->flags, including PG_skip_kasan_poison, before calling
should_skip_kasan_poison(), which meant that it would never return true as
a result of the page flag being set.  Therefore, fix the code to call
should_skip_kasan_poison() before clearing the flags, as we were doing
before the reverted patch.

This fixes a measurable performance regression introduced in the reverted
commit, where munmap() takes longer than intended if HW tags KASAN is
supported and enabled at runtime.  Without this patch, we see a
single-digit percentage performance regression in a particular
mmap()-heavy benchmark when enabling HW tags KASAN, and with the patch,
there is no statistically significant performance impact when enabling HW
tags KASAN.

Link: https://lkml.kernel.org/r/20230310042914.3805818-2-pcc@google.com
Fixes: 487a32ec24 ("kasan: drop skip_kasan_poison variable in free_pages_prepare")
  Link: https://linux-review.googlesource.com/id/Ic4f13affeebd20548758438bb9ed9ca40e312b79
Signed-off-by: Peter Collingbourne <pcc@google.com>
Reviewed-by: Andrey Konovalov <andreyknvl@gmail.com>
Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com>
Cc: Catalin Marinas <catalin.marinas@arm.com> [arm64]
Cc: Evgenii Stepanov <eugenis@google.com>
Cc: Vincenzo Frascino <vincenzo.frascino@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: <stable@vger.kernel.org>	[6.1]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
(cherry picked from commit f446883d12)
Change-Id: Ic4f13affeebd20548758438bb9ed9ca40e312b79
Bug: 268383694
2023-04-07 12:35:01 -07:00
Ramji Jiyani
ee8815e209 ANDROID: GKI: Convert 80211 modules as unprotected
Convert cfg80211 & mac80211 GKI modules as unprotected.
This allows vendors to override these modules with
unsigned vendor versions.

Bug: 274416891
Test: TH
Change-Id: I50b854c0f0c7f0eeb516b440c69533921cb998f0
Signed-off-by: Ramji Jiyani <ramjiyani@google.com>
2023-04-06 18:45:43 +00:00
Greg Kroah-Hartman
ea78df75c6 FROMLIST: staging: greybus: drop loopback test files
The greybus loopback test tool does not belong burried down in a
driver-specific directory.  If it is needed, it should be somewhere
else, like in the testing directory.  But as the loopback driver is
probably never going to be merged out of the staging directory, let's
just delete the test alltogether for now.  If it's needed in the future,
it can be brought back with a revert.

Also, having an Android.mk file in the kernel source tree breaks some
Android build systems when trying to build from a read-only source tree,
the report of which prompted this being a good reason to remove it as
well.

Cc: Johan Hovold <johan@kernel.org>
Cc: Alex Elder <elder@kernel.org>
Cc: Jack Schofield <schofija@oregonstate.edu>
Cc: Vaibhav Nagare <vnagare@redhat.com>
Cc: greybus-dev@lists.linaro.org
Change-Id: Ie19bcd87d0062d8453ff0d3d998224a7e478f3d0
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bug: 275824813
Link: https://lore.kernel.org/r/2023040613-huntsman-goldsmith-4a41@gregkh
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2023-04-06 15:46:06 +00:00
Vincent Donnefort
65ccd1af45 ANDROID: KVM: arm64: Fix pKVM module loading close
The HVC number limit must be the id inside the enum, not the fully
encoded version. Without this fix, all HVC would be rejected after
closing the pKVM modules door.

Bug: 254835242
Change-Id: Ia338859e07412ea1c2377b90ddee2c29c6fb0755
Signed-off-by: Vincent Donnefort <vdonnefort@google.com>
2023-04-06 14:20:42 +00:00
Vincent Donnefort
af3a2c6853 ANDROID: KVM: arm64: Prevent pKVM module loading after IOMMU init
As a fail-safe mechanism, disable pKVM module loading after the IOMMU
init is complete. This intends to make sure nothing can be loaded after
the IOMMU driver is ready, in case a vendor would forget to call
__pkvm_close_module_registration

Bug: 254835242
Change-Id: I32a9752e145a8ef9787dae6319e37ba38544739b
Signed-off-by: Vincent Donnefort <vdonnefort@google.com>
2023-04-06 14:19:23 +00:00
Vincent Donnefort
c4c48a21c0 ANDROID: KVM: arm64: Handle permission issue while loading pKVM module
pKVM module loading is disabled by rejecting the HVCs. This is a problem
for kvm_call_hyp_nvhe(__pkvm_alloc_module_va). First a WARN will be
trigger, then the res.a1 being very much likely non 0 the error will
not be caught. The loading would then proceed (even though no EL2 code
will be actually loaded).

Fix this behaviour by catching when the HVC is blocked, so the user gets
a meaningful error returned and the driver is not half-loaded.

Bug: 254835242
Change-Id: Ieeca6eebb083d99f8d6b79ebbc486a7c9f7d334e
Signed-off-by: Vincent Donnefort <vdonnefort@google.com>
2023-04-06 14:16:43 +00:00
Fuad Tabba
7d3bde28a6 ANDROID: KVM: arm64: Factor out logic for setting SVE vector length at hyp
Factor out the logic for setting the SVE vector length at the
hypervisor in pKVM to the maximum hardware supported value when
saving and restoring host SVE state.

This shares common code, and elides an unused variable warning
when SVE is not configured.

Change-Id: Ibaa58e5bb44e4f85b9548a6abb498f0a769f6a4b
Signed-off-by: Fuad Tabba <tabba@google.com>
Bug: 267291591
2023-04-06 13:19:18 +00:00
RD Babiera
1cb8f1d22c FROMGIT: usb: typec: altmodes/displayport: Fix configure initial pin assignment
While determining the initial pin assignment to be sent in the configure
message, using the DP_PIN_ASSIGN_DP_ONLY_MASK mask causes the DFP_U to
send both Pin Assignment C and E when both are supported by the DFP_U and
UFP_U. The spec (Table 5-7 DFP_U Pin Assignment Selection Mandates,
VESA DisplayPort Alt Mode Standard v2.0) indicates that the DFP_U never
selects Pin Assignment E when Pin Assignment C is offered.

Update the DP_PIN_ASSIGN_DP_ONLY_MASK conditional to intially select only
Pin Assignment C if it is available.

Fixes: 0e3bb7d689 ("usb: typec: Add driver for DisplayPort alternate mode")
Cc: stable@vger.kernel.org
Signed-off-by: RD Babiera <rdbabiera@google.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20230329215159.2046932-1-rdbabiera@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Bug: 271912353
(cherry picked from commit eddebe3960
 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-linus)
Change-Id: If1c2515e35a538e32d3b51f0c304b6de507df407
Signed-off-by: RD Babiera <rdbabiera@google.com>
2023-04-06 09:29:56 +00:00
Greg Kroah-Hartman
83e0304b4e Merge 5.15.106 into android14-5.15
Changes in 5.15.106
	fsverity: don't drop pagecache at end of FS_IOC_ENABLE_VERITY
	usb: dwc3: gadget: move cmd_endtransfer to extra function
	usb: dwc3: gadget: Add 1ms delay after end transfer command without IOC
	kernel: kcsan: kcsan_test: build without structleak plugin
	kcsan: avoid passing -g for test
	ksmbd: don't terminate inactive sessions after a few seconds
	bus: imx-weim: fix branch condition evaluates to a garbage value
	xfrm: Zero padding when dumping algos and encap
	ASoC: codecs: tx-macro: Fix for KASAN: slab-out-of-bounds
	md: avoid signed overflow in slot_store()
	x86/PVH: obtain VGA console info in Dom0
	net: hsr: Don't log netdev_err message on unknown prp dst node
	ALSA: asihpi: check pao in control_message()
	ALSA: hda/ca0132: fixup buffer overrun at tuning_ctl_set()
	fbdev: tgafb: Fix potential divide by zero
	sched_getaffinity: don't assume 'cpumask_size()' is fully initialized
	fbdev: nvidia: Fix potential divide by zero
	fbdev: intelfb: Fix potential divide by zero
	fbdev: lxfb: Fix potential divide by zero
	fbdev: au1200fb: Fix potential divide by zero
	tools/power turbostat: Fix /dev/cpu_dma_latency warnings
	tools/power turbostat: fix decoding of HWP_STATUS
	tracing: Fix wrong return in kprobe_event_gen_test.c
	ca8210: Fix unsigned mac_len comparison with zero in ca8210_skb_tx()
	mips: bmips: BCM6358: disable RAC flush for TP1
	ALSA: usb-audio: Fix recursive locking at XRUN during syncing
	platform/x86: think-lmi: add missing type attribute
	platform/x86: think-lmi: use correct possible_values delimiters
	platform/x86: think-lmi: only display possible_values if available
	platform/x86: think-lmi: Add possible_values for ThinkStation
	mtd: rawnand: meson: invalidate cache on polling ECC bit
	SUNRPC: fix shutdown of NFS TCP client socket
	sfc: ef10: don't overwrite offload features at NIC reset
	scsi: megaraid_sas: Fix crash after a double completion
	scsi: mpt3sas: Don't print sense pool info twice
	ptp_qoriq: fix memory leak in probe()
	net: dsa: microchip: ksz8863_smi: fix bulk access
	r8169: fix RTL8168H and RTL8107E rx crc error
	regulator: Handle deferred clk
	net/net_failover: fix txq exceeding warning
	net: stmmac: don't reject VLANs when IFF_PROMISC is set
	drm/i915/tc: Fix the ICL PHY ownership check in TC-cold state
	platform/x86/intel/pmc: Alder Lake PCH slp_s0_residency fix
	can: bcm: bcm_tx_setup(): fix KMSAN uninit-value in vfs_write
	s390/vfio-ap: fix memory leak in vfio_ap device driver
	loop: suppress uevents while reconfiguring the device
	loop: LOOP_CONFIGURE: send uevents for partitions
	net: mvpp2: classifier flow fix fragmentation flags
	net: mvpp2: parser fix QinQ
	net: mvpp2: parser fix PPPoE
	smsc911x: avoid PHY being resumed when interface is not up
	ice: add profile conflict check for AVF FDIR
	ice: fix invalid check for empty list in ice_sched_assoc_vsi_to_agg()
	ALSA: ymfpci: Create card with device-managed snd_devm_card_new()
	ALSA: ymfpci: Fix BUG_ON in probe function
	net: ipa: compute DMA pool size properly
	i40e: fix registers dump after run ethtool adapter self test
	bnxt_en: Fix reporting of test result in ethtool selftest
	bnxt_en: Fix typo in PCI id to device description string mapping
	bnxt_en: Add missing 200G link speed reporting
	net: dsa: mv88e6xxx: Enable IGMP snooping on user ports only
	net: ethernet: mtk_eth_soc: fix flow block refcounting logic
	pinctrl: ocelot: Fix alt mode for ocelot
	iommu/vt-d: Allow zero SAGAW if second-stage not supported
	Input: alps - fix compatibility with -funsigned-char
	Input: focaltech - use explicitly signed char type
	cifs: prevent infinite recursion in CIFSGetDFSRefer()
	cifs: fix DFS traversal oops without CONFIG_CIFS_DFS_UPCALL
	Input: goodix - add Lenovo Yoga Book X90F to nine_bytes_report DMI table
	btrfs: fix race between quota disable and quota assign ioctls
	btrfs: scan device in non-exclusive mode
	zonefs: Always invalidate last cached page on append write
	can: j1939: prevent deadlock by moving j1939_sk_errqueue()
	xen/netback: don't do grant copy across page boundary
	net: phy: dp83869: fix default value for tx-/rx-internal-delay
	pinctrl: amd: Disable and mask interrupts on resume
	pinctrl: at91-pio4: fix domain name assignment
	powerpc: Don't try to copy PPR for task with NULL pt_regs
	NFSv4: Fix hangs when recovering open state after a server reboot
	ALSA: hda/conexant: Partial revert of a quirk for Lenovo
	ALSA: usb-audio: Fix regression on detection of Roland VS-100
	ALSA: hda/realtek: Add quirks for some Clevo laptops
	ALSA: hda/realtek: Add quirk for Lenovo ZhaoYang CF4620Z
	xtensa: fix KASAN report for show_stack
	rcu: Fix rcu_torture_read ftrace event
	drm/etnaviv: fix reference leak when mmaping imported buffer
	drm/amd/display: Add DSC Support for Synaptics Cascaded MST Hub
	KVM: arm64: Disable interrupts while walking userspace PTs
	s390/uaccess: add missing earlyclobber annotations to __clear_user()
	KVM: VMX: Move preemption timer <=> hrtimer dance to common x86
	KVM: x86: Inject #GP on x2APIC WRMSR that sets reserved bits 63:32
	KVM: x86: Purge "highest ISR" cache when updating APICv state
	zonefs: Fix error message in zonefs_file_dio_append()
	selftests/bpf: Test btf dump for struct with padding only fields
	libbpf: Fix BTF-to-C converter's padding logic
	selftests/bpf: Add few corner cases to test padding handling of btf_dump
	libbpf: Fix btf_dump's packed struct determination
	hsr: ratelimit only when errors are printed
	x86/PVH: avoid 32-bit build warning when obtaining VGA console info
	Linux 5.15.106

Change-Id: I3197b16c9f82b9bd6a17d4637a00b15e9bd5b873
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2023-04-05 14:15:04 +00:00
Greg Kroah-Hartman
d86dfc4d95 Linux 5.15.106
Link: https://lore.kernel.org/r/20230403140356.079638751@linuxfoundation.org
Tested-by: Shuah Khan <skhan@linuxfoundation.org>
Tested-by: Florian Fainelli <f.fainelli@gmail.com>
Tested-by: Bagas Sanjaya <bagasdotme@gmail.com>
Tested-by: Linux Kernel Functional Testing <lkft@linaro.org>
Tested-by: Jon Hunter <jonathanh@nvidia.com>
Tested-by: Chris Paterson (CIP) <chris.paterson2@renesas.com>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Tested-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Tested-by: Ron Economos <re@w6rz.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-04-05 11:25:02 +02:00