Commit Graph

1159391 Commits

Author SHA1 Message Date
Greg Kroah-Hartman
20b90d46a0 Merge 6.1.77 into android14-6.1-lts
Changes in 6.1.77
	asm-generic: make sparse happy with odd-sized put_unaligned_*()
	powerpc/mm: Fix null-pointer dereference in pgtable_cache_add
	arm64: irq: set the correct node for VMAP stack
	drivers/perf: pmuv3: don't expose SW_INCR event in sysfs
	powerpc: Fix build error due to is_valid_bugaddr()
	powerpc/mm: Fix build failures due to arch_reserved_kernel_pages()
	powerpc/64s: Fix CONFIG_NUMA=n build due to create_section_mapping()
	x86/boot: Ignore NMIs during very early boot
	powerpc: pmd_move_must_withdraw() is only needed for CONFIG_TRANSPARENT_HUGEPAGE
	powerpc/lib: Validate size for vector operations
	x86/mce: Mark fatal MCE's page as poison to avoid panic in the kdump kernel
	perf/core: Fix narrow startup race when creating the perf nr_addr_filters sysfs file
	debugobjects: Stop accessing objects after releasing hash bucket lock
	regulator: core: Only increment use_count when enable_count changes
	audit: Send netlink ACK before setting connection in auditd_set
	ACPI: video: Add quirk for the Colorful X15 AT 23 Laptop
	PNP: ACPI: fix fortify warning
	ACPI: extlog: fix NULL pointer dereference check
	ACPI: NUMA: Fix the logic of getting the fake_pxm value
	PM / devfreq: Synchronize devfreq_monitor_[start/stop]
	ACPI: APEI: set memory failure flags as MF_ACTION_REQUIRED on synchronous events
	FS:JFS:UBSAN:array-index-out-of-bounds in dbAdjTree
	UBSAN: array-index-out-of-bounds in dtSplitRoot
	jfs: fix slab-out-of-bounds Read in dtSearch
	jfs: fix array-index-out-of-bounds in dbAdjTree
	jfs: fix uaf in jfs_evict_inode
	pstore/ram: Fix crash when setting number of cpus to an odd number
	crypto: octeontx2 - Fix cptvf driver cleanup
	erofs: fix ztailpacking for subpage compressed blocks
	crypto: stm32/crc32 - fix parsing list of devices
	afs: fix the usage of read_seqbegin_or_lock() in afs_lookup_volume_rcu()
	afs: fix the usage of read_seqbegin_or_lock() in afs_find_server*()
	rxrpc_find_service_conn_rcu: fix the usage of read_seqbegin_or_lock()
	jfs: fix array-index-out-of-bounds in diNewExt
	arch: consolidate arch_irq_work_raise prototypes
	s390/vfio-ap: fix sysfs status attribute for AP queue devices
	s390/ptrace: handle setting of fpc register correctly
	KVM: s390: fix setting of fpc register
	SUNRPC: Fix a suspicious RCU usage warning
	ecryptfs: Reject casefold directory inodes
	ext4: fix inconsistent between segment fstrim and full fstrim
	ext4: unify the type of flexbg_size to unsigned int
	ext4: remove unnecessary check from alloc_flex_gd()
	ext4: avoid online resizing failures due to oversized flex bg
	wifi: rt2x00: restart beacon queue when hardware reset
	selftests/bpf: satisfy compiler by having explicit return in btf test
	selftests/bpf: Fix pyperf180 compilation failure with clang18
	wifi: rt2x00: correct wrong BBP register in RxDCOC calibration
	selftests/bpf: Fix issues in setup_classid_environment()
	soc: xilinx: Fix for call trace due to the usage of smp_processor_id()
	soc: xilinx: fix unhandled SGI warning message
	scsi: lpfc: Fix possible file string name overflow when updating firmware
	PCI: Add no PM reset quirk for NVIDIA Spectrum devices
	bonding: return -ENOMEM instead of BUG in alb_upper_dev_walk
	net: usb: ax88179_178a: avoid two consecutive device resets
	scsi: mpi3mr: Add PCI checks where SAS5116 diverges from SAS4116
	scsi: arcmsr: Support new PCI device IDs 1883 and 1886
	ARM: dts: imx7d: Fix coresight funnel ports
	ARM: dts: imx7s: Fix lcdif compatible
	ARM: dts: imx7s: Fix nand-controller #size-cells
	wifi: ath9k: Fix potential array-index-out-of-bounds read in ath9k_htc_txstatus()
	wifi: ath11k: fix race due to setting ATH11K_FLAG_EXT_IRQ_ENABLED too early
	bpf: Check rcu_read_lock_trace_held() before calling bpf map helpers
	scsi: libfc: Don't schedule abort twice
	scsi: libfc: Fix up timeout error in fc_fcp_rec_error()
	bpf: Set uattr->batch.count as zero before batched update or deletion
	wifi: wfx: fix possible NULL pointer dereference in wfx_set_mfp_ap()
	ARM: dts: rockchip: fix rk3036 hdmi ports node
	ARM: dts: imx25/27-eukrea: Fix RTC node name
	ARM: dts: imx: Use flash@0,0 pattern
	ARM: dts: imx27: Fix sram node
	ARM: dts: imx1: Fix sram node
	net: phy: at803x: fix passing the wrong reference for config_intr
	ionic: pass opcode to devcmd_wait
	ionic: bypass firmware cmds when stuck in reset
	block/rnbd-srv: Check for unlikely string overflow
	ARM: dts: imx25: Fix the iim compatible string
	ARM: dts: imx25/27: Pass timing0
	ARM: dts: imx27-apf27dev: Fix LED name
	ARM: dts: imx23-sansa: Use preferred i2c-gpios properties
	ARM: dts: imx23/28: Fix the DMA controller node name
	scsi: hisi_sas: Set .phy_attached before notifing phyup event HISI_PHYE_PHY_UP_PM
	ice: fix ICE_AQ_VSI_Q_OPT_RSS_* register values
	net: atlantic: eliminate double free in error handling logic
	net: dsa: mv88e6xxx: Fix mv88e6352_serdes_get_stats error path
	block: prevent an integer overflow in bvec_try_merge_hw_page
	md: Whenassemble the array, consult the superblock of the freshest device
	arm64: dts: qcom: msm8996: Fix 'in-ports' is a required property
	arm64: dts: qcom: msm8998: Fix 'out-ports' is a required property
	ice: fix pre-shifted bit usage
	arm64: dts: amlogic: fix format for s4 uart node
	wifi: rtl8xxxu: Add additional USB IDs for RTL8192EU devices
	libbpf: Fix NULL pointer dereference in bpf_object__collect_prog_relos
	wifi: rtlwifi: rtl8723{be,ae}: using calculate_bit_shift()
	wifi: cfg80211: free beacon_ies when overridden from hidden BSS
	Bluetooth: qca: Set both WIDEBAND_SPEECH and LE_STATES quirks for QCA2066
	Bluetooth: hci_sync: fix BR/EDR wakeup bug
	Bluetooth: L2CAP: Fix possible multiple reject send
	net/smc: disable SEID on non-s390 archs where virtual ISM may be used
	bridge: cfm: fix enum typo in br_cc_ccm_tx_parse
	i40e: Fix VF disable behavior to block all traffic
	octeontx2-af: Fix max NPC MCAM entry check while validating ref_entry
	net: dsa: qca8k: put MDIO bus OF node on qca8k_mdio_register() failure
	f2fs: fix to check return value of f2fs_reserve_new_block()
	ALSA: hda: Refer to correct stream index at loops
	ASoC: doc: Fix undefined SND_SOC_DAPM_NOPM argument
	fast_dput(): handle underflows gracefully
	RDMA/IPoIB: Fix error code return in ipoib_mcast_join
	drm/panel-edp: Add override_edid_mode quirk for generic edp
	drm/bridge: anx7625: Fix Set HPD irq detect window to 2ms
	drm/amd/display: Fix tiled display misalignment
	f2fs: fix write pointers on zoned device after roll forward
	ASoC: amd: Add new dmi entries for acp5x platform
	drm/drm_file: fix use of uninitialized variable
	drm/framebuffer: Fix use of uninitialized variable
	drm/mipi-dsi: Fix detach call without attach
	media: stk1160: Fixed high volume of stk1160_dbg messages
	media: rockchip: rga: fix swizzling for RGB formats
	PCI: add INTEL_HDA_ARL to pci_ids.h
	ALSA: hda: Intel: add HDA_ARL PCI ID support
	media: rkisp1: Drop IRQF_SHARED
	media: rkisp1: Fix IRQ handler return values
	media: rkisp1: Store IRQ lines
	media: rkisp1: Fix IRQ disable race issue
	hwmon: (nct6775) Fix fan speed set failure in automatic mode
	f2fs: fix to tag gcing flag on page during block migration
	drm/exynos: Call drm_atomic_helper_shutdown() at shutdown/unbind time
	IB/ipoib: Fix mcast list locking
	media: amphion: remove mutext lock in condition of wait_event
	media: ddbridge: fix an error code problem in ddb_probe
	media: i2c: imx335: Fix hblank min/max values
	drm/amd/display: For prefetch mode > 0, extend prefetch if possible
	drm/msm/dpu: Ratelimit framedone timeout msgs
	drm/msm/dpu: fix writeback programming for YUV cases
	drm/amdgpu: fix ftrace event amdgpu_bo_move always move on same heap
	clk: hi3620: Fix memory leak in hi3620_mmc_clk_init()
	clk: mmp: pxa168: Fix memory leak in pxa168_clk_init()
	watchdog: it87_wdt: Keep WDTCTRL bit 3 unmodified for IT8784/IT8786
	drm/amd/display: make flip_timestamp_in_us a 64-bit variable
	clk: imx: clk-imx8qxp: fix LVDS bypass, pixel and phy clocks
	drm/amdgpu: Fix ecc irq enable/disable unpaired
	drm/amdgpu: Let KFD sync with VM fences
	drm/amdgpu: Fix '*fw' from request_firmware() not released in 'amdgpu_ucode_request()'
	drm/amdgpu: Drop 'fence' check in 'to_amdgpu_amdkfd_fence()'
	drm/amdkfd: Fix iterator used outside loop in 'kfd_add_peer_prop()'
	ALSA: hda/conexant: Fix headset auto detect fail in cx8070 and SN6140
	leds: trigger: panic: Don't register panic notifier if creating the trigger failed
	um: Fix naming clash between UML and scheduler
	um: Don't use vfprintf() for os_info()
	um: net: Fix return type of uml_net_start_xmit()
	um: time-travel: fix time corruption
	i3c: master: cdns: Update maximum prescaler value for i2c clock
	xen/gntdev: Fix the abuse of underlying struct page in DMA-buf import
	mfd: ti_am335x_tscadc: Fix TI SoC dependencies
	mailbox: arm_mhuv2: Fix a bug for mhuv2_sender_interrupt
	PCI: Only override AMD USB controller if required
	PCI: switchtec: Fix stdev_release() crash after surprise hot remove
	perf cs-etm: Bump minimum OpenCSD version to ensure a bugfix is present
	usb: hub: Replace hardcoded quirk value with BIT() macro
	usb: hub: Add quirk to decrease IN-ep poll interval for Microchip USB491x hub
	selftests/sgx: Fix linker script asserts
	tty: allow TIOCSLCKTRMIOS with CAP_CHECKPOINT_RESTORE
	fs/kernfs/dir: obey S_ISGID
	spmi: mediatek: Fix UAF on device remove
	PCI: Fix 64GT/s effective data rate calculation
	PCI/AER: Decode Requester ID when no error info found
	9p: Fix initialisation of netfs_inode for 9p
	misc: lis3lv02d_i2c: Add missing setting of the reg_ctrl callback
	libsubcmd: Fix memory leak in uniq()
	drm/amdkfd: Fix lock dependency warning
	drm/amdkfd: Fix lock dependency warning with srcu
	virtio_net: Fix "‘%d’ directive writing between 1 and 11 bytes into a region of size 10" warnings
	blk-mq: fix IO hang from sbitmap wakeup race
	ceph: reinitialize mds feature bit even when session in open
	ceph: fix deadlock or deadcode of misusing dget()
	ceph: fix invalid pointer access if get_quota_realm return ERR_PTR
	drm/amd/powerplay: Fix kzalloc parameter 'ATOM_Tonga_PPM_Table' in 'get_platform_power_management_table()'
	drm/amdgpu: Fix with right return code '-EIO' in 'amdgpu_gmc_vram_checking()'
	drm/amdgpu: Release 'adev->pm.fw' before return in 'amdgpu_device_need_post()'
	drm/amdkfd: Fix 'node' NULL check in 'svm_range_get_range_boundaries()'
	perf: Fix the nr_addr_filters fix
	wifi: cfg80211: fix RCU dereference in __cfg80211_bss_update
	drm: using mul_u32_u32() requires linux/math64.h
	scsi: isci: Fix an error code problem in isci_io_request_build()
	regulator: ti-abb: don't use devm_platform_ioremap_resource_byname for shared interrupt register
	scsi: core: Move scsi_host_busy() out of host lock for waking up EH handler
	HID: hidraw: fix a problem of memory leak in hidraw_release()
	selftests: net: give more time for GRO aggregation
	ip6_tunnel: make sure to pull inner header in __ip6_tnl_rcv()
	ipv4: raw: add drop reasons
	ipmr: fix kernel panic when forwarding mcast packets
	net: lan966x: Fix port configuration when using SGMII interface
	tcp: add sanity checks to rx zerocopy
	ixgbe: Refactor returning internal error codes
	ixgbe: Refactor overtemp event handling
	ixgbe: Fix an error handling path in ixgbe_read_iosf_sb_reg_x550()
	net: dsa: qca8k: fix illegal usage of GPIO
	ipv6: Ensure natural alignment of const ipv6 loopback and router addresses
	llc: call sock_orphan() at release time
	bridge: mcast: fix disabled snooping after long uptime
	selftests: net: add missing config for GENEVE
	netfilter: conntrack: correct window scaling with retransmitted SYN
	netfilter: nf_tables: restrict tunnel object to NFPROTO_NETDEV
	netfilter: nf_log: replace BUG_ON by WARN_ON_ONCE when putting logger
	netfilter: nft_ct: sanitize layer 3 and 4 protocol number in custom expectations
	net: ipv4: fix a memleak in ip_setup_cork
	af_unix: fix lockdep positive in sk_diag_dump_icons()
	selftests: net: fix available tunnels detection
	net: sysfs: Fix /sys/class/net/<iface> path
	selftests: team: Add missing config options
	selftests: bonding: Check initial state
	arm64: irq: set the correct node for shadow call stack
	mm, kmsan: fix infinite recursion due to RCU critical section
	Revert "drm/amd/display: Disable PSR-SU on Parade 0803 TCON again"
	drm/msm/dsi: Enable runtime PM
	LoongArch/smp: Call rcutree_report_cpu_starting() at tlb_init()
	gve: Fix use-after-free vulnerability
	bonding: remove print in bond_verify_device_path
	ASoC: codecs: lpass-wsa-macro: fix compander volume hack
	ASoC: codecs: wsa883x: fix PA volume control
	drm/amdgpu: Fix missing error code in 'gmc_v6/7/8/9_0_hw_init()'
	Linux 6.1.77

