Commit Graph

1058663 Commits

Author SHA1 Message Date
Will Deacon
709e2b9ed9 Revert "Revert "ANDROID: KVM: arm64: Allow userspace to receive SHARE and UNSHARE notifications""
This reverts commit 68c3df5b39.

Bug: 233587962
Signed-off-by: Will Deacon <willdeacon@google.com>
Change-Id: Id5caa080b3b271e3e84e583ceb6d18b0823c52c7
2022-08-04 13:03:53 +00:00
Will Deacon
49625f6cd7 Revert "Revert "ANDROID: KVM: arm64: Add initial support for KVM_CAP_EXIT_HYPERCALL""
This reverts commit 94bf7ff642.

Bug: 233587962
Signed-off-by: Will Deacon <willdeacon@google.com>
Change-Id: Ie60089221f571a98e5a8cb8f0ba87ac81bb1b6d3
2022-08-04 13:03:53 +00:00
Will Deacon
ab71832edb Revert "ANDROID: KVM: arm64: Drop FOLL_FORCE when pinning guest memory pages"
This reverts commit 3f5ffbd827.

Bug: 233587962
Signed-off-by: Will Deacon <willdeacon@google.com>
Change-Id: Ie38216650f36b6b38f0c4052cec515955e239b80
2022-08-04 13:03:53 +00:00
Will Deacon
f1689aa7a9 Revert "ANDROID: KVM: arm64: pkvm: Don't access kvm_arm_hyp_percpu_base at EL1"
This reverts commit e3d466ac29.

Bug: 233587962
Signed-off-by: Will Deacon <willdeacon@google.com>
Change-Id: Icef84ef2ec9eb7bc1256750d839f93328e0b2397
2022-08-04 13:03:53 +00:00
Will Deacon
daf3271f36 Revert "ANDROID: KVM: arm64: Unmap kvm_arm_hyp_percpu_base from the host"
This reverts commit 7670745758.

Bug: 233587962
Signed-off-by: Will Deacon <willdeacon@google.com>
Change-Id: I5a04572d7dfbee8929288a7d4c15543c3c505410
2022-08-04 13:03:53 +00:00
Will Deacon
14d38827ac Revert "ANDROID: KVM: arm64: Explicitely map kvm_vgic_global_state at EL2"
This reverts commit fa96b5be92.

Bug: 233587962
Signed-off-by: Will Deacon <willdeacon@google.com>
Change-Id: I669c57a28410308ed0f17d553e8564c6121da56e
2022-08-04 13:03:53 +00:00
Will Deacon
85cb45425f Revert "ANDROID: KVM: arm64: Don't map host sections in pkvm"
This reverts commit d10551c5fd.

Bug: 233587962
Signed-off-by: Will Deacon <willdeacon@google.com>
Change-Id: I9dd0930dd35616553c5a2d7a061840e837e06bb1
2022-08-04 13:03:53 +00:00
Will Deacon
68a03041a7 Revert "ANDROID: KVM: arm64: iommu: Harden __pkvm_iommu_pm_notify"
This reverts commit 0c292fa8d6.

Bug: 233587962
Signed-off-by: Will Deacon <willdeacon@google.com>
Change-Id: I39c4f3ff6a0094117fe979378aed19814dc645a0
2022-08-04 13:03:53 +00:00
Will Deacon
0d6639d203 Revert "ANDROID: KVM: arm64: iommu: Free memory on registration error"
This reverts commit 597558ad5b.

Bug: 233587962
Signed-off-by: Will Deacon <willdeacon@google.com>
Change-Id: I98af74857a8100942e81094570291038305c0474
2022-08-04 13:03:53 +00:00
Will Deacon
59eea64c9a Revert "ANDROID: KVM: arm64: iommu: Create private mapping last"
This reverts commit c690c2e305.

Bug: 233587962
Signed-off-by: Will Deacon <willdeacon@google.com>
Change-Id: If921b6b032233bc649b076fa3f4de37600c71dc3
2022-08-04 13:03:53 +00:00
Will Deacon
59fe12e0c0 Revert "ANDROID: KVM: arm64: iommu: Run validate() on struct pkvm_iommu"
This reverts commit db89d65f69.

Bug: 233587962
Signed-off-by: Will Deacon <willdeacon@google.com>
Change-Id: I20750ee1f8fa246b8fd6397fcbb31a1f60a9c02b
2022-08-04 13:03:53 +00:00
Will Deacon
4a775df889 Revert "ANDROID: KVM: arm64: iommu: Create parent/child relation"
This reverts commit d5bc119656.

