Commit Graph

990712 Commits

Author SHA1 Message Date
Greg Kroah-Hartman
78df4e8f81 Merge 5.10.124 into android13-5.10-lts
Changes in 5.10.124
	9p: missing chunk of "fs/9p: Don't update file type when updating file attributes"
	nfsd: Replace use of rwsem with errseq_t
	bpf: Fix incorrect memory charge cost calculation in stack_map_alloc()
	arm64: dts: imx8mm-beacon: Enable RTS-CTS on UART3
	powerpc/kasan: Silence KASAN warnings in __get_wchan()
	ASoC: nau8822: Add operation for internal PLL off and on
	dma-debug: make things less spammy under memory pressure
	ASoC: cs42l52: Fix TLV scales for mixer controls
	ASoC: cs35l36: Update digital volume TLV
	ASoC: cs53l30: Correct number of volume levels on SX controls
	ASoC: cs42l52: Correct TLV for Bypass Volume
	ASoC: cs42l56: Correct typo in minimum level for SX volume controls
	ASoC: cs42l51: Correct minimum value for SX volume control
	ata: libata-core: fix NULL pointer deref in ata_host_alloc_pinfo()
	quota: Prevent memory allocation recursion while holding dq_lock
	ASoC: wm8962: Fix suspend while playing music
	ASoC: es8328: Fix event generation for deemphasis control
	ASoC: wm_adsp: Fix event generation for wm_adsp_fw_put()
	Input: soc_button_array - also add Lenovo Yoga Tablet2 1051F to dmi_use_low_level_irq
	scsi: vmw_pvscsi: Expand vcpuHint to 16 bits
	scsi: lpfc: Fix port stuck in bypassed state after LIP in PT2PT topology
	scsi: lpfc: Allow reduced polling rate for nvme_admin_async_event cmd completion
	scsi: ipr: Fix missing/incorrect resource cleanup in error case
	scsi: pmcraid: Fix missing resource cleanup in error case
	ALSA: hda/realtek - Add HW8326 support
	virtio-mmio: fix missing put_device() when vm_cmdline_parent registration failed
	nfc: nfcmrvl: Fix memory leak in nfcmrvl_play_deferred
	ipv6: Fix signed integer overflow in l2tp_ip6_sendmsg
	net: ethernet: mtk_eth_soc: fix misuse of mem alloc interface netdev[napi]_alloc_frag
	mellanox: mlx5: avoid uninitialized variable warning with gcc-12
	MIPS: Loongson-3: fix compile mips cpu_hwmon as module build error.
	gpio: dwapb: Don't print error on -EPROBE_DEFER
	random: credit cpu and bootloader seeds by default
	pNFS: Don't keep retrying if the server replied NFS4ERR_LAYOUTUNAVAILABLE
	pNFS: Avoid a live lock condition in pnfs_update_layout()
	clocksource: hyper-v: unexport __init-annotated hv_init_clocksource()
	i40e: Fix adding ADQ filter to TC0
	i40e: Fix calculating the number of queue pairs
	i40e: Fix call trace in setup_tx_descriptors
	Drivers: hv: vmbus: Release cpu lock in error case
	tty: goldfish: Fix free_irq() on remove
	misc: atmel-ssc: Fix IRQ check in ssc_probe
	drm/i915/reset: Fix error_state_read ptr + offset use
	nvme: use sysfs_emit instead of sprintf
	nvme: add device name to warning in uuid_show()
	mlxsw: spectrum_cnt: Reorder counter pools
	net: bgmac: Fix an erroneous kfree() in bgmac_remove()
	net: ax25: Fix deadlock caused by skb_recv_datagram in ax25_recvmsg
	arm64: ftrace: fix branch range checks
	arm64: ftrace: consistently handle PLTs.
	certs/blacklist_hashes.c: fix const confusion in certs blacklist
	block: Fix handling of offline queues in blk_mq_alloc_request_hctx()
	faddr2line: Fix overlapping text section failures, the sequel
	i2c: npcm7xx: Add check for platform_driver_register
	irqchip/gic/realview: Fix refcount leak in realview_gic_of_init
	irqchip/gic-v3: Fix error handling in gic_populate_ppi_partitions
	irqchip/gic-v3: Fix refcount leak in gic_populate_ppi_partitions
	i2c: designware: Use standard optional ref clock implementation
	mei: me: add raptor lake point S DID
	comedi: vmk80xx: fix expression for tx buffer size
	crypto: memneq - move into lib/
	USB: serial: option: add support for Cinterion MV31 with new baseline
	USB: serial: io_ti: add Agilent E5805A support
	usb: dwc2: Fix memory leak in dwc2_hcd_init
	usb: gadget: lpc32xx_udc: Fix refcount leak in lpc32xx_udc_probe
	serial: 8250: Store to lsr_save_flags after lsr read
	dm mirror log: round up region bitmap size to BITS_PER_LONG
	drm/amd/display: Cap OLED brightness per max frame-average luminance
	ext4: fix bug_on ext4_mb_use_inode_pa
	ext4: make variable "count" signed
	ext4: add reserved GDT blocks check
	KVM: arm64: Don't read a HW interrupt pending state in user context
	KVM: x86: Account a variety of miscellaneous allocations
	KVM: SVM: Use kzalloc for sev ioctl interfaces to prevent kernel data leak
	ALSA: hda/realtek: fix right sounds and mute/micmute LEDs for HP machine
	virtio-pci: Remove wrong address verification in vp_del_vqs()
	dma-direct: don't over-decrypt memory
	net/sched: act_police: more accurate MTU policing
	net: openvswitch: fix misuse of the cached connection on tuple changes
	Revert "PCI: Make pci_enable_ptm() private"
	igc: Enable PCIe PTM
	powerpc/book3e: get rid of #include <generated/compile.h>
	clk: imx8mp: fix usb_root_clk parent
	Linux 5.10.124

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I987dc63a8a51c3310ee3a28be855ed9cb0e3d9b4
2022-08-10 16:50:42 +02:00
Greg Kroah-Hartman
139306ceb0 Merge 5.10.123 into android13-5.10-lts
Changes in 5.10.123
	Documentation: Add documentation for Processor MMIO Stale Data
	x86/speculation/mmio: Enumerate Processor MMIO Stale Data bug
	x86/speculation: Add a common function for MD_CLEAR mitigation update
	x86/speculation/mmio: Add mitigation for Processor MMIO Stale Data
	x86/bugs: Group MDS, TAA & Processor MMIO Stale Data mitigations
	x86/speculation/mmio: Enable CPU Fill buffer clearing on idle
	x86/speculation/mmio: Add sysfs reporting for Processor MMIO Stale Data
	x86/speculation/srbds: Update SRBDS mitigation selection
	x86/speculation/mmio: Reuse SRBDS mitigation for SBDS
	KVM: x86/speculation: Disable Fill buffer clear within guests
	x86/speculation/mmio: Print SMT warning
	Linux 5.10.123

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Id4ac331753976e27e181b50634b446dbf97092e1
2022-08-10 16:38:18 +02:00
Greg Kroah-Hartman
48f617349a Merge 5.10.122 into android13-5.10-lts
Changes in 5.10.122
	pcmcia: db1xxx_ss: restrict to MIPS_DB1XXX boards
	staging: greybus: codecs: fix type confusion of list iterator variable
	iio: adc: ad7124: Remove shift from scan_type
	lkdtm/bugs: Check for the NULL pointer after calling kmalloc
	tty: goldfish: Use tty_port_destroy() to destroy port
	tty: serial: owl: Fix missing clk_disable_unprepare() in owl_uart_probe
	tty: n_tty: Restore EOF push handling behavior
	tty: serial: fsl_lpuart: fix potential bug when using both of_alias_get_id and ida_simple_get
	usb: usbip: fix a refcount leak in stub_probe()
	usb: usbip: add missing device lock on tweak configuration cmd
	USB: storage: karma: fix rio_karma_init return
	usb: musb: Fix missing of_node_put() in omap2430_probe
	staging: fieldbus: Fix the error handling path in anybuss_host_common_probe()
	pwm: lp3943: Fix duty calculation in case period was clamped
	rpmsg: qcom_smd: Fix irq_of_parse_and_map() return value
	usb: dwc3: pci: Fix pm_runtime_get_sync() error checking
	misc: fastrpc: fix an incorrect NULL check on list iterator
	firmware: stratix10-svc: fix a missing check on list iterator
	usb: typec: mux: Check dev_set_name() return value
	iio: adc: stmpe-adc: Fix wait_for_completion_timeout return value check
	iio: proximity: vl53l0x: Fix return value check of wait_for_completion_timeout
	iio: adc: sc27xx: fix read big scale voltage not right
	iio: adc: sc27xx: Fine tune the scale calibration values
	rpmsg: qcom_smd: Fix returning 0 if irq_of_parse_and_map() fails
	phy: qcom-qmp: fix pipe-clock imbalance on power-on failure
	serial: sifive: Report actual baud base rather than fixed 115200
	coresight: cpu-debug: Replace mutex with mutex_trylock on panic notifier
	extcon: ptn5150: Add queue work sync before driver release
	soc: rockchip: Fix refcount leak in rockchip_grf_init
	clocksource/drivers/riscv: Events are stopped during CPU suspend
	rtc: mt6397: check return value after calling platform_get_resource()
	serial: meson: acquire port->lock in startup()
	serial: 8250_fintek: Check SER_RS485_RTS_* only with RS485
	serial: digicolor-usart: Don't allow CS5-6
	serial: rda-uart: Don't allow CS5-6
	serial: txx9: Don't allow CS5-6
	serial: sh-sci: Don't allow CS5-6
	serial: sifive: Sanitize CSIZE and c_iflag
	serial: st-asc: Sanitize CSIZE and correct PARENB for CS7
	serial: stm32-usart: Correct CSIZE, bits, and parity
	firmware: dmi-sysfs: Fix memory leak in dmi_sysfs_register_handle
	bus: ti-sysc: Fix warnings for unbind for serial
	driver: base: fix UAF when driver_attach failed
	driver core: fix deadlock in __device_attach
	watchdog: rti-wdt: Fix pm_runtime_get_sync() error checking
	watchdog: ts4800_wdt: Fix refcount leak in ts4800_wdt_probe
	ASoC: fsl_sai: Fix FSL_SAI_xDR/xFR definition
	clocksource/drivers/oxnas-rps: Fix irq_of_parse_and_map() return value
	s390/crypto: fix scatterwalk_unmap() callers in AES-GCM
	net: sched: fixed barrier to prevent skbuff sticking in qdisc backlog
	net: ethernet: mtk_eth_soc: out of bounds read in mtk_hwlro_get_fdir_entry()
	net: ethernet: ti: am65-cpsw-nuss: Fix some refcount leaks
	net: dsa: mv88e6xxx: Fix refcount leak in mv88e6xxx_mdios_register
	modpost: fix removing numeric suffixes
	jffs2: fix memory leak in jffs2_do_fill_super
	ubi: fastmap: Fix high cpu usage of ubi_bgt by making sure wl_pool not empty
	ubi: ubi_create_volume: Fix use-after-free when volume creation failed
	bpf: Fix probe read error in ___bpf_prog_run()
	riscv: read-only pages should not be writable
	net/smc: fixes for converting from "struct smc_cdc_tx_pend **" to "struct smc_wr_tx_pend_priv *"
	nfp: only report pause frame configuration for physical device
	sfc: fix considering that all channels have TX queues
	sfc: fix wrong tx channel offset with efx_separate_tx_channels
	net/mlx5: Don't use already freed action pointer
	net/mlx5: correct ECE offset in query qp output
	net/mlx5e: Update netdev features after changing XDP state
	net: sched: add barrier to fix packet stuck problem for lockless qdisc
	tcp: tcp_rtx_synack() can be called from process context
	gpio: pca953x: use the correct register address to do regcache sync
	afs: Fix infinite loop found by xfstest generic/676
	scsi: sd: Fix potential NULL pointer dereference
	tipc: check attribute length for bearer name
	driver core: Fix wait_for_device_probe() & deferred_probe_timeout interaction
	perf c2c: Fix sorting in percent_rmt_hitm_cmp()
	dmaengine: idxd: set DMA_INTERRUPT cap bit
	mips: cpc: Fix refcount leak in mips_cpc_default_phys_base
	bootconfig: Make the bootconfig.o as a normal object file
	tracing: Fix sleeping function called from invalid context on RT kernel
	tracing: Avoid adding tracer option before update_tracer_options
	iommu/arm-smmu: fix possible null-ptr-deref in arm_smmu_device_probe()
	iommu/arm-smmu-v3: check return value after calling platform_get_resource()
	f2fs: remove WARN_ON in f2fs_is_valid_blkaddr
	i2c: cadence: Increase timeout per message if necessary
	m68knommu: set ZERO_PAGE() to the allocated zeroed page
	m68knommu: fix undefined reference to `_init_sp'
	dmaengine: zynqmp_dma: In struct zynqmp_dma_chan fix desc_size data type
	NFSv4: Don't hold the layoutget locks across multiple RPC calls
	video: fbdev: hyperv_fb: Allow resolutions with size > 64 MB for Gen1
	video: fbdev: pxa3xx-gcu: release the resources correctly in pxa3xx_gcu_probe/remove()
	xprtrdma: treat all calls not a bcall when bc_serv is NULL
	netfilter: nat: really support inet nat without l3 address
	netfilter: nf_tables: delete flowtable hooks via transaction list
	powerpc/kasan: Force thread size increase with KASAN
	netfilter: nf_tables: always initialize flowtable hook list in transaction
	ata: pata_octeon_cf: Fix refcount leak in octeon_cf_probe
	netfilter: nf_tables: release new hooks on unsupported flowtable flags
	netfilter: nf_tables: memleak flow rule from commit path
	netfilter: nf_tables: bail out early if hardware offload is not supported
	xen: unexport __init-annotated xen_xlate_map_ballooned_pages()
	af_unix: Fix a data-race in unix_dgram_peer_wake_me().
	bpf, arm64: Clear prog->jited_len along prog->jited
	net: dsa: lantiq_gswip: Fix refcount leak in gswip_gphy_fw_list
	net/mlx4_en: Fix wrong return value on ioctl EEPROM query failure
	SUNRPC: Fix the calculation of xdr->end in xdr_get_next_encode_buffer()
	net: mdio: unexport __init-annotated mdio_bus_init()
	net: xfrm: unexport __init-annotated xfrm4_protocol_init()
	net: ipv6: unexport __init-annotated seg6_hmac_init()
	net/mlx5: Rearm the FW tracer after each tracer event
	net/mlx5: fs, fail conflicting actions
	ip_gre: test csum_start instead of transport header
	net: altera: Fix refcount leak in altera_tse_mdio_create
	drm: imx: fix compiler warning with gcc-12
	iio: dummy: iio_simple_dummy: check the return value of kstrdup()
	staging: rtl8712: fix a potential memory leak in r871xu_drv_init()
	iio: st_sensors: Add a local lock for protecting odr
	lkdtm/usercopy: Expand size of "out of frame" object
	tty: synclink_gt: Fix null-pointer-dereference in slgt_clean()
	tty: Fix a possible resource leak in icom_probe
	drivers: staging: rtl8192u: Fix deadlock in ieee80211_beacons_stop()
	drivers: staging: rtl8192e: Fix deadlock in rtllib_beacons_stop()
	USB: host: isp116x: check return value after calling platform_get_resource()
	drivers: tty: serial: Fix deadlock in sa1100_set_termios()
	drivers: usb: host: Fix deadlock in oxu_bus_suspend()
	USB: hcd-pci: Fully suspend across freeze/thaw cycle
	sysrq: do not omit current cpu when showing backtrace of all active CPUs
	usb: dwc2: gadget: don't reset gadget's driver->bus
	misc: rtsx: set NULL intfdata when probe fails
	extcon: Modify extcon device to be created after driver data is set
	clocksource/drivers/sp804: Avoid error on multiple instances
	staging: rtl8712: fix uninit-value in usb_read8() and friends
	staging: rtl8712: fix uninit-value in r871xu_drv_init()
	serial: msm_serial: disable interrupts in __msm_console_write()
	kernfs: Separate kernfs_pr_cont_buf and rename_lock.
	watchdog: wdat_wdt: Stop watchdog when rebooting the system
	md: protect md_unregister_thread from reentrancy
	scsi: myrb: Fix up null pointer access on myrb_cleanup()
	Revert "net: af_key: add check for pfkey_broadcast in function pfkey_process"
	ceph: allow ceph.dir.rctime xattr to be updatable
	drm/radeon: fix a possible null pointer dereference
	modpost: fix undefined behavior of is_arm_mapping_symbol()
	x86/cpu: Elide KCSAN for cpu_has() and friends
	jump_label,noinstr: Avoid instrumentation for JUMP_LABEL=n builds
	nbd: call genl_unregister_family() first in nbd_cleanup()
	nbd: fix race between nbd_alloc_config() and module removal
	nbd: fix io hung while disconnecting device
	s390/gmap: voluntarily schedule during key setting
	cifs: version operations for smb20 unneeded when legacy support disabled
	nodemask: Fix return values to be unsigned
	vringh: Fix loop descriptors check in the indirect cases
	scripts/gdb: change kernel config dumping method
	ALSA: hda/conexant - Fix loopback issue with CX20632
	ALSA: hda/realtek: Fix for quirk to enable speaker output on the Lenovo Yoga DuetITL 2021
	cifs: return errors during session setup during reconnects
	cifs: fix reconnect on smb3 mount types
	ata: libata-transport: fix {dma|pio|xfer}_mode sysfs files
	mmc: block: Fix CQE recovery reset success
	net: phy: dp83867: retrigger SGMII AN when link change
	nfc: st21nfca: fix incorrect validating logic in EVT_TRANSACTION
	nfc: st21nfca: fix memory leaks in EVT_TRANSACTION handling
	nfc: st21nfca: fix incorrect sizing calculations in EVT_TRANSACTION
	ixgbe: fix bcast packets Rx on VF after promisc removal
	ixgbe: fix unexpected VLAN Rx in promisc mode on VF
	Input: bcm5974 - set missing URB_NO_TRANSFER_DMA_MAP urb flag
	drm/bridge: analogix_dp: Support PSR-exit to disable transition
	drm/atomic: Force bridge self-refresh-exit on CRTC switch
	powerpc/32: Fix overread/overwrite of thread_struct via ptrace
	powerpc/mm: Switch obsolete dssall to .long
	interconnect: qcom: sc7180: Drop IP0 interconnects
	interconnect: Restore sync state by ignoring ipa-virt in provider count
	md/raid0: Ignore RAID0 layout if the second zone has only one device
	PCI: qcom: Fix pipe clock imbalance
	zonefs: fix handling of explicit_open option on mount
	dmaengine: idxd: add missing callback function to support DMA_INTERRUPT
	tcp: fix tcp_mtup_probe_success vs wrong snd_cwnd
	Linux 5.10.122

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I7e5a1ee0701c33542f046ce8e1a6bc927028fa7c
2022-08-10 16:24:44 +02:00
Greg Kroah-Hartman
807852e09a Revert "drm: fix EDID struct for old ARM OABI format"
This reverts commit 61bbbde9b6 which is
commit 47f15561b6 upstream.

It breaks the Android kernel ABI CRC signatures and is not needed for
Android devices, so it is safe to revert for now.  If it is determined
that it is needed in the future, it can be brought back in an
abi-preserving way.

Bug: 161946584
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ib4225a2aa2b9ad6eac9af856a6230eb34f2a42f4
2022-08-10 15:54:04 +02:00
Greg Kroah-Hartman
a60e0a6f71 Revert "mailbox: forward the hrtimer if not queued and under a lock"
This reverts commit bb2220e067 which is
commit bca1a10046 upstream.

It breaks the Android kernel ABI and is not needed for Android devices,
so it is safe to revert for now.  If it is determined that it is needed
in the future, it can be brought back in an abi-preserving way.

Bug: 161946584
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I5e9282790af470cf09d353c7e1e54e9f93f01d85
2022-08-10 15:53:36 +02:00
Greg Kroah-Hartman
5b92736e7d Revert "Bluetooth: Interleave with allowlist scan"
This reverts commit 5702c3c657 which is
commit c4f1f40816 upstream.

It breaks the Android kernel ABI and is not needed for Android devices,
so it is safe to revert for now.  If it is determined that it is needed
in the future, it can be brought back in an abi-preserving way.

Bug: 161946584
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I0931559c61d70d9750eae7c12cdcfe4485163a39
2022-08-10 14:44:32 +02:00
Greg Kroah-Hartman
28c1cdf9c7 Revert "Bluetooth: use inclusive language when filtering devices"
This reverts commit 792f8b0e74 which is
commit 3d4f9c0049 upstream.

It breaks the Android kernel ABI and is not needed for Android devices,
so it is safe to revert for now.  If it is determined that it is needed
in the future, it can be brought back in an abi-preserving way.

Bug: 161946584
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ie2af5f73a1726c05497d64b797a97fd4f6564383
2022-08-10 14:44:27 +02:00
Greg Kroah-Hartman
bb2fcc3cf4 Revert "Bluetooth: use hdev lock for accept_list and reject_list in conn req"
This reverts commit 8ace1e6355 which is
commit fb048cae51 upstream.

It breaks the Android kernel ABI and is not needed for Android devices,
so it is safe to revert for now.  If it is determined that it is needed
in the future, it can be brought back in an abi-preserving way.

Bug: 161946584
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I6593a06f315b0b5798602895e095e680f8dbd535
2022-08-10 14:44:21 +02:00
Greg Kroah-Hartman
80e1eb27f0 Revert "thermal/drivers/core: Use a char pointer for the cooling device name"
This reverts commit dcf5ffc91c which is
commit 5848376181 upstream.

It breaks the Android kernel ABI and is not needed for Android devices,
so it is safe to revert for now.  If it is determined that it is needed
in the future, it can be brought back in an abi-preserving way.

Bug: 161946584
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I1554f3e0e4972d5553d62dc7b994303708c617b5
2022-08-10 14:44:10 +02:00
Greg Kroah-Hartman
4c97277087 Revert "thermal/core: Fix memory leak in __thermal_cooling_device_register()"
This reverts commit 18530bedd2 which is
commit 98a160e898 upstream.

It breaks the Android kernel ABI and is not needed for Android devices,
so it is safe to revert for now.  If it is determined that it is needed
in the future, it can be brought back in an abi-preserving way.

Bug: 161946584
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Iba9a1c4019b19674fc3f9520b31e4e43be30c847
2022-08-10 14:44:05 +02:00
Greg Kroah-Hartman
c4ba093841 Revert "thermal/core: fix a UAF bug in __thermal_cooling_device_register()"
This reverts commit b132abaa65 which is
commit 0a5c26712f upstream.

It breaks the Android kernel ABI and is not needed for Android devices,
so it is safe to revert for now.  If it is determined that it is needed
in the future, it can be brought back in an abi-preserving way.

Bug: 161946584
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ibaaab9a23fa0cbb5b11204cd6dc59b29215ee8a1
2022-08-10 14:44:01 +02:00
Greg Kroah-Hartman
864e3e7bd2 Revert "thermal/core: Fix memory leak in the error path"
This reverts commit 54cdc10ac7 which is
commit d44616c6cc upstream.

It breaks the Android kernel ABI and is not needed for Android devices,
so it is safe to revert for now.  If it is determined that it is needed
in the future, it can be brought back in an abi-preserving way.

Bug: 161946584
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I83010322077db689f57ae26b2bc3775af944384f
2022-08-10 14:43:56 +02:00
Greg Kroah-Hartman
d5fcc446da Revert "ALSA: jack: Access input_dev under mutex"
This reverts commit e2b8681769 which is
commit 1b6a6fc528 upstream.

It breaks the Android kernel ABI and is not needed for Android devices,
so it is safe to revert for now.  If it is determined that it is needed
in the future, it can be brought back in an abi-preserving way.

Bug: 161946584
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I3b24427044ea6b385a2f686c71c6b239a3d00f18
2022-08-10 14:43:40 +02:00
Greg Kroah-Hartman
5d387312a9 Revert "gpiolib: of: Introduce hook for missing gpio-ranges"
This reverts commit cda45b715d which is
commit 3550bba25d upstream.

It breaks the Android kernel ABI and is not needed for Android devices,
so it is safe to revert for now.  If it is determined that it is needed
in the future, it can be brought back in an abi-preserving way.

Bug: 161946584
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I4039000cca532561dc7c02f31dfa8274620018b3
2022-08-10 14:43:29 +02:00
Greg Kroah-Hartman
cd906c69c4 Revert "pinctrl: bcm2835: implement hook for missing gpio-ranges"
This reverts commit ceb61ab22d which is
commit d2b67744fd upstream.

It breaks the Android kernel ABI and is not needed for Android devices,
so it is safe to revert for now.  If it is determined that it is needed
in the future, it can be brought back in an abi-preserving way.

Bug: 161946584
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I509752798a361ebe2b3e53df526099349b5aba81
2022-08-10 14:43:23 +02:00
Greg Kroah-Hartman
fa465efc10 Merge 5.10.121 into android13-5.10-lts
Changes in 5.10.121
	binfmt_flat: do not stop relocating GOT entries prematurely on riscv
	parisc/stifb: Implement fb_is_primary_device()
	riscv: Initialize thread pointer before calling C functions
	riscv: Fix irq_work when SMP is disabled
	ALSA: hda/realtek: Enable 4-speaker output for Dell XPS 15 9520 laptop
	ALSA: hda/realtek - Fix microphone noise on ASUS TUF B550M-PLUS
	ALSA: usb-audio: Cancel pending work at closing a MIDI substream
	USB: serial: option: add Quectel BG95 modem
	USB: new quirk for Dell Gen 2 devices
	usb: dwc3: gadget: Move null pinter check to proper place
	usb: core: hcd: Add support for deferring roothub registration
	cifs: when extending a file with falloc we should make files not-sparse
	xhci: Allow host runtime PM as default for Intel Alder Lake N xHCI
	Fonts: Make font size unsigned in font_desc
	parisc/stifb: Keep track of hardware path of graphics card
	x86/MCE/AMD: Fix memory leak when threshold_create_bank() fails
	perf/x86/intel: Fix event constraints for ICL
	ptrace/um: Replace PT_DTRACE with TIF_SINGLESTEP
	ptrace/xtensa: Replace PT_SINGLESTEP with TIF_SINGLESTEP
	ptrace: Reimplement PTRACE_KILL by always sending SIGKILL
	btrfs: add "0x" prefix for unsupported optional features
	btrfs: repair super block num_devices automatically
	iommu/vt-d: Add RPLS to quirk list to skip TE disabling
	drm/virtio: fix NULL pointer dereference in virtio_gpu_conn_get_modes
	mwifiex: add mutex lock for call in mwifiex_dfs_chan_sw_work_queue
	b43legacy: Fix assigning negative value to unsigned variable
	b43: Fix assigning negative value to unsigned variable
	ipw2x00: Fix potential NULL dereference in libipw_xmit()
	ipv6: fix locking issues with loops over idev->addr_list
	fbcon: Consistently protect deferred_takeover with console_lock()
	x86/platform/uv: Update TSC sync state for UV5
	ACPICA: Avoid cache flush inside virtual machines
	drm/komeda: return early if drm_universal_plane_init() fails.
	rcu-tasks: Fix race in schedule and flush work
	rcu: Make TASKS_RUDE_RCU select IRQ_WORK
	sfc: ef10: Fix assigning negative value to unsigned variable
	ALSA: jack: Access input_dev under mutex
	spi: spi-rspi: Remove setting {src,dst}_{addr,addr_width} based on DMA direction
	tools/power turbostat: fix ICX DRAM power numbers
	drm/amd/pm: fix double free in si_parse_power_table()
	ath9k: fix QCA9561 PA bias level
	media: venus: hfi: avoid null dereference in deinit
	media: pci: cx23885: Fix the error handling in cx23885_initdev()
	media: cx25821: Fix the warning when removing the module
	md/bitmap: don't set sb values if can't pass sanity check
	mmc: jz4740: Apply DMA engine limits to maximum segment size
	drivers: mmc: sdhci_am654: Add the quirk to set TESTCD bit
	scsi: megaraid: Fix error check return value of register_chrdev()
	scsi: ufs: Use pm_runtime_resume_and_get() instead of pm_runtime_get_sync()
	scsi: lpfc: Fix resource leak in lpfc_sli4_send_seq_to_ulp()
	ath11k: disable spectral scan during spectral deinit
	ASoC: Intel: bytcr_rt5640: Add quirk for the HP Pro Tablet 408
	drm/plane: Move range check for format_count earlier
	drm/amd/pm: fix the compile warning
	ath10k: skip ath10k_halt during suspend for driver state RESTARTING
	arm64: compat: Do not treat syscall number as ESR_ELx for a bad syscall
	drm: msm: fix error check return value of irq_of_parse_and_map()
	ipv6: Don't send rs packets to the interface of ARPHRD_TUNNEL
	net/mlx5: fs, delete the FTE when there are no rules attached to it
	ASoC: dapm: Don't fold register value changes into notifications
	mlxsw: spectrum_dcb: Do not warn about priority changes
	mlxsw: Treat LLDP packets as control
	drm/amdgpu/ucode: Remove firmware load type check in amdgpu_ucode_free_bo
	HID: bigben: fix slab-out-of-bounds Write in bigben_probe
	ASoC: tscs454: Add endianness flag in snd_soc_component_driver
	net: remove two BUG() from skb_checksum_help()
	s390/preempt: disable __preempt_count_add() optimization for PROFILE_ALL_BRANCHES
	perf/amd/ibs: Cascade pmu init functions' return value
	spi: stm32-qspi: Fix wait_cmd timeout in APM mode
	dma-debug: change allocation mode from GFP_NOWAIT to GFP_ATIOMIC
	ACPI: PM: Block ASUS B1400CEAE from suspend to idle by default
	ipmi:ssif: Check for NULL msg when handling events and messages
	ipmi: Fix pr_fmt to avoid compilation issues
	rtlwifi: Use pr_warn instead of WARN_ONCE
	media: rga: fix possible memory leak in rga_probe
	media: coda: limit frame interval enumeration to supported encoder frame sizes
	media: imon: reorganize serialization
	media: cec-adap.c: fix is_configuring state
	openrisc: start CPU timer early in boot
	nvme-pci: fix a NULL pointer dereference in nvme_alloc_admin_tags
	ASoC: rt5645: Fix errorenous cleanup order
	nbd: Fix hung on disconnect request if socket is closed before
	net: phy: micrel: Allow probing without .driver_data
	media: exynos4-is: Fix compile warning
	ASoC: max98357a: remove dependency on GPIOLIB
	ASoC: rt1015p: remove dependency on GPIOLIB
	can: mcp251xfd: silence clang's -Wunaligned-access warning
	x86/microcode: Add explicit CPU vendor dependency
	m68k: atari: Make Atari ROM port I/O write macros return void
	rxrpc: Return an error to sendmsg if call failed
	rxrpc, afs: Fix selection of abort codes
	eth: tg3: silence the GCC 12 array-bounds warning
	selftests/bpf: fix btf_dump/btf_dump due to recent clang change
	gfs2: use i_lock spin_lock for inode qadata
	IB/rdmavt: add missing locks in rvt_ruc_loopback
	ARM: dts: ox820: align interrupt controller node name with dtschema
	ARM: dts: s5pv210: align DMA channels with dtschema
	arm64: dts: qcom: msm8994: Fix BLSP[12]_DMA channels count
	PM / devfreq: rk3399_dmc: Disable edev on remove()
	crypto: ccree - use fine grained DMA mapping dir
	soc: ti: ti_sci_pm_domains: Check for null return of devm_kcalloc
	fs: jfs: fix possible NULL pointer dereference in dbFree()
	ARM: OMAP1: clock: Fix UART rate reporting algorithm
	powerpc/fadump: Fix fadump to work with a different endian capture kernel
	fat: add ratelimit to fat*_ent_bread()
	pinctrl: renesas: rzn1: Fix possible null-ptr-deref in sh_pfc_map_resources()
	ARM: versatile: Add missing of_node_put in dcscb_init
	ARM: dts: exynos: add atmel,24c128 fallback to Samsung EEPROM
	ARM: hisi: Add missing of_node_put after of_find_compatible_node
	PCI: Avoid pci_dev_lock() AB/BA deadlock with sriov_numvfs_store()
	tracing: incorrect isolate_mote_t cast in mm_vmscan_lru_isolate
	powerpc/powernv/vas: Assign real address to rx_fifo in vas_rx_win_attr
	powerpc/xics: fix refcount leak in icp_opal_init()
	powerpc/powernv: fix missing of_node_put in uv_init()
	macintosh/via-pmu: Fix build failure when CONFIG_INPUT is disabled
	powerpc/iommu: Add missing of_node_put in iommu_init_early_dart
	RDMA/hfi1: Prevent panic when SDMA is disabled
	drm: fix EDID struct for old ARM OABI format
	dt-bindings: display: sitronix, st7735r: Fix backlight in example
	ath11k: acquire ab->base_lock in unassign when finding the peer by addr
	ath9k: fix ar9003_get_eepmisc
	drm/edid: fix invalid EDID extension block filtering
	drm/bridge: adv7511: clean up CEC adapter when probe fails
	spi: qcom-qspi: Add minItems to interconnect-names
	ASoC: mediatek: Fix error handling in mt8173_max98090_dev_probe
	ASoC: mediatek: Fix missing of_node_put in mt2701_wm8960_machine_probe
	x86/delay: Fix the wrong asm constraint in delay_loop()
	drm/ingenic: Reset pixclock rate when parent clock rate changes
	drm/mediatek: Fix mtk_cec_mask()
	drm/vc4: hvs: Reset muxes at probe time
	drm/vc4: txp: Don't set TXP_VSTART_AT_EOF
	drm/vc4: txp: Force alpha to be 0xff if it's disabled
	libbpf: Don't error out on CO-RE relos for overriden weak subprogs
	bpf: Fix excessive memory allocation in stack_map_alloc()
	nl80211: show SSID for P2P_GO interfaces
	drm/komeda: Fix an undefined behavior bug in komeda_plane_add()
	drm: mali-dp: potential dereference of null pointer
	spi: spi-ti-qspi: Fix return value handling of wait_for_completion_timeout
	scftorture: Fix distribution of short handler delays
	net: dsa: mt7530: 1G can also support 1000BASE-X link mode
	NFC: NULL out the dev->rfkill to prevent UAF
	efi: Add missing prototype for efi_capsule_setup_info
	target: remove an incorrect unmap zeroes data deduction
	drbd: fix duplicate array initializer
	EDAC/dmc520: Don't print an error for each unconfigured interrupt line
	mtd: rawnand: denali: Use managed device resources
	HID: hid-led: fix maximum brightness for Dream Cheeky
	HID: elan: Fix potential double free in elan_input_configured
	drm/bridge: Fix error handling in analogix_dp_probe
	sched/fair: Fix cfs_rq_clock_pelt() for throttled cfs_rq
	spi: img-spfi: Fix pm_runtime_get_sync() error checking
	cpufreq: Fix possible race in cpufreq online error path
	ath9k_htc: fix potential out of bounds access with invalid rxstatus->rs_keyix
	media: hantro: Empty encoder capture buffers by default
	drm/panel: simple: Add missing bus flags for Innolux G070Y2-L01
	ALSA: pcm: Check for null pointer of pointer substream before dereferencing it
	inotify: show inotify mask flags in proc fdinfo
	fsnotify: fix wrong lockdep annotations
	of: overlay: do not break notify on NOTIFY_{OK|STOP}
	drm/msm/dpu: adjust display_v_end for eDP and DP
	scsi: ufs: qcom: Fix ufs_qcom_resume()
	scsi: ufs: core: Exclude UECxx from SFR dump list
	selftests/resctrl: Fix null pointer dereference on open failed
	libbpf: Fix logic for finding matching program for CO-RE relocation
	mtd: spi-nor: core: Check written SR value in spi_nor_write_16bit_sr_and_check()
	x86/pm: Fix false positive kmemleak report in msr_build_context()
	mtd: rawnand: cadence: fix possible null-ptr-deref in cadence_nand_dt_probe()
	x86/speculation: Add missing prototype for unpriv_ebpf_notify()
	ASoC: rk3328: fix disabling mclk on pclk probe failure
	perf tools: Add missing headers needed by util/data.h
	drm/msm/disp/dpu1: set vbif hw config to NULL to avoid use after memory free during pm runtime resume
	drm/msm/dp: stop event kernel thread when DP unbind
	drm/msm/dp: fix error check return value of irq_of_parse_and_map()
	drm/msm/dsi: fix error checks and return values for DSI xmit functions
	drm/msm/hdmi: check return value after calling platform_get_resource_byname()
	drm/msm/hdmi: fix error check return value of irq_of_parse_and_map()
	drm/msm: add missing include to msm_drv.c
	drm/panel: panel-simple: Fix proper bpc for AM-1280800N3TZQW-T00H
	drm/rockchip: vop: fix possible null-ptr-deref in vop_bind()
	perf tools: Use Python devtools for version autodetection rather than runtime
	virtio_blk: fix the discard_granularity and discard_alignment queue limits
	x86: Fix return value of __setup handlers
	irqchip/exiu: Fix acknowledgment of edge triggered interrupts
	irqchip/aspeed-i2c-ic: Fix irq_of_parse_and_map() return value
	irqchip/aspeed-scu-ic: Fix irq_of_parse_and_map() return value
	x86/mm: Cleanup the control_va_addr_alignment() __setup handler
	arm64: fix types in copy_highpage()
	regulator: core: Fix enable_count imbalance with EXCLUSIVE_GET
	drm/msm/dp: fix event thread stuck in wait_event after kthread_stop()
	drm/msm/mdp5: Return error code in mdp5_pipe_release when deadlock is detected
	drm/msm/mdp5: Return error code in mdp5_mixer_release when deadlock is detected
	drm/msm: return an error pointer in msm_gem_prime_get_sg_table()
	media: uvcvideo: Fix missing check to determine if element is found in list
	iomap: iomap_write_failed fix
	spi: spi-fsl-qspi: check return value after calling platform_get_resource_byname()
	Revert "cpufreq: Fix possible race in cpufreq online error path"
	regulator: qcom_smd: Fix up PM8950 regulator configuration
	perf/amd/ibs: Use interrupt regs ip for stack unwinding
	ath11k: Don't check arvif->is_started before sending management frames
	ASoC: fsl: Fix refcount leak in imx_sgtl5000_probe
	ASoC: mxs-saif: Fix refcount leak in mxs_saif_probe
	regulator: pfuze100: Fix refcount leak in pfuze_parse_regulators_dt
	ASoC: samsung: Use dev_err_probe() helper
	ASoC: samsung: Fix refcount leak in aries_audio_probe
	kselftest/cgroup: fix test_stress.sh to use OUTPUT dir
	scripts/faddr2line: Fix overlapping text section failures
	media: aspeed: Fix an error handling path in aspeed_video_probe()
	media: exynos4-is: Fix PM disable depth imbalance in fimc_is_probe
	media: st-delta: Fix PM disable depth imbalance in delta_probe
	media: exynos4-is: Change clk_disable to clk_disable_unprepare
	media: pvrusb2: fix array-index-out-of-bounds in pvr2_i2c_core_init
	media: vsp1: Fix offset calculation for plane cropping
	Bluetooth: fix dangling sco_conn and use-after-free in sco_sock_timeout
	Bluetooth: Interleave with allowlist scan
	Bluetooth: L2CAP: Rudimentary typo fixes
	Bluetooth: LL privacy allow RPA
	Bluetooth: use inclusive language in HCI role comments
	Bluetooth: use inclusive language when filtering devices
	Bluetooth: use hdev lock for accept_list and reject_list in conn req
	nvme: set dma alignment to dword
	m68k: math-emu: Fix dependencies of math emulation support
	lsm,selinux: pass flowi_common instead of flowi to the LSM hooks
	sctp: read sk->sk_bound_dev_if once in sctp_rcv()
	net: hinic: add missing destroy_workqueue in hinic_pf_to_mgmt_init
	ASoC: ti: j721e-evm: Fix refcount leak in j721e_soc_probe_*
	media: ov7670: remove ov7670_power_off from ov7670_remove
	media: staging: media: rkvdec: Make use of the helper function devm_platform_ioremap_resource()
	media: rkvdec: h264: Fix dpb_valid implementation
	media: rkvdec: h264: Fix bit depth wrap in pps packet
	ext4: reject the 'commit' option on ext2 filesystems
	drm/msm/a6xx: Fix refcount leak in a6xx_gpu_init
	drm: msm: fix possible memory leak in mdp5_crtc_cursor_set()
	x86/sev: Annotate stack change in the #VC handler
	drm/msm/dpu: handle pm_runtime_get_sync() errors in bind path
	drm/i915: Fix CFI violation with show_dynamic_id()
	thermal/drivers/bcm2711: Don't clamp temperature at zero
	thermal/drivers/broadcom: Fix potential NULL dereference in sr_thermal_probe
	thermal/drivers/core: Use a char pointer for the cooling device name
	thermal/core: Fix memory leak in __thermal_cooling_device_register()
	thermal/drivers/imx_sc_thermal: Fix refcount leak in imx_sc_thermal_probe
	ASoC: wm2000: fix missing clk_disable_unprepare() on error in wm2000_anc_transition()
	NFC: hci: fix sleep in atomic context bugs in nfc_hci_hcp_message_tx
	ASoC: max98090: Move check for invalid values before casting in max98090_put_enab_tlv()
	net: stmmac: selftests: Use kcalloc() instead of kzalloc()
	net: stmmac: fix out-of-bounds access in a selftest
	hv_netvsc: Fix potential dereference of NULL pointer
	rxrpc: Fix listen() setting the bar too high for the prealloc rings
	rxrpc: Don't try to resend the request if we're receiving the reply
	rxrpc: Fix overlapping ACK accounting
	rxrpc: Don't let ack.previousPacket regress
	rxrpc: Fix decision on when to generate an IDLE ACK
	net: huawei: hinic: Use devm_kcalloc() instead of devm_kzalloc()
	hinic: Avoid some over memory allocation
	net/smc: postpone sk_refcnt increment in connect()
	arm64: dts: rockchip: Move drive-impedance-ohm to emmc phy on rk3399
	memory: samsung: exynos5422-dmc: Avoid some over memory allocation
	ARM: dts: suniv: F1C100: fix watchdog compatible
	soc: qcom: smp2p: Fix missing of_node_put() in smp2p_parse_ipc
	soc: qcom: smsm: Fix missing of_node_put() in smsm_parse_ipc
	PCI: cadence: Fix find_first_zero_bit() limit
	PCI: rockchip: Fix find_first_zero_bit() limit
	PCI: dwc: Fix setting error return on MSI DMA mapping failure
	ARM: dts: ci4x10: Adapt to changes in imx6qdl.dtsi regarding fec clocks
	soc: qcom: llcc: Add MODULE_DEVICE_TABLE()
	KVM: nVMX: Leave most VM-Exit info fields unmodified on failed VM-Entry
	KVM: nVMX: Clear IDT vectoring on nested VM-Exit for double/triple fault
	platform/chrome: cros_ec: fix error handling in cros_ec_register()
	ARM: dts: imx6dl-colibri: Fix I2C pinmuxing
	platform/chrome: Re-introduce cros_ec_cmd_xfer and use it for ioctls
	can: xilinx_can: mark bit timing constants as const
	ARM: dts: stm32: Fix PHY post-reset delay on Avenger96
	ARM: dts: bcm2835-rpi-zero-w: Fix GPIO line name for Wifi/BT
	ARM: dts: bcm2837-rpi-cm3-io3: Fix GPIO line names for SMPS I2C
	ARM: dts: bcm2837-rpi-3-b-plus: Fix GPIO line name of power LED
	ARM: dts: bcm2835-rpi-b: Fix GPIO line names
	misc: ocxl: fix possible double free in ocxl_file_register_afu
	crypto: marvell/cesa - ECB does not IV
	gpiolib: of: Introduce hook for missing gpio-ranges
	pinctrl: bcm2835: implement hook for missing gpio-ranges
	arm: mediatek: select arch timer for mt7629
	powerpc/fadump: fix PT_LOAD segment for boot memory area
	mfd: ipaq-micro: Fix error check return value of platform_get_irq()
	scsi: fcoe: Fix Wstringop-overflow warnings in fcoe_wwn_from_mac()
	firmware: arm_scmi: Fix list protocols enumeration in the base protocol
	nvdimm: Fix firmware activation deadlock scenarios
	nvdimm: Allow overwrite in the presence of disabled dimms
	pinctrl: mvebu: Fix irq_of_parse_and_map() return value
	drivers/base/node.c: fix compaction sysfs file leak
	dax: fix cache flush on PMD-mapped pages
	drivers/base/memory: fix an unlikely reference counting issue in __add_memory_block()
	powerpc/8xx: export 'cpm_setbrg' for modules
	pinctrl: renesas: core: Fix possible null-ptr-deref in sh_pfc_map_resources()
	powerpc/idle: Fix return value of __setup() handler
	powerpc/4xx/cpm: Fix return value of __setup() handler
	ASoC: atmel-pdmic: Remove endianness flag on pdmic component
	ASoC: atmel-classd: Remove endianness flag on class d component
	proc: fix dentry/inode overinstantiating under /proc/${pid}/net
	ipc/mqueue: use get_tree_nodev() in mqueue_get_tree()
	PCI: imx6: Fix PERST# start-up sequence
	tty: fix deadlock caused by calling printk() under tty_port->lock
	crypto: sun8i-ss - rework handling of IV
	crypto: sun8i-ss - handle zero sized sg
	crypto: cryptd - Protect per-CPU resource by disabling BH.
	Input: sparcspkr - fix refcount leak in bbc_beep_probe
	PCI/AER: Clear MULTI_ERR_COR/UNCOR_RCV bits
	hwrng: omap3-rom - fix using wrong clk_disable() in omap_rom_rng_runtime_resume()
	powerpc/64: Only WARN if __pa()/__va() called with bad addresses
	powerpc/perf: Fix the threshold compare group constraint for power9
	macintosh: via-pmu and via-cuda need RTC_LIB
	powerpc/fsl_rio: Fix refcount leak in fsl_rio_setup
	mfd: davinci_voicecodec: Fix possible null-ptr-deref davinci_vc_probe()
	mailbox: forward the hrtimer if not queued and under a lock
	RDMA/hfi1: Prevent use of lock before it is initialized
	Input: stmfts - do not leave device disabled in stmfts_input_open
	OPP: call of_node_put() on error path in _bandwidth_supported()
	f2fs: fix dereference of stale list iterator after loop body
	iommu/mediatek: Add list_del in mtk_iommu_remove
	i2c: at91: use dma safe buffers
	cpufreq: mediatek: add missing platform_driver_unregister() on error in mtk_cpufreq_driver_init
	cpufreq: mediatek: Use module_init and add module_exit
	cpufreq: mediatek: Unregister platform device on exit
	MIPS: Loongson: Use hwmon_device_register_with_groups() to register hwmon
	i2c: at91: Initialize dma_buf in at91_twi_xfer()
	dmaengine: idxd: Fix the error handling path in idxd_cdev_register()
	NFS: Do not report EINTR/ERESTARTSYS as mapping errors
	NFS: fsync() should report filesystem errors over EINTR/ERESTARTSYS
	NFS: Do not report flush errors in nfs_write_end()
	NFS: Don't report errors from nfs_pageio_complete() more than once
	NFSv4/pNFS: Do not fail I/O when we fail to allocate the pNFS layout
	video: fbdev: clcdfb: Fix refcount leak in clcdfb_of_vram_setup
	dmaengine: stm32-mdma: remove GISR1 register
	dmaengine: stm32-mdma: rework interrupt handler
	dmaengine: stm32-mdma: fix chan initialization in stm32_mdma_irq_handler()
	iommu/amd: Increase timeout waiting for GA log enablement
	i2c: npcm: Fix timeout calculation
	i2c: npcm: Correct register access width
	i2c: npcm: Handle spurious interrupts
	i2c: rcar: fix PM ref counts in probe error paths
	perf c2c: Use stdio interface if slang is not supported
	perf jevents: Fix event syntax error caused by ExtSel
	f2fs: fix to avoid f2fs_bug_on() in dec_valid_node_count()
	f2fs: fix to do sanity check on block address in f2fs_do_zero_range()
	f2fs: fix to clear dirty inode in f2fs_evict_inode()
	f2fs: fix deadloop in foreground GC
	f2fs: don't need inode lock for system hidden quota
	f2fs: fix to do sanity check on total_data_blocks
	f2fs: fix fallocate to use file_modified to update permissions consistently
	f2fs: fix to do sanity check for inline inode
	wifi: mac80211: fix use-after-free in chanctx code
	iwlwifi: mvm: fix assert 1F04 upon reconfig
	fs-writeback: writeback_sb_inodes:Recalculate 'wrote' according skipped pages
	efi: Do not import certificates from UEFI Secure Boot for T2 Macs
	bfq: Split shared queues on move between cgroups
	bfq: Update cgroup information before merging bio
	bfq: Track whether bfq_group is still online
	ext4: fix use-after-free in ext4_rename_dir_prepare
	ext4: fix warning in ext4_handle_inode_extension
	ext4: fix bug_on in ext4_writepages
	ext4: filter out EXT4_FC_REPLAY from on-disk superblock field s_state
	ext4: fix bug_on in __es_tree_search
	ext4: verify dir block before splitting it
	ext4: avoid cycles in directory h-tree
	ACPI: property: Release subnode properties with data nodes
	tracing: Fix potential double free in create_var_ref()
	PCI/PM: Fix bridge_d3_blacklist[] Elo i2 overwrite of Gigabyte X299
	PCI: qcom: Fix runtime PM imbalance on probe errors
	PCI: qcom: Fix unbalanced PHY init on probe errors
	mm, compaction: fast_find_migrateblock() should return pfn in the target zone
	s390/perf: obtain sie_block from the right address
	dlm: fix plock invalid read
	dlm: fix missing lkb refcount handling
	ocfs2: dlmfs: fix error handling of user_dlm_destroy_lock
	scsi: dc395x: Fix a missing check on list iterator
	scsi: ufs: qcom: Add a readl() to make sure ref_clk gets enabled
	drm/amdgpu/cs: make commands with 0 chunks illegal behaviour.
	drm/etnaviv: check for reaped mapping in etnaviv_iommu_unmap_gem
	drm/nouveau/clk: Fix an incorrect NULL check on list iterator
	drm/nouveau/kms/nv50-: atom: fix an incorrect NULL check on list iterator
	drm/bridge: analogix_dp: Grab runtime PM reference for DP-AUX
	drm/i915/dsi: fix VBT send packet port selection for ICL+
	md: fix an incorrect NULL check in does_sb_need_changing
	md: fix an incorrect NULL check in md_reload_sb
	mtd: cfi_cmdset_0002: Move and rename chip_check/chip_ready/chip_good_for_write
	mtd: cfi_cmdset_0002: Use chip_ready() for write on S29GL064N
	media: coda: Fix reported H264 profile
	media: coda: Add more H264 levels for CODA960
	ima: remove the IMA_TEMPLATE Kconfig option
	Kconfig: Add option for asm goto w/ tied outputs to workaround clang-13 bug
	RDMA/hfi1: Fix potential integer multiplication overflow errors
	csky: patch_text: Fixup last cpu should be master
	irqchip/armada-370-xp: Do not touch Performance Counter Overflow on A375, A38x, A39x
	irqchip: irq-xtensa-mx: fix initial IRQ affinity
	cfg80211: declare MODULE_FIRMWARE for regulatory.db
	mac80211: upgrade passive scan to active scan on DFS channels after beacon rx
	um: chan_user: Fix winch_tramp() return value
	um: Fix out-of-bounds read in LDT setup
	kexec_file: drop weak attribute from arch_kexec_apply_relocations[_add]
	ftrace: Clean up hash direct_functions on register failures
	iommu/msm: Fix an incorrect NULL check on list iterator
	nodemask.h: fix compilation error with GCC12
	hugetlb: fix huge_pmd_unshare address update
	xtensa/simdisk: fix proc_read_simdisk()
	rtl818x: Prevent using not initialized queues
	ASoC: rt5514: Fix event generation for "DSP Voice Wake Up" control
	carl9170: tx: fix an incorrect use of list iterator
	stm: ltdc: fix two incorrect NULL checks on list iterator
	bcache: improve multithreaded bch_btree_check()
	bcache: improve multithreaded bch_sectors_dirty_init()
	bcache: remove incremental dirty sector counting for bch_sectors_dirty_init()
	bcache: avoid journal no-space deadlock by reserving 1 journal bucket
	serial: pch: don't overwrite xmit->buf[0] by x_char
	tilcdc: tilcdc_external: fix an incorrect NULL check on list iterator
	gma500: fix an incorrect NULL check on list iterator
	arm64: dts: qcom: ipq8074: fix the sleep clock frequency
	phy: qcom-qmp: fix struct clk leak on probe errors
	ARM: dts: s5pv210: Remove spi-cs-high on panel in Aries
	ARM: pxa: maybe fix gpio lookup tables
	SMB3: EBADF/EIO errors in rename/open caused by race condition in smb2_compound_op
	docs/conf.py: Cope with removal of language=None in Sphinx 5.0.0
	dt-bindings: gpio: altera: correct interrupt-cells
	vdpasim: allow to enable a vq repeatedly
	blk-iolatency: Fix inflight count imbalances and IO hangs on offline
	coresight: core: Fix coresight device probe failure issue
	phy: qcom-qmp: fix reset-controller leak on probe errors
	net: ipa: fix page free in ipa_endpoint_trans_release()
	net: ipa: fix page free in ipa_endpoint_replenish_one()
	xfs: set inode size after creating symlink
	xfs: sync lazy sb accounting on quiesce of read-only mounts
	xfs: fix chown leaking delalloc quota blocks when fssetxattr fails
	xfs: fix incorrect root dquot corruption error when switching group/project quota types
	xfs: restore shutdown check in mapped write fault path
	xfs: force log and push AIL to clear pinned inodes when aborting mount
	xfs: consider shutdown in bmapbt cursor delete assert
	xfs: assert in xfs_btree_del_cursor should take into account error
	kseltest/cgroup: Make test_stress.sh work if run interactively
	thermal/core: fix a UAF bug in __thermal_cooling_device_register()
	thermal/core: Fix memory leak in the error path
	bfq: Avoid merging queues with different parents
	bfq: Drop pointless unlock-lock pair
	bfq: Remove pointless bfq_init_rq() calls
	bfq: Get rid of __bio_blkcg() usage
	bfq: Make sure bfqg for which we are queueing requests is online
	block: fix bio_clone_blkg_association() to associate with proper blkcg_gq
	Revert "random: use static branch for crng_ready()"
	RDMA/rxe: Generate a completion for unsupported/invalid opcode
	MIPS: IP27: Remove incorrect `cpu_has_fpu' override
	MIPS: IP30: Remove incorrect `cpu_has_fpu' override
	ext4: only allow test_dummy_encryption when supported
	md: bcache: check the return value of kzalloc() in detached_dev_do_request()
	Linux 5.10.121

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I3c3c3951b4c8ad9b113063a4d6a12910714a17f8
2022-08-05 14:25:17 +02:00
Greg Kroah-Hartman
972e02a437 ANDROID: GKI: update .xml file with new symbol needed for zsmalloc
Commit fae05b2314 ("zsmalloc: fix races between asynchronous zspage
free and page migration") in 5.15.45 changed the zsmalloc code to not
need the __lock_page symbol and rely on the wait_on_page_bit symbol.  So
add the new symbol to the virtual device list in order to fix the build
of that target platform.

Functions changes summary: 0 Removed, 0 Changed (2826 filtered out), 1 Added functions
Variables changes summary: 0 Removed, 0 Changed (183 filtered out), 0 Added variables

1 Added function:

  [A] 'function void wait_on_page_bit(page*, int)'

Fixes: fae05b2314 ("zsmalloc: fix races between asynchronous zspage free and page migration")
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ifce0569f798f53cff828a046d777d54096e58361
2022-08-03 15:05:54 +02:00
Greg Kroah-Hartman
f5dcc72927 ANDROID: GKI: fix up abi breakage in struct pipe_inode_info
In commit cd720fad8b ("pipe: make poll_usage boolean and annotate its
access") a field was changed from 'unsigned int' to 'bool' in struct
pipe_inode_info when it was determinied that the kernel was only
checking true/false for it.  This breaks the internal abi so put the
type back, while still keeping the original change that resolved a race
condition.

Bug: 161946584
Fixes: cd720fad8b ("pipe: make poll_usage boolean and annotate its access")
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: If5ebc17e4a198801e49257abef0f5e2ead94e668
2022-08-03 09:41:20 +02:00
Greg Kroah-Hartman
8f3dc62237 Merge 5.10.120 into android13-5.10-lts
Changes in 5.10.120
	pinctrl: sunxi: fix f1c100s uart2 function
	percpu_ref_init(): clean ->percpu_count_ref on failure
	net: af_key: check encryption module availability consistency
	nfc: pn533: Fix buggy cleanup order
	net: ftgmac100: Disable hardware checksum on AST2600
	i2c: ismt: Provide a DMA buffer for Interrupt Cause Logging
	drivers: i2c: thunderx: Allow driver to work with ACPI defined TWSI controllers
	netfilter: nf_tables: disallow non-stateful expression in sets earlier
	pipe: make poll_usage boolean and annotate its access
	pipe: Fix missing lock in pipe_resize_ring()
	cfg80211: set custom regdomain after wiphy registration
	assoc_array: Fix BUG_ON during garbage collect
	io_uring: don't re-import iovecs from callbacks
	io_uring: fix using under-expanded iters
	net: ipa: compute proper aggregation limit
	xfs: detect overflows in bmbt records
	xfs: show the proper user quota options
	xfs: fix the forward progress assertion in xfs_iwalk_run_callbacks
	xfs: fix an ABBA deadlock in xfs_rename
	xfs: Fix CIL throttle hang when CIL space used going backwards
	drm/i915: Fix -Wstringop-overflow warning in call to intel_read_wm_latency()
	exfat: check if cluster num is valid
	lib/crypto: add prompts back to crypto libraries
	crypto: drbg - prepare for more fine-grained tracking of seeding state
	crypto: drbg - track whether DRBG was seeded with !rng_is_initialized()
	crypto: drbg - move dynamic ->reseed_threshold adjustments to __drbg_seed()
	crypto: drbg - make reseeding from get_random_bytes() synchronous
	netfilter: nf_tables: sanitize nft_set_desc_concat_parse()
	netfilter: conntrack: re-fetch conntrack after insertion
	KVM: PPC: Book3S HV: fix incorrect NULL check on list iterator
	x86/kvm: Alloc dummy async #PF token outside of raw spinlock
	x86, kvm: use correct GFP flags for preemption disabled
	KVM: x86: avoid calling x86 emulator without a decoded instruction
	crypto: caam - fix i.MX6SX entropy delay value
	crypto: ecrdsa - Fix incorrect use of vli_cmp
	zsmalloc: fix races between asynchronous zspage free and page migration
	Bluetooth: hci_qca: Use del_timer_sync() before freeing
	ARM: dts: s5pv210: Correct interrupt name for bluetooth in Aries
	dm integrity: fix error code in dm_integrity_ctr()
	dm crypt: make printing of the key constant-time
	dm stats: add cond_resched when looping over entries
	dm verity: set DM_TARGET_IMMUTABLE feature flag
	raid5: introduce MD_BROKEN
	HID: multitouch: Add support for Google Whiskers Touchpad
	HID: multitouch: add quirks to enable Lenovo X12 trackpoint
	tpm: Fix buffer access in tpm2_get_tpm_pt()
	tpm: ibmvtpm: Correct the return value in tpm_ibmvtpm_probe()
	docs: submitting-patches: Fix crossref to 'The canonical patch format'
	NFS: Memory allocation failures are not server fatal errors
	NFSD: Fix possible sleep during nfsd4_release_lockowner()
	bpf: Fix potential array overflow in bpf_trampoline_get_progs()
	bpf: Enlarge offset check value to INT_MAX in bpf_skb_{load,store}_bytes
	Linux 5.10.120

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I3fc614b3f88df6d6e0eb9bc262f4ba3fcf3fdef4
2022-08-02 18:31:49 +02:00
Will McVicker
6d8de02237 ANDROID: random: fix CRC issues with the merge
The upstream commit 9342656c01 ("random: remove unused tracepoints")
removed the random.h tracepoints which lead to CRC differences for the
following symbols:

    add_random_ready_callback()
    del_random_ready_callback()

If I add back #includes <linux/writeback.h> which is what was included
by the random.h tracepoint header, then the CRCs match the original CRC
values for those two functions above. This is necessary to retain GKI
compatibility.

Fixes: 9342656c01 ("random: remove unused tracepoints")
Change-Id: I52422404ec46273cc686d1930102e066cef05eb0
Signed-off-by: Will McVicker <willmcvicker@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2022-08-02 14:01:12 +02:00
Greg Kroah-Hartman
1aff1ca4be ANDROID: change function signatures for some random functions.
In 5.10.119 the functions add_device_randomness() and get_random_bytes()
want from:
	void get_random_bytes(void *buf, int len);
		->
	void get_random_bytes(void *buf, size_t len);

	void add_device_randomness(const void *buf, unsigned int len);
		->
	void add_device_randomness(const void *buf, size_t len);

	int __must_check get_random_bytes_arch(void *buf, int len);
		->
	size_t __must_check get_random_bytes_arch(void *buf, size_t len);

As these functions are part of the GKI abi to be preserved, move them
back.  As these are just lengths of the buffer, all is fine with the
size, they should never overflow.

Bug: 161946584
Fixes: 07280d2c3f ("random: make more consistent use of integer types")
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I5430259958b9a904e6e8b950e11526332c919c0c
2022-08-02 14:01:12 +02:00
Jason A. Donenfeld
335b7342a1 ANDROID: cpu/hotplug: avoid breaking Android ABI by fusing cpuhp steps
We can't add more values to the cpuhp_state enum, lest we break some
vendor module. So instead break out existing steps into helper functions
which call both steps. Fortunately none of these steps return anything
other than 0, so we don't need to worry about rollback.

Bug: 161946584
Fixes: 5064550d42 ("random: clear fast pool, crng, and batches in cpuhp bring up")
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Icaa61291207d799bab741be7bab2b636cda09422
2022-08-02 14:01:12 +02:00
Greg Kroah-Hartman
cb817808c6 ANDROID: random: add back removed callback functions
Commit 6da877d2d4 ("random: replace custom notifier chain with
standard one") in 5.15.44 removed the add_random_ready_callback() and
del_random_ready_callback() functions, which are part of the current
Android ABI in this branch.  To handle this properly, add them back in
order for out-of-tree code to continue working.

Bug: 161946584
Fixes: 6da877d2d4 ("random: replace custom notifier chain with standard one")
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I422f3af1a28c5cf2e7f7806d6fb37d66901e3a33
2022-08-02 14:01:12 +02:00
Michal Kubecek
9829ff4f72 UPSTREAM: Revert "net: af_key: add check for pfkey_broadcast in function pfkey_process"
This reverts commit 4dc2a5a8f6.

A non-zero return value from pfkey_broadcast() does not necessarily mean
an error occurred as this function returns -ESRCH when no registered
listener received the message. In particular, a call with
BROADCAST_PROMISC_ONLY flag and null one_sk argument can never return
zero so that this commit in fact prevents processing any PF_KEY message.
One visible effect is that racoon daemon fails to find encryption
algorithms like aes and refuses to start.

Excluding -ESRCH return value would fix this but it's not obvious that
we really want to bail out here and most other callers of
pfkey_broadcast() also ignore the return value. Also, as pointed out by
Steffen Klassert, PF_KEY is kind of deprecated and newer userspace code
should use netlink instead so that we should only disturb the code for
really important fixes.

v2: add a comment explaining why is the return value ignored

Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
(cherry picked from commit 9c90c9b3e5)
Reported-by: Carlos Llamas <cmllamas@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ia2df29e35828d87edfc45fa3fe359e0a5a0fcb71
2022-08-02 14:01:12 +02:00
Justin M. Forbes
9e9e52e98e UPSTREAM: lib/crypto: add prompts back to crypto libraries
commit e56e189855 upstream.

Commit 6048fdcc5f ("lib/crypto: blake2s: include as built-in") took
away a number of prompt texts from other crypto libraries. This makes
values flip from built-in to module when oldconfig runs, and causes
problems when these crypto libs need to be built in for thingslike
BIG_KEYS.

Fixes: 6048fdcc5f ("lib/crypto: blake2s: include as built-in")
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: linux-crypto@vger.kernel.org
Signed-off-by: Justin M. Forbes <jforbes@fedoraproject.org>
[Jason: - moved menu into submenu of lib/ instead of root menu
        - fixed chacha sub-dependencies for CONFIG_CRYPTO]
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 630192aa45)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I9f92399d94f5b00408203ce4a9237925e7435ec1
2022-08-02 14:01:12 +02:00
Greg Kroah-Hartman
9ebc6036fd Merge 5.10.119 into android13-5.10-lts
Changes in 5.10.119
	lockdown: also lock down previous kgdb use
	staging: rtl8723bs: prevent ->Ssid overflow in rtw_wx_set_scan()
	KVM: x86: Properly handle APF vs disabled LAPIC situation
	KVM: x86/mmu: fix NULL pointer dereference on guest INVPCID
	tcp: change source port randomizarion at connect() time
	secure_seq: use the 64 bits of the siphash for port offset calculation
	media: vim2m: Register video device after setting up internals
	media: vim2m: initialize the media device earlier
	ACPI: sysfs: Make sparse happy about address space in use
	ACPI: sysfs: Fix BERT error region memory mapping
	random: avoid arch_get_random_seed_long() when collecting IRQ randomness
	random: remove dead code left over from blocking pool
	MAINTAINERS: co-maintain random.c
	MAINTAINERS: add git tree for random.c
	crypto: lib/blake2s - Move selftest prototype into header file
	crypto: blake2s - define shash_alg structs using macros
	crypto: x86/blake2s - define shash_alg structs using macros
	crypto: blake2s - remove unneeded includes
	crypto: blake2s - move update and final logic to internal/blake2s.h
	crypto: blake2s - share the "shash" API boilerplate code
	crypto: blake2s - optimize blake2s initialization
	crypto: blake2s - add comment for blake2s_state fields
	crypto: blake2s - adjust include guard naming
	crypto: blake2s - include <linux/bug.h> instead of <asm/bug.h>
	lib/crypto: blake2s: include as built-in
	lib/crypto: blake2s: move hmac construction into wireguard
	lib/crypto: sha1: re-roll loops to reduce code size
	lib/crypto: blake2s: avoid indirect calls to compression function for Clang CFI
	random: document add_hwgenerator_randomness() with other input functions
	random: remove unused irq_flags argument from add_interrupt_randomness()
	random: use BLAKE2s instead of SHA1 in extraction
	random: do not sign extend bytes for rotation when mixing
	random: do not re-init if crng_reseed completes before primary init
	random: mix bootloader randomness into pool
	random: harmonize "crng init done" messages
	random: use IS_ENABLED(CONFIG_NUMA) instead of ifdefs
	random: early initialization of ChaCha constants
	random: avoid superfluous call to RDRAND in CRNG extraction
	random: don't reset crng_init_cnt on urandom_read()
	random: fix typo in comments
	random: cleanup poolinfo abstraction
	random: cleanup integer types
	random: remove incomplete last_data logic
	random: remove unused extract_entropy() reserved argument
	random: rather than entropy_store abstraction, use global
	random: remove unused OUTPUT_POOL constants
	random: de-duplicate INPUT_POOL constants
	random: prepend remaining pool constants with POOL_
	random: cleanup fractional entropy shift constants
	random: access input_pool_data directly rather than through pointer
	random: selectively clang-format where it makes sense
	random: simplify arithmetic function flow in account()
	random: continually use hwgenerator randomness
	random: access primary_pool directly rather than through pointer
	random: only call crng_finalize_init() for primary_crng
	random: use computational hash for entropy extraction
	random: simplify entropy debiting
	random: use linear min-entropy accumulation crediting
	random: always wake up entropy writers after extraction
	random: make credit_entropy_bits() always safe
	random: remove use_input_pool parameter from crng_reseed()
	random: remove batched entropy locking
	random: fix locking in crng_fast_load()
	random: use RDSEED instead of RDRAND in entropy extraction
	random: get rid of secondary crngs
	random: inline leaves of rand_initialize()
	random: ensure early RDSEED goes through mixer on init
	random: do not xor RDRAND when writing into /dev/random
	random: absorb fast pool into input pool after fast load
	random: use simpler fast key erasure flow on per-cpu keys
	random: use hash function for crng_slow_load()
	random: make more consistent use of integer types
	random: remove outdated INT_MAX >> 6 check in urandom_read()
	random: zero buffer after reading entropy from userspace
	random: fix locking for crng_init in crng_reseed()
	random: tie batched entropy generation to base_crng generation
	random: remove ifdef'd out interrupt bench
	random: remove unused tracepoints
	random: add proper SPDX header
	random: deobfuscate irq u32/u64 contributions
	random: introduce drain_entropy() helper to declutter crng_reseed()
	random: remove useless header comment
	random: remove whitespace and reorder includes
	random: group initialization wait functions
	random: group crng functions
	random: group entropy extraction functions
	random: group entropy collection functions
	random: group userspace read/write functions
	random: group sysctl functions
	random: rewrite header introductory comment
	random: defer fast pool mixing to worker
	random: do not take pool spinlock at boot
	random: unify early init crng load accounting
	random: check for crng_init == 0 in add_device_randomness()
	random: pull add_hwgenerator_randomness() declaration into random.h
	random: clear fast pool, crng, and batches in cpuhp bring up
	random: round-robin registers as ulong, not u32
	random: only wake up writers after zap if threshold was passed
	random: cleanup UUID handling
	random: unify cycles_t and jiffies usage and types
	random: do crng pre-init loading in worker rather than irq
	random: give sysctl_random_min_urandom_seed a more sensible value
	random: don't let 644 read-only sysctls be written to
	random: replace custom notifier chain with standard one
	random: use SipHash as interrupt entropy accumulator
	random: make consistent usage of crng_ready()
	random: reseed more often immediately after booting
	random: check for signal and try earlier when generating entropy
	random: skip fast_init if hwrng provides large chunk of entropy
	random: treat bootloader trust toggle the same way as cpu trust toggle
	random: re-add removed comment about get_random_{u32,u64} reseeding
	random: mix build-time latent entropy into pool at init
	random: do not split fast init input in add_hwgenerator_randomness()
	random: do not allow user to keep crng key around on stack
	random: check for signal_pending() outside of need_resched() check
	random: check for signals every PAGE_SIZE chunk of /dev/[u]random
	random: allow partial reads if later user copies fail
	random: make random_get_entropy() return an unsigned long
	random: document crng_fast_key_erasure() destination possibility
	random: fix sysctl documentation nits
	init: call time_init() before rand_initialize()
	ia64: define get_cycles macro for arch-override
	s390: define get_cycles macro for arch-override
	parisc: define get_cycles macro for arch-override
	alpha: define get_cycles macro for arch-override
	powerpc: define get_cycles macro for arch-override
	timekeeping: Add raw clock fallback for random_get_entropy()
	m68k: use fallback for random_get_entropy() instead of zero
	riscv: use fallback for random_get_entropy() instead of zero
	mips: use fallback for random_get_entropy() instead of just c0 random
	arm: use fallback for random_get_entropy() instead of zero
	nios2: use fallback for random_get_entropy() instead of zero
	x86/tsc: Use fallback for random_get_entropy() instead of zero
	um: use fallback for random_get_entropy() instead of zero
	sparc: use fallback for random_get_entropy() instead of zero
	xtensa: use fallback for random_get_entropy() instead of zero
	random: insist on random_get_entropy() existing in order to simplify
	random: do not use batches when !crng_ready()
	random: use first 128 bits of input as fast init
	random: do not pretend to handle premature next security model
	random: order timer entropy functions below interrupt functions
	random: do not use input pool from hard IRQs
	random: help compiler out with fast_mix() by using simpler arguments
	siphash: use one source of truth for siphash permutations
	random: use symbolic constants for crng_init states
	random: avoid initializing twice in credit race
	random: move initialization out of reseeding hot path
	random: remove ratelimiting for in-kernel unseeded randomness
	random: use proper jiffies comparison macro
	random: handle latent entropy and command line from random_init()
	random: credit architectural init the exact amount
	random: use static branch for crng_ready()
	random: remove extern from functions in header
	random: use proper return types on get_random_{int,long}_wait()
	random: make consistent use of buf and len
	random: move initialization functions out of hot pages
	random: move randomize_page() into mm where it belongs
	random: unify batched entropy implementations
	random: convert to using fops->read_iter()
	random: convert to using fops->write_iter()
	random: wire up fops->splice_{read,write}_iter()
	random: check for signals after page of pool writes
	ALSA: ctxfi: Add SB046x PCI ID
	Linux 5.10.119

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I1544e958e791180f51d27dc39010468ed6551103
2022-08-02 14:00:36 +02:00
Greg Kroah-Hartman
64f18041dd Merge branch 'android13-5.10' into branch 'android13-5.10-lts'
Sync up with android13-5.10 for the following commits:

f677cbf076 ANDROID: GKI: include more type definitions in vendor hooks
2b35014fea ANDROID: fuse-bpf: Introduce readdirplus test case for fuse bpf
0559f8d2fd BACKPORT: nfc: nfcmrvl: main: reorder destructive operations in nfcmrvl_nci_unregister_dev to avoid bugs
2c8c8d03c1 ANDROID: fuse-bpf: Make sure force_again flag is false by default
4ad093cae1 ANDROID: fuse-bpf: Make inodes with backing_fd reachable for regular FUSE fuse_iget
6210ced850 BACKPORT: ptrace: Check PTRACE_O_SUSPEND_SECCOMP permission on PTRACE_SEIZE
da358e264c BACKPORT: locking: Add missing __sched attributes
4e1dd5a354 BACKPORT: ALSA: pcm: Fix races among concurrent prealloc proc writes
4e5367f25d BACKPORT: ALSA: pcm: Fix races among concurrent prepare and hw_params/hw_free calls
dd17ad6e7d BACKPORT: ALSA: pcm: Fix races among concurrent read/write and buffer changes
f39647e757 ANDROID: Fix up abi issue with struct snd_pcm_runtime
d7202e9cc4 BACKPORT: ALSA: pcm: Fix races among concurrent hw_params and hw_free calls
80b6ac8cf3 Revert "ANDROID: fuse-bpf: use target instead of parent inode to execute backing revalidate"
5d95acffca ANDROID: KVM: arm64: Fix error handling in pKVM FF-A proxy
854df93a7a ANDROID: GKI: Expose device async to userspace
18be5dcef3 FROMGIT: f2fs: fix iostat related lock protection
fc02d3582a BACKPORT: FROMLIST: dma-buf: Move sysfs work out of DMA-BUF export path
fca6ddffc8 ANDROID: vendor_hooks: add vendor hoook in current_alloc_flags()
45cb58e134 ANDROID: vendor_hooks: add vendor hoook to report acr_info in cma_alloc()
45d8a7d082 ANDROID: Enable GKI Dr. No Enforcement
06e6eb707d ANDROID: KVM: arm64: Prevent kmemleak from accessing .hyp.data
2f97e58fd2 BACKPORT: exfat: improve write performance when dirsync enabled
f8ca44396e FROMLIST: scsi: ufs: Fix a race between the interrupt handler and the reset handler
3e1a3ae036 FROMLIST: scsi: ufs: Support clearing multiple commands at once
986b493c4c FROMLIST: scsi: ufs: Simplify ufshcd_clear_cmd()
fe3b7f87c4 ANDROID: Adding Image.gz and boot-gz.img
e913814ab6 ANDROID: softirq: Refine RT defer softirq
043c58ffe0 ANDROID: binder: fix race in priority restore
d45e8f3336 ANDROID: binder: switch task argument for binder_thread
d4dce34fbb ANDROID: binder: pass desired priority by reference
e4f3cf6bdb ANDROID: binder: fold common setup of node_prio
a4e61a4805 ANDROID: Update the ABI representation
8d9e58e6f3 ANDROID: Update the ABI representation
19e41a3404 ANDROID: sched: Add vendor hook for cpu distribution functions
a08f978392 ANDROID: Update the ABI representation
4b895c556f BACKPORT: io_uring: fix race between timeout flush and removal
20c6e1ba55 ANDROID: KVM: arm64: Don't update IOMMUs unnecessarily
c84bdd74f8 ANDROID: Creating boot.img for x86_64 GKI
84b11bc9d4 ANDROID: Update the ABI representation
b5a54d8de2 BACKPORT: net/sched: cls_u32: fix netns refcount changes in u32_change()
d23166278e ANDROID: Update the ABI representation
13b6bd38bb ANDROID: mm: vh for compaction begin/end
d68ba8769b ANDROID: Fix the CONFIG_ANDROID_VENDOR_OEM_DATA=n build
2a6fab1479 ANDROID: Update the ABI representation
a1037b8e1b ANDROID: init_task: Init android vendor and oem data
bb697d4a01 FROMGIT: xfrm: do not set IPv4 DF flag when encapsulating IPv6 frames <= 1280 bytes.
812805ff3b UPSTREAM: io_uring: always use original task when preparing req identity
b610eff230 ANDROID: fuse-bpf: use target instead of parent inode to execute backing revalidate
1e48e8970c FROMLIST: remoteproc: Fix dma_mem leak after rproc_shutdown
91ad5ba0aa FROMLIST: dma-mapping: Add dma_release_coherent_memory to DMA API
6eece719b7 UPSTREAM: arm64: paravirt: Use RCU read locks to guard stolen_time
0db47d8194 Revert "FROMLIST: arm64: paravirt: Use RCU read locks to guard stolen_time"
e9dd78ebe1 FROMLIST: BACKPORT: mm: fix is_pinnable_page against on cma page
c0f1d79d13 ANDROID: Update the ABI representation
3676702251 ANDROID: Update the ABI representation
0ca85e35bf ANDROID: add vendor_hook to control CMA allocation ratio
1ccbb12b74 ANDROID: Creating boot-img.tar.gz for aarch64
5d08df9399 ANDROID: Update the ABI representation
f0cf55d4bd ANDROID: Update the ABI representation
45a00576f8 UPSTREAM: usb: dwc3: gadget: Move null pinter check to proper place
83962808e2 UPSTREAM: firmware_loader: use kernel credentials when reading firmware
f6243b50bb FROMGIT: dma-buf: ensure unique directory name for dmabuf stats
53cad4677c ANDROID: Update the ABI representation
9292423a3e BACKPORT: can: ems_usb: ems_usb_start_xmit(): fix double dev_kfree_skb() in error path
0944dd4741 ANDROID: arm64: Fix MMIO guard ioremap when called before slab_is_available().
65735b81dd ANDROID: sched: Add vendor hook for update_rq_clock_pelt
4acf9710ca ANDROID: Disable CFI on trace hooks
b6193c5685 ANDROID: KVM: arm64: pkvm: Ensure that TLBs and I-cache are private to each vcpu
729adca51a ANDROID: KVM: arm64: Remove stale shadow_handle field
bb4c6c0105 BACKPORT: can: usb_8dev: usb_8dev_start_xmit(): fix double dev_kfree_skb() in error path
4f1e1edb08 Revert "ANDROID: KVM: arm64: pkvm: Ensure that TLBs and I-cache are private to each vcpu"
273ad59b01 ANDROID: Update the ABI representation
9328b6c499 ANDROID: Update the ABI symbol list
207e72ba41 BACKPORT: esp: Fix possible buffer overflow in ESP transformation
46fc349c54 ANDROID: Update the ABI representation
45361b5a0f Revert "Revert "binder: Prevent context manager from incrementing ref 0""
346e46a9a3 UPSTREAM: scsi: ufs: core: Exclude UECxx from SFR dump list
f48d444fef FROMGIT: dma-buf: call dma_buf_stats_setup after dmabuf is in valid list
611d3745f3 ANDROID: mm: keep __get_user_pages_remote behavior
9afeef924c ANDROID: Update the ABI representation
ec9b4b8fff UPSTREAM: xfrm: fix tunnel model fragmentation behavior
42596c7b41 ANDROID: fix ABI breakage caused by per_cpu_pages
2eb3710ce5 ANDROID: fix ABI breakage caused by adding union type in struct page
fc19a77b2a FROMLIST: BACKPORT: mm/page_alloc: Remotely drain per-cpu lists
b71c6184df FROMLIST: BACKPORT: mm/page_alloc: Protect PCP lists with a spinlock
c249c40b79 FROMLIST: BACKPORT: mm/page_alloc: Split out buddy removal code from rmqueue into separate helper
a248d08a94 FROMLIST: BACKPORT: mm/page_alloc: Add page->buddy_list and page->pcp_list
e70a2e110b UPSTREAM: BACKPORT: mm/page_alloc: don't pass pfn to free_unref_page_commit()
5707719280 UPSTREAM: BACKPORT: mm/page_alloc: avoid conflating IRQs disabled with zone->lock
49f6aaf99d UPSTREAM: Revert "usb: dwc3: core: Add shutdown callback for dwc3"
721fb79e0e BACKPORT: staging: ion: Prevent incorrect reference counting behavour
0f6bc2b736 FROMGIT: net: fix wrong network header length
f6f08b9b18 UPSTREAM: mm: fix unexpected zeroed page mapping with zram swap
c607c61848 ANDROID: KVM: arm64: Fix for do not allow memslot changes after first VM run under pKVM
b9b94e2aca ANDROID: KVM: arm64: pkvm: Ensure that TLBs and I-cache are private to each vcpu
392241199b ANDROID: Update the ABI representation
cebb2c99be ANDROID: Update the ABI symbol list
10b114cc3c ANDROID: KVM: arm64: Export nvhe_hyp_panic_handler
67bef07aab FROMLIST: arm64: paravirt: Use RCU read locks to guard stolen_time
4dce9d7a65 ANDROID: clang: update to 14.0.7
43e6093d9d FROMGIT: KVM: arm64: Handle host stage-2 faults from 32-bit EL0
4eb197cb06 ANDROID: fix kernelci build issue for configfs module
3ed683cb94 ANDROID: gki - set CONFIG_USB_NET_AX88179_178A=y (usb gbit ethernet dongle)
277827dd5b ANDROID: fix KCFLAGS override by __ANDROID_COMMON_KERNEL__
4053a1e898 ANDROID: Add flag to indicate compiling against ACK
e78c5b621d UPSTREAM: mm: madvise: return correct bytes advised with process_madvise
5f9fb34d8b UPSTREAM: kfence, x86: fix preemptible warning on KPTI-enabled systems
a0046956bf BACKPORT: net/packet: fix slab-out-of-bounds access in packet_recvmsg()
06bb3003c6 BACKPORT: dm: fix NULL pointer issue when free bio
98c15b2bad ANDROID: dm-bow: Protect Ranges fetched and erased from the RB tree
6450df3d7e ANDROID: arm64: Auto-enroll MMIO guard on protected vms
3e591c63b1 ANDROID: cma: allow to use CMA in swap-in path
c56ecad172 UPSTREAM: f2fs: should not truncate blocks during roll-forward recovery
a50ef731e0 BACKPORT: media: v4l2-mem2mem: Apply DST_QUEUE_OFF_BASE on MMAP buffers across ioctls
0496c13ded ANDROID: GKI: build damon reclaim
b3190b539a FROMLIST: mm/damon/reclaim: Fix the timer always stays active
ca5cc6bc4c BACKPORT: treewide: Add missing includes masked by cgroup -> bpf dependency
891f111a14 UPSTREAM: mm/damon: modify damon_rand() macro to static inline function
284927effa UPSTREAM: mm/damon: add 'age' of region tracepoint support
3d89e63310 UPSTREAM: mm/damon: hide kernel pointer from tracepoint event
1656aa6e49 UPSTREAM: mm/damon/vaddr: hide kernel pointer from damon_va_three_regions() failure log
a0220f613b UPSTREAM: mm/damon/vaddr: use pr_debug() for damon_va_three_regions() failure logging
6be0ebcb89 UPSTREAM: mm/damon/dbgfs: remove an unnecessary variable
1b9e81febe UPSTREAM: mm/damon: move the implementation of damon_insert_region to damon.h
196600574b UPSTREAM: mm/damon: add access checking for hugetlb pages
2d885a4902 UPSTREAM: mm/damon/dbgfs: support all DAMOS stats
4baaaded13 UPSTREAM: mm/damon/reclaim: provide reclamation statistics
5388d0502f UPSTREAM: mm/damon/schemes: account how many times quota limit has exceeded
caa9694119 UPSTREAM: mm/damon/schemes: account scheme actions that successfully applied
cb7e28849d UPSTREAM: mm/damon: convert macro functions to static inline functions
e7b7a5370d UPSTREAM: mm/damon: move damon_rand() definition into damon.h
5fefa05ffd UPSTREAM: mm/damon/schemes: add the validity judgment of thresholds
1a8086a78e UPSTREAM: mm/damon/vaddr: remove swap_ranges() and replace it with swap()
ed97f2620f UPSTREAM: mm/damon: remove some unneeded function definitions in damon.h
0fb0a85d42 UPSTREAM: mm/damon/core: use abs() instead of diff_of()
df930c3b5d UPSTREAM: mm/damon: unified access_check function naming rules
b1ddf425f6 UPSTREAM: mm/damon/dbgfs: fix 'struct pid' leaks in 'dbgfs_target_ids_write()'
5529c8c7eb UPSTREAM: mm/damon/dbgfs: protect targets destructions with kdamond_lock
3de975028c UPSTREAM: mm/damon/vaddr-test: remove unnecessary variables
0a44e491b5 UPSTREAM: mm/damon/vaddr-test: split a test function having >1024 bytes frame size
a5405bc0f5 UPSTREAM: mm/damon/vaddr: remove an unnecessary warning message
04b67c5cf2 UPSTREAM: mm/damon/core: remove unnecessary error messages
1b77288b69 UPSTREAM: mm/damon/dbgfs: remove an unnecessary error message
5e31976171 UPSTREAM: mm/damon/core: use better timer mechanisms selection threshold
cce6ca2fa3 UPSTREAM: mm/damon/core: fix fake load reports due to uninterruptible sleeps
856b276105 BACKPORT: timers: implement usleep_idle_range()
4c721a7b6e UPSTREAM: mm/damon/dbgfs: fix missed use of damon_dbgfs_lock
48bd7c8963 UPSTREAM: mm/damon/dbgfs: use '__GFP_NOWARN' for user-specified size buffer allocation
90ba2d5488 UPSTREAM: mm/damon: remove return value from before_terminate callback
c8aa05a582 UPSTREAM: mm/damon: fix a few spelling mistakes in comments and a pr_debug message
8d31217aa0 UPSTREAM: mm/damon: simplify stop mechanism
c8f0959228 UPSTREAM: mm/damon/dbgfs: add adaptive_targets list check before enable monitor_on
2aafd45856 UPSTREAM: mm/damon: remove unnecessary variable initialization
b3b7318332 UPSTREAM: mm/damon: introduce DAMON-based Reclamation (DAMON_RECLAIM)
656bbf4bde UPSTREAM: selftests/damon: support watermarks
545df68814 UPSTREAM: mm/damon/dbgfs: support watermarks
62bd89b42a UPSTREAM: mm/damon/schemes: activate schemes based on a watermarks mechanism
f4a02dbcef UPSTREAM: tools/selftests/damon: update for regions prioritization of schemes
98260e4ee7 UPSTREAM: mm/damon/dbgfs: support prioritization weights
2b85e83330 UPSTREAM: mm/damon/vaddr,paddr: support pageout prioritization
76fb24657c UPSTREAM: mm/damon/schemes: prioritize regions within the quotas
6a0d2afdab UPSTREAM: mm/damon/selftests: support schemes quotas
350631992f UPSTREAM: mm/damon/dbgfs: support quotas of schemes
e2eee39ec1 UPSTREAM: mm/damon/schemes: implement time quota
a7e263a0c5 UPSTREAM: mm/damon/schemes: skip already charged targets and regions
51cd480dec UPSTREAM: mm/damon/schemes: implement size quota for schemes application speed control
78572870a2 UPSTREAM: mm/damon/paddr: support the pageout scheme
8d537db0f9 UPSTREAM: mm/damon/dbgfs: remove unnecessary variables
c525089abf UPSTREAM: mm/damon/vaddr: constify static mm_walk_ops
fd1bd69a67 UPSTREAM: mm/damon/dbgfs: support physical memory monitoring
2dc9fec10e UPSTREAM: mm/damon: implement primitives for physical address space monitoring
7dc7024f32 UPSTREAM: mm/damon/vaddr: separate commonly usable functions
319f3accc7 UPSTREAM: mm/damon/dbgfs-test: add a unit test case for 'init_regions'
2c807d1f1f UPSTREAM: mm/damon/dbgfs: allow users to set initial monitoring target regions
99510047c7 UPSTREAM: selftests/damon: add 'schemes' debugfs tests
fe2da2d930 UPSTREAM: mm/damon/schemes: implement statistics feature
59e4256bb0 UPSTREAM: mm/damon/dbgfs: support DAMON-based Operation Schemes
77091caf83 UPSTREAM: mm/damon/vaddr: support DAMON-based Operation Schemes
07cefe8b8c UPSTREAM: mm/damon/core: implement DAMON-based Operation Schemes (DAMOS)
a0a2eec57c UPSTREAM: mm/damon/core: account age of target regions
e5a92ffc76 UPSTREAM: mm/damon/core: nullify pointer ctx->kdamond with a NULL
f6a7b6527d UPSTREAM: mm/damon: needn't hold kdamond_lock to print pid of kdamond
7aa826a5df UPSTREAM: mm/damon: remove unnecessary do_exit() from kdamond
bbc7383c1f UPSTREAM: mm/damon/core: print kdamond start log in debug mode only
d09e6d4366 UPSTREAM: include/linux/damon.h: fix kernel-doc comments for 'damon_callback'
0492d06b2e UPSTREAM: mm/damon: grammar s/works/work/
e24d4d7d21 UPSTREAM: mm/damon/core-test: fix wrong expectations for 'damon_split_regions_of()'
729698e1ab UPSTREAM: mm/damon: don't use strnlen() with known-bogus source length
789928c5b6 UPSTREAM: mm/damon: add kunit tests
d3cff19d31 UPSTREAM: mm/damon: add user space selftests
ac418a7965 UPSTREAM: mm/damon/dbgfs: support multiple contexts
9fda42d2d6 UPSTREAM: mm/damon/dbgfs: export kdamond pid to the user space
c8ecb4f7a1 UPSTREAM: mm/damon: implement a debugfs-based user space interface
e415cf98cb UPSTREAM: mm/damon: add a tracepoint
75f4f6ebe9 UPSTREAM: mm/damon: implement primitives for the virtual memory address spaces
ad6156f833 UPSTREAM: mm/idle_page_tracking: make PG_idle reusable
f78eee74b4 UPSTREAM: mm/damon: adaptively adjust regions
40064a1877 UPSTREAM: mm/damon/core: implement region-based sampling
d1e43a5be8 UPSTREAM: mm: introduce Data Access MONitor (DAMON)
88e4dbaf59 ANDROID: Make MGLRU aware of speculative faults
e7c680add6 ANDROID: KVM: arm64: Prevent HVC calls outside of the core kernel text
32169780e8 ANDROID: fuse-bpf: Fix misuse of args.out_args
df2083258d ANDROID: Update the ABI representation
d7b1683f78 ANDROID: add __trace_bputs() to aarch64 ABI
f6c964af25 ANDROID: Suppress build.sh deprecation warnings.
5d6831add7 ANDROID: KVM: arm64: s2mpu: Allow r/o access to control regs
d5c0f0f937 ANDROID: KVM: arm64: s2mpu: Allow reading MPTC entries
e56d9603a6 ANDROID: KVM: arm64: s2mpu: Allow L1ENTRY_* r/o access
96767ad7be ANDROID: KVM: arm64: s2mpu: Refactor DABT handler
c43dfe89fe ANDROID: KVM: arm64: s2mpu: Extract L1ENTRY_* consts
7a9a532432 BACKPORT: ext4: don't BUG if someone dirty pages without asking ext4 first
c383610d0f UPSTREAM: binder: change error code from postive to negative in binder_transaction
d4d78c7278 ANDROID: fuse-bpf: Fix non-fusebpf build
9a5023967b ANDROID: fuse-bpf: Use fuse_bpf_args in uapi
92c8c21ad0 BACKPORT: nl80211: correctly check NL80211_ATTR_REG_ALPHA2 size
65533e0212 ANDROID: Update the ABI representation
a1013fd19b FROMLIST: kasan: mark KASAN_VMALLOC flags as kasan_vmalloc_flags_t
c098614509 FROMLIST: kasan: fix hw tags enablement when KUNIT tests are disabled
f60a0b3285 UPSTREAM: usb: dwc3: leave default DMA for PCI devices
3b508e8fe4 UPSTREAM: usb: dwc3: support 64 bit DMA in platform driver
03f40d5252 ANDROID: Update the ABI representation
6db38c5bbc FROMGIT: EXP rcu: Move expedited grace period (GP) work to RT kthread_worker
68c87a277c ANDROID: Update the ABI representation
699e6e3211 UPSTREAM: block: fix async_depth sysfs interface for mq-deadline
53ff5efb2c ANDROID: PCI/PM: Use usleep_range for d3hot_delay
609fa1be7a ANDROID: mm: page_pinner: fix elapsed time
d5d9a23576 ANDROID: mm: retry GUP with orignal gup_flags on failure
6acb261444 ANDROID: GKI: 4/15/2022 KMI freeze
a034320a68 ANDROID: add vendor fields to swap_slots_cache to support multiple swap devices
1b14ae01b0 ANDROID: add vendor fields to lruvec to record refault stats
af4eb0e377 ANDROID: add vendor fields to swap_info_struct to record swap stats
fae5207ecc ANDROID: scsi: ufs: Add suspend/resume SCSI command processing support
64293a57f1 ANDROID: scsi: ufs: Pass the clock scaling timeout as an argument
69014b2b36 ANDROID: scsi: ufs: Move a clock scaling check
aca52cabdb ANDROID: scsi: ufs: Reduce the clock scaling latency
00ed95fe93 FROMGIT: scsi: ufs: core: scsi_get_lba() error fix
c0a4aeb7aa FROMGIT: scsi: ufs: Fix runtime PM messages never-ending cycle
0cd3abcaa4 FROMGIT: scsi: core: sd: Add silence_suspend flag to suppress some PM messages
e46eb26194 FROMGIT: scsi: ufs: core: Remove wlun_dev_to_hba()
85d759e39a FROMGIT: scsi: ufs: Add checking lifetime attribute for WriteBooster
44b7a4f00f FROMGIT: scsi: ufs: Use generic error code in ufshcd_set_dev_pwr_mode()
aeedc78679 FROMGIT: scsi: ufs: ufs-mediatek: Fix error checking in ufs_mtk_init_va09_pwr_ctrl()
1fc4aef3d5 FROMGIT: scsi: ufs: Modify Tactive time setting conditions
d87405c2fe FROMGIT: scsi: ufs: ufs-pci: Add support for Intel ADL
b65cfd7b92 FROMGIT: scsi: ufs: ufs-mediatek: Add put_device() after of_find_device_by_node()
4f4bf31d39 FROMGIT: scsi: ufs: ufshpb: Fix warning in ufshpb_set_hpb_read_to_upiu()
acb0ef885c ANDROID: scsi: ufs: Minimize the difference with the upstream code
321995d280 ANDROID: GKI: build multi-gen LRU
306dbfb34c FROMLIST: mm: multi-gen LRU: design doc
8b006e4d1c FROMLIST: mm: multi-gen LRU: admin guide
3cf1dfaaa5 FROMLIST: mm: multi-gen LRU: debugfs interface
96f4a592d3 FROMLIST: mm: multi-gen LRU: thrashing prevention
76fdc1010b FROMLIST: mm: multi-gen LRU: kill switch
082bc8296a FROMLIST: mm: multi-gen LRU: optimize multiple memcgs
93c4f86793 FROMLIST: mm: multi-gen LRU: support page table walks
c8356f7573 FROMLIST: mm: multi-gen LRU: exploit locality in rmap
436dff20eb FROMLIST: mm: multi-gen LRU: minimal implementation
fe302bd1f9 FROMLIST: mm: multi-gen LRU: groundwork
4c6c817249 FROMLIST: mm/vmscan.c: refactor shrink_node()
95acc9c28b FROMLIST: mm: x86: add CONFIG_ARCH_HAS_NONLEAF_PMD_YOUNG
1ed19b562b FROMLIST: mm: x86, arm64: add arch_has_hw_pte_young()
b4f3b6ac71 UPSTREAM: include/linux/page-flags-layout.h: cleanups
2b286703d9 UPSTREAM: include/linux/page-flags-layout.h: correctly determine LAST_CPUPID_WIDTH
80343eeaf3 UPSTREAM: mm/swap: don't SetPageWorkingset unconditionally during swapin
0c20cff831 UPSTREAM: include/linux/mm_inline.h: fold page_lru_base_type() into its sole caller
aadc45fae6 BACKPORT: mm: VM_BUG_ON lru page flags
bcc2f50f7b BACKPORT: mm: add __clear_page_lru_flags() to replace page_off_lru()
552f416558 BACKPORT: mm/swap.c: don't pass "enum lru_list" to del_page_from_lru_list()
10899adee3 UPSTREAM: mm/swap.c: don't pass "enum lru_list" to trace_mm_lru_insertion()
c18b4f50ce BACKPORT: mm: don't pass "enum lru_list" to lru list addition functions
32ebee4382 BACKPORT: include/linux/mm_inline.h: shuffle lru list addition and deletion functions
885e11e970 BACKPORT: mm/vmscan.c: use add_page_to_lru_list()
75020bfbe2 ANDROID: Move BRANCH from build.config.common to .constants.
5ef1198a15 ANDROID: Update the ABI symbol list
0a227f89cf ANDROID: KVM: arm64: Do not allow memslot modifications once a PVM has run
8be6e93244 ANDROID: fuse-bpf: Fix read_iter
128ed57bca ANDROID: fuse-bpf: Use cache and refcount
8e24eb9a2d ANDROID: fuse-bpf: Rename iocb_fuse to iocb_orig
0f51319527 ANDROID: fuse-bpf: Fix fixattr in rename
0c37c1459a ANDROID: fuse-bpf: Fix readdir
68c9936883 ANDROID: clang: update to 14.0.4
7a197aa504 ANDROID: mm: fix build break
d9e4b67784 ANDROID: mm: freeing MIGRATE_ISOLATE page instantly
83aa7ef838 ANDROID: KVM: arm64: Fix size calculation of FFA memory range
2d2e0ad1d1 ANDROID: KVM: arm64: Pin FFA mailboxes shared by the host
b196350f2a ANDROID: fuse-bpf: Fix lseek return value for offset 0
bba21782c8 ANDROID: Update the ABI symbol list and xml
e5765b86ce ANDROID: GKI: set more vfs-only exports into their own namespace
74ff6e66d2 ANDROID: KVM: arm64: Fix ToCToU issue when refilling the hyp memcache
8fe46774c6 ANDROID: mm: page_pinner: remove dump_page_pinner
94c6c10c39 BACKPORT: mm, kasan: fix __GFP_BITS_SHIFT definition breaking LOCKDEP
7bfa608df5 UPSTREAM: kasan: test: support async (again) and asymm modes for HW_TAGS
4e56697b42 ANDROID: KVM: arm64: iommu: Optimize snapshot_host_stage2
174ac5b7c5 ANDROID: KVM: arm64: s2mpu: Initialize MPTs to PROT_RW
a946ac5ff5 ANDROID: KVM: arm64: iommu: Fix upper bound of PT walk
a63ec2bcac ANDROID: GKI: 4/6/2022 KMI update
ac3d413511 ANDROID: vendor_hooks: Reduce pointless modversions CRC churn
f33dc31c48 ANDROID: mm: gup: additional param in vendor hooks
16b4583a99 ANDROID: mm: page_pinner: fix build warning
01edbc91e2 ANDROID: mm: page_pinner: change pinner buffer size
b8a18e852e ANDROID: mm: page_pinner: remove static buffer
5c70ecb399 ANDROID: mm: page_pinner: remove longterm_pinner
e17f903a92 ANDROID: mm: page_pinner: change output format for alloc_contig_failed
a45f3891de ANDROID: mm: page_pinner refactoring
8e9a170748 FROMGIT: iommu/iova: Improve 32-bit free space estimate
34469ce1b4 ANDROID: KVM: arm64: pkvm: Track the SVE state in the shadow vcpu
7cea3ceefb ANDROID: KVM: arm64: Make the use of host or shadow vcpu less error prone
176c157bbe ANDROID: GKI: set vfs-only exports into their own namespace
21c7e202ac FROMLIST: export: fix string handling of namespace in EXPORT_SYMBOL_NS
fdf0178dba UPSTREAM: module.h: allow #define strings to work with MODULE_IMPORT_NS
7ba447d039 ANDROID: Update the ABI representation
8302ed7fba FROMGIT: arm64: head.S: Initialise MPAM EL2 registers and disable traps
5748592d14 ANDROID: arm64: Partial MPAM sysreg definition import
aadf7ad9db BACKPORT: virtio: pci: check bar values read from virtio config space
7e5df18bee UPSTREAM: Revert "virtio_pci: harden MSI-X interrupts"
c7912e3027 UPSTREAM: Revert "virtio-pci: harden INTX interrupts"
30d72758db FROMLIST: fuse: give wakeup hints to the scheduler
11e605185f ANDROID: KVM: arm64: Don't map host sections in pkvm
fce8d906cf ANDROID: KVM: arm64: Explicitely map kvm_vgic_global_state at EL2
6e12d67ad0 ANDROID: KVM: arm64: Unmap kvm_arm_hyp_percpu_base from the host
ae49ca9a17 ANDROID: KVM: arm64: pkvm: Don't access kvm_arm_hyp_percpu_base at EL1
b576a36a95 ANDROID: Update the ABI symbol list
4c3d004aa7 UPSTREAM: erofs: add sysfs interface
dc123bee94 Revert "ANDROID: dm-bow: Protect Ranges fetched and erased from the RB tree"
3f9db3f711 ANDROID: sched: Add vendor hook for rt util update
cd5c13796b ANDROID: Update the ABI symbol list
9859d2761e ANDROID: Add new pkvm_iommu_* functions to aarch64 ABI
8fd93b0ef9 ANDROID: KVM: arm64: iommu: Add pkvm_iommu_finalize
798c4ea545 ANDROID: KVM: arm64: iommu: No powered check in DABT handler
57381d548d ANDROID: KVM: arm64: s2mpu: Create SysMMU_SYNC driver
e69c61cf4e ANDROID: KVM: arm64: iommu: Create parent/child relation
be84f2c770 ANDROID: KVM: arm64: iommu: Run validate() on struct pkvm_iommu
e6574a68fa ANDROID: KVM: arm64: iommu: Create private mapping last
acb9a25416 ANDROID: KVM: arm64: iommu: Free memory on registration error
6eaed0b8b7 ANDROID: KVM: arm64: iommu: Harden __pkvm_iommu_pm_notify
a75cb9df82 ANDROID: KVM: arm64: Drop FOLL_FORCE when pinning guest memory pages
a246583fcc Revert "ANDROID: BACKPORT: KVM: arm64: Add initial support for KVM_CAP_EXIT_HYPERCALL"
bbe5c85592 Revert "ANDROID: KVM: arm64: Allow userspace to receive SHARE and UNSHARE notifications"
588affc843 BACKPORT: virtio-blk: Use blk_validate_block_size() to validate block size
fe0484006f ANDROID: Update the ABI representation
e3356ca0a6 ANDROID: sched: Add vendor hook for util-update related functions
ec7c9ea9d4 ANDROID: Update the ABI representation
982febefcd ANDROID: KVM: arm64: pkvm: Inject SIGSEGV on illegal accesses
e7b80adac2 ANDROID: KVM: arm64: Refactor enter_exception64()
91c32ff1fe ANDROID: KVM: arm64: Add is_pkvm_initialized() helper
ba73e0b827 ANDROID: KVM: arm64: Use PSCI MEM_PROTECT to zap guest pages on reset
40493bc91e ANDROID: KVM: arm64: Check pin_user_pages() return value
dbba49b6cb ANDROID: KVM: arm64: Handle all ID registers trapped for a protected VM
5c6f14f146 ANDROID: Update the ABI symbol list
373e5bd7d4 ANDROID: GKI: Enable BUILD_GKI_CERTIFICATION_TOOLS
83631772f3 ANDROID: usb: gadget: f_accessory: add compat_ioctl support
4443600ce1 UPSTREAM: mm: fix use-after-free when anon vma name is used after vma is freed
6962eb33d8 UPSTREAM: mm: prevent vm_area_struct::anon_name refcount saturation
9fbdc4b53f UPSTREAM: mm: refactor vm_area_struct::anon_vma_name usage code
6b94b8c3b7 ANDROID: KVM: arm64: Only map swap-backed pages into the guest
c8b5505153 ANDROID: Update the ABI representation
3101b49e5b ANDROID: clang: update to 14.0.3
93846ccca1 ANDROID: KVM: arm64: Invalidate TLB by VMID when tearing down the shadow VM
ed0dec098e ANDROID: gki_config: enable F2FS_UNFAIR_RWSEM
f8c415b6c2 Merge remote-tracking branch 'aosp/upstream-f2fs-stable-linux-5.10.y' into android13-5.10
cf9be86ac4 ANDROID: GKI: 3/23/2022 KMI update
e5315a20b2 ANDROID: GKI: enable macsec
7531264e68 ANDROID: Update the ABI symbol list
aea946bdf0 ANDROID: mm: gup: vendor hook in GUP friends
0375b0d297 ANDROID: selftests: incfs: Add umount helper function
5fdeabb1a2 ANDROID: selftests: incfs: skip large_file_test test is not enough free space
9a7faf669a ANDROID: Update the ABI symbol list
b6079b142e ANDROID: incremental-fs: limit mount stack depth
68980ff96c fscrypt: update documentation for direct I/O support
1654219723 f2fs: support direct I/O with fscrypt using blk-crypto
9f7cc5fda4 ext4: support direct I/O with fscrypt using blk-crypto
4b613cb0c4 iomap: support direct I/O with fscrypt using blk-crypto
b6da748bab fscrypt: add functions for direct I/O support
21557656af ANDROID: selftests: incfs: Add -fno-omit-frame-pointer
59e664cd0e f2fs: fix to do sanity check on .cp_pack_total_block_count
40185ceea1 f2fs: make gc_urgent and gc_segment_mode sysfs node readable
f1e8564c55 FROMLIST: kasan, scs: support tagged vmalloc mappings
c05355c5f8 ANDROID: kasan: sync vmalloc support with linux-next/akpm
2fce32030b f2fs: use aggressive GC policy during f2fs_disable_checkpoint()
9214367dd9 f2fs: fix compressed file start atomic write may cause data corruption
bb434bbb77 f2fs: initialize sbi->gc_mode explicitly
81a9c7d6ac f2fs: introduce gc_urgent_mid mode
13f1b8f147 f2fs: compress: fix to print raw data size in error path of lz4 decompression
bede94339a f2fs: remove redundant parameter judgment
4bab14807f f2fs: use spin_lock to avoid hang
e3d44a0028 f2fs: don't get FREEZE lock in f2fs_evict_inode in frozen fs
e182f50c16 f2fs: remove unnecessary read for F2FS_FITS_IN_INODE
e9e689047f f2fs: introduce F2FS_UNFAIR_RWSEM to support unfair rwsem
beebf94806 f2fs: avoid an infinite loop in f2fs_sync_dirty_inodes
266c3326ad f2fs: fix to do sanity check on curseg->alloc_type
7a711a5447 f2fs: fix to avoid potential deadlock
185e61d607 f2fs: quota: fix loop condition at f2fs_quota_sync()
150ce3cd60 f2fs: Restore rwsem lockdep support
c5feaf141e f2fs: fix missing free nid in f2fs_handle_failed_inode
421c7a5850 f2fs: add a way to limit roll forward recovery time
95c5bd71d4 f2fs: introduce F2FS_IPU_HONOR_OPU_WRITE ipu policy
a3bb3ae25e f2fs: adjust readahead block number during recovery
4af7ca6cc2 f2fs: fix to unlock page correctly in error path of is_alive()
7fa3e73d19 f2fs: expose discard related parameters in sysfs
7f148c6c55 f2fs: move discard parameters into discard_cmd_control
04e34c8449 f2fs: fix to enable ATGC correctly via gc_idle sysfs interface
c4454e2978 f2fs: move f2fs to use reader-unfair rwsems

And track more new symbols that were added to the 'android13-5.10' branch:

Leaf changes summary: 28 artifacts changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 18 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 10 Added variables

18 Added functions:

  [A] 'function int __traceiter_android_rvh_cpumask_any_and_distribute(void*, task_struct*, const cpumask*, const cpumask*, int*)'
  [A] 'function int __traceiter_android_rvh_update_rq_clock_pelt(void*, rq*, s64, bool*)'
  [A] 'function int __traceiter_android_vh_cma_alloc_adjust(void*, zone*, bool*)'
  [A] 'function int __traceiter_android_vh_dump_throttled_rt_tasks(void*, int, u64, ktime_t, u64, s64)'
  [A] 'function int __traceiter_android_vh_mm_compaction_begin(void*, compact_control*, long int*)'
  [A] 'function int __traceiter_android_vh_mm_compaction_end(void*, compact_control*, long int)'
  [A] 'function int __traceiter_android_vh_sched_setaffinity_early(void*, task_struct*, const cpumask*, int*)'
  [A] 'function int __traceiter_android_vh_show_max_freq(void*, cpufreq_policy*, unsigned int*)'
  [A] 'function int __traceiter_android_vh_ufs_update_sdev(void*, scsi_device*)'
  [A] 'function unsigned int cfg80211_vendor_cmd_get_sender(wiphy*)'
  [A] 'function int cpumask_any_and_distribute(const cpumask*, const cpumask*)'
  [A] 'function char* d_path(const path*, char*, int)'
  [A] 'function pid* find_vpid(int)'
  [A] 'function mm_struct* get_task_mm(task_struct*)'
  [A] 'function void lru_cache_disable()'
  [A] 'function void lru_cache_enable()'
  [A] 'function void mmput(mm_struct*)'
  [A] 'function int vprintk_emit(int, int, const dev_printk_info*, const char*, va_list)'

10 Added variables:

  [A] 'tracepoint __tracepoint_android_rvh_cpumask_any_and_distribute'
  [A] 'tracepoint __tracepoint_android_rvh_update_rq_clock_pelt'
  [A] 'tracepoint __tracepoint_android_vh_cma_alloc_adjust'
  [A] 'tracepoint __tracepoint_android_vh_dump_throttled_rt_tasks'
  [A] 'tracepoint __tracepoint_android_vh_mm_compaction_begin'
  [A] 'tracepoint __tracepoint_android_vh_mm_compaction_end'
  [A] 'tracepoint __tracepoint_android_vh_sched_setaffinity_early'
  [A] 'tracepoint __tracepoint_android_vh_show_max_freq'
  [A] 'tracepoint __tracepoint_android_vh_ufs_update_sdev'
  [A] 'unsigned long int freq_scale'

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ie158191bf4ee4639506c2adb7d8beebdca4923c2
2022-07-01 13:36:13 +02:00
Giuliano Procida
f677cbf076 ANDROID: GKI: include more type definitions in vendor hooks
In an effort to improve ABI coverage, type definitions are now pulled
into vendor hook by #including public and internal kernel headers
where possible.

Exceptional cases (due to build breakage):

* `struct cgroup_taskset` remains forward declared
* `struct uclamp_se` is available in public header but only
  conditionally, so it is forward declared as well

Note the changes are all conditional on ! __GENKSYMS__ so that
MODVERSIONS symbol CRCs remain the same.

Bug: 233047575
Change-Id: I8d11b9afb0136fe006772f07affa993e9a8d23d3
Signed-off-by: Giuliano Procida <gprocida@google.com>
2022-07-01 07:24:27 +00:00
Dmitrii Merkurev
2b35014fea ANDROID: fuse-bpf: Introduce readdirplus test case for
fuse bpf

Readdir plus is potentially dangerous place because
this leads us to allocate fuse inodes. If we have
problems with inode allocation and discovery we may
end up with inode conflict which may cause backing_fd
losing.

We currently have this problem and this test clearly
reproduce it.

More information about the problem:
go/fuse-loosing-inode-with-backing

Fixes for this problem:
https://android-review.googlesource.com/c/kernel/common/+/2135866
https://android-review.googlesource.com/c/kernel/common/+/2135457

Bug: 219958836
Test: Currently it’s fairly failed, after applying patches from
above it passed.
Co-developed-by: Paul Lawrence <paullawrence@google.com>

Change-Id: I8afb535605faffc9facf626d0c7d0f244dc8d28e
Signed-off-by: Dmitrii Merkurev <dimorinny@google.com>
2022-06-30 16:44:12 +00:00
Duoming Zhou
0559f8d2fd BACKPORT: nfc: nfcmrvl: main: reorder destructive operations in nfcmrvl_nci_unregister_dev to avoid bugs
commit d270453a0d upstream.

There are destructive operations such as nfcmrvl_fw_dnld_abort and
gpio_free in nfcmrvl_nci_unregister_dev. The resources such as firmware,
gpio and so on could be destructed while the upper layer functions such as
nfcmrvl_fw_dnld_start and nfcmrvl_nci_recv_frame is executing, which leads
to double-free, use-after-free and null-ptr-deref bugs.

There are three situations that could lead to double-free bugs.

The first situation is shown below:

   (Thread 1)                 |      (Thread 2)
nfcmrvl_fw_dnld_start         |
 ...                          |  nfcmrvl_nci_unregister_dev
 release_firmware()           |   nfcmrvl_fw_dnld_abort
  kfree(fw) //(1)             |    fw_dnld_over
                              |     release_firmware
  ...                         |      kfree(fw) //(2)
                              |     ...

The second situation is shown below:

   (Thread 1)                 |      (Thread 2)
nfcmrvl_fw_dnld_start         |
 ...                          |
 mod_timer                    |
 (wait a time)                |
 fw_dnld_timeout              |  nfcmrvl_nci_unregister_dev
   fw_dnld_over               |   nfcmrvl_fw_dnld_abort
    release_firmware          |    fw_dnld_over
     kfree(fw) //(1)          |     release_firmware
     ...                      |      kfree(fw) //(2)

The third situation is shown below:

       (Thread 1)               |       (Thread 2)
nfcmrvl_nci_recv_frame          |
 if(..->fw_download_in_progress)|
  nfcmrvl_fw_dnld_recv_frame    |
   queue_work                   |
                                |
fw_dnld_rx_work                 | nfcmrvl_nci_unregister_dev
 fw_dnld_over                   |  nfcmrvl_fw_dnld_abort
  release_firmware              |   fw_dnld_over
   kfree(fw) //(1)              |    release_firmware
                                |     kfree(fw) //(2)

The firmware struct is deallocated in position (1) and deallocated
in position (2) again.

The crash trace triggered by POC is like below:

BUG: KASAN: double-free or invalid-free in fw_dnld_over
Call Trace:
  kfree
  fw_dnld_over
  nfcmrvl_nci_unregister_dev
  nci_uart_tty_close
  tty_ldisc_kill
  tty_ldisc_hangup
  __tty_hangup.part.0
  tty_release
  ...

What's more, there are also use-after-free and null-ptr-deref bugs
in nfcmrvl_fw_dnld_start. If we deallocate firmware struct, gpio or
set null to the members of priv->fw_dnld in nfcmrvl_nci_unregister_dev,
then, we dereference firmware, gpio or the members of priv->fw_dnld in
nfcmrvl_fw_dnld_start, the UAF or NPD bugs will happen.

This patch reorders destructive operations after nci_unregister_device
in order to synchronize between cleanup routine and firmware download
routine.

The nci_unregister_device is well synchronized. If the device is
detaching, the firmware download routine will goto error. If firmware
download routine is executing, nci_unregister_device will wait until
firmware download routine is finished.

Bug: 234690530
Fixes: 3194c68701 ("NFC: nfcmrvl: add firmware download support")
Signed-off-by: Duoming Zhou <duoming@zju.edu.cn>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Change-Id: I8cc1f6450c7fecf5f5994033931da1d23a522282
2022-06-30 15:33:55 +00:00
Dmitrii Merkurev
2c8c8d03c1 ANDROID: fuse-bpf: Make sure force_again flag is false by default
Usage of uninitialized boolean is potentially can cause annoying
and “hard to catch” types of problems. Currently we have 1
case where we use uninitialized boolean:

int fuse_readdir(struct file *file, struct dir_context *ctx)

And I constantly see that every userspace readdir operation
causes an infinite cycle inside the Kernel for my QEMU tests
(gcc).
This problem isn’t reproducible inside cuttlefish, probably
because we use clang toolchain.

Bug: 219958836
Test: atest ScopedStorageDeviceTest
Test: selftests
Change-Id: I2c38056448cd2910e0cb20da5839d7db9ebd26b9
Signed-off-by: Dmitrii Merkurev <dimorinny@google.com>
2022-06-30 14:22:22 +00:00
Dmitrii Merkurev
4ad093cae1 ANDROID: fuse-bpf: Make inodes with backing_fd reachable
for regular FUSE fuse_iget

Currently, when we’re trying to find inode based on their
backing inode we strictly checking on nodeid == 0, so
basically we’re not supporting nodeid != 0 for inode,
which is backed by another one. Alongside with this, we’re
using backing_inode as a hash for inode which make this inode
not reachable for regular FUSE fuse_iget that as a result
causing backing_inode losing because instead of getting
existent one (with backing inode) we create a new one as
a part of readdirplus.

For more details please check: go/fuse-loosing-inode-with-backing

Bug: 219958836
Test: Manually checked that /data and /obb inodes
always have inode numbers configured.
Co-developed-by: Paul Lawrence <paullawrence@google.com>

Change-Id: If6a5fb340561ac6320d3c4e86215f1bcd4c2c10c
Signed-off-by: Dmitrii Merkurev <dimorinny@google.com>
2022-06-30 14:21:25 +00:00
Greg Kroah-Hartman
3cbab1c9ac Revert "xfrm: Add possibility to set the default to block if we have no policy"
This reverts commit 5b7f84b1f9 which is
commit 2d151d3907 upstream.

It breaks the Android kernel ABI and if this really needs to be added to
Android, it must come back in a format in the future that does not break
the abi.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ic222a9dfeaa3775f1173b4cd13de7e9ae959ccd9
2022-06-30 07:45:13 +00:00
Greg Kroah-Hartman
49412256c9 Revert "net: xfrm: fix shift-out-of-bounce"
This reverts commit ab610ee1d1 which is
5d8dbb7fb8 commit upstream.

It breaks the Android kernel ABI and if this really needs to be added to
Android, it must come back in a format in the future that does not break
the abi.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I1843039a406d0e39cdbde7f1da9be30fb1cbcd6a
2022-06-30 07:45:13 +00:00
Greg Kroah-Hartman
65b0a22abc Revert "xfrm: make user policy API complete"
This reverts commit 20fd28df40 which is
f8d858e607 commit upstream.

It breaks the Android kernel ABI and if this really needs to be added to
Android, it must come back in a format in the future that does not break
the abi.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I0597156be84f636d8196c81b2625a04bab57dc0c
2022-06-30 07:45:13 +00:00
Greg Kroah-Hartman
b60c58879e Revert "xfrm: notify default policy on update"
This reverts commit 9856c3a129 which is
88d0adb5f1 commit upstream.

It breaks the Android kernel ABI and if this really needs to be added to
Android, it must come back in a format in the future that does not break
the abi.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I4e7bf3d512309e061272648fdb5733e270ab4279
2022-06-30 07:45:13 +00:00
Greg Kroah-Hartman
51b82c1241 Revert "xfrm: fix dflt policy check when there is no policy configured"
This reverts commit 57c1bbe709 which is
ec3bb89081 commit upstream.

It breaks the Android kernel ABI and if this really needs to be added to
Android, it must come back in a format in the future that does not break
the abi.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Iebfe2659463646982cc41c7cd29db2d51ef5e6eb
2022-06-30 07:45:13 +00:00
Greg Kroah-Hartman
f91fa99d4b Revert "xfrm: rework default policy structure"
This reverts commit 0d2e9d8000 which is
b58b1f563a commit upstream.

It breaks the Android kernel ABI and if this really needs to be added to
Android, it must come back in a format in the future that does not break
the abi.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I0a8403a202b21cda7f856ea143c5b01b78346078
2022-06-30 07:45:13 +00:00
Greg Kroah-Hartman
c932832406 Revert "xfrm: fix "disable_policy" flag use when arriving from different devices"
This reverts commit 47f04f95ed which is
e6175a2ed1 commit upstream.

It breaks the Android kernel ABI and if this really needs to be added to
Android, it must come back in a format in the future that does not break
the abi.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ibb0fcc031d2bf71f137d3c760d84858436acc801
2022-06-30 07:45:13 +00:00
Greg Kroah-Hartman
6629a18b57 Revert "include/uapi/linux/xfrm.h: Fix XFRM_MSG_MAPPING ABI breakage"
This reverts commit 633be494c3 which is
commit 844f7eaaed upstream.

It breaks the Android kernel ABI and if this really needs to be added to
Android, it must come back in a format in the future that does not break
the abi.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I4224f0b86fdc8cfba5e18f9632ed191d18552a30
2022-06-30 07:45:13 +00:00
Treehugger Robot
a6c120a514 Merge "Merge 5.10.118 into android13-5.10-lts" into android13-5.10-lts 2022-06-30 07:45:13 +00:00
Bowgo Tsai
17267bb8e8 ANDROID: Adding Image.gz and boot-gz.img
This adds <10 seconds for a LTO=thin build, while the original
build time is about ~250 seconds on a build machine with 48 2.60 GHz
processors and 64GB RAM.

Within the 10 seconds, ~3 seconds spent on building Image.gz,
~5 seconds for packing Image.gz as boot-gz.img and <1 second for
including the boot-gz.img into the boot-img.tar.gz.

Bug: 233352819
Test: LTO=thin BUILD_CONFIG=common/build.config.gki.aarch64 build/build.sh
Signed-off-by: Bowgo Tsai <bowgotsai@google.com>
Change-Id: I283ef004d1233d2e175573b893379e0d68221353
(cherry picked from commit 2ad997b4d1)
(cherry picked from commit 933eddd126d18b45f5a693d695bc69a7a6770167)
(cherry picked from commit 0082c521ea)
2022-06-29 18:39:59 +00:00
Bowgo Tsai
3b28477cb8 ANDROID: Creating boot-img.tar.gz for aarch64
The boot-img.tar.gz includes boot.img and boot-lz4.img,
with kernel image: Image and Image.lz4, respectively.

Bug: 222078981
Test: BUILD_CONFIG=common/build.config.gki.aarch64 build/build.sh
Signed-off-by: Bowgo Tsai <bowgotsai@google.com>
Change-Id: I7f929a73967ce87d0d653d0b9926198cfeedc973
(cherry picked from commit 3361d46a39)
(cherry picked from commit 841307cecccb131df86a09cefcf7e5ea6b329a35)
(cherry picked from commit f60f35c121)
2022-06-29 18:39:33 +00:00
Jann Horn
6210ced850 BACKPORT: ptrace: Check PTRACE_O_SUSPEND_SECCOMP permission on PTRACE_SEIZE
commit ee1fee9005 upstream.

Setting PTRACE_O_SUSPEND_SECCOMP is supposed to be a highly privileged
operation because it allows the tracee to completely bypass all seccomp
filters on kernels with CONFIG_CHECKPOINT_RESTORE=y. It is only supposed to
be settable by a process with global CAP_SYS_ADMIN, and only if that
process is not subject to any seccomp filters at all.

However, while these permission checks were done on the PTRACE_SETOPTIONS
path, they were missing on the PTRACE_SEIZE path, which also sets
user-specified ptrace flags.

Move the permissions checks out into a helper function and let both
ptrace_attach() and ptrace_setoptions() call it.

Bug: 233438137
Cc: stable@kernel.org
Fixes: 13c4a90119 ("seccomp: add ptrace options for suspend/resume")
Signed-off-by: Jann Horn <jannh@google.com>
Link: https://lkml.kernel.org/r/20220319010838.1386861-1-jannh@google.com
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Change-Id: Ic2f98b220f24ff2f27b1d4aadd5c6d6dca2678ed
2022-06-29 15:04:37 +01:00
Minchan Kim
da358e264c BACKPORT: locking: Add missing __sched attributes
This patch adds __sched attributes to a few missing places
to show blocked function rather than locking function
in get_wchan.

Signed-off-by: Minchan Kim <minchan@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20220115231657.84828-1-minchan@kernel.org

Conflicts:
	kernel/locking/percpu-rwsem.c

1. conflict <linux/sched/debug.h>

Bug: 228243692
Change-Id: Ifb50c13cfdd7484269d9a291a8da515e1cce6a7b
(cherry picked from commit c441e934b6)
Signed-off-by: Minchan Kim <minchan@google.com>
2022-06-26 23:49:25 +00:00
Takashi Iwai
4e1dd5a354 BACKPORT: ALSA: pcm: Fix races among concurrent prealloc proc writes
commit 69534c48ba upstream.

We have no protection against concurrent PCM buffer preallocation
changes via proc files, and it may potentially lead to UAF or some
weird problem.  This patch applies the PCM open_mutex to the proc
write operation for avoiding the racy proc writes and the PCM stream
open (and further operations).

Bug: 232293337
Cc: <stable@vger.kernel.org>
Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Link: https://lore.kernel.org/r/20220322170720.3529-5-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Change-Id: I52d0347c440b87c700b28e082eee9ab9d3ec4910
2022-06-24 19:45:33 +00:00
Takashi Iwai
4e5367f25d BACKPORT: ALSA: pcm: Fix races among concurrent prepare and hw_params/hw_free calls
commit 3c3201f8c7 upstream.

Like the previous fixes to hw_params and hw_free ioctl races, we need
to paper over the concurrent prepare ioctl calls against hw_params and
hw_free, too.

This patch implements the locking with the existing
runtime->buffer_mutex for prepare ioctls.  Unlike the previous case
for snd_pcm_hw_hw_params() and snd_pcm_hw_free(), snd_pcm_prepare() is
performed to the linked streams, hence the lock can't be applied
simply on the top.  For tracking the lock in each linked substream, we
modify snd_pcm_action_group() slightly and apply the buffer_mutex for
the case stream_lock=false (formerly there was no lock applied)
there.

Bug: 232293337
Cc: <stable@vger.kernel.org>
Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Link: https://lore.kernel.org/r/20220322170720.3529-4-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Change-Id: Idcb26b8b178b9617e44443f2ca093074b76068b0
2022-06-24 19:45:26 +00:00
Takashi Iwai
dd17ad6e7d BACKPORT: ALSA: pcm: Fix races among concurrent read/write and buffer changes
commit dca947d4d2 upstream.

In the current PCM design, the read/write syscalls (as well as the
equivalent ioctls) are allowed before the PCM stream is running, that
is, at PCM PREPARED state.  Meanwhile, we also allow to re-issue
hw_params and hw_free ioctl calls at the PREPARED state that may
change or free the buffers, too.  The problem is that there is no
protection against those mix-ups.

This patch applies the previously introduced runtime->buffer_mutex to
the read/write operations so that the concurrent hw_params or hw_free
call can no longer interfere during the operation.  The mutex is
unlocked before scheduling, so we don't take it too long.

Bug: 232293337
Cc: <stable@vger.kernel.org>
Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Link: https://lore.kernel.org/r/20220322170720.3529-3-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Change-Id: I4ec9ab14347e88de6b51025b845d13514ac289e9
2022-06-24 19:45:26 +00:00
Greg Kroah-Hartman
f39647e757 ANDROID: Fix up abi issue with struct snd_pcm_runtime
A portion of the fix for CVE-2022-1048, commit 0f6947f5f5 ("ALSA: pcm:
Fix races among concurrent hw_params and hw_free calls"), caused an ABI
break by adding a new field to struct snd_pcm_runtime.  Because we have
to keep this new addition, it is safe to move it to the end of the
structure because this is only ever created by the sound core, and
referenced as a pointer everywhere else.

This does require a .xml update also to handle the increased structure
size:

Leaf changes summary: 1 artifact changed
Changed leaf types summary: 1 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 0 Added function
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable

'struct snd_pcm_runtime at pcm.h:344:1' changed:
  type size changed from 6144 to 6528 (in bits)
  1 data member insertion:
    'mutex buffer_mutex', at offset 6144 (in bits) at pcm.h:432:1
  72 impacted interfaces

Bug: 161946584
Fixes: 0f6947f5f5 ("ALSA: pcm: Fix races among concurrent hw_params and hw_free calls")
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
[Lee: Update XML files for this branch]
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Change-Id: I20340387fbe85fb82676517a93bb0184c8c1eb65
2022-06-24 19:45:26 +00:00
Takashi Iwai
d7202e9cc4 BACKPORT: ALSA: pcm: Fix races among concurrent hw_params and hw_free calls
commit 92ee3c60ec upstream.

Currently we have neither proper check nor protection against the
concurrent calls of PCM hw_params and hw_free ioctls, which may result
in a UAF.  Since the existing PCM stream lock can't be used for
protecting the whole ioctl operations, we need a new mutex to protect
those racy calls.

This patch introduced a new mutex, runtime->buffer_mutex, and applies
it to both hw_params and hw_free ioctl code paths.  Along with it, the
both functions are slightly modified (the mmap_count check is moved
into the state-check block) for code simplicity.

Bug: 5d95acffca
Reported-by: Hu Jiahui <kirin.say@gmail.com>
Cc: <stable@vger.kernel.org>
Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Link: https://lore.kernel.org/r/20220322170720.3529-2-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Change-Id: I33b5ed3d1f38904e215692a236fe39e8b3ee1f15
2022-06-24 19:45:26 +00:00