Change-Id: I8d69fc7831db64d8a0fad88a318f03052f8bbf69
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2024-04-17 08:34:35 +00:00
Greg Kroah-Hartman
f28d3f0d96 Merge branch 'android14-6.1' into branch 'android14-6.1-lts'
We need the abi updates to be merged to the -lts branch so we can
properly track the new symbols.  This includes the following commit:

089d1b8f6d ANDROID: Add known structs used by modules to KMI

Change-Id: Ie1915aedf85ab42761c27cfb63283be675f11c86
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2024-04-17 08:27:28 +00:00
Will McVicker
089d1b8f6d ANDROID: Add known structs used by modules to KMI
This adds `struct dwc3` and `struct kernel_all_info` to the KMI via fake
GKI symbols as we know some partners are using these in their
out-of-tree drivers. This ensures that future changes to these structs
will not break partner builds.

Bug: 332277393
Bug: 236036821
Change-Id: Ifa1ac6b71d58415339a63f16a79c1f713dda789f
Signed-off-by: Will McVicker <willmcvicker@google.com>
2024-04-16 13:49:35 -07:00
Greg Kroah-Hartman
7a8376be74 ANDROID: use reserved cpucaps for new capability
In commit 2b1dc0666e ("arm64: Rename ARM64_WORKAROUND_2966298"), a new
quirk is added to the tree, which breaks the Android ABI.  Fix this up
by using the space reserved for this for the new capability

Fixes: 2b1dc0666e ("arm64: Rename ARM64_WORKAROUND_2966298")
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ic3a9d32d85eaf86eef77593dc150bb566600cea7
2024-04-16 15:02:32 +00:00
Greg Kroah-Hartman
c801066eca Revert "mm/sparsemem: fix race in accessing memory_section->usage"
This reverts commit 68ed9e3332 which is
commit 5ec8e8ea8b7783fab150cf86404fc38cb4db8800 upstream.

It breaks the Android kernel abi and can be brought back in the future
in an abi-safe way if it is really needed.

Bug: 161946584
Change-Id: Id78d131f9d910aa331832fb9b7cda4088e37d5f2
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2024-04-16 15:02:32 +00:00
Greg Kroah-Hartman
2dbddbe358 This is the 6.1.76 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmW64xYACgkQONu9yGCS
 aT7kVA/+KKlE3UFuGmV1ZmiHagHF+oRZKSk9m97F5zgfAcEHAcTnnuikzvJHuepU
 4hPMsH+tTXafOJLh81bv7IH3RhHtvmQZPQyWUw7ysY9ms/7CZxjkuirxLWI3evUG
 lre7OiApyOPkxERBfA5f9r2D1ufXC742xcAdaXrn+GSZd4nuId5f0IbHmfdNv/MV
 zTt6+0qRU3TMpsUdqp0rIm/0KUXtopCDFf2fI/lIImAvN2onuiqDy+TC0FJ0ErTQ
 C3wTEi1j9u6l3AO51OYm57TbKj/KmVOcQdcQyskHGHbB+7nS9z29LXQyorRUKqkv
 KTs739kgG8GH0ZegTwPVPCx5t1SBzy8fuzI2c2MMVfNCT6rWJVS7brzeb7zDLuRT
 9pSr9MnoQNYMhJ3IlPvgPHKwvpP4t2el7Z8noVTRXHDjrkC238gloHwvH78/b2ao
 bXO3DRKTzB4Vv/Q8YUPFmj5fhPqz5lnK6idr4r72JSlzfjxtYoPAKwYihDGxmeLN
 mWikAPepLqoGg/P2ztKhV/fL9TVhJB+d2YM5op/b+pUxZtYdiJODefFF1ebBbF34
 sRG12htP7GV/MTkxC7Yu0h3vS3HWVHugHMBIXXUnqlOANMUbyAMEQW+xkdS/W5bd
 QnowcQr+DT1A5b9P1bYXB7efNiHENxo/jvuJTrzZmLioy1MPqeE=
 =219k
 -----END PGP SIGNATURE-----

Merge 6.1.76 into android-6.1