Bug: 233587962
Signed-off-by: Will Deacon <willdeacon@google.com>
Change-Id: I7aded5e8adabfe9e717bb104edcdf072b581842e
2022-08-04 13:03:53 +00:00
Will Deacon
dd8e24204e Revert "ANDROID: KVM: arm64: s2mpu: Create SysMMU_SYNC driver"
This reverts commit 611c9a2a4a.

Bug: 233587962
Signed-off-by: Will Deacon <willdeacon@google.com>
Change-Id: I409241329f9528be4402c0dd50e119488791a083
2022-08-04 13:03:53 +00:00
Will Deacon
57726405ee Revert "ANDROID: KVM: arm64: iommu: No powered check in DABT handler"
This reverts commit 2c05ff981a.

Bug: 233587962
Signed-off-by: Will Deacon <willdeacon@google.com>
Change-Id: I164f13bb4bd466e86cec2d07cda67a7641049f7a
2022-08-04 13:03:53 +00:00
Will Deacon
d3c529951d Revert "ANDROID: KVM: arm64: iommu: Add pkvm_iommu_finalize"
This reverts commit d2e71e529b.

Bug: 233587962
Signed-off-by: Will Deacon <willdeacon@google.com>
Change-Id: I56297185ba60400d5f52d284f7d8e167b25e5a48
2022-08-04 13:03:53 +00:00
Will Deacon
ede52bb8fe Revert "ANDROID: KVM: arm64: Make the use of host or shadow vcpu less error prone"
This reverts commit 0b9114c308.

Bug: 233587962
Signed-off-by: Will Deacon <willdeacon@google.com>
Change-Id: Ibbfa7f977bddab8123c27d016af32b3ab360a1fe
2022-08-04 13:03:53 +00:00
Will Deacon
0ec225eb5e Revert "ANDROID: KVM: arm64: pkvm: Track the SVE state in the shadow vcpu"
This reverts commit d35bf8afbf.

Bug: 233587962
Signed-off-by: Will Deacon <willdeacon@google.com>
Change-Id: I7400ee64cb65b99f3616dc77c66960d65881e37a
2022-08-04 13:03:53 +00:00
Will Deacon
b01c45bf4a Revert "ANDROID: KVM: arm64: iommu: Fix upper bound of PT walk"
This reverts commit 58f8121600.

Bug: 233587962
Signed-off-by: Will Deacon <willdeacon@google.com>
Change-Id: Ib31b14b0c49a427c78a0f316b86eab46771d31d2
2022-08-04 13:03:53 +00:00
Will Deacon
e192394792 Revert "ANDROID: KVM: arm64: s2mpu: Initialize MPTs to PROT_RW"
This reverts commit b8a31a6030.

Bug: 233587962
Signed-off-by: Will Deacon <willdeacon@google.com>
Change-Id: I4076ea01681f5718671203cf2e024355caaa0e40
2022-08-04 13:03:53 +00:00
Will Deacon
7e017331f5 Revert "ANDROID: KVM: arm64: iommu: Optimize snapshot_host_stage2"
This reverts commit 8b304ef274.

Bug: 233587962
Signed-off-by: Will Deacon <willdeacon@google.com>
Change-Id: I986e5e99986ba18ac24b54bb94ebeda781b55d8f
2022-08-04 13:03:53 +00:00
Will Deacon
52273e667f Revert "ANDROID: KVM: arm64: Fix ToCToU issue when refilling the hyp memcache"
This reverts commit 0957aec081.

Bug: 233587962
Signed-off-by: Will Deacon <willdeacon@google.com>
Change-Id: Id838e47d103f6a9100ae042b73abb2e907f63aa0
2022-08-04 13:03:53 +00:00
Will Deacon
5b5d8886f6 Revert "ANDROID: KVM: arm64: Pin FFA mailboxes shared by the host"
This reverts commit 7a67d424c1.

Bug: 233587962
Signed-off-by: Will Deacon <willdeacon@google.com>
Change-Id: I9ddf51c2dc07fe5b68e6e2ce3d814dcdd36cfb27
2022-08-04 13:03:53 +00:00
Will Deacon
d81875516a Revert "ANDROID: KVM: arm64: Fix size calculation of FFA memory range"
This reverts commit 3d21efc81c.

Bug: 233587962
Signed-off-by: Will Deacon <willdeacon@google.com>
Change-Id: Ie1a4e5117d51af64d2bd2641dc68d13c13015dd5
2022-08-04 13:03:53 +00:00
Will Deacon
bb4b2952f4 Revert "ANDROID: KVM: arm64: Do not allow memslot modifications once a PVM has run"
This reverts commit 4d5aa4280a.

Bug: 233587962
Signed-off-by: Will Deacon <willdeacon@google.com>
Change-Id: Ib0661ad68724a4667eaa8ab3e7a335eeac887457
2022-08-04 13:03:53 +00:00
Will Deacon
9a287c833f Revert "ANDROID: KVM: arm64: s2mpu: Extract L1ENTRY_* consts"
This reverts commit 28632d7a23.

