* refs/heads/tmp-bd65f1b:
ANDROID: uid_sys_stats: Use llist for deferred work
UPSTREAM: usb: typec: ucsi: Fix command cancellation
ANDROID: GKI: update symbol list file for xiaomi
UPSTREAM: erofs: avoid infinite loop in z_erofs_do_read_page() when reading beyond EOF
UPSTREAM: erofs: avoid useless loops in z_erofs_pcluster_readmore() when reading beyond EOF
UPSTREAM: erofs: Fix detection of atomic context
UPSTREAM: erofs: fix compact 4B support for 16k block size
UPSTREAM: erofs: kill hooked chains to avoid loops on deduplicated compressed images
UPSTREAM: erofs: fix potential overflow calculating xattr_isize
UPSTREAM: erofs: stop parsing non-compact HEAD index if clusterofs is invalid
UPSTREAM: erofs: initialize packed inode after root inode is assigned
ANDROID: GKI: Update ABI for zsmalloc fixes
BACKPORT: zsmalloc: fix races between modifications of fullness and isolated
UPSTREAM: zsmalloc: consolidate zs_pool's migrate_lock and size_class's locks
ANDROID: consolidate.fragment: Enable slub debug in consolidate-fragment
BACKPORT: FROMGIT: mm: handle faults that merely update the accessed bit under the VMA lock
FROMLIST: mm: Allow fault_dirty_shared_page() to be called under the VMA lock
FROMGIT: mm: handle swap and NUMA PTE faults under the VMA lock
FROMGIT: mm: run the fault-around code under the VMA lock
FROMGIT: mm: move FAULT_FLAG_VMA_LOCK check down from do_fault()
FROMGIT: mm: move FAULT_FLAG_VMA_LOCK check down in handle_pte_fault()
BACKPORT: FROMGIT: mm: handle some PMD faults under the VMA lock
BACKPORT: FROMGIT: mm: handle PUD faults under the VMA lock
FROMGIT: mm: move FAULT_FLAG_VMA_LOCK check from handle_mm_fault()
BACKPORT: FROMGIT: mm: allow per-VMA locks on file-backed VMAs
FROMGIT: mm: remove CONFIG_PER_VMA_LOCK ifdefs
FROMGIT: mm: fix a lockdep issue in vma_assert_write_locked
FROMGIT: mm: handle userfaults under VMA lock
FROMGIT: mm: handle swap page faults under per-VMA lock
FROMGIT: mm: change folio_lock_or_retry to use vm_fault directly
BACKPORT: FROMGIT: mm: drop per-VMA lock when returning VM_FAULT_RETRY or VM_FAULT_COMPLETED
BACKPORT: FROMGIT: mm: move vma locking out of vma_prepare and dup_anon_vma
BACKPORT: FROMGIT: mm: always lock new vma before inserting into vma tree
FROMGIT: mm: lock vma explicitly before doing vm_flags_reset and vm_flags_reset_once
FROMGIT: mm: replace mmap with vma write lock assertions when operating on a vma
FROMGIT: mm: for !CONFIG_PER_VMA_LOCK equate write lock assertion for vma and mmap
FROMGIT: mm: don't drop VMA locks in mm_drop_all_locks()
BACKPORT: riscv: mm: try VMA lock-based page fault handling first
BACKPORT: FROMGIT: mm: enable page walking API to lock vmas during the walk
BACKPORT: mm: lock VMA in dup_anon_vma() before setting ->anon_vma
UPSTREAM: mm: fix memory ordering for mm_lock_seq and vm_lock_seq
FROMGIT: usb: host: ehci-sched: try to turn on io watchdog as long as periodic_count > 0
FROMGIT: BACKPORT: usb: ehci: add workaround for chipidea PORTSC.PEC bug
UPSTREAM: tty: n_gsm: fix UAF in gsm_cleanup_mux
UPSTREAM: mm/mmap: Fix extra maple tree write
FROMGIT: Multi-gen LRU: skip CMA pages when they are not eligible
UPSTREAM: mm: skip CMA pages when they are not available
UPSTREAM: dma-buf: fix an error pointer vs NULL bug
UPSTREAM: dma-buf: keep the signaling time of merged fences v3
UPSTREAM: netfilter: nf_tables: skip bound chain on rule flush
UPSTREAM: net/sched: sch_qfq: account for stab overhead in qfq_enqueue
UPSTREAM: net/sched: sch_qfq: refactor parsing of netlink parameters
UPSTREAM: netfilter: nft_set_pipapo: fix improper element removal
ANDROID: Add checkpatch target.
UPSTREAM: USB: Gadget: core: Help prevent panic during UVC unconfigure
ANDROID: GKI: Update symbols to symbol list
ANDROID: vendor_hook: fix the error record position of mutex
ANDROID: ABI: add allowed list for galaxy
ANDROID: gfp: add __GFP_CMA in gfpflag_names
ANDROID: ABI: Update to fix slab-out-of-bounds in xhci_vendor_get_ops
ANDROID: usb: host: fix slab-out-of-bounds in xhci_vendor_get_ops
ANDROID: GKI: update pixel symbol list for xhci
FROMGIT: fs: drop_caches: draining pages before dropping caches
ANDROID: GKI: update symbol list file for xiaomi
ANDROID: uid_sys_stats: Use a single work for deferred updates
ANDROID: ABI: Update symbol for Exynos SoC
ANDROID: GKI: Add symbols to symbol list for vivo
ANDROID: vendor_hooks: Add tune scan type hook in get_scan_count()
FROMGIT: BACKPORT: Multi-gen LRU: Fix can_swap in lru_gen_look_around()
FROMGIT: Multi-gen LRU: Avoid race in inc_min_seq()
FROMGIT: Multi-gen LRU: Fix per-zone reclaim
ANDROID: ABI: update symbol list for galaxy
ANDROID: oplus: Update the ABI xml and symbol list
ANDROID: vendor_hooks: Add hooks for lookaround
ANDROID: ABI: Update STG ABI to format version 2
ANDROID: ABI: Update symbol list for imx
FROMGIT: erofs: fix wrong primary bvec selection on deduplicated extents
UPSTREAM: media: Add ABGR64_12 video format
BACKPORT: media: Add BGR48_12 video format
UPSTREAM: media: Add YUV48_12 video format
UPSTREAM: media: Add Y212 v4l2 format info
UPSTREAM: media: Add Y210, Y212 and Y216 formats
UPSTREAM: media: Add Y012 video format
UPSTREAM: media: Add P012 and P012M video format
ANDROID: GKI: Create symbol files in include/config
ANDROID: fuse-bpf: Use stored bpf for create_open
ANDROID: fuse-bpf: Add bpf to negative fuse_dentry
ANDROID: fuse-bpf: Check inode not null
ANDROID: fuse-bpf: Fix flock test compile error
ANDROID: fuse-bpf: Add partial ioctl support
ANDROID: ABI: Update oplus symbol list
UPSTREAM: mm/mempolicy: Take VMA lock before replacing policy
BACKPORT: mm: lock_vma_under_rcu() must check vma->anon_vma under vma lock
BACKPORT: FROMGIT: irqchip/gic-v3: Workaround for GIC-700 erratum 2941627
ANDROID: GKI: update xiaomi symbol list
UPSTREAM: mm: lock newly mapped VMA with corrected ordering
UPSTREAM: fork: lock VMAs of the parent process when forking
UPSTREAM: mm: lock newly mapped VMA which can be modified after it becomes visible
UPSTREAM: mm: lock a vma before stack expansion
ANDROID: GKI: bring back find_extend_vma()
BACKPORT: mm: always expand the stack with the mmap write lock held
BACKPORT: execve: expand new process stack manually ahead of time
ANDROID: abi_gki_aarch64_qcom: ufshcd_mcq_poll_cqe_lock
UPSTREAM: mm: make find_extend_vma() fail if write lock not held
UPSTREAM: powerpc/mm: convert coprocessor fault to lock_mm_and_find_vma()
UPSTREAM: mm/fault: convert remaining simple cases to lock_mm_and_find_vma()
UPSTREAM: arm/mm: Convert to using lock_mm_and_find_vma()
UPSTREAM: riscv/mm: Convert to using lock_mm_and_find_vma()
UPSTREAM: mips/mm: Convert to using lock_mm_and_find_vma()
UPSTREAM: powerpc/mm: Convert to using lock_mm_and_find_vma()
BACKPORT: arch/arm64/mm/fault: Fix undeclared variable error in do_page_fault()
BACKPORT: arm64/mm: Convert to using lock_mm_and_find_vma()
UPSTREAM: mm: make the page fault mmap locking killable
ANDROID: Inherit "user-aware property" across rtmutex.
BACKPORT: blk-crypto: use dynamic lock class for blk_crypto_profile::lock
ANDROID: ABI: update symbol list for Xclipse GPU
ANDROID: drm/ttm: export ttm_tt_unpopulate()
ANDROID: GKI: Add ABI symbol list(devlink) for MTK
ANDROID: devlink: Select CONFIG_NET_DEVLINK in Kconfig.gki
ANDROID: KVM: arm64: Fix memory ordering for pKVM module callbacks
BACKPORT: mm: introduce new 'lock_mm_and_find_vma()' page fault helper
BACKPORT: maple_tree: fix potential out-of-bounds access in mas_wr_end_piv()
UPSTREAM: x86/smp: Cure kexec() vs. mwait_play_dead() breakage
UPSTREAM: x86/smp: Use dedicated cache-line for mwait_play_dead()
UPSTREAM: x86/smp: Remove pointless wmb()s from native_stop_other_cpus()
UPSTREAM: x86/smp: Dont access non-existing CPUID leaf
UPSTREAM: x86/smp: Make stop_other_cpus() more robust
UPSTREAM: x86/microcode/AMD: Load late on both threads too
BACKPORT: mm, hwpoison: when copy-on-write hits poison, take page offline
UPSTREAM: mm, hwpoison: try to recover from copy-on write faults
BACKPORT: mm/mmap: Fix error return in do_vmi_align_munmap()
BACKPORT: mm/mmap: Fix error path in do_vmi_align_munmap()
UPSTREAM: HID: logitech-hidpp: add HIDPP_QUIRK_DELAYED_INIT for the T651.
UPSTREAM: HID: hidraw: fix data race on device refcount
UPSTREAM: can: isotp: isotp_sendmsg(): fix return error fix on TX path
UPSTREAM: fbdev: fix potential OOB read in fast_imageblit()
ANDROID: GKI: add function symbols for unisoc
ANDROID: cgroup: Cleanup android_rvh_cgroup_force_kthread_migration
UPSTREAM: net/sched: cls_fw: Fix improper refcount update leads to use-after-free
UPSTREAM: netfilter: nf_tables: fix chain binding transaction logic
ANDROID: abi_gki_aarch64_qcom: update abi
UPSTREAM: fs/ntfs3: Check fields while reading
ANDROID: GKI: Update abi_gki_aarch64_qcom
ANDROID: ABI: Update pixel symbol list
ANDROID: GKI: Move GKI module headers to generated includes
ANDROID: set kmi_symbol_list_add_only for Kleaf builds.
ANDROID: GKI: Add Android ABI padding to wwan_port_ops
ANDROID: GKI: Add Android ABI padding to wwan_ops
ANDROID: update symbol list for unisoc regmap vendor hook
ANDROID: GKI: Update mtk ABI symbol list
UPSTREAM: media: dvb-core: Fix kernel WARNING for blocking operation in wait_event*()
ANDROID: abi_gki_aarch64_qcom: Update QCOM symbol list
ANDROID: ABI: Update pixel symbol list
ANDROID: GKI: add ABI symbol for xiaomi
ANDROID: vendor_hooks: add vendor hook to support SAGT
FROMLIST: fuse: revalidate: don't invalidate if interrupted
ANDROID: GKI: Update pixel symbol list for thermal
ANDROID: thermal: Add vendor thermal genl check
ANDROID: GKI: Update the pixel symbol list
ANDROID: GKI: Update protected exports
FROMGIT: mm: add missing VM_FAULT_RESULT_TRACE name for VM_FAULT_COMPLETED
FROMGIT: swap: remove remnants of polling from read_swap_cache_async
UPSTREAM: io_uring/poll: serialize poll linked timer start with poll removal
Change-Id: Ib4aaa987f777d4cdb0897af78aecb19aaee8d68b
Upstream-Build: ks_qcom-android14-6.1-keystone-qcom-release@10801570 UKQ2.230913.001
Signed-off-by: jianzhou <quic_jianzhou@quicinc.com>
Pointer wakeup_irq_wq can be NULL if workqueue allocation
fails and may be dereferenced later.
To avoid this returned error if workqueue allocation fails.
Change-Id: Ic70c862e75c2594171c6a4f165ea87f21524cd40
Signed-off-by: Aniket Randive <quic_arandive@quicinc.com>
__alloc_and_insert_iova_range return -ENOMEM when there is no
suitable size, where dma_buf_map_attachment return -EINVAL which
is not accurate info.
Call trace:
alloc_iova+0x2cc/0x318
alloc_iova_fast+0x190/0x2c4
iommu_dma_alloc_iova+0xc0/0x180
iommu_dma_map_sg+0x1cc/0x3a0
dma_map_sg_attrs+0x44/0xbc
msm_dma_map_sg_attrs+0x398/0x6a4 [msm_dma_iommu_mapping]
qcom_sg_map_dma_buf+0xe4/0x14c [qcom_dma_heaps]
dma_buf_map_attachment+0xcc/0x1d8
fastrpc_mmap_create+0x3a8/0x938 [frpc_adsprpc]
fastrpc_internal_mmap+0x100/0x268 [frpc_adsprpc]
fastrpc_device_ioctl+0x620/0x2078 [frpc_adsprpc]
__arm64_sys_ioctl+0xa8/0xe4
invoke_syscall+0x58/0x11c
el0_svc_common+0xb4/0xf4
do_el0_svc+0x2c/0xb0
el0_svc+0x2c/0xa4
el0t_64_sync_handler+0x68/0xb4
el0t_64_sync+0x1a0/0x1a4
change this to follow upstream usage in
kernel/dma/mapping.c dma_map_sgtable.
Change-Id: I5cec3005a8759de820705c268fef18addb2a8899
Signed-off-by: Kassey Li <quic_yingangl@quicinc.com>
* keystone/mirror-android14-6.1-2023-08: (162 commits)
ANDROID: uid_sys_stats: Use llist for deferred work
UPSTREAM: usb: typec: ucsi: Fix command cancellation
ANDROID: GKI: update symbol list file for xiaomi
UPSTREAM: erofs: avoid infinite loop in z_erofs_do_read_page() when reading beyond EOF
UPSTREAM: erofs: avoid useless loops in z_erofs_pcluster_readmore() when reading beyond EOF
UPSTREAM: erofs: Fix detection of atomic context
UPSTREAM: erofs: fix compact 4B support for 16k block size
UPSTREAM: erofs: kill hooked chains to avoid loops on deduplicated compressed images
UPSTREAM: erofs: fix potential overflow calculating xattr_isize
UPSTREAM: erofs: stop parsing non-compact HEAD index if clusterofs is invalid
UPSTREAM: erofs: initialize packed inode after root inode is assigned
ANDROID: GKI: Update ABI for zsmalloc fixes
BACKPORT: zsmalloc: fix races between modifications of fullness and isolated
UPSTREAM: zsmalloc: consolidate zs_pool's migrate_lock and size_class's locks
BACKPORT: FROMGIT: mm: handle faults that merely update the accessed bit under the VMA lock
FROMLIST: mm: Allow fault_dirty_shared_page() to be called under the VMA lock
FROMGIT: mm: handle swap and NUMA PTE faults under the VMA lock
FROMGIT: mm: run the fault-around code under the VMA lock
FROMGIT: mm: move FAULT_FLAG_VMA_LOCK check down from do_fault()
FROMGIT: mm: move FAULT_FLAG_VMA_LOCK check down in handle_pte_fault()
...
Change-Id: Ic33be5a9dae71958c187029751cb599a83110ab9
Based on the board designs, same ADC channel for a PMIC may be required
to use with a different scale function.
eg -
PM7250B PMIC's VADC channel for reading slave charger temperature will
require different scaling function to calculate the voltage to
temperature based on the slave charger used on that board(SMB1390/SMB1398).
Add DT based option to specify scale-fn-type to handle such
kind of requirements.
Change-Id: I52d7b8afb5b6b6ef0419740bdb67ed3f48108cde
Signed-off-by: Rakesh Kota <quic_kotarake@quicinc.com>
Since the dedicated hwq for dev command has been removed
by upstream commit 680cfe91d1 ("UPSTREAM: scsi: ufs:
core: Remove dedicated hwq for dev command"), we need to
add ESI affinity for this hwq.
Change-Id: Ia25ac6d34b78ca2598eb40fc6a1374e4c8704e60
Signed-off-by: Ziqi Chen <quic_ziqichen@quicinc.com>
This reverts commit 71e862d942.
After properly switching to public kleaf APIs, we no longer need to
pass --nocheck_bzl_visibility to the build.
Change-Id: I3ff04efd2cbebdeb176f6b67b099f7a6ff6b2fab
Signed-off-by: John Moon <quic_johmoo@quicinc.com>
Currently, we use an in-tree definition of the super_image rule to
generate our super.img files. This rule depends on a private kleaf
API which is no longer visible to msm-kernel after an upstream
change.
To fix, we've upstreamed the super_image rule to kleaf which allows
usage of the private API. Accordingly, we need to make an update here
which uses the new super_image API from kleaf.
Change-Id: Ie904958a773061c83e33190cc9ad89a5467c738e
Signed-off-by: John Moon <quic_johmoo@quicinc.com>
A use-after-free bug was found in the previous custom lock-free list
implementation for the deferred work, so switch functionality to llist
implementation.
While the previous approach atomically handled the list head, it did not
assure the new node's next pointer was assigned before the head was
pointed to the node, allowing the consumer to traverse to an invalid
next pointer.
Additionally, in switching to llists, this patch pulls the entire list
off the list head once and processes it separately, reducing the number
of atomic operations compared with the custom lists's implementation
which pulled one node at a time atomically from the list head.
BUG: KASAN: use-after-free in process_notifier+0x270/0x2dc
Write of size 8 at addr d4ffff89545c3c58 by task Blocking Thread/3431
Pointer tag: [d4], memory tag: [fe]
call trace:
dump_backtrace+0xf8/0x118
show_stack+0x18/0x24
dump_stack_lvl+0x60/0x78
print_report+0x178/0x470
kasan_report+0x8c/0xbc
kasan_tag_mismatch+0x28/0x3c
__hwasan_tag_mismatch+0x30/0x60
process_notifier+0x270/0x2dc
notifier_call_chain+0xb4/0x108
blocking_notifier_call_chain+0x54/0x80
profile_task_exit+0x20/0x2c
do_exit+0xec/0x1114
__arm64_sys_exit_group+0x0/0x24
get_signal+0x93c/0xa78
do_notify_resume+0x158/0x3fc
el0_svc+0x54/0x78
el0t_64_sync_handler+0x44/0xe4
el0t_64_sync+0x190/0x194
Bug: 294468796
Bug: 295787403
Bug: 299197985
Fixes: 8e86825eec ("ANDROID: uid_sys_stats: Use a single work for deferred updates")
Change-Id: Id377348c239ec720a5237726bc3632544d737e3b
Signed-off-by: John Stultz <jstultz@google.com>
[nkapron: Squashed with other changes and rewrote the commit message]
Signed-off-by: Neill Kapron <nkapron@google.com>
(cherry picked from commit 87647c0c54)
Pin all the pages when physically contiguous pages are coalesced.
Change-Id: I91bc45130dd63a45b4e84f1de847db85ef5efacc
Signed-off-by: Prakruthi Deepak Heragu <quic_pheragu@quicinc.com>
Snapshot of updating lucid prepare callback to check pll calibration
status properly. Also add logic to properly slew the PLL when
HW_UPDATE_LOGIC_BYPASS bit is not set
commit 6e270ebf5893 ("clk: qcom: clk-alpha-pll: Update the lucid
pll ops").
Change-Id: I4ae488d8df6e60dcefdddcc3ab2a696f66e4a594
Signed-off-by: Kalpak Kawadkar <quic_kkawadka@quicinc.com>
If the hardware is still accessing memory after SMMU translation
is disabled (as part of smmu shutdown callback), then the
IOVAs (I/O virtual address) which it was using will go on the bus
as the physical addresses which will result in unknown crashes
like NoC/interconnect errors.
So, implement shutdown callback for i2c driver to suspend the bus
during system "reboot" or "shutdown".
Change-Id: I58b719082a8d8beed4317b33691115c9e7031ec1
Signed-off-by: Srikanth Nanavalla <quic_snanaval@quicinc.com>
Signed-off-by: Visweswara Tanuku <quic_vtanuku@quicinc.com>
kaslr offset in IMEM is required to decode the ram dumps with
kaslr enabled kernel. Add hibernation callback to update IMEM cookie
during hibernation restore. Use syscore callbacks in this
case to restore the value as soon as possible.
Change-Id: I3fe618c56385362e796e52deb423a035f0e03707
Signed-off-by: Venkatakrishnaiah Pari <quic_vpari@quicinc.com>
Signed-off-by: Shreyas K K <quic_shrekk@quicinc.com>
Add hibernation callback to reinitialize memory_dump table
in IMEM during hibernation restore. Use syscore callbacks in
this case to reinitialize the value as soon as possible.
Change-Id: I243a354ce6ccb9f349684eb9b649d43d5b3ed519
Signed-off-by: Arun KS <arunks@codeaurora.org>
Signed-off-by: Shreyas K K <quic_shrekk@quicinc.com>