Changes in 6.1.76
	usb: dwc3: gadget: Refactor EP0 forced stall/restart into a separate API
	usb: dwc3: gadget: Queue PM runtime idle on disconnect event
	usb: dwc3: gadget: Handle EP0 request dequeuing properly
	Revert "nSVM: Check for reserved encodings of TLB_CONTROL in nested VMCB"
	iio: adc: ad7091r: Set alert bit in config register
	iio: adc: ad7091r: Allow users to configure device events
	ext4: allow for the last group to be marked as trimmed
	arm64: properly install vmlinuz.efi
	OPP: Pass rounded rate to _set_opp()
	btrfs: sysfs: validate scrub_speed_max value
	crypto: api - Disallow identical driver names
	PM: hibernate: Enforce ordering during image compression/decompression
	hwrng: core - Fix page fault dead lock on mmap-ed hwrng
	crypto: s390/aes - Fix buffer overread in CTR mode
	s390/vfio-ap: unpin pages on gisc registration failure
	PM / devfreq: Fix buffer overflow in trans_stat_show
	media: imx355: Enable runtime PM before registering async sub-device
	rpmsg: virtio: Free driver_override when rpmsg_remove()
	media: ov9734: Enable runtime PM before registering async sub-device
	s390/vfio-ap: always filter entire AP matrix
	s390/vfio-ap: loop over the shadow APCB when filtering guest's AP configuration
	s390/vfio-ap: let on_scan_complete() callback filter matrix and update guest's APCB
	mips: Fix max_mapnr being uninitialized on early stages
	bus: mhi: host: Add alignment check for event ring read pointer
	bus: mhi: host: Drop chan lock before queuing buffers
	bus: mhi: host: Add spinlock to protect WP access when queueing TREs
	parisc/firmware: Fix F-extend for PDC addresses
	parisc/power: Fix power soft-off button emulation on qemu
	async: Split async_schedule_node_domain()
	async: Introduce async_schedule_dev_nocall()
	iio: adc: ad7091r: Enable internal vref if external vref is not supplied
	dmaengine: fix NULL pointer in channel unregistration function
	scsi: ufs: core: Remove the ufshcd_hba_exit() call from ufshcd_async_scan()
	arm64: dts: qcom: sc7180: fix USB wakeup interrupt types
	arm64: dts: qcom: sdm845: fix USB wakeup interrupt types
	arm64: dts: qcom: sm8150: fix USB wakeup interrupt types
	arm64: dts: qcom: sc7280: fix usb_1 wakeup interrupt types
	arm64: dts: qcom: sdm845: fix USB DP/DM HS PHY interrupts
	arm64: dts: qcom: sm8150: fix USB DP/DM HS PHY interrupts
	lsm: new security_file_ioctl_compat() hook
	docs: kernel_abi.py: fix command injection
	scripts/get_abi: fix source path leak
	media: videobuf2-dma-sg: fix vmap callback
	mmc: core: Use mrq.sbc in close-ended ffu
	mmc: mmc_spi: remove custom DMA mapped buffers
	media: mtk-jpeg: Fix use after free bug due to error path handling in mtk_jpeg_dec_device_run
	arm64: Rename ARM64_WORKAROUND_2966298
	rtc: cmos: Use ACPI alarm for non-Intel x86 systems too
	rtc: Adjust failure return code for cmos_set_alarm()
	rtc: mc146818-lib: Adjust failure return code for mc146818_get_time()
	rtc: Add support for configuring the UIP timeout for RTC reads
	rtc: Extend timeout for waiting for UIP to clear to 1s
	nouveau/vmm: don't set addr on the fail path to avoid warning
	ubifs: ubifs_symlink: Fix memleak of inode->i_link in error path
	mm/rmap: fix misplaced parenthesis of a likely()
	mm/sparsemem: fix race in accessing memory_section->usage
	rename(): fix the locking of subdirectories
	serial: sc16is7xx: improve regmap debugfs by using one regmap per port
	serial: sc16is7xx: remove wasteful static buffer in sc16is7xx_regmap_name()
	serial: sc16is7xx: remove global regmap from struct sc16is7xx_port
	serial: sc16is7xx: remove unused line structure member
	serial: sc16is7xx: change EFR lock to operate on each channels
	serial: sc16is7xx: convert from _raw_ to _noinc_ regmap functions for FIFO
	serial: sc16is7xx: fix invalid sc16is7xx_lines bitfield in case of probe error
	serial: sc16is7xx: remove obsolete loop in sc16is7xx_port_irq()
	serial: sc16is7xx: improve do/while loop in sc16is7xx_irq()
	LoongArch/smp: Call rcutree_report_cpu_starting() earlier
	mm: page_alloc: unreserve highatomic page blocks before oom
	ksmbd: set v2 lease version on lease upgrade
	ksmbd: fix potential circular locking issue in smb2_set_ea()
	ksmbd: don't increment epoch if current state and request state are same
	ksmbd: send lease break notification on FILE_RENAME_INFORMATION
	ksmbd: Add missing set_freezable() for freezable kthread
	Revert "drm/amd: Enable PCIe PME from D3"
	drm/amd/display: pbn_div need be updated for hotplug event
	wifi: mac80211: fix potential sta-link leak
	net/smc: fix illegal rmb_desc access in SMC-D connection dump
	tcp: make sure init the accept_queue's spinlocks once
	bnxt_en: Wait for FLR to complete during probe
	vlan: skip nested type that is not IFLA_VLAN_QOS_MAPPING
	llc: make llc_ui_sendmsg() more robust against bonding changes
	llc: Drop support for ETH_P_TR_802_2.
	udp: fix busy polling
	net: fix removing a namespace with conflicting altnames
	tun: fix missing dropped counter in tun_xdp_act
	tun: add missing rx stats accounting in tun_xdp_act
	net: micrel: Fix PTP frame parsing for lan8814
	net/rds: Fix UBSAN: array-index-out-of-bounds in rds_cmsg_recv
	netfs, fscache: Prevent Oops in fscache_put_cache()
	tracing: Ensure visibility when inserting an element into tracing_map
	afs: Hide silly-rename files from userspace
	tcp: Add memory barrier to tcp_push()
	netlink: fix potential sleeping issue in mqueue_flush_file
	ipv6: init the accept_queue's spinlocks in inet6_create
	net/mlx5: DR, Use the right GVMI number for drop action
	net/mlx5: DR, Can't go to uplink vport on RX rule
	net/mlx5: Use mlx5 device constant for selecting CQ period mode for ASO
	net/mlx5e: Allow software parsing when IPsec crypto is enabled
	net/mlx5e: fix a double-free in arfs_create_groups
	net/mlx5e: fix a potential double-free in fs_any_create_groups
	rcu: Defer RCU kthreads wakeup when CPU is dying
	netfilter: nft_limit: reject configurations that cause integer overflow
	btrfs: fix infinite directory reads
	btrfs: set last dir index to the current last index when opening dir
	btrfs: refresh dir last index during a rewinddir(3) call
	btrfs: fix race between reading a directory and adding entries to it
	netfilter: nf_tables: restrict anonymous set and map names to 16 bytes
	netfilter: nf_tables: validate NFPROTO_* family
	net: stmmac: Wait a bit for the reset to take effect
	net: mvpp2: clear BM pool before initialization
	selftests: netdevsim: fix the udp_tunnel_nic test
	fjes: fix memleaks in fjes_hw_setup
	net: fec: fix the unhandled context fault from smmu
	nbd: always initialize struct msghdr completely
	btrfs: avoid copying BTRFS_ROOT_SUBVOL_DEAD flag to snapshot of subvolume being deleted
	btrfs: ref-verify: free ref cache before clearing mount opt
	btrfs: tree-checker: fix inline ref size in error messages
	btrfs: don't warn if discard range is not aligned to sector
	btrfs: defrag: reject unknown flags of btrfs_ioctl_defrag_range_args
	btrfs: don't abort filesystem when attempting to snapshot deleted subvolume
	rbd: don't move requests to the running list on errors
	exec: Fix error handling in begin_new_exec()
	wifi: iwlwifi: fix a memory corruption
	hv_netvsc: Calculate correct ring size when PAGE_SIZE is not 4 Kbytes
	netfilter: nft_chain_filter: handle NETDEV_UNREGISTER for inet/ingress basechain
	netfilter: nf_tables: reject QUEUE/DROP verdict parameters
	platform/x86: p2sb: Allow p2sb_bar() calls during PCI device probe
	ksmbd: fix global oob in ksmbd_nl_policy
	firmware: arm_scmi: Check mailbox/SMT channel for consistency
	xfs: read only mounts with fsopen mount API are busted
	gpiolib: acpi: Ignore touchpad wakeup on GPD G1619-04
	cpufreq: intel_pstate: Refine computation of P-state for given frequency
	drm: Don't unref the same fb many times by mistake due to deadlock handling
	drm/bridge: nxp-ptn3460: fix i2c_master_send() error checking
	drm/tidss: Fix atomic_flush check
	drm/amd/display: Disable PSR-SU on Parade 0803 TCON again
	platform/x86: intel-uncore-freq: Fix types in sysfs callbacks
	drm/bridge: nxp-ptn3460: simplify some error checking
	drm/amd/display: Port DENTIST hang and TDR fixes to OTG disable W/A
	drm/amdgpu/pm: Fix the power source flag error
	erofs: get rid of the remaining kmap_atomic()
	erofs: fix lz4 inplace decompression
	media: ov13b10: Support device probe in non-zero ACPI D state
	media: ov13b10: Enable runtime PM before registering async sub-device
	bus: mhi: ep: Do not allocate event ring element on stack
	PM: core: Remove unnecessary (void *) conversions
	PM: sleep: Fix possible deadlocks in core system-wide PM code
	thermal: intel: hfi: Refactor enabling code into helper functions
	thermal: intel: hfi: Disable an HFI instance when all its CPUs go offline
	thermal: intel: hfi: Add syscore callbacks for system-wide PM
	fs/pipe: move check to pipe_has_watch_queue()
	pipe: wakeup wr_wait after setting max_usage
	ARM: dts: qcom: sdx55: fix USB wakeup interrupt types
	ARM: dts: samsung: exynos4210-i9100: Unconditionally enable LDO12
	ARM: dts: qcom: sdx55: fix pdc '#interrupt-cells'
	ARM: dts: qcom: sdx55: fix USB DP/DM HS PHY interrupts
	ARM: dts: qcom: sdx55: fix USB SS wakeup
	dlm: use kernel_connect() and kernel_bind()
	serial: core: Provide port lock wrappers
	serial: sc16is7xx: Use port lock wrappers
	serial: sc16is7xx: fix unconditional activation of THRI interrupt
	btrfs: zoned: factor out prepare_allocation_zoned()
	btrfs: zoned: optimize hint byte for zoned allocator
	drm/panel-edp: drm/panel-edp: Fix AUO B116XAK01 name and timing
	Revert "powerpc/64s: Increase default stack size to 32KB"
	drm/bridge: parade-ps8640: Wait for HPD when doing an AUX transfer
	drm: panel-simple: add missing bus flags for Tianma tm070jvhg[30/33]
	drm/bridge: sii902x: Use devm_regulator_bulk_get_enable()
	drm/bridge: sii902x: Fix probing race issue
	drm/bridge: sii902x: Fix audio codec unregistration
	drm/bridge: parade-ps8640: Ensure bridge is suspended in .post_disable()
	drm/bridge: parade-ps8640: Make sure we drop the AUX mutex in the error case
	drm/exynos: fix accidental on-stack copy of exynos_drm_plane
	drm/exynos: gsc: minor fix for loop iteration in gsc_runtime_resume
	gpio: eic-sprd: Clear interrupt after set the interrupt type
	block: Move checking GENHD_FL_NO_PART to bdev_add_partition()
	drm/bridge: anx7625: Ensure bridge is suspended in disable()
	spi: bcm-qspi: fix SFDP BFPT read by usig mspi read
	spi: fix finalize message on error return
	MIPS: lantiq: register smp_ops on non-smp platforms
	cxl/region:Fix overflow issue in alloc_hpa()
	mips: Call lose_fpu(0) before initializing fcr31 in mips_set_personality_nan
	tick/sched: Preserve number of idle sleeps across CPU hotplug events
	x86/entry/ia32: Ensure s32 is sign extended to s64
	serial: core: fix kernel-doc for uart_port_unlock_irqrestore()
	net/mlx5e: Handle hardware IPsec limits events
	Linux 6.1.76

Change-Id: I4725561e2ca5df042a1fe307af701e7d5e2d06c8
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2024-04-16 15:01:11 +00:00
Greg Kroah-Hartman
0eac7b614d Merge branch 'android14-6.1' into branch 'android14-6.1-lts'
Catch up on some ABI updates from the non-lts branch.  This includes the
following commits:

* 77fec6cefe UPSTREAM: netfilter: nf_tables: release mutex after nft_gc_seq_end from abort path
* e27468009d UPSTREAM: netfilter: nf_tables: release batch on table validation from abort path
* 26f2c9be9e UPSTREAM: netfilter: nf_tables: mark set as dead when unbinding anonymous set with timeout
* 99aea323a3 UPSTREAM: netfilter: nft_set_pipapo: release elements in clone only from destroy path
* b76ed11859 ANDROID: GKI: Add symbol list for Nothing
* cfa154389a ANDROID: GKI: Update honda symbol list for asound
* 9be03f0456 ANDROID: GKI: Update honda symbol list for xt_LOG
* a6cb9e0acf ANDROID: GKI: Update honda symbol list for ebtables
* e6dcd23df8 ANDROID: GKI: Update honda symbol list for net scheduler
* 3547821560 ANDROID: softirq: add tasklet to LONG_SOFTIRQ_MASK
* ca4095789f ANDROID: Update the ABI symbol list
* 59ef545736 ANDROID: vendor_hooks: add restricted vendor hook for meminfo
* be55946e20 ANDROID: Update the ABI symbol list
* 4b8e1f520a BACKPORT: cpufreq: Don't unregister cpufreq cooling on CPU hotplug
* 165b01710b FROMGIT: usb: typec: tcpm: Correct the PDO counting in pd_set
* 5dc2bc2966 UPSTREAM: tls: fix race between tx work scheduling and socket close
* cdc8aeb893 UPSTREAM: netfilter: nft_chain_filter: handle NETDEV_UNREGISTER for inet/ingress basechain
* 5b4439c0d7 UPSTREAM: tls: fix race between async notify and socket close
* fd16669b18 UPSTREAM: net: tls: factor out tls_*crypt_async_wait()
* 5cb88480ab UPSTREAM: tls: extract context alloc/initialization out of tls_set_sw_offload
* 338203a817 BACKPORT: mm: update mark_victim tracepoints fields
* 97808981ed Revert "FROMGIT: BACKPORT: mm: update mark_victim tracepoints fields"
* dfd2c809b9 ANDROID: Update the ABI symbol list
* babe7ef868 ANDROID: export two function to reclaim memory
* 66193f866d ANDROID: add reclaim tune parameter functions
* 27c443059c UPSTREAM: netfilter: nf_tables: disallow anonymous set with timeout flag
* 56ba301cac ANDROID: drop redundant OWNERS_DrNo file
* 60534eef47 UPSTREAM: ALSA: virtio: Fix "Coverity: virtsnd_kctl_tlv_op(): Uninitialized variables" warning.
* e7f7d55471 UPSTREAM: ALSA: virtio: add support for audio controls
* 0fd2018454 ANDROID: Update symbols list for virtio_snd.ko audio controls
* ebcdb9dc21 ANDROID: Move cpu_busy_with_softirqs() into sched.h
* 5dd0c4814f UPSTREAM: mm: page_alloc: unreserve highatomic page blocks before oom
* 6d3db504d1 UPSTREAM: mm: page_alloc: enforce minimum zone size to do high atomic reserves
* 58699757f4 UPSTREAM: mm: page_alloc: correct high atomic reserve calculations
* 9ce8f4d0bb ANDROID: Update the ABI symbol list
* dcdec80d6b ANDROID: Export cpu_busy_with_softirqs()
* baba019a00 ANDROID: GKI: update symbol list file for xiaomi
* 4747c75687 Reapply "ANDROID: null_blk: Support configuring the maximum segment size"

Change-Id: Idfcc657d09135269051426f9fa114465d2e53003
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2024-04-16 12:13:34 +00:00
Pablo Neira Ayuso
77fec6cefe UPSTREAM: netfilter: nf_tables: release mutex after nft_gc_seq_end from abort path
commit 0d459e2ffb541841714839e8228b845458ed3b27 upstream.

The commit mutex should not be released during the critical section
between nft_gc_seq_begin() and nft_gc_seq_end(), otherwise, async GC
worker could collect expired objects and get the released commit lock
within the same GC sequence.

nf_tables_module_autoload() temporarily releases the mutex to load
module dependencies, then it goes back to replay the transaction again.
Move it at the end of the abort phase after nft_gc_seq_end() is called.

Bug: 332996726
Cc: stable@vger.kernel.org
Fixes: 720344340fb9 ("netfilter: nf_tables: GC transaction race with abort path")
Reported-by: Kuan-Ting Chen <hexrabbit@devco.re>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 8038ee3c3e5b59bcd78467686db5270c68544e30)
Signed-off-by: Lee Jones <joneslee@google.com>
Change-Id: I637389421d8eca5ab59a41bd1a4b70432440034c
2024-04-15 11:20:28 +00:00
Pablo Neira Ayuso
e27468009d UPSTREAM: netfilter: nf_tables: release batch on table validation from abort path
commit a45e6889575c2067d3c0212b6bc1022891e65b91 upstream.

Unlike early commit path stage which triggers a call to abort, an
explicit release of the batch is required on abort, otherwise mutex is
released and commit_list remains in place.

Add WARN_ON_ONCE to ensure commit_list is empty from the abort path
before releasing the mutex.

After this patch, commit_list is always assumed to be empty before
grabbing the mutex, therefore

  03c1f1ef15 ("netfilter: Cleanup nft_net->module_list from nf_tables_exit_net()")

only needs to release the pending modules for registration.

Bug: 332996726
Cc: stable@vger.kernel.org
Fixes: c0391b6ab8 ("netfilter: nf_tables: missing validation from the abort path")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit b0b36dcbe0f24383612e5e62bd48df5a8107f7fc)
Signed-off-by: Lee Jones <joneslee@google.com>
Change-Id: I38f9b05ac4eadd1d2b7b306cccaf0aeacb61b57a
2024-04-15 11:20:28 +00:00
Pablo Neira Ayuso
26f2c9be9e UPSTREAM: netfilter: nf_tables: mark set as dead when unbinding anonymous set with timeout
commit 552705a3650bbf46a22b1adedc1b04181490fc36 upstream.

While the rhashtable set gc runs asynchronously, a race allows it to
collect elements from anonymous sets with timeouts while it is being
released from the commit path.

Mingi Cho originally reported this issue in a different path in 6.1.x
with a pipapo set with low timeouts which is not possible upstream since
7395dfacfff6 ("netfilter: nf_tables: use timestamp to check for set
element timeout").

Fix this by setting on the dead flag for anonymous sets to skip async gc
in this case.

According to 08e4c8c5919f ("netfilter: nf_tables: mark newset as dead on
transaction abort"), Florian plans to accelerate abort path by releasing
objects via workqueue, therefore, this sets on the dead flag for abort
path too.

Bug: 329205787
Cc: stable@vger.kernel.org
Fixes: 5f68718b34a5 ("netfilter: nf_tables: GC transaction API to avoid race with control plane")
Reported-by: Mingi Cho <mgcho.minic@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 406b0241d0eb598a0b330ab20ae325537d8d8163)
Signed-off-by: Lee Jones <joneslee@google.com>
Change-Id: I6170493c267e020c50a739150f8c421deb635b35
2024-04-15 10:33:08 +00:00
Pablo Neira Ayuso
99aea323a3 UPSTREAM: netfilter: nft_set_pipapo: release elements in clone only from destroy path
[ Upstream commit b0e256f3dd2ba6532f37c5c22e07cb07a36031ee ]

Clone already always provides a current view of the lookup table, use it
to destroy the set, otherwise it is possible to destroy elements twice.

This fix requires:

 212ed75dc5fb ("netfilter: nf_tables: integrate pipapo into commit protocol")

which came after:

 9827a0e6e2 ("netfilter: nft_set_pipapo: release elements in clone from abort path").

Bug: 330876672
Fixes: 9827a0e6e2 ("netfilter: nft_set_pipapo: release elements in clone from abort path")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit ff90050771412b91e928093ccd8736ae680063c2)
Signed-off-by: Lee Jones <joneslee@google.com>
Change-Id: I8c0811e69f82681c7fcfdca1111f1702e27bb80e
2024-04-15 10:17:49 +00:00
Dylan Chang
b76ed11859 ANDROID: GKI: Add symbol list for Nothing
2 function symbol(s) added
  'char* dentry_path_raw(const struct dentry*, char*, int)'
  'int fscrypt_file_open(struct inode*, struct file*)'

Bug: 334026503
Change-Id: I20b224d5336753a1fa8783178be60dbaae35b3ba
Signed-off-by: Dylan Chang <dylan.chang@nothing.tech>
2024-04-14 10:01:56 +00:00
Norihiko Hama
cfa154389a ANDROID: GKI: Update honda symbol list for asound
Additional missing symbols required for vendor audio module

1 function symbol(s) added
  'int snd_pcm_suspend_all(struct snd_pcm*)'

Bug: 333795249

Change-Id: I8bf2d33b407f76aa528c8160bde1f996e4927b57
Signed-off-by: Norihiko Hama <Norihiko.Hama@alpsalpine.com>
2024-04-12 12:59:04 +00:00
Norihiko Hama
9be03f0456 ANDROID: GKI: Update honda symbol list for xt_LOG
Add some missing symbols required for xt_LOG

2 function symbol(s) added
  'int xt_register_targets(struct xt_target*, unsigned int)'
  'void xt_unregister_targets(struct xt_target*, unsigned int)'

Bug: 333795249

Change-Id: Idb1f0a8028c822428da9fb1de2dd4b6b497c1f52
Signed-off-by: Norihiko Hama <Norihiko.Hama@alpsalpine.com>
2024-04-12 12:58:50 +00:00
Norihiko Hama
a6cb9e0acf ANDROID: GKI: Update honda symbol list for ebtables
Add some missing symbols required for ebtables

2 function symbol(s) added
  'int xt_register_target(struct xt_target*)'
  'void xt_unregister_target(struct xt_target*)'

Bug: 333795249

Change-Id: I8e80c481732ea07cc84c41bb70c18175fc5fd23b
Signed-off-by: Norihiko Hama <Norihiko.Hama@alpsalpine.com>
2024-04-12 12:58:38 +00:00
Norihiko Hama
e6dcd23df8 ANDROID: GKI: Update honda symbol list for net scheduler
Add some missing symbols required for net scheduler

4 function symbol(s) added
  'void tc_cleanup_offload_action(struct flow_action*)'
  'int tc_setup_offload_action(struct flow_action*, const struct tcf_exts*, struct netlink_ext_ack*)'
  'int tcf_action_update_hw_stats(struct tc_action*)'
  'int tcf_exts_validate_ex(struct net*, struct tcf_proto*, struct nlattr**, struct nlattr*, struct tcf_exts*, u32, u32, struct netlink_ext_ack*)'

Bug: 333795249

Change-Id: I2cefa08e07a6c8b8d9b9032f35792d7df9f94b0d
Signed-off-by: Norihiko Hama <Norihiko.Hama@alpsalpine.com>
2024-04-12 12:58:19 +00:00
lukechang
3547821560 ANDROID: softirq: add tasklet to LONG_SOFTIRQ_MASK
In commit 35a06697da ("FROMLIST: sched: Avoid placing RT threads on cores handling long softirqs"), the patch drop TASKLET_SOFTIRQ from LONG_SOFTIRQS.

Some drivers use tasklet softirq for data reception from firmware. When
there's a high volume or continuous stream of data from the firmware,
it can lead to unexpectedly long execution times for RT tasks and further cause jank or audio glitch.

Bug: 333895950
Test: check tasklet are defered when RT task is running

Change-Id: I53d6b43fe5a8860758898f09810a52fe319344f9
Signed-off-by: lukechang <lukechang@google.com>
2024-04-12 02:39:54 +00:00
Minchan Kim
ca4095789f ANDROID: Update the ABI symbol list
1 function symbol(s) added
  'int __traceiter_android_rvh_meminfo_proc_show(void*, struct seq_file*)'

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

Bug: 333482947
Change-Id: I27ffd601307085f35aa853a214838fda605f901d
Signed-off-by: Minchan Kim <minchan@google.com>
2024-04-11 00:56:49 +00:00
Minchan Kim
59ef545736 ANDROID: vendor_hooks: add restricted vendor hook for meminfo
To report vendor-specific memory statistics, add restricted
vendor hook since normal vendor hook work with only atomic
context.