Bug: 233587962
Signed-off-by: Will Deacon <willdeacon@google.com>
Change-Id: Ibdea76beec5f84e49c2485e9758ca3988b35964d
2022-08-04 13:03:53 +00:00
Will Deacon
b43d1f61f1 Revert "ANDROID: KVM: arm64: s2mpu: Refactor DABT handler"
This reverts commit e62f59e567.

Bug: 233587962
Signed-off-by: Will Deacon <willdeacon@google.com>
Change-Id: I5e7d2667f798b9106bffb9952b0c2dd5954d654a
2022-08-04 13:03:53 +00:00
Will Deacon
2ab7a04c0c Revert "ANDROID: KVM: arm64: s2mpu: Allow L1ENTRY_* r/o access"
This reverts commit fdfed49bf7.

Bug: 233587962
Signed-off-by: Will Deacon <willdeacon@google.com>
Change-Id: I8558f5d4c197f1f52104e44b8b78f316a61db137
2022-08-04 13:03:53 +00:00
Will Deacon
12c8829443 Revert "ANDROID: KVM: arm64: s2mpu: Allow reading MPTC entries"
This reverts commit 520d88005f.

Bug: 233587962
Signed-off-by: Will Deacon <willdeacon@google.com>
Change-Id: I288452bc61971299883961cae4d8b0b32e149991
2022-08-04 13:03:53 +00:00
Will Deacon
7a630e9e6c Revert "ANDROID: KVM: arm64: s2mpu: Allow r/o access to control regs"
This reverts commit fde6251d1f.

Bug: 233587962
Signed-off-by: Will Deacon <willdeacon@google.com>
Change-Id: I195dd33cea8415268af305e0b1fbb97e7b215b1b
2022-08-04 13:03:53 +00:00
Will Deacon
fb1d2e66e8 Revert "ANDROID: arm64: Auto-enroll MMIO guard on protected vms"
This reverts commit 6f741e863c.

Bug: 233587962
Signed-off-by: Will Deacon <willdeacon@google.com>
Change-Id: I80106643ffb3004f42142c3d048a1c1998333dd8
2022-08-04 13:03:53 +00:00
Will Deacon
fde82d8ef2 Revert "FROMGIT: KVM: arm64: Handle host stage-2 faults from 32-bit EL0"
This reverts commit f5216880de.

Bug: 233587962
Signed-off-by: Will Deacon <willdeacon@google.com>
Change-Id: I84ba44805200eac477db1d89c997f253138811dd
2022-08-04 13:03:53 +00:00
Will Deacon
63a3bd4756 Revert "ANDROID: KVM: arm64: pkvm: Ensure that TLBs and I-cache are private to each vcpu"
This reverts commit 92a6dd3865.

Bug: 233587962
Signed-off-by: Will Deacon <willdeacon@google.com>
Change-Id: Ia14e19d7ff188ec6bc3d521378df04cee67f10d7
2022-08-04 13:03:53 +00:00
Will Deacon
a5d986619f Revert "ANDROID: KVM: arm64: Fix for do not allow memslot changes after first VM run under pKVM"
This reverts commit e2e042c0c4.

Bug: 233587962
Signed-off-by: Will Deacon <willdeacon@google.com>
Change-Id: I9a2364b3afd0cf12c7dba466f2d032424ba901e4
2022-08-04 13:03:53 +00:00
Will Deacon
5de803f3b8 Revert "Revert "ANDROID: KVM: arm64: pkvm: Ensure that TLBs and I-cache are private to each vcpu""
This reverts commit bb8c831668.

Bug: 233587962
Signed-off-by: Will Deacon <willdeacon@google.com>
Change-Id: I4dbced82a26342b2f2ec76fcd910d19a77b60484
2022-08-04 13:03:53 +00:00
Will Deacon
c845bb9e8d Revert "ANDROID: KVM: arm64: Remove stale shadow_handle field"
This reverts commit 10bb2d3f93.

Bug: 233587962
Signed-off-by: Will Deacon <willdeacon@google.com>
Change-Id: I8cbfe4020bc6349887ccacf8fde477db6b076686
2022-08-04 13:03:53 +00:00
Will Deacon
b6e3528d30 Revert "ANDROID: KVM: arm64: pkvm: Ensure that TLBs and I-cache are private to each vcpu"
This reverts commit e88313ab7c.

Bug: 233587962
Signed-off-by: Will Deacon <willdeacon@google.com>
Change-Id: Ied723fcd19742d3e88e913602560b60b141aa90a
2022-08-04 13:03:53 +00:00
Will Deacon
2464120770 Revert "ANDROID: arm64: Fix MMIO guard ioremap when called before slab_is_available()."
This reverts commit e8b3f31d7a.

Bug: 233587962
Signed-off-by: Will Deacon <willdeacon@google.com>
Change-Id: I90bacc5428b3f345afdd8c35de917807e39e29d1
2022-08-04 13:03:53 +00:00
Will Deacon
c6b7b62370 Revert "ANDROID: KVM: arm64: Don't update IOMMUs unnecessarily"
This reverts commit dbd1cb3025.

Bug: 233587962
Signed-off-by: Will Deacon <willdeacon@google.com>
Change-Id: Icc12e018efd1c01248db641417404e6f6ef4843a
2022-08-04 13:03:53 +00:00
Will Deacon
c9be48501b Revert "ANDROID: KVM: arm64: Prevent kmemleak from accessing .hyp.data"
This reverts commit 8ee914a539.

Bug: 233587962
Signed-off-by: Will Deacon <willdeacon@google.com>
Change-Id: I0892eaf93fe03af579974fef5605be79194e82a9
2022-08-04 13:03:53 +00:00
Carlos Llamas
95b22fd138 FROMLIST: binder: fix UAF of ref->proc caused by race condition
A transaction of type BINDER_TYPE_WEAK_HANDLE can fail to increment the
reference for a node. In this case, the target proc normally releases
the failed reference upon close as expected. However, if the target is
dying in parallel the call will race with binder_deferred_release(), so
the target could have released all of its references by now leaving the
cleanup of the new failed reference unhandled.

The transaction then ends and the target proc gets released making the
ref->proc now a dangling pointer. Later on, ref->node is closed and we
attempt to take spin_lock(&ref->proc->inner_lock), which leads to the
use-after-free bug reported below. Let's fix this by cleaning up the
failed reference on the spot instead of relying on the target to do so.

  ==================================================================
  BUG: KASAN: use-after-free in _raw_spin_lock+0xa8/0x150
  Write of size 4 at addr ffff5ca207094238 by task kworker/1:0/590

  CPU: 1 PID: 590 Comm: kworker/1:0 Not tainted 5.19.0-rc8 #10
  Hardware name: linux,dummy-virt (DT)
  Workqueue: events binder_deferred_func
  Call trace:
   dump_backtrace.part.0+0x1d0/0x1e0
   show_stack+0x18/0x70
   dump_stack_lvl+0x68/0x84
   print_report+0x2e4/0x61c
   kasan_report+0xa4/0x110
   kasan_check_range+0xfc/0x1a4
   __kasan_check_write+0x3c/0x50
   _raw_spin_lock+0xa8/0x150
   binder_deferred_func+0x5e0/0x9b0
   process_one_work+0x38c/0x5f0
   worker_thread+0x9c/0x694
   kthread+0x188/0x190
   ret_from_fork+0x10/0x20

Signed-off-by: Carlos Llamas <cmllamas@google.com>
Acked-by: Christian Brauner (Microsoft) <brauner@kernel.org>

Bug: 239630375
Link: https://lore.kernel.org/all/20220801182511.3371447-1-cmllamas@google.com/
Signed-off-by: Carlos Llamas <cmllamas@google.com>
Change-Id: I5085dd0dc805a780a64c057e5819f82dd8f02868
(cherry picked from commit ae3fa5d16a02ba7c7b170e0e1ab56d6f0ba33964)
2022-08-02 22:12:20 +00:00
Carlos Llamas
cc0cf923e8 ANDROID: binder: fix pending prio state for early exit
When calling binder_do_set_priority() with the same policy and priority
values as the current task, we exit early since there is nothing to do.
However, the BINDER_PRIO_PENDING state might be set and in this case we
fail to update it. A subsequent call to binder_transaction_priority()
will then read an incorrect state and save the wrong priority. Fix this
by setting thread->prio_state to BINDER_PRIO_SET on our way out.