Bug: 333482947
Change-Id: I5c32961b30f082a8a4aa78906d2fce1cdf4b0d2b
Signed-off-by: Minchan Kim <minchan@google.com>
2024-04-11 00:56:49 +00:00
Chungjui Fan
be55946e20 ANDROID: Update the ABI symbol list
Adding the following symbols:
  - ksoftirqd
  - pwmchip_add
  - pwmchip_remove
  - pwm_get_chip_data
  - pwm_set_chip_data

Bug: 307424586
Change-Id: I1a73d09feb888394925d23b4cdfce7bc3d1b0d9c
Signed-off-by: Chungjui Fan <chungjuifan@google.com>
2024-04-10 18:11:08 +00:00
Viresh Kumar
4b8e1f520a BACKPORT: cpufreq: Don't unregister cpufreq cooling on CPU hotplug
Offlining a CPU and bringing it back online is a common operation and it
happens frequently during system suspend/resume, where the non-boot CPUs
are hotplugged out during suspend and brought back at resume.

The cpufreq core already tries to make this path as fast as possible as
the changes are only temporary in nature and full cleanup of resources
isn't required in this case. For example the drivers can implement
online()/offline() callbacks to avoid a lot of tear down of resources.

On similar lines, there is no need to unregister the cpufreq cooling
device during suspend / resume, but only while the policy is getting
removed.

Moreover, unregistering the cpufreq cooling device is resulting in an
unwanted outcome, where the system suspend is eventually aborted in the
process.  Currently, during system suspend the cpufreq core unregisters
the cooling device, which in turn removes a kobject using device_del()
and that generates a notification to the userspace via uevent broadcast.
This causes system suspend to abort in some setups.

This was also earlier reported (indirectly) by Roman [1]. Maybe there is
another way around to fixing that problem properly, but this change
makes sense anyways.

Move the registering and unregistering of the cooling device to policy
creation and removal times onlyy.

Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218521
Reported-by: Manaf Meethalavalappu Pallikunhi <quic_manafm@quicinc.com>
Reported-by: Roman Stratiienko <r.stratiienko@gmail.com>
Link: https://patchwork.kernel.org/project/linux-pm/patch/20220710164026.541466-1-r.stratiienko@gmail.com/ [1]
Tested-by: Manaf Meethalavalappu Pallikunhi <quic_manafm@quicinc.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Dhruva Gole <d-gole@ti.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
(cherry picked from commit c4d61a529db788d2e52654f5b02c8d1de4952c5b)
Change-Id: I0b9435be1c2b41ea52a26cb578d850fd8121d57a
[jstultz: Tweaked to work around collision with existing android_vh
calls]
Signed-off-by: John Stultz <jstultz@google.com>
Bug: 333300519
2024-04-10 18:11:00 +00:00
Kyle Tso
165b01710b FROMGIT: usb: typec: tcpm: Correct the PDO counting in pd_set
Off-by-one errors happen because nr_snk_pdo and nr_src_pdo are
incorrectly added one. The index of the loop is equal to the number of
PDOs to be updated when leaving the loop and it doesn't need to be added
one.

When doing the power negotiation, TCPM relies on the "nr_snk_pdo" as
the size of the local sink PDO array to match the Source capabilities
of the partner port. If the off-by-one overflow occurs, a wrong RDO
might be sent and unexpected power transfer might happen such as over
voltage or over current (than expected).

"nr_src_pdo" is used to set the Rp level when the port is in Source
role. It is also the array size of the local Source capabilities when
filling up the buffer which will be sent as the Source PDOs (such as
in Power Negotiation). If the off-by-one overflow occurs, a wrong Rp
level might be set and wrong Source PDOs will be sent to the partner
port. This could potentially cause over current or port resets.

Fixes: cd099cde4ed2 ("usb: typec: tcpm: Support multiple capabilities")
Cc: stable@vger.kernel.org
Signed-off-by: Kyle Tso <kyletso@google.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20240404133517.2707955-1-kyletso@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Bug: 206108037
(cherry picked from commit c4128304c2169b4664ed6fb6200f228cead2ab70
 git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-linus)
Change-Id: Icf86f562c7bbaefe7e27885e107b373aa4b64fd0
Signed-off-by: Kyle Tso <kyletso@google.com>
2024-04-10 01:35:44 +00:00
Jakub Kicinski
5dc2bc2966 UPSTREAM: tls: fix race between tx work scheduling and socket close
commit e01e3934a1b2d122919f73bc6ddbe1cdafc4bbdb upstream.

Similarly to previous commit, the submitting thread (recvmsg/sendmsg)
may exit as soon as the async crypto handler calls complete().
Reorder scheduling the work before calling complete().
This seems more logical in the first place, as it's
the inverse order of what the submitting thread will do.

Bug: 326214245
Reported-by: valis <sec@valis.email>
Fixes: a42055e8d2 ("net/tls: Add support for async encryption of records for performance")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Simon Horman <horms@kernel.org>
Reviewed-by: Sabrina Dubroca <sd@queasysnail.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
[Lee: Fixed merge-conflict in Stable branches linux-6.1.y and older]
Signed-off-by: Lee Jones <lee@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 196f198ca6fce04ba6ce262f5a0e4d567d7d219d)
Signed-off-by: Lee Jones <joneslee@google.com>
Change-Id: I3128347d1e45018db30b6f2336ece2a4a3a630db
(cherry picked from commit e78d26a9ec366b108c89099b148ae3cea6f1a8e9)
2024-04-09 16:39:29 +00:00
Pablo Neira Ayuso
cdc8aeb893 UPSTREAM: netfilter: nft_chain_filter: handle NETDEV_UNREGISTER for inet/ingress basechain
commit 01acb2e8666a6529697141a6017edbf206921913 upstream.

Remove netdevice from inet/ingress basechain in case NETDEV_UNREGISTER
event is reported, otherwise a stale reference to netdevice remains in
the hook list.

Bug: 332803585
Fixes: 60a3815da7 ("netfilter: add inet ingress support")
Cc: stable@vger.kernel.org
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 70f17b48c86622217a58d5099d29242fc9adac58)
Signed-off-by: Lee Jones <joneslee@google.com>
Change-Id: I28482dca416b61dcf2e722ba0aef62d2d41a8f23
2024-04-09 16:39:11 +00:00
Jakub Kicinski
5b4439c0d7 UPSTREAM: tls: fix race between async notify and socket close
[ Upstream commit aec7961916f3f9e88766e2688992da6980f11b8d ]

The submitting thread (one which called recvmsg/sendmsg)
may exit as soon as the async crypto handler calls complete()
so any code past that point risks touching already freed data.

Try to avoid the locking and extra flags altogether.
Have the main thread hold an extra reference, this way
we can depend solely on the atomic ref counter for
synchronization.

Don't futz with reiniting the completion, either, we are now
tightly controlling when completion fires.

Bug: 326214245
Reported-by: valis <sec@valis.email>
Fixes: 0cada33241 ("net/tls: fix race condition causing kernel panic")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Simon Horman <horms@kernel.org>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Sabrina Dubroca <sd@queasysnail.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit 7a3ca06d04d589deec81f56229a9a9d62352ce01)
Signed-off-by: Lee Jones <joneslee@google.com>
Change-Id: Idda32dd68ed26ae5c85c985305f52c3b2245e32c
2024-04-09 13:05:29 +01:00
Jakub Kicinski
fd16669b18 UPSTREAM: net: tls: factor out tls_*crypt_async_wait()
[ Upstream commit c57ca512f3b68ddcd62bda9cc24a8f5584ab01b1 ]

Factor out waiting for async encrypt and decrypt to finish.
There are already multiple copies and a subsequent fix will
need more. No functional changes.

Note that crypto_wait_req() returns wait->err

Bug: 326214245
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Simon Horman <horms@kernel.org>
Reviewed-by: Sabrina Dubroca <sd@queasysnail.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Stable-dep-of: aec7961916f3 ("tls: fix race between async notify and socket close")
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit 2c6841c88201e13967583f0f8a9f9b54b9cde404)
Signed-off-by: Lee Jones <joneslee@google.com>
Change-Id: I7355c32d284623e08650c4d2b2a7d3be40f0cc0c
2024-04-09 13:05:23 +01:00
Sabrina Dubroca
5cb88480ab UPSTREAM: tls: extract context alloc/initialization out of tls_set_sw_offload
[ Upstream commit 615580cbc99af0da2d1c7226fab43a3d5003eb97 ]

Simplify tls_set_sw_offload a bit.

Bug: 326214245
Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Stable-dep-of: aec7961916f3 ("tls: fix race between async notify and socket close")
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit d55eb0b495a9e4de1c61394087bb06f12d18b6bc)
Signed-off-by: Lee Jones <joneslee@google.com>
Change-Id: I97ae8c76bb91d49ca26ad9d92c7ce099a3f780ed
2024-04-09 13:05:12 +01:00
Carlos Galo
338203a817 BACKPORT: mm: update mark_victim tracepoints fields
The current implementation of the mark_victim tracepoint provides only the
process ID (pid) of the victim process.  This limitation poses challenges
for userspace tools requiring real-time OOM analysis and intervention.
Although this information is available from the kernel logs, it’s not
the appropriate format to provide OOM notifications.  In Android, BPF
programs are used with the mark_victim trace events to notify userspace of
an OOM kill.  For consistency, update the trace event to include the same
information about the OOMed victim as the kernel logs.

- UID
   In Android each installed application has a unique UID. Including
   the `uid` assists in correlating OOM events with specific apps.

- Process Name (comm)
   Enables identification of the affected process.

- OOM Score
  Will allow userspace to get additional insight of the relative kill
  priority of the OOM victim. In Android, the oom_score_adj is used to
  categorize app state (foreground, background, etc.), which aids in
  analyzing user-perceptible impacts of OOM events [1].

- Total VM, RSS Stats, and pgtables
  Amount of memory used by the victim that will, potentially, be freed up
  by killing it.

[1] 246dc8fc95:frameworks/base/services/core/java/com/android/server/am/ProcessList.java;l=188-283
Signed-off-by: Carlos Galo <carlosgalo@google.com>
Reviewed-by: Steven Rostedt <rostedt@goodmis.org>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: "Masami Hiramatsu (Google)" <mhiramat@kernel.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

Bug: 331214192
(cherry picked from commit 72ba14deb40a9e9668ec5e66a341ed657e5215c2)
[ carlosgalo: Manually added struct cred change in mark_oom_victim function ]
Link: https://lore.kernel.org/all/20240223173258.174828-1-carlosgalo@google.com/
Change-Id: I24f503ceca04b83f8abf42fcd04a3409e17be6b5
2024-04-08 18:00:16 +00:00
Carlos Galo
97808981ed Revert "FROMGIT: BACKPORT: mm: update mark_victim tracepoints fields"
This reverts commit 6b4c816d17.

Reason for revert: b/331214192

Change-Id: I9f4f56de7d65cee19c7015b0cb1bda339d82a5f5
Signed-off-by: Carlos Galo <carlosgalo@google.com>
2024-04-08 18:00:16 +00:00
Minchan Kim
dfd2c809b9 ANDROID: Update the ABI symbol list
4 function symbol(s) added
  'bool __oom_reap_task_mm(struct mm_struct*)'
  'int do_send_sig_info(int, struct kernel_siginfo*, struct task_struct*, enum pid_type)'
  'void get_reclaim_params(int*, int*)'
  'int set_reclaim_params(int, int)'