Bug: 199309216
Fixes: cac827f261 ("ANDROID: binder: fix race in priority restore")
Signed-off-by: Carlos Llamas <cmllamas@google.com>
Change-Id: I21e906cf4b2ebee908af41fe101ecd458ae1991c
(cherry picked from commit 72193be6d4)
2022-08-02 19:43:56 +00:00
Greg Kroah-Hartman
6d2ac8a0a4 Merge 5.15.58 into android14-5.15
Changes in 5.15.58
	pinctrl: stm32: fix optional IRQ support to gpios
	riscv: add as-options for modules with assembly compontents
	mlxsw: spectrum_router: Fix IPv4 nexthop gateway indication
	lockdown: Fix kexec lockdown bypass with ima policy
	drm/ttm: fix locking in vmap/vunmap TTM GEM helpers
	bus: mhi: host: pci_generic: add Telit FN980 v1 hardware revision
	bus: mhi: host: pci_generic: add Telit FN990
	Revert "selftest/vm: verify remap destination address in mremap_test"
	Revert "selftest/vm: verify mmap addr in mremap_test"
	PCI: hv: Fix multi-MSI to allow more than one MSI vector
	PCI: hv: Fix hv_arch_irq_unmask() for multi-MSI
	PCI: hv: Reuse existing IRTE allocation in compose_msi_msg()
	PCI: hv: Fix interrupt mapping for multi-MSI
	serial: mvebu-uart: correctly report configured baudrate value
	batman-adv: Use netif_rx_any_context() any.
	Revert "mt76: mt7921: Fix the error handling path of mt7921_pci_probe()"
	Revert "mt76: mt7921e: fix possible probe failure after reboot"
	mt76: mt7921: use physical addr to unify register access
	mt76: mt7921e: fix possible probe failure after reboot
	mt76: mt7921: Fix the error handling path of mt7921_pci_probe()
	xfs: fix maxlevels comparisons in the btree staging code
	xfs: fold perag loop iteration logic into helper function
	xfs: rename the next_agno perag iteration variable
	xfs: terminate perag iteration reliably on agcount
	xfs: fix perag reference leak on iteration race with growfs
	xfs: prevent a WARN_ONCE() in xfs_ioc_attr_list()
	r8152: fix a WOL issue
	ip: Fix data-races around sysctl_ip_default_ttl.
	xfrm: xfrm_policy: fix a possible double xfrm_pols_put() in xfrm_bundle_lookup()
	power/reset: arm-versatile: Fix refcount leak in versatile_reboot_probe
	RDMA/irdma: Do not advertise 1GB page size for x722
	RDMA/irdma: Fix sleep from invalid context BUG
	pinctrl: ralink: rename MT7628(an) functions to MT76X8
	pinctrl: ralink: rename pinctrl-rt2880 to pinctrl-ralink
	pinctrl: ralink: Check for null return of devm_kcalloc
	perf/core: Fix data race between perf_event_set_output() and perf_mmap_close()
	ipv4/tcp: do not use per netns ctl sockets
	net: tun: split run_ebpf_filter() and pskb_trim() into different "if statement"
	mm/pagealloc: sysctl: change watermark_scale_factor max limit to 30%
	sysctl: move some boundary constants from sysctl.c to sysctl_vals
	tcp: Fix data-races around sysctl_tcp_ecn.
	drm/amd/display: Support for DMUB HPD interrupt handling
	drm/amd/display: Add option to defer works of hpd_rx_irq
	drm/amd/display: Fork thread to offload work of hpd_rx_irq
	drm/amdgpu/display: add quirk handling for stutter mode
	drm/amd/display: Ignore First MST Sideband Message Return Error
	scsi: megaraid: Clear READ queue map's nr_queues
	scsi: ufs: core: Drop loglevel of WriteBoost message
	nvme: check for duplicate identifiers earlier
	nvme: fix block device naming collision
	e1000e: Enable GPT clock before sending message to CSME
	Revert "e1000e: Fix possible HW unit hang after an s0ix exit"
	igc: Reinstate IGC_REMOVED logic and implement it properly
	ip: Fix data-races around sysctl_ip_no_pmtu_disc.
	ip: Fix data-races around sysctl_ip_fwd_use_pmtu.
	ip: Fix data-races around sysctl_ip_fwd_update_priority.
	ip: Fix data-races around sysctl_ip_nonlocal_bind.
	ip: Fix a data-race around sysctl_ip_autobind_reuse.
	ip: Fix a data-race around sysctl_fwmark_reflect.
	tcp/dccp: Fix a data-race around sysctl_tcp_fwmark_accept.
	tcp: sk->sk_bound_dev_if once in inet_request_bound_dev_if()
	tcp: Fix data-races around sysctl_tcp_l3mdev_accept.
	tcp: Fix data-races around sysctl_tcp_mtu_probing.
	tcp: Fix data-races around sysctl_tcp_base_mss.
	tcp: Fix data-races around sysctl_tcp_min_snd_mss.
	tcp: Fix a data-race around sysctl_tcp_mtu_probe_floor.
	tcp: Fix a data-race around sysctl_tcp_probe_threshold.
	tcp: Fix a data-race around sysctl_tcp_probe_interval.
	net: stmmac: fix pm runtime issue in stmmac_dvr_remove()
	net: stmmac: fix unbalanced ptp clock issue in suspend/resume flow
	mtd: rawnand: gpmi: validate controller clock rate
	mtd: rawnand: gpmi: Set WAIT_FOR_READY timeout based on program/erase times
	net: dsa: microchip: ksz_common: Fix refcount leak bug
	net: skb: introduce kfree_skb_reason()
	net: skb: use kfree_skb_reason() in tcp_v4_rcv()
	net: skb: use kfree_skb_reason() in __udp4_lib_rcv()
	net: socket: rename SKB_DROP_REASON_SOCKET_FILTER
	net: skb_drop_reason: add document for drop reasons
	net: netfilter: use kfree_drop_reason() for NF_DROP
	net: ipv4: use kfree_skb_reason() in ip_rcv_core()
	net: ipv4: use kfree_skb_reason() in ip_rcv_finish_core()
	i2c: mlxcpld: Fix register setting for 400KHz frequency
	i2c: cadence: Change large transfer count reset logic to be unconditional
	perf tests: Fix Convert perf time to TSC test for hybrid
	net: stmmac: fix dma queue left shift overflow issue
	net/tls: Fix race in TLS device down flow
	igmp: Fix data-races around sysctl_igmp_llm_reports.
	igmp: Fix a data-race around sysctl_igmp_max_memberships.
	igmp: Fix data-races around sysctl_igmp_max_msf.
	tcp: Fix data-races around keepalive sysctl knobs.
	tcp: Fix data-races around sysctl_tcp_syn(ack)?_retries.
	tcp: Fix data-races around sysctl_tcp_syncookies.
	tcp: Fix data-races around sysctl_tcp_migrate_req.
	tcp: Fix data-races around sysctl_tcp_reordering.
	tcp: Fix data-races around some timeout sysctl knobs.
	tcp: Fix a data-race around sysctl_tcp_notsent_lowat.
	tcp: Fix a data-race around sysctl_tcp_tw_reuse.
	tcp: Fix data-races around sysctl_max_syn_backlog.
	tcp: Fix data-races around sysctl_tcp_fastopen.
	tcp: Fix data-races around sysctl_tcp_fastopen_blackhole_timeout.
	iavf: Fix handling of dummy receive descriptors
	pinctrl: armada-37xx: Use temporary variable for struct device
	pinctrl: armada-37xx: Make use of the devm_platform_ioremap_resource()
	pinctrl: armada-37xx: Convert to use dev_err_probe()
	pinctrl: armada-37xx: use raw spinlocks for regmap to avoid invalid wait context
	i40e: Fix erroneous adapter reinitialization during recovery process
	ixgbe: Add locking to prevent panic when setting sriov_numvfs to zero
	net: stmmac: remove redunctant disable xPCS EEE call
	gpio: pca953x: only use single read/write for No AI mode
	gpio: pca953x: use the correct range when do regmap sync
	gpio: pca953x: use the correct register address when regcache sync during init
	be2net: Fix buffer overflow in be_get_module_eeprom
	net: dsa: sja1105: silent spi_device_id warnings
	net: dsa: vitesse-vsc73xx: silent spi_device_id warnings
	drm/imx/dcss: Add missing of_node_put() in fail path
	ipv4: Fix a data-race around sysctl_fib_multipath_use_neigh.
	ipv4: Fix data-races around sysctl_fib_multipath_hash_policy.
	ipv4: Fix data-races around sysctl_fib_multipath_hash_fields.
	ip: Fix data-races around sysctl_ip_prot_sock.
	udp: Fix a data-race around sysctl_udp_l3mdev_accept.
	tcp: Fix data-races around sysctl knobs related to SYN option.
	tcp: Fix a data-race around sysctl_tcp_early_retrans.
	tcp: Fix data-races around sysctl_tcp_recovery.
	tcp: Fix a data-race around sysctl_tcp_thin_linear_timeouts.
	tcp: Fix data-races around sysctl_tcp_slow_start_after_idle.
	tcp: Fix a data-race around sysctl_tcp_retrans_collapse.
	tcp: Fix a data-race around sysctl_tcp_stdurg.
	tcp: Fix a data-race around sysctl_tcp_rfc1337.
	tcp: Fix a data-race around sysctl_tcp_abort_on_overflow.
	tcp: Fix data-races around sysctl_tcp_max_reordering.
	gpio: gpio-xilinx: Fix integer overflow
	KVM: selftests: Fix target thread to be migrated in rseq_test
	spi: bcm2835: bcm2835_spi_handle_err(): fix NULL pointer deref for non DMA transfers
	KVM: Don't null dereference ops->destroy
	mm/mempolicy: fix uninit-value in mpol_rebind_policy()
	bpf: Make sure mac_header was set before using it
	sched/deadline: Fix BUG_ON condition for deboosted tasks
	x86/bugs: Warn when "ibrs" mitigation is selected on Enhanced IBRS parts
	dlm: fix pending remove if msg allocation fails
	x86/uaccess: Implement macros for CMPXCHG on user addresses
	x86/extable: Tidy up redundant handler functions
	x86/extable: Get rid of redundant macros
	x86/mce: Deduplicate exception handling
	x86/extable: Rework the exception table mechanics
	x86/extable: Provide EX_TYPE_DEFAULT_MCE_SAFE and EX_TYPE_FAULT_MCE_SAFE
	bitfield.h: Fix "type of reg too small for mask" test
	x86/entry_32: Remove .fixup usage
	x86/extable: Extend extable functionality
	x86/msr: Remove .fixup usage
	x86/futex: Remove .fixup usage
	KVM: x86: Use __try_cmpxchg_user() to emulate atomic accesses
	xhci: dbc: refactor xhci_dbc_init()
	xhci: dbc: create and remove dbc structure in dbgtty driver.
	xhci: dbc: Rename xhci_dbc_init and xhci_dbc_exit
	xhci: Set HCD flag to defer primary roothub registration
	mt76: fix use-after-free by removing a non-RCU wcid pointer
	iwlwifi: fw: uefi: add missing include guards
	crypto: qat - set to zero DH parameters before free
	crypto: qat - use pre-allocated buffers in datapath
	crypto: qat - refactor submission logic
	crypto: qat - add backlog mechanism
	crypto: qat - fix memory leak in RSA
	crypto: qat - remove dma_free_coherent() for RSA
	crypto: qat - remove dma_free_coherent() for DH
	crypto: qat - add param check for RSA
	crypto: qat - add param check for DH
	crypto: qat - re-enable registration of algorithms
	exfat: fix referencing wrong parent directory information after renaming
	tracing: Have event format check not flag %p* on __get_dynamic_array()
	tracing: Place trace_pid_list logic into abstract functions
	tracing: Fix return value of trace_pid_write()
	um: virtio_uml: Allow probing from devicetree
	um: virtio_uml: Fix broken device handling in time-travel
	Bluetooth: Add bt_skb_sendmsg helper
	Bluetooth: Add bt_skb_sendmmsg helper
	Bluetooth: SCO: Replace use of memcpy_from_msg with bt_skb_sendmsg
	Bluetooth: RFCOMM: Replace use of memcpy_from_msg with bt_skb_sendmmsg
	Bluetooth: Fix passing NULL to PTR_ERR
	Bluetooth: SCO: Fix sco_send_frame returning skb->len
	Bluetooth: Fix bt_skb_sendmmsg not allocating partial chunks
	exfat: use updated exfat_chain directly during renaming
	drm/amd/display: Reset DMCUB before HW init
	drm/amd/display: Optimize bandwidth on following fast update
	drm/amd/display: Fix surface optimization regression on Carrizo
	x86/amd: Use IBPB for firmware calls
	x86/alternative: Report missing return thunk details
	watchqueue: make sure to serialize 'wqueue->defunct' properly
	tty: drivers/tty/, stop using tty_schedule_flip()
	tty: the rest, stop using tty_schedule_flip()
	tty: drop tty_schedule_flip()
	tty: extract tty_flip_buffer_commit() from tty_flip_buffer_push()
	tty: use new tty_insert_flip_string_and_push_buffer() in pty_write()
	net: usb: ax88179_178a needs FLAG_SEND_ZLP
	watch-queue: remove spurious double semicolon
	drm/amd/display: Don't lock connection_mutex for DMUB HPD
	drm/amd/display: invalid parameter check in dmub_hpd_callback
	x86/extable: Prefer local labels in .set directives
	KVM: x86: fix typo in __try_cmpxchg_user causing non-atomicness
	x86: drop bogus "cc" clobber from __try_cmpxchg_user_asm()
	drm/amdgpu: Off by one in dm_dmub_outbox1_low_irq()
	x86/entry_32: Fix segment exceptions
	drm/amd/display: Fix wrong format specifier in amdgpu_dm.c
	Linux 5.15.58

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I6655a937b4226d3011278d13df84b25e5ab4b9ef
2022-08-02 08:37:15 +02:00
zhangchuang3
05d2bfcd32 ANDROID: binder: Export binder_txn_latency_free trace point
We use ANDROID_VENDOR_DATA to point to our custom data structure,
we need to free it by binder_txn_latency_free

Bug: 235773151

Signed-off-by: zhang chuang <zhangchuang3@xiaomi.com>
Change-Id: Ib6e9af5e52e13a658555908ac46d4b13904b1d0c
(cherry picked from commit 8db214e1e2b18178e2fec4e1ca246d05cb82f975)
2022-08-01 20:46:34 +00:00
Rick Yiu
b8545ebadd ANDROID: sched: Add vendor hook for rt util update
Vendor may have need to track rt util.

Bug: 201261299
Signed-off-by: Rick Yiu <rickyiu@google.com>
Change-Id: I2f4e5142c6bc8574ee3558042e1fb0dae13b702d
2022-08-01 13:20:13 +00:00
Rick Yiu
e8762ad424 ANDROID: sched: Add vendor hook for util-update related functions
Vendor may have the need to implement their own util tracking.

Bug: 201260585
Signed-off-by: Rick Yiu <rickyiu@google.com>
Change-Id: I973902e6ff82a85ecd029ac5a78692d629df1ebe
2022-08-01 13:19:59 +00:00
Greg Kroah-Hartman
7d8048d4e0 Linux 5.15.58
Link: https://lore.kernel.org/r/20220727161026.977588183@linuxfoundation.org
Tested-by: Florian Fainelli <f.fainelli@gmail.com>
Tested-by: Linux Kernel Functional Testing <lkft@linaro.org>
Tested-by: Bagas Sanjaya <bagasdotme@gmail.com>
Tested-by: Jon Hunter <jonathanh@nvidia.com>
Tested-by: Shuah Khan <skhan@linuxfoundation.org>
Link: https://lore.kernel.org/r/20220728133327.660846209@linuxfoundation.org
Tested-by: Jon Hunter <jonathanh@nvidia.com>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Tested-by: Ron Economos <re@w6rz.net>
Tested-by: Bagas Sanjaya <bagasdotme@gmail.com>
Tested-by: Linux Kernel Functional Testing <lkft@linaro.org>
Tested-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-07-29 17:25:34 +02:00
Hayden Goodfellow
c6e4817ab6 drm/amd/display: Fix wrong format specifier in amdgpu_dm.c
commit 655c167edc upstream.