Bug: 323406883
Change-Id: I07f578ef8ec675e4980f225611630c57ec9eaff3
Signed-off-by: Minchan Kim <minchan@google.com>
2024-04-08 17:39:38 +00:00
Minchan Kim
babe7ef868 ANDROID: export two function to reclaim memory
Export two functions to help memory reclaim.

Bug: 323406883
Change-Id: I099d414c9b3648224ab077b9929c6622b2d4228a
Signed-off-by: Minchan Kim <minchan@google.com>
2024-04-08 17:39:38 +00:00
Minchan Kim
66193f866d ANDROID: add reclaim tune parameter functions
This patch adds two exported functions to set/get reclaim parameters.

Bug: 323406883
Change-Id: I8c29073dba3e77cb5db7f45b640518deae04b8a9
Signed-off-by: Minchan Kim <minchan@google.com>
2024-04-08 17:39:38 +00:00
Pablo Neira Ayuso
27c443059c UPSTREAM: netfilter: nf_tables: disallow anonymous set with timeout flag
commit 16603605b667b70da974bea8216c93e7db043bf1 upstream.

Anonymous sets are never used with timeout from userspace, reject this.
Exception to this rule is NFT_SET_EVAL to ensure legacy meters still work.

Bug: 329055463
Cc: stable@vger.kernel.org
Fixes: 761da2935d ("netfilter: nf_tables: add set timeout API support")
Reported-by: lonial con <kongln9170@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 72c1efe3f247a581667b7d368fff3bd9a03cd57a)
Signed-off-by: Lee Jones <joneslee@google.com>
Change-Id: I8c1c818e3d155d5edefee0b741568104081efb38
2024-04-08 16:15:41 +01:00
Giuliano Procida
56ba301cac ANDROID: drop redundant OWNERS_DrNo file
This file should only exist in android-mainline.

Bug: 333350072
Change-Id: I6350acb9d187f94a67c34c2e72b607a9599269b0
Signed-off-by: Giuliano Procida <gprocida@google.com>
2024-04-08 12:52:46 +00:00
Aiswarya Cyriac
60534eef47 UPSTREAM: ALSA: virtio: Fix "Coverity: virtsnd_kctl_tlv_op(): Uninitialized variables" warning.
This commit fixes the following warning when building virtio_snd driver.

"
*** CID 1583619:  Uninitialized variables  (UNINIT)
sound/virtio/virtio_kctl.c:294 in virtsnd_kctl_tlv_op()
288
289     		break;
290     	}
291
292     	kfree(tlv);
293
vvv     CID 1583619:  Uninitialized variables  (UNINIT)
vvv     Using uninitialized value "rc".
294     	return rc;
295     }
296
297     /**
298      * virtsnd_kctl_get_enum_items() - Query items for the ENUMERATED element type.
299      * @snd: VirtIO sound device.
"

This warning is caused by the absence of the "default" branch in the
switch-block, and is a false positive because the kernel calls
virtsnd_kctl_tlv_op() only with values for op_flag processed in
this block.

Also, this commit unifies the cleanup path for all possible control
paths in the callback function.

Signed-off-by: Anton Yakovlev <anton.yakovlev@opensynergy.com>
Signed-off-by: Aiswarya Cyriac <aiswarya.cyriac@opensynergy.com>
Reported-by: coverity-bot <keescook+coverity-bot@chromium.org>
Addresses-Coverity-ID: 1583619 ("Uninitialized variables")
Fixes: d6568e3de42d ("ALSA: virtio: add support for audio controls")
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Link: https://lore.kernel.org/r/20240216100643.688590-1-aiswarya.cyriac@opensynergy.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>

Bug: 330891925
Change-Id: I6fb999ed48457baddcde95a3539daf010d505296
(cherry picked from commit ba00e413fa1515e4d0890803c01ebc555f500f15)
Signed-off-by: Marcin Radomski <dextero@google.com>
2024-04-04 15:35:58 +00:00
Anton Yakovlev
e7f7d55471 UPSTREAM: ALSA: virtio: add support for audio controls
Implementation of support for audio controls in accordance with the
extension of the virtio sound device specification [1] planned for
virtio-v1.3-cs01.

The device can announce the VIRTIO_SND_F_CTLS feature. If the feature is
negotiated, then an additional field appears in the configuration space:

  struct virtio_snd_config {
    ...
    /* number of available control elements */
    __le32 controls;
  };

The driver can send the following requests to manage audio controls:

  enum {
    ...
    /* control element request types */
    VIRTIO_SND_R_CTL_INFO = 0x0300,
    VIRTIO_SND_R_CTL_ENUM_ITEMS,
    VIRTIO_SND_R_CTL_READ,
    VIRTIO_SND_R_CTL_WRITE,
    VIRTIO_SND_R_CTL_TLV_READ,
    VIRTIO_SND_R_CTL_TLV_WRITE,
    VIRTIO_SND_R_CTL_TLV_COMMAND,
    ...
  };

And the device can send the following audio control event notification:

  enum {
    ...
    /* control element event types */
    VIRTIO_SND_EVT_CTL_NOTIFY = 0x1200,
    ...
  };

See additional details in [1].

[1] https://lists.oasis-open.org/archives/virtio-comment/202104/msg00013.html

Signed-off-by: Anton Yakovlev <anton.yakovlev@opensynergy.com>
Signed-off-by: Aiswarya Cyriac <aiswarya.cyriac@opensynergy.com>
Link: https://lore.kernel.org/r/20240115133654.576068-2-aiswarya.cyriac@opensynergy.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>

Bug: 330891925
Change-Id: I4c70787a920bc4a7cf82b8115fc9f0a6c77b4859
(cherry picked from commit d6568e3de42dd971a1356f7ba581e6600d53f0a0)
Signed-off-by: Marcin Radomski <dextero@google.com>
2024-04-04 15:35:58 +00:00
Marcin Radomski
0fd2018454 ANDROID: Update symbols list for virtio_snd.ko audio controls
Added just symbols reported as required by:

  tools/bazel run //common-modules/virtual-device:virtual_device_aarch64_dist

because the virtual_device_aarch64_abi_update_symbol_list tool
introduces a ton of unrelated changes - not just trivial reordering, but
also adds some extra symbols.

Bug: 330891925
Test: Build dist packages on the entire commit chain:
Test: tools/bazel run //common-modules/virtual-device:virtual_device_x86_64_dist
Test: tools/bazel run //common-modules/virtual-device:virtual_device_aarch64_dist
Change-Id: I26abf56b3cb9b3cc3f179647ce229aa85a3dd7c8
Signed-off-by: Marcin Radomski <dextero@google.com>
2024-04-04 15:35:55 +00:00
Qais Yousef
ebcdb9dc21 ANDROID: Move cpu_busy_with_softirqs() into sched.h
The extern declaration ended up at the end of rt.c instead of sched.h by
mistake.

Bug: 332629555
Fixes: dcdec80d6b ("ANDROID: Export cpu_busy_with_softirqs()")
Signed-off-by: Qais Yousef <qyousef@google.com>
Change-Id: Id95a1c2261134c4d4f589ec51d350fc5eb2724f9
2024-04-04 02:42:42 +00:00
Charan Teja Kalla
5dd0c4814f UPSTREAM: mm: page_alloc: unreserve highatomic page blocks before oom
__alloc_pages_direct_reclaim() is called from slowpath allocation where
high atomic reserves can be unreserved after there is a progress in
reclaim and yet no suitable page is found.  Later should_reclaim_retry()
gets called from slow path allocation to decide if the reclaim needs to be
retried before OOM kill path is taken.

should_reclaim_retry() checks the available(reclaimable + free pages)
memory against the min wmark levels of a zone and returns:

a) true, if it is above the min wmark so that slow path allocation will
   do the reclaim retries.

b) false, thus slowpath allocation takes oom kill path.

should_reclaim_retry() can also unreserves the high atomic reserves **but
only after all the reclaim retries are exhausted.**

In a case where there are almost none reclaimable memory and free pages
contains mostly the high atomic reserves but allocation context can't use
these high atomic reserves, makes the available memory below min wmark
levels hence false is returned from should_reclaim_retry() leading the
allocation request to take OOM kill path.  This can turn into a early oom
kill if high atomic reserves are holding lot of free memory and
unreserving of them is not attempted.

(early)OOM is encountered on a VM with the below state:
[  295.998653] Normal free:7728kB boost:0kB min:804kB low:1004kB
high:1204kB reserved_highatomic:8192KB active_anon:4kB inactive_anon:0kB
active_file:24kB inactive_file:24kB unevictable:1220kB writepending:0kB
present:70732kB managed:49224kB mlocked:0kB bounce:0kB free_pcp:688kB
local_pcp:492kB free_cma:0kB
[  295.998656] lowmem_reserve[]: 0 32
[  295.998659] Normal: 508*4kB (UMEH) 241*8kB (UMEH) 143*16kB (UMEH)
33*32kB (UH) 7*64kB (UH) 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB
0*4096kB = 7752kB

Per above log, the free memory of ~7MB exist in the high atomic reserves
is not freed up before falling back to oom kill path.

Fix it by trying to unreserve the high atomic reserves in
should_reclaim_retry() before __alloc_pages_direct_reclaim() can fallback
to oom kill path.

Bug: 332219324
Link: https://lkml.kernel.org/r/1700823445-27531-1-git-send-email-quic_charante@quicinc.com
Fixes: 0aaa29a56e ("mm, page_alloc: reserve pageblocks for high-order atomic allocations on demand")
(cherry picked from commit ac3f3b0a55518056bc80ed32a41931c99e1f7d81)
Change-Id: I432d4ac4864d401a4413f6b2ef902625766f8070
Signed-off-by: Charan Teja Kalla <quic_charante@quicinc.com>
Reported-by: Chris Goldsworthy <quic_cgoldswo@quicinc.com>
Suggested-by: Michal Hocko <mhocko@suse.com>
Acked-by: Michal Hocko <mhocko@suse.com>
Acked-by: David Rientjes <rientjes@google.com>
Cc: Chris Goldsworthy <quic_cgoldswo@quicinc.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Mel Gorman <mgorman@techsingularity.net>
Cc: Pavankumar Kondeti <quic_pkondeti@quicinc.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2024-04-03 22:38:24 +00:00
Charan Teja Kalla
6d3db504d1 UPSTREAM: mm: page_alloc: enforce minimum zone size to do high atomic reserves
Highatomic reserves are set to roughly 1% of zone for maximum and a
pageblock size for minimum.  Encountered a system with the below
configuration:
Normal free:7728kB boost:0kB min:804kB low:1004kB high:1204kB
reserved_highatomic:8192KB managed:49224kB

On such systems, even a single pageblock makes highatomic reserves are set
to ~8% of the zone memory.  This high value can easily exert pressure on
the zone.