[Why]
Currently, the 32bit kernel build fails due to an incorrect string
format specifier. ARRAY_SIZE() returns size_t type as it uses sizeof().
However, we specify it in a string as %ld. This causes a compiler error
and causes the 32bit build to fail.

[How]
Change the %ld to %zu as size_t (which sizeof() returns) is an unsigned
integer data type. We use 'z' to ensure it also works with 64bit build.

Reviewed-by: Harry Wentland <Harry.Wentland@amd.com>
Acked-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Hayden Goodfellow <Hayden.Goodfellow@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-07-29 17:25:33 +02:00
Peter Zijlstra
198a6f4082 x86/entry_32: Fix segment exceptions
commit 9cdbeec409 upstream.

The LKP robot reported that commit in Fixes: caused a failure. Turns out
the ldt_gdt_32 selftest turns into an infinite loop trying to clear the
segment.

As discovered by Sean, what happens is that PARANOID_EXIT_TO_KERNEL_MODE
in the handle_exception_return path overwrites the entry stack data with
the task stack data, restoring the "bad" segment value.

Instead of having the exception retry the instruction, have it emulate
the full instruction. Replace EX_TYPE_POP_ZERO with EX_TYPE_POP_REG
which will do the equivalent of: POP %reg; MOV $imm, %reg.