Per discussion with Michal and Mel, it is not much useful to reserve the
memory for highatomic allocations on such small systems[1].  Since the
minimum size for high atomic reserves is always going to be a pageblock
size and if 1% of zone managed pages is going to be below pageblock size,
don't reserve memory for high atomic allocations.  Thanks Michal for this
suggestion[2].

Since no memory is being reserved for high atomic allocations and if
respective allocation failures are seen, this patch can be reverted.

[1] https://lore.kernel.org/linux-mm/20231117161956.d3yjdxhhm4rhl7h2@techsingularity.net/
[2] https://lore.kernel.org/linux-mm/ZVYRJMUitykepLRy@tiehlicka/

Bug: 332219324
Link: https://lkml.kernel.org/r/c3a2a48e2cfe08176a80eaf01c110deb9e918055.1700821416.git.quic_charante@quicinc.com
Change-Id: Id059b63bd6ee68b3a2cd1c4b44613234a42d0a46
(cherry picked from commit 9cd20f3fe045af95a8fe7a12328b21bfd2f3b8bf)
Signed-off-by: Charan Teja Kalla <quic_charante@quicinc.com>
Acked-by: David Rientjes <rientjes@google.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Mel Gorman <mgorman@techsingularity.net>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Pavankumar Kondeti <quic_pkondeti@quicinc.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2024-04-03 22:38:24 +00:00
Charan Teja Kalla
58699757f4 UPSTREAM: mm: page_alloc: correct high atomic reserve calculations
Patch series "mm: page_alloc: fixes for high atomic reserve
caluculations", v3.

The state of the system where the issue exposed shown in oom kill logs:

[  295.998653] Normal free:7728kB boost:0kB min:804kB low:1004kB high:1204kB reserved_highatomic:8192KB active_anon:4kB inactive_anon:0kB active_file:24kB inactive_file:24kB unevictable:1220kB writepending:0kB present:70732kB managed:49224kB mlocked:0kB bounce:0kB free_pcp:688kBlocal_pcp:492kB free_cma:0kB
[  295.998656] lowmem_reserve[]: 0 32
[  295.998659] Normal: 508*4kB (UMEH) 241*8kB (UMEH) 143*16kB (UMEH)
33*32kB (UH) 7*64kB (UH) 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 7752kB

From the above, it is seen that ~16MB of memory reserved for high atomic
reserves against the expectation of 1% reserves which is fixed in the 1st
patch.

Don't reserve the high atomic page blocks if 1% of zone memory size is
below a pageblock size.

This patch (of 2):

reserve_highatomic_pageblock() aims to reserve the 1% of the managed pages
of a zone, which is used for the high order atomic allocations.

It uses the below calculation to reserve:
static void reserve_highatomic_pageblock(struct page *page, ....) {

   .......
   max_managed = (zone_managed_pages(zone) / 100) + pageblock_nr_pages;

   if (zone->nr_reserved_highatomic >= max_managed)
       goto out;

   zone->nr_reserved_highatomic += pageblock_nr_pages;
   set_pageblock_migratetype(page, MIGRATE_HIGHATOMIC);
   move_freepages_block(zone, page, MIGRATE_HIGHATOMIC, NULL);

out:
   ....
}

Since we are always appending the 1% of zone managed pages count to
pageblock_nr_pages, the minimum it is turning into 2 pageblocks as the
nr_reserved_highatomic is incremented/decremented in pageblock sizes.

Encountered a system(actually a VM running on the Linux kernel) with the
below zone configuration:
Normal free:7728kB boost:0kB min:804kB low:1004kB high:1204kB
reserved_highatomic:8192KB managed:49224kB

The existing calculations making it to reserve the 8MB(with pageblock size
of 4MB) i.e.  16% of the zone managed memory.  Reserving such high amount
of memory can easily exert memory pressure in the system thus may lead
into unnecessary reclaims till unreserving of high atomic reserves.

Since high atomic reserves are managed in pageblock size granules, as
MIGRATE_HIGHATOMIC is set for such pageblock, fix the calculations for
high atomic reserves as, minimum is pageblock size , maximum is
approximately 1% of the zone managed pages.

Bug: 332219324
Link: https://lkml.kernel.org/r/cover.1700821416.git.quic_charante@quicinc.com
Link: https://lkml.kernel.org/r/1660034138397b82a0a8b6ae51cbe96bd583d89e.1700821416.git.quic_charante@quicinc.com
Change-Id: Icc15fb88ef6166f691f5aa14311bc45bff972b99
(cherry picked from commit d68e39fc45f70e35eb74df2128d315c1d91e4dc4)
Signed-off-by: Charan Teja Kalla <quic_charante@quicinc.com>
Acked-by: Mel Gorman <mgorman@techsingularity.net>
Acked-by: David Rientjes <rientjes@google.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Pavankumar Kondeti <quic_pkondeti@quicinc.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2024-04-03 22:38:24 +00:00
Qais Yousef
9ce8f4d0bb ANDROID: Update the ABI symbol list
Adding the following symbols:
  - cpu_busy_with_softirqs
  - __traceiter_android_rvh_tick_entry
  - __tracepoint_android_rvh_tick_entry

Bug: 332629555
Change-Id: I8ff85b6c13e39de35013dd742aaccf5db02e74b4
Signed-off-by: Qais Yousef <qyousef@google.com>
2024-04-03 20:32:38 +00:00
Qais Yousef
dcdec80d6b ANDROID: Export cpu_busy_with_softirqs()
This function used to be called task_may_not_preempt() in older versions
and used by modules that have their extension to RT. Export it to allow
users to continue to use it.

Bug: 332629555
Signed-off-by: Qais Yousef <qyousef@google.com>
Change-Id: I04affb8e9e6258f9fb36ebab4d7956a265e9e299
2024-04-03 19:43:22 +00:00
fengqi
baba019a00 ANDROID: GKI: update symbol list file for xiaomi
5 function symbol(s) added
  'struct backlight_device* backlight_device_get_by_name(const char*)'
  'void netdev_reset_tc(struct net_device*)'
  'int netdev_set_num_tc(struct net_device*, u8)'
  'int netdev_set_tc_queue(struct net_device*, u8, u16, u16)'
  'int pci_sriov_set_totalvfs(struct pci_dev*, u16)'

1 variable symbol(s) added
  'const struct udp_tunnel_nic_ops* udp_tunnel_nic_ops'

Bug: 332479153
Change-Id: Ia8c886218eea2048df52bc3406ded44d4ed3ab66
Signed-off-by: fengqi <fengqi@xiaomi.corp-partner.google.com>
2024-04-03 19:21:15 +00:00
Greg Kroah-Hartman
63040ce8e9 Merge branch 'android14-6.1' into branch 'android14-6.1-lts'
This brings the -lts branch up to date with the recent changes in
'android14-6.1'.  Included in here are the following commits:

* af361f9a10 UPSTREAM: usb: typec: Return size of buffer if pd_set operation succeeds
* 07d4bc4f64 UPSTREAM: usb: typec: tcpm: Update PD of Type-C port upon pd_set
* 59dc53906a UPSTREAM: usb: typec: tcpm: fix double-free issue in tcpm_port_unregister_pd()
* 0e88400de9 UPSTREAM: usb: typec: tcpm: Correct port source pdo array in pd_set callback
* 3ca4271578 Reapply "Merge tag 'android14-6.1.75_r00' into android14-6.1"
* eb58741d26 Revert "ANDROID: null_blk: Support configuring the maximum segment size"
* e684a924fa Revert "usb: dwc3: core: configure TX/RX threshold for DWC3_IP"
* f085398f0e ANDROID: Update the ABI symbol list
* fa57be1983 ANDROID: GKI: Update symbols for rockchip drm
* 0c9784b747 FROMLIST: binder: check offset alignment in binder_get_object()
* 931187cc18 ANDROID: GKI: Add symbol list for Nothing
* 353c3de3f1 ANDROID: thermal: Add vendor thermal_pm_notify_suspend function
* 5b8114ec3c UPSTREAM: usb: dwc3: gadget: Don't disconnect if not started
* 80cdac5d86 Revert "ANDROID: block: Add support for filesystem requests and small segments"
* 71ad82fd45 ANDROID: vendor_hook: fix issue vip thread do not sleep while no vip work
* 8f2f0a3b12 UPSTREAM: sched/wait: Fix a kthread_park race with wait_woken()
* eef3b6e529 ANDROID: KVM: arm64: Fix TLB invalidation when coalescing into a block
* 8790a94475 ANDROID: ABI: Update symbol list for Exynos SoC
* d518ca9dbb ANDROID: GKI: Add symbols for rockchip snd trcm
* 89af1d57cc FROMGIT: usb: dwc2: Disable clock gating feature on Rockchip SoCs
* 38f8abdd89 ANDROID: ABI: Update symbol list for Exynos SoC
* 421a001633 ANDROID: KVM: arm64: Fix missing trace event for nVHE dyn HVCs
* 609541ba1a ANDROID: Update the ABI symbol list
* b751125447 ANDROID: Add symbols for IIO SCMI module
* 2485080922 ANDROID: GKI: Update symbols for rockchip
* 148edc25ee UPSTREAM: usb: dwc2: disable lpm feature on Rockchip SoCs
* 2adbad2296 ANDROID: Update symbols list for open-dice.ko
* 176b8fe524 FROMLIST: mm/migrate: set swap entry values of THP tail pages properly.
* 14a09b9f62 ANDROID: Update the ABI symbol list
* 7d911a149b ANDROID: virt: gunyah: Move send_lock around req and reply
* 75266774b9 ANDROID: null_blk: Support configuring the maximum segment size
* a265d535b7 ANDROID: scsi_debug: Support configuring the maximum segment size
* 8a2f432fcb ANDROID: block: Add support for filesystem requests and small segments
* 879eff2954 ANDROID: block: Support submitting passthrough requests with small segments
* c5b8696597 ANDROID: block: Make sub_page_limit_queues available in debugfs
* 4fd9a46455 ANDROID: block: Support configuring limits below the page size
* 65bdaa7543 ANDROID: block: Prepare for supporting sub-page limits
* 05ee024443 ANDROID: block: Use pr_info() instead of printk(KERN_INFO ...)
* 326690739d ANDROID: sound: usb: add vendor hook for cpu suspend support
* 41292928f9 ANDROID: usb: Add vendor hook for usb suspend and resume
* 3f5807c586 ANDROID: fips140: change linker script guard
* fa6c89a93f Revert "ANDROID: Update symbols list for open-dice.ko"
* 14e89262f0 ANDROID: Update symbols list for open-dice.ko
* 7b51d1fd64 FROMGIT: PM: sleep: wakeirq: fix wake irq warning in system suspend
* a354271b6e ANDROID: ABI: Update symbol for Exynos SoC
* 2df2c4b515 UPSTREAM: usb: dwc3: core: set force_gen1 bit in USB31 devices if max speed is SS
* 299c92ff85 UPSTREAM: PCI: dwc: Strengthen the MSI address allocation logic
* e3bc469e5d UPSTREAM: PCI: dwc: Restrict only coherent DMA mask for MSI address allocation
* e623dd5ac2 ANDROID: ABI: Update oplus symbol list
* db91c5d31a ANDROID: vendor_hook: rename the the name of hooks
* 4292d25903 FROMGIT: usb: xhci: Add error handling in xhci_map_urb_for_dma
* 6bce7cfc5e FROMGIT: usb: dwc3: host: Set XHCI_SG_TRB_CACHE_SIZE_QUIRK
* 89e4f7a7a3 FROMGIT: usb: host: xhci-plat: Add support for XHCI_SG_TRB_CACHE_SIZE_QUIRK
* ef39f76e4d ANDROID: fuse-bpf: Fix readdir for getdents
* 4c25eb8ea5 ANDROID: EXPORT raise_softirq and update the ABI symbol list
* a69447d296 UPSTREAM: netfilter: nf_tables: disallow timeout for anonymous sets
* 4a85f45e4e BACKPORT: FROMGIT: mm: add alloc_contig_migrate_range allocation statistics
* e2903ba04e FROMLIST: iommu: Avoid races around default domain allocations
* 65d457fae4 ANDROID: fips140 - fix integrity check by unapplying dynamic SCS
* 1616e03be1 ANDROID: fips140 - add option for debugging the integrity check
* fd3551098b BACKPORT: f2fs: split initial and dynamic conditions for extent_cache
* e897dadaf3 ANDROID: Update the ABI symbol list
* bb197cebd5 UPSTREAM: usb: typec: altmodes/displayport: create sysfs nodes as driver's default device attribute group
* 981ffd6df1 UPSTREAM: epoll: use refcount to reduce ep_mutex contention
* 457946c233 ANDROID: GKI: Update oplus symbol list
* 2fd940bf34 ANDROID: uid_sys_stat: fix data-error of cputime and io
* 5f66e7c904 ANDROID: Update the ABI symbol list
* 8bd9771065 ANDROID: vendor_hooks: Export cma_alloc trace points
* 9219a44e00 ANDROID: gki_defconfig: Enable CONFIG_ARM_SCMI_TRANSPORT_VIRTIO
* 6bad1052c2 Revert "Merge tag 'android14-6.1.75_r00' into android14-6.1"
* ecb45e2a73 UPSTREAM: net: tls: fix use-after-free with partial reads and async decrypt
* 1dbafe61e3 Merge tag 'android14-6.1.75_r00' into android14-6.1
* 95805f9e46 ANDROID: GKI: add GKI symbol list for Exynosauto SoC
* 23c8963806 UPSTREAM: usb: typec: class: fix typec_altmode_put_partner to put plugs
* 3b7cd7d0e0 UPSTREAM: Revert "usb: typec: class: fix typec_altmode_put_partner to put plugs"
* 8b964b55a6 ANDROID: GKI: Update symbol list for mtk
* 945b0c8ac4 ANDROID: GKI: Update oplus symbol list
* 9698f7e8e7 FROMGIT: f2fs: introduce FAULT_BLKADDR_CONSISTENCE
* cc322f7dee FROMGIT: f2fs: fix to remove unnecessary f2fs_bug_on() to avoid panic
* 33d3b7311b FROMGIT: f2fs: compress: fix to avoid inconsistence bewteen i_blocks and dnode
* ba28d24cea FROMGIT: f2fs: compress: fix to check unreleased compressed cluster
* 0c3d1c94c4 FROMGIT: f2fs: compress: fix to cover normal cluster write with cp_rwsem
* 02a1ce0cf2 FROMGIT: f2fs: compress: fix to guarantee persisting compressed blocks by CP
* 139e9a0f9d ANDROID: remove LTO check from build.config.gki.aarch64.fips140
* e61a6ec29a ANDROID: add symbol list for fips140 module
* 09ca5740fb ANDROID: abi_gki_aarch64_qcom: Update symbol list
* 0832777c62 ANDROID: GKI: Update symbol list for transsion
* 35bb2c8c5f ANDROID: Add vendor_hooks to workaround CONFIG_TASK_DELAY_ACCT
* 70fdaa07de Revert "ANDROID: Build null_blk and scsi_debug as kernel modules"
* 30edcedb44 Revert "interconnect: Fix locking for runpm vs reclaim"
* 4289e1348e ANDROID: GKI: Update symbol list for xiaomi
* 77277e4ba4 ANDROID: sched/cpuset: Add vendor hook to change tasks affinity
* 18c75fa402 ANDROID: ABI: Update oplus symbol list
* 56e0cf4e39 ANDROID: binder: Add vendor hook to fix priority restore
* c73814520d Revert "interconnect: Teach lockdep about icc_bw_lock order"
* c38ea4a131 BACKPORT: gso: fix dodgy bit handling for GSO_UDP_L4
* 34cf02fef9 ANDROID: ABI: Update oplus symbol list
* 763647877c ANDROID: vendor_hooks: Add hook for trace_android_vh_copy_process
* 26d7216e1d ANDROID: GKI: Update symbol list for mtk
* ad49939193 FROMGIT: PM: runtime: add tracepoint for runtime_status changes
* e7d236d9c4 ANDROID: GKI: add allowed list file for xiaomi
* 1bb51799bf UPSTREAM: netfilter: nft_set_rbtree: skip end interval element from gc
* d68f68a9d7 ANDROID: GKI: add symbol list file for moto
* 7114c782ec UPSTREAM: scsi: ufs: core: Fix racing issue between ufshcd_mcq_abort() and ISR
* db23405211 UPSTREAM: scsi: ufs: core: Remove dev cmd clock scaling busy
* c622e98ddc ANDROID: ABI: Update symbol list for Nothing
* 8c0f917473 ANDROID: abi_gki_aarch64_qcom: Export trace_android_vh_try_fixup_sea
* 9be763fb64 ANDROID: arm64: Call fixup_exception() within do_sea()
* d6b58cc171 ANDROID: PCI: dwc: Wait for the link only if it has been started
* a7f647f49d ANDROID: Update the Pixel symbol list and GKI ABI
* eef88095dc ANDROID: scsi: ufs: add complete init vendor hook
* 81d55bc3b9 ANDROID: Update the ABI symbol list

Change-Id: I039832aa8c22ce92962c51396516b96b3a32a9fc
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2024-04-03 17:16:25 +00:00
Greg Kroah-Hartman
4747c75687 Reapply "ANDROID: null_blk: Support configuring the maximum segment size"
This reverts commit 95d3e50fde4993d5631e83aa65414b98de24cb90.

Bug: 308663717
Bug: 319125789
Cc: Bart Van Assche <bvanassche@acm.org>
Cc: Juan Yescas <jyescas@google.com>
Change-Id: Ib07f0e6c7fb3266ca7959aef6615f2daf5701665
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2024-04-03 17:09:27 +00:00
Kyle Tso
af361f9a10 UPSTREAM: usb: typec: Return size of buffer if pd_set operation succeeds
The attribute writing should return the number of bytes used from the
buffer on success.

Fixes: a7cff92f06 ("usb: typec: USB Power Delivery helpers for ports and partners")
Cc: stable@vger.kernel.org
Signed-off-by: Kyle Tso <kyletso@google.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20240319074309.3306579-1-kyletso@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Bug: 206108037
(cherry picked from commit 53f5094fdf5deacd99b8655df692e9278506724d)
Change-Id: If5ad5cd3b82a81480a5dbe488e49482ab4836ab8
Signed-off-by: Kyle Tso <kyletso@google.com>
2024-04-03 07:45:33 +00:00
Kyle Tso
07d4bc4f64 UPSTREAM: usb: typec: tcpm: Update PD of Type-C port upon pd_set
The PD of Type-C port needs to be updated in pd_set. Unlink the Type-C
port device to the old PD before linking it to a new one.

Fixes: cd099cde4ed2 ("usb: typec: tcpm: Support multiple capabilities")
Cc: stable@vger.kernel.org
Signed-off-by: Kyle Tso <kyletso@google.com>
Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20240311172306.3911309-1-kyletso@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Bug: 206108037
(cherry picked from commit 17af5050dead6cbcca12c1fcd17e0bb8bb284eae)
Change-Id: I84e6735181e2ab7fd37432533ab6b91b0b560c1e
Signed-off-by: Kyle Tso <kyletso@google.com>
2024-04-03 07:45:33 +00:00
Xu Yang
59dc53906a UPSTREAM: usb: typec: tcpm: fix double-free issue in tcpm_port_unregister_pd()
When unregister pd capabilitie in tcpm, KASAN will capture below double
-free issue. The root cause is the same capabilitiy will be kfreed twice,
the first time is kfreed by pd_capabilities_release() and the second time
is explicitly kfreed by tcpm_port_unregister_pd().

[    3.988059] BUG: KASAN: double-free in tcpm_port_unregister_pd+0x1a4/0x3dc
[    3.995001] Free of addr ffff0008164d3000 by task kworker/u16:0/10
[    4.001206]
[    4.002712] CPU: 2 PID: 10 Comm: kworker/u16:0 Not tainted 6.8.0-rc5-next-20240220-05616-g52728c567a55 #53
[    4.012402] Hardware name: Freescale i.MX8QXP MEK (DT)
[    4.017569] Workqueue: events_unbound deferred_probe_work_func
[    4.023456] Call trace:
[    4.025920]  dump_backtrace+0x94/0xec
[    4.029629]  show_stack+0x18/0x24
[    4.032974]  dump_stack_lvl+0x78/0x90
[    4.036675]  print_report+0xfc/0x5c0
[    4.040289]  kasan_report_invalid_free+0xa0/0xc0
[    4.044937]  __kasan_slab_free+0x124/0x154
[    4.049072]  kfree+0xb4/0x1e8
[    4.052069]  tcpm_port_unregister_pd+0x1a4/0x3dc
[    4.056725]  tcpm_register_port+0x1dd0/0x2558
[    4.061121]  tcpci_register_port+0x420/0x71c
[    4.065430]  tcpci_probe+0x118/0x2e0

To fix the issue, this will remove kree() from tcpm_port_unregister_pd().

Fixes: cd099cde4ed2 ("usb: typec: tcpm: Support multiple capabilities")
cc: stable@vger.kernel.org
Suggested-by: Aisheng Dong <aisheng.dong@nxp.com>
Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20240311065219.777037-1-xu.yang_2@nxp.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Bug: 206108037
(cherry picked from commit b63f90487bdf93a4223ce7853d14717e9d452856)
Change-Id: Ic7878160e11e606c26fbaa64e90e2bf877c53259
Signed-off-by: Kyle Tso <kyletso@google.com>
2024-04-03 07:45:33 +00:00
Kyle Tso
0e88400de9 UPSTREAM: usb: typec: tcpm: Correct port source pdo array in pd_set callback
In tcpm_pd_set, the array of port source capabilities is port->src_pdo,
not port->snk_pdo.

Fixes: cd099cde4ed2 ("usb: typec: tcpm: Support multiple capabilities")
Cc: stable@vger.kernel.org
Signed-off-by: Kyle Tso <kyletso@google.com>
Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20240311144500.3694849-1-kyletso@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Bug: 206108037
(cherry picked from commit 893cd9469c68a89a34956121685617dbb37497b1)
Change-Id: I471747b140e22ba6a3ca9eaa54e18ac995395a2d
Signed-off-by: Kyle Tso <kyletso@google.com>
2024-04-03 07:45:33 +00:00