In order to encode the segment registers, add them as registers 8-11 for
32-bit.

By setting regs->[defg]s the (nested) RESTORE_REGS will pop this value
at the end of the exception handler and by increasing regs->sp, it will
have skipped the stack slot.

This was debugged by Sean Christopherson <seanjc@google.com>.

 [ bp: Add EX_REG_GS too. ]

Fixes: aa93e2ad74 ("x86/entry_32: Remove .fixup usage")
Reported-by: kernel test robot <oliver.sang@intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lore.kernel.org/r/Yd1l0gInc4zRcnt/@hirez.programming.kicks-ass.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-07-29 17:25:33 +02:00
Dan Carpenter
ec9ec3bc08 drm/amdgpu: Off by one in dm_dmub_outbox1_low_irq()
commit a35faec3db upstream.

The > ARRAY_SIZE() should be >= ARRAY_SIZE() to prevent an out of bounds
access.

Fixes: e27c41d5b0 ("drm/amd/display: Support for DMUB HPD interrupt handling")
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-07-29 17:25:33 +02:00
Jan Beulich
e4481000ac x86: drop bogus "cc" clobber from __try_cmpxchg_user_asm()
commit 1df931d95f upstream.

As noted (and fixed) a couple of times in the past, "=@cc<cond>" outputs
and clobbering of "cc" don't work well together. The compiler appears to
mean to reject such, but doesn't - in its upstream form - quite manage
to yet for "cc". Furthermore two similar macros don't clobber "cc", and
clobbering "cc" is pointless in asm()-s for x86 anyway - the compiler
always assumes status flags to be clobbered there.

Fixes: 989b5db215 ("x86/uaccess: Implement macros for CMPXCHG on user addresses")
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Message-Id: <485c0c0b-a3a7-0b7c-5264-7d00c01de032@suse.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-07-29 17:25:33 +02:00