Commit Graph

213 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
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
c16bb76a0c This is the 6.1.75 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmWy7o0ACgkQONu9yGCS
 aT76JA/9Gh3VNSLG35LaLyq3xGd827N6DPsMzeFHi+MGSyPVg0auE77QkHD/gZl9
 KynmBmz2+9DSoFxymWAS9oEPM8d/vw87AMuSTTct3GKkjEeUcj9lbeOEzgZydXX8
 cJSXvcCeKE3FESU/YbQKxo0N+r7tUDmnCR0edss5/FpYni3jPdg7jdESzGhiCHXj
 r5rjrTE6h7Z/d+2kaKqlheL4o4OkV0YwnFnU2gC3MOOvLmgvXdOVQQsyaZ+WgSAN
 0JS0Q6Xk1xyYWx8iFaLGWIs1pUsQPKxIiRG3N/1KmXITopf2Pu68Yy7ST+YryDkO
 nLcNrr3gsQxrM6MYnEhLzlxs3H1KuAVxJ4Y/dNqJnDxn0OJjcY3repwempz5Sxtk
 0OLDOsCICAiMHeF8rYIGhm09WdowLz0EH+sqadIGqWKzW/BcXqD+r9mpF1lwk1ZL
 FJLgLmtOaG4amI46lEUHQ6ujN7Oad3gLYzudq2zKLeqonSIjm1TuDoMRvHWFsspO
 5i9I0x7Vlo3PqCl7kkKVL9PvVHx6BXJGFShABJqa9ao/oHxkOWuIt26pxUoLUN3P
 7Wa5WnfdlDd9nR3VGHcVe2ncuRmEfuriYpXvItJ7/KJKyIPkGoPehAh+vbZMoEy0
 DwhtD9PPsTlnUufbcZdHavYA1E4y/uXDMOIGB+ERpsTdXh9DwEo=
 =2XHn
 -----END PGP SIGNATURE-----

Merge 6.1.75 into android14-6.1-lts

Changes in 6.1.75
	x86/lib: Fix overflow when counting digits
	x86/mce/inject: Clear test status value
	EDAC/thunderx: Fix possible out-of-bounds string access
	powerpc: remove checks for binutils older than 2.25
	powerpc: add crtsavres.o to always-y instead of extra-y
	powerpc/44x: select I2C for CURRITUCK
	powerpc/pseries/memhp: Fix access beyond end of drmem array
	selftests/powerpc: Fix error handling in FPU/VMX preemption tests
	powerpc/powernv: Add a null pointer check to scom_debug_init_one()
	powerpc/powernv: Add a null pointer check in opal_event_init()
	powerpc/powernv: Add a null pointer check in opal_powercap_init()
	powerpc/imc-pmu: Add a null pointer check in update_events_in_group()
	spi: spi-zynqmp-gqspi: fix driver kconfig dependencies
	mtd: rawnand: Increment IFC_TIMEOUT_MSECS for nand controller response
	ACPI: video: check for error while searching for backlight device parent
	ACPI: LPIT: Avoid u32 multiplication overflow
	KEYS: encrypted: Add check for strsep
	platform/x86/intel/vsec: Enhance and Export intel_vsec_add_aux()
	platform/x86/intel/vsec: Support private data
	platform/x86/intel/vsec: Use mutex for ida_alloc() and ida_free()
	platform/x86/intel/vsec: Fix xa_alloc memory leak
	of: Add of_property_present() helper
	cpufreq: Use of_property_present() for testing DT property presence
	cpufreq: scmi: process the result of devm_of_clk_add_hw_provider()
	calipso: fix memory leak in netlbl_calipso_add_pass()
	efivarfs: force RO when remounting if SetVariable is not supported
	efivarfs: Free s_fs_info on unmount
	spi: sh-msiof: Enforce fixed DTDL for R-Car H3
	ACPI: LPSS: Fix the fractional clock divider flags
	ACPI: extlog: Clear Extended Error Log status when RAS_CEC handled the error
	kunit: debugfs: Fix unchecked dereference in debugfs_print_results()
	mtd: Fix gluebi NULL pointer dereference caused by ftl notifier
	selinux: Fix error priority for bind with AF_UNSPEC on PF_INET6 socket
	crypto: virtio - Handle dataq logic with tasklet
	crypto: sa2ul - Return crypto_aead_setkey to transfer the error
	crypto: ccp - fix memleak in ccp_init_dm_workarea
	crypto: af_alg - Disallow multiple in-flight AIO requests
	crypto: safexcel - Add error handling for dma_map_sg() calls
	crypto: sahara - remove FLAGS_NEW_KEY logic
	crypto: sahara - fix cbc selftest failure
	crypto: sahara - fix ahash selftest failure
	crypto: sahara - fix processing requests with cryptlen < sg->length
	crypto: sahara - fix error handling in sahara_hw_descriptor_create()
	crypto: hisilicon/qm - save capability registers in qm init process
	crypto: hisilicon/zip - add zip comp high perf mode configuration
	crypto: hisilicon/qm - add a function to set qm algs
	crypto: hisilicon/hpre - save capability registers in probe process
	crypto: hisilicon/sec2 - save capability registers in probe process
	crypto: hisilicon/zip - save capability registers in probe process
	pstore: ram_core: fix possible overflow in persistent_ram_init_ecc()
	erofs: fix memory leak on short-lived bounced pages
	fs: indicate request originates from old mount API
	gfs2: Fix kernel NULL pointer dereference in gfs2_rgrp_dump
	crypto: virtio - Wait for tasklet to complete on device remove
	crypto: sahara - avoid skcipher fallback code duplication
	crypto: sahara - handle zero-length aes requests
	crypto: sahara - fix ahash reqsize
	crypto: sahara - fix wait_for_completion_timeout() error handling
	crypto: sahara - improve error handling in sahara_sha_process()
	crypto: sahara - fix processing hash requests with req->nbytes < sg->length
	crypto: sahara - do not resize req->src when doing hash operations
	crypto: scomp - fix req->dst buffer overflow
	csky: fix arch_jump_label_transform_static override
	blocklayoutdriver: Fix reference leak of pnfs_device_node
	NFSv4.1/pnfs: Ensure we handle the error NFS4ERR_RETURNCONFLICT
	SUNRPC: fix _xprt_switch_find_current_entry logic
	pNFS: Fix the pnfs block driver's calculation of layoutget size
	wifi: plfxlc: check for allocation failure in plfxlc_usb_wreq_async()
	wifi: rtw88: fix RX filter in FIF_ALLMULTI flag
	bpf, lpm: Fix check prefixlen before walking trie
	bpf: Add crosstask check to __bpf_get_stack
	wifi: ath11k: Defer on rproc_get failure
	wifi: libertas: stop selecting wext
	ARM: dts: qcom: apq8064: correct XOADC register address
	net/ncsi: Fix netlink major/minor version numbers
	firmware: ti_sci: Fix an off-by-one in ti_sci_debugfs_create()
	firmware: meson_sm: populate platform devices from sm device tree data
	wifi: rtlwifi: rtl8821ae: phy: fix an undefined bitwise shift behavior
	arm64: dts: ti: k3-am62a-main: Fix GPIO pin count in DT nodes
	arm64: dts: ti: k3-am65-main: Fix DSS irq trigger type
	selftests/bpf: Fix erroneous bitmask operation
	md: synchronize flush io with array reconfiguration
	bpf: enforce precision of R0 on callback return
	ARM: dts: qcom: sdx65: correct SPMI node name
	arm64: dts: qcom: sc7180: Make watchdog bark interrupt edge triggered
	arm64: dts: qcom: sc7280: Mark some nodes as 'reserved'
	arm64: dts: qcom: sc7280: Make watchdog bark interrupt edge triggered
	arm64: dts: qcom: sdm845: Make watchdog bark interrupt edge triggered
	arm64: dts: qcom: sm8150: Make watchdog bark interrupt edge triggered
	arm64: dts: qcom: sm8250: Make watchdog bark interrupt edge triggered
	arm64: dts: qcom: sc8280xp: Make watchdog bark interrupt edge triggered
	arm64: dts: qcom: sm6350: Make watchdog bark interrupt edge triggered
	rcu-tasks: Provide rcu_trace_implies_rcu_gp()
	bpf: add percpu stats for bpf_map elements insertions/deletions
	bpf: Add map and need_defer parameters to .map_fd_put_ptr()
	bpf: Defer the free of inner map when necessary
	selftests/net: specify the interface when do arping
	bpf: fix check for attempt to corrupt spilled pointer
	scsi: fnic: Return error if vmalloc() failed
	arm64: dts: qcom: qrb5165-rb5: correct LED panic indicator
	arm64: dts: qcom: sdm845-db845c: correct LED panic indicator
	arm64: dts: qcom: sm8350: Fix DMA0 address
	arm64: dts: qcom: sc7280: Fix up GPU SIDs
	arm64: dts: qcom: sc7280: Mark Adreno SMMU as DMA coherent
	arm64: dts: qcom: sc7280: fix usb_2 wakeup interrupt types
	wifi: mt76: mt7921s: fix workqueue problem causes STA association fail
	bpf: Fix verification of indirect var-off stack access
	arm64: dts: hisilicon: hikey970-pmic: fix regulator cells properties
	dt-bindings: media: mediatek: mdp3: correct RDMA and WROT node with generic names
	arm64: dts: mediatek: mt8183: correct MDP3 DMA-related nodes
	wifi: mt76: mt7921: fix country count limitation for CLC
	selftests/bpf: Relax time_tai test for equal timestamps in tai_forward
	block: Set memalloc_noio to false on device_add_disk() error path
	arm64: dts: renesas: white-hawk-cpu: Fix missing serial console pin control
	arm64: dts: imx8mm: Reduce GPU to nominal speed
	scsi: hisi_sas: Replace with standard error code return value
	scsi: hisi_sas: Rollback some operations if FLR failed
	scsi: hisi_sas: Correct the number of global debugfs registers
	ARM: dts: stm32: don't mix SCMI and non-SCMI board compatibles
	selftests/net: fix grep checking for fib_nexthop_multiprefix
	ipmr: support IP_PKTINFO on cache report IGMP msg
	virtio/vsock: fix logic which reduces credit update messages
	dma-mapping: clear dev->dma_mem to NULL after freeing it
	soc: qcom: llcc: Fix dis_cap_alloc and retain_on_pc configuration
	arm64: dts: qcom: sm8150-hdk: fix SS USB regulators
	block: add check of 'minors' and 'first_minor' in device_add_disk()
	arm64: dts: qcom: sc7280: Mark SDHCI hosts as cache-coherent
	arm64: dts: qcom: ipq6018: fix clock rates for GCC_USB0_MOCK_UTMI_CLK
	arm64: dts: qcom: ipq6018: improve pcie phy pcs reg table
	arm64: dts: qcom: ipq6018: Use lowercase hex
	arm64: dts: qcom: ipq6018: Pad addresses to 8 hex digits
	arm64: dts: qcom: ipq6018: Fix up indentation
	wifi: rtlwifi: add calculate_bit_shift()
	wifi: rtlwifi: rtl8188ee: phy: using calculate_bit_shift()
	wifi: rtlwifi: rtl8192c: using calculate_bit_shift()
	wifi: rtlwifi: rtl8192cu: using calculate_bit_shift()
	wifi: rtlwifi: rtl8192ce: using calculate_bit_shift()
	wifi: rtlwifi: rtl8192de: using calculate_bit_shift()
	wifi: rtlwifi: rtl8192ee: using calculate_bit_shift()
	wifi: rtlwifi: rtl8192se: using calculate_bit_shift()
	wifi: iwlwifi: mvm: set siso/mimo chains to 1 in FW SMPS request
	wifi: iwlwifi: mvm: send TX path flush in rfkill
	netfilter: nf_tables: mark newset as dead on transaction abort
	Bluetooth: Fix bogus check for re-auth no supported with non-ssp
	Bluetooth: btmtkuart: fix recv_buf() return value
	block: make BLK_DEF_MAX_SECTORS unsigned
	null_blk: don't cap max_hw_sectors to BLK_DEF_MAX_SECTORS
	bpf: sockmap, fix proto update hook to avoid dup calls
	sctp: support MSG_ERRQUEUE flag in recvmsg()
	sctp: fix busy polling
	net/sched: act_ct: fix skb leak and crash on ooo frags
	mlxbf_gige: Fix intermittent no ip issue
	mlxbf_gige: Enable the GigE port in mlxbf_gige_open
	ip6_tunnel: fix NEXTHDR_FRAGMENT handling in ip6_tnl_parse_tlv_enc_lim()
	ARM: davinci: always select CONFIG_CPU_ARM926T
	Revert "drm/tidss: Annotate dma-fence critical section in commit path"
	Revert "drm/omapdrm: Annotate dma-fence critical section in commit path"
	drm/panfrost: Really power off GPU cores in panfrost_gpu_power_off()
	RDMA/usnic: Silence uninitialized symbol smatch warnings
	RDMA/hns: Fix inappropriate err code for unsupported operations
	drm/panel-elida-kd35t133: hold panel in reset for unprepare
	drm/nouveau/fence:: fix warning directly dereferencing a rcu pointer
	drm/bridge: tpd12s015: Drop buggy __exit annotation for remove function
	drm/tilcdc: Fix irq free on unload
	media: pvrusb2: fix use after free on context disconnection
	media: mtk-jpegdec: export jpeg decoder functions
	media: mtk-jpeg: Remove cancel worker in mtk_jpeg_remove to avoid the crash of multi-core JPEG devices
	media: verisilicon: Hook the (TRY_)DECODER_CMD stateless ioctls
	media: rkvdec: Hook the (TRY_)DECODER_CMD stateless ioctls
	drm/bridge: Fix typo in post_disable() description
	f2fs: fix to avoid dirent corruption
	drm/radeon/r600_cs: Fix possible int overflows in r600_cs_check_reg()
	drm/radeon/r100: Fix integer overflow issues in r100_cs_track_check()
	drm/radeon: check return value of radeon_ring_lock()
	drm/tidss: Move reset to the end of dispc_init()
	drm/tidss: Return error value from from softreset
	drm/tidss: Check for K2G in in dispc_softreset()
	drm/tidss: Fix dss reset
	ASoC: cs35l33: Fix GPIO name and drop legacy include
	ASoC: cs35l34: Fix GPIO name and drop legacy include
	drm/msm/mdp4: flush vblank event on disable
	drm/msm/dsi: Use pm_runtime_resume_and_get to prevent refcnt leaks
	drm/drv: propagate errors from drm_modeset_register_all()
	ASoC: Intel: glk_rt5682_max98357a: fix board id mismatch
	drm/panfrost: Ignore core_mask for poweroff and disable PWRTRANS irq
	drm/radeon: check the alloc_workqueue return value in radeon_crtc_init()
	drm/radeon/dpm: fix a memleak in sumo_parse_power_table
	drm/radeon/trinity_dpm: fix a memleak in trinity_parse_power_table
	drm/bridge: cdns-mhdp8546: Fix use of uninitialized variable
	drm/bridge: tc358767: Fix return value on error case
	media: cx231xx: fix a memleak in cx231xx_init_isoc
	RDMA/hns: Fix memory leak in free_mr_init()
	clk: qcom: gpucc-sm8150: Update the gpu_cc_pll1 config
	media: imx-mipi-csis: Fix clock handling in remove()
	media: dt-bindings: media: rkisp1: Fix the port description for the parallel interface
	media: rkisp1: Fix media device memory leak
	drm/panel: st7701: Fix AVCL calculation
	f2fs: fix to wait on block writeback for post_read case
	f2fs: fix to check compress file in f2fs_move_file_range()
	f2fs: fix to update iostat correctly in f2fs_filemap_fault()
	media: dvbdev: drop refcount on error path in dvb_device_open()
	media: dvb-frontends: m88ds3103: Fix a memory leak in an error handling path of m88ds3103_probe()
	clk: renesas: rzg2l-cpg: Reuse code in rzg2l_cpg_reset()
	clk: renesas: rzg2l: Check reset monitor registers
	drm/msm/dpu: Set input_sel bit for INTF
	drm/msm/dpu: Drop enable and frame_count parameters from dpu_hw_setup_misr()
	drm/mediatek: Return error if MDP RDMA failed to enable the clock
	drm/mediatek: Fix underrun in VDO1 when switches off the layer
	drm/amdgpu/debugfs: fix error code when smc register accessors are NULL
	drm/amd/pm: fix a double-free in si_dpm_init
	drivers/amd/pm: fix a use-after-free in kv_parse_power_table
	gpu/drm/radeon: fix two memleaks in radeon_vm_init
	drm/amd/pm: fix a double-free in amdgpu_parse_extended_power_table
	f2fs: fix to check return value of f2fs_recover_xattr_data
	dt-bindings: clock: Update the videocc resets for sm8150
	clk: qcom: videocc-sm8150: Update the videocc resets
	clk: qcom: videocc-sm8150: Add missing PLL config property
	drivers: clk: zynqmp: calculate closest mux rate
	drivers: clk: zynqmp: update divider round rate logic
	watchdog: set cdev owner before adding
	watchdog/hpwdt: Only claim UNKNOWN NMI if from iLO
	watchdog: bcm2835_wdt: Fix WDIOC_SETTIMEOUT handling
	watchdog: rti_wdt: Drop runtime pm reference count when watchdog is unused
	clk: si5341: fix an error code problem in si5341_output_clk_set_rate
	drm/mediatek: dp: Add phy_mtk_dp module as pre-dependency
	accel/habanalabs: fix information leak in sec_attest_info()
	clk: fixed-rate: fix clk_hw_register_fixed_rate_with_accuracy_parent_hw
	pwm: stm32: Use regmap_clear_bits and regmap_set_bits where applicable
	pwm: stm32: Use hweight32 in stm32_pwm_detect_channels
	pwm: stm32: Fix enable count for clk in .probe()
	ASoC: rt5645: Drop double EF20 entry from dmi_platform_data[]
	ALSA: scarlett2: Add missing error check to scarlett2_config_save()
	ALSA: scarlett2: Add missing error check to scarlett2_usb_set_config()
	ALSA: scarlett2: Allow passing any output to line_out_remap()
	ALSA: scarlett2: Add missing error checks to *_ctl_get()
	ALSA: scarlett2: Add clamp() in scarlett2_mixer_ctl_put()
	mmc: sdhci_am654: Fix TI SoC dependencies
	mmc: sdhci_omap: Fix TI SoC dependencies
	IB/iser: Prevent invalidating wrong MR
	drm/amdkfd: Confirm list is non-empty before utilizing list_first_entry in kfd_topology.c
	drm/amd/pm/smu7: fix a memleak in smu7_hwmgr_backend_init
	kselftest/alsa - mixer-test: fix the number of parameters to ksft_exit_fail_msg()
	kselftest/alsa - mixer-test: Fix the print format specifier warning
	ksmbd: validate the zero field of packet header
	of: Fix double free in of_parse_phandle_with_args_map
	fbdev: imxfb: fix left margin setting
	of: unittest: Fix of_count_phandle_with_args() expected value message
	selftests/bpf: Add assert for user stacks in test_task_stack
	keys, dns: Fix size check of V1 server-list header
	binder: fix async space check for 0-sized buffers
	binder: fix unused alloc->free_async_space
	mips/smp: Call rcutree_report_cpu_starting() earlier
	Input: atkbd - use ab83 as id when skipping the getid command
	xen-netback: don't produce zero-size SKB frags
	binder: fix race between mmput() and do_exit()
	clocksource/drivers/timer-ti-dm: Fix make W=n kerneldoc warnings
	powerpc/64s: Increase default stack size to 32KB
	tick-sched: Fix idle and iowait sleeptime accounting vs CPU hotplug
	usb: phy: mxs: remove CONFIG_USB_OTG condition for mxs_phy_is_otg_host()
	usb: dwc: ep0: Update request status in dwc3_ep0_stall_restart
	Revert "usb: dwc3: Soft reset phy on probe for host"
	Revert "usb: dwc3: don't reset device side if dwc3 was configured as host-only"
	usb: chipidea: wait controller resume finished for wakeup irq
	usb: cdns3: fix uvc failure work since sg support enabled
	usb: cdns3: fix iso transfer error when mult is not zero
	usb: cdns3: Fix uvc fail when DMA cross 4k boundery since sg enabled
	Revert "usb: typec: class: fix typec_altmode_put_partner to put plugs"
	usb: typec: class: fix typec_altmode_put_partner to put plugs
	usb: mon: Fix atomicity violation in mon_bin_vma_fault
	serial: core: fix sanitizing check for RTS settings
	serial: core: make sure RS485 cannot be enabled when it is not supported
	serial: 8250_bcm2835aux: Restore clock error handling
	serial: core, imx: do not set RS485 enabled if it is not supported
	serial: imx: Ensure that imx_uart_rs485_config() is called with enabled clock
	serial: 8250_exar: Set missing rs485_supported flag
	serial: omap: do not override settings for RS485 support
	drm/vmwgfx: Fix possible invalid drm gem put calls
	drm/vmwgfx: Keep a gem reference to user bos in surfaces
	ALSA: oxygen: Fix right channel of capture volume mixer
	ALSA: hda/relatek: Enable Mute LED on HP Laptop 15s-fq2xxx
	ALSA: hda/realtek: Enable mute/micmute LEDs and limit mic boost on HP ZBook
	ALSA: hda/realtek: Enable headset mic on Lenovo M70 Gen5
	ksmbd: validate mech token in session setup
	ksmbd: fix UAF issue in ksmbd_tcp_new_connection()
	ksmbd: only v2 leases handle the directory
	io_uring/rw: ensure io->bytes_done is always initialized
	fbdev: flush deferred work in fb_deferred_io_fsync()
	fbdev: flush deferred IO before closing
	scsi: ufs: core: Simplify power management during async scan
	scsi: target: core: add missing file_{start,end}_write()
	scsi: mpi3mr: Refresh sdev queue depth after controller reset
	scsi: mpi3mr: Block PEL Enable Command on Controller Reset and Unrecoverable State
	drm/amd: Enable PCIe PME from D3
	block: add check that partition length needs to be aligned with block size
	block: Fix iterating over an empty bio with bio_for_each_folio_all
	netfilter: nf_tables: check if catch-all set element is active in next generation
	pwm: jz4740: Don't use dev_err_probe() in .request()
	pwm: Fix out-of-bounds access in of_pwm_single_xlate()
	md/raid1: Use blk_opf_t for read and write operations
	rootfs: Fix support for rootfstype= when root= is given
	Bluetooth: Fix atomicity violation in {min,max}_key_size_set
	bpf: Fix re-attachment branch in bpf_tracing_prog_attach
	LoongArch: Fix and simplify fcsr initialization on execve()
	iommu/arm-smmu-qcom: Add missing GMU entry to match table
	iommu/dma: Trace bounce buffer usage when mapping buffers
	wifi: mt76: fix broken precal loading from MTD for mt7915
	wifi: rtlwifi: Remove bogus and dangerous ASPM disable/enable code
	wifi: rtlwifi: Convert LNKCTL change to PCIe cap RMW accessors
	wifi: mwifiex: configure BSSID consistently when starting AP
	Revert "net: rtnetlink: Enslave device before bringing it up"
	cxl/port: Fix decoder initialization when nr_targets > interleave_ways
	PCI/P2PDMA: Remove reference to pci_p2pdma_map_sg()
	PCI: dwc: endpoint: Fix dw_pcie_ep_raise_msix_irq() alignment support
	PCI: mediatek: Clear interrupt status before dispatching handler
	x86/kvm: Do not try to disable kvmclock if it was not enabled
	KVM: arm64: vgic-v4: Restore pending state on host userspace write
	KVM: arm64: vgic-its: Avoid potential UAF in LPI translation cache
	iio: adc: ad7091r: Pass iio_dev to event handler
	HID: wacom: Correct behavior when processing some confidence == false touches
	serial: sc16is7xx: add check for unsupported SPI modes during probe
	serial: sc16is7xx: set safe default SPI clock frequency
	ARM: 9330/1: davinci: also select PINCTRL
	mfd: syscon: Fix null pointer dereference in of_syscon_register()
	leds: aw2013: Select missing dependency REGMAP_I2C
	mfd: intel-lpss: Fix the fractional clock divider flags
	mips: dmi: Fix early remap on MIPS32
	mips: Fix incorrect max_low_pfn adjustment
	riscv: Check if the code to patch lies in the exit section
	riscv: Fix module_alloc() that did not reset the linear mapping permissions
	riscv: Fix set_memory_XX() and set_direct_map_XX() by splitting huge linear mappings
	riscv: Fix set_direct_map_default_noflush() to reset _PAGE_EXEC
	riscv: Fixed wrong register in XIP_FIXUP_FLASH_OFFSET macro
	MIPS: Alchemy: Fix an out-of-bound access in db1200_dev_setup()
	MIPS: Alchemy: Fix an out-of-bound access in db1550_dev_setup()
	power: supply: cw2015: correct time_to_empty units in sysfs
	power: supply: bq256xx: fix some problem in bq256xx_hw_init
	serial: 8250: omap: Don't skip resource freeing if pm_runtime_resume_and_get() failed
	libapi: Add missing linux/types.h header to get the __u64 type on io.h
	base/node.c: initialize the accessor list before registering
	acpi: property: Let args be NULL in __acpi_node_get_property_reference
	software node: Let args be NULL in software_node_get_reference_args
	serial: imx: fix tx statemachine deadlock
	selftests/sgx: Fix uninitialized pointer dereference in error path
	selftests/sgx: Fix uninitialized pointer dereferences in encl_get_entry
	selftests/sgx: Include memory clobber for inline asm in test enclave
	selftests/sgx: Skip non X86_64 platform
	iio: adc: ad9467: fix reset gpio handling
	iio: adc: ad9467: don't ignore error codes
	iio: adc: ad9467: fix scale setting
	perf header: Fix one memory leakage in perf_event__fprintf_event_update()
	perf hisi-ptt: Fix one memory leakage in hisi_ptt_process_auxtrace_event()
	perf genelf: Set ELF program header addresses properly
	tty: change tty_write_lock()'s ndelay parameter to bool
	tty: early return from send_break() on TTY_DRIVER_HARDWARE_BREAK
	tty: don't check for signal_pending() in send_break()
	tty: use 'if' in send_break() instead of 'goto'
	usb: cdc-acm: return correct error code on unsupported break
	spmi: mtk-pmif: Serialize PMIF status check and command submission
	vdpa: Fix an error handling path in eni_vdpa_probe()
	nvmet-tcp: Fix a kernel panic when host sends an invalid H2C PDU length
	nvmet-tcp: fix a crash in nvmet_req_complete()
	perf env: Avoid recursively taking env->bpf_progs.lock
	cxl/region: fix x9 interleave typo
	apparmor: avoid crash when parsed profile name is empty
	usb: xhci-mtk: fix a short packet issue of gen1 isoc-in transfer
	serial: imx: Correct clock error message in function probe()
	nvmet: re-fix tracing strncpy() warning
	nvme: trace: avoid memcpy overflow warning
	nvmet-tcp: Fix the H2C expected PDU len calculation
	PCI: keystone: Fix race condition when initializing PHYs
	PCI: mediatek-gen3: Fix translation window size calculation
	ASoC: mediatek: sof-common: Add NULL check for normal_link string
	s390/pci: fix max size calculation in zpci_memcpy_toio()
	net: qualcomm: rmnet: fix global oob in rmnet_policy
	net: ethernet: ti: am65-cpsw: Fix max mtu to fit ethernet frames
	amt: do not use overwrapped cb area
	net: phy: micrel: populate .soft_reset for KSZ9131
	mptcp: mptcp_parse_option() fix for MPTCPOPT_MP_JOIN
	mptcp: strict validation before using mp_opt->hmac
	mptcp: use OPTION_MPTCP_MPJ_SYNACK in subflow_finish_connect()
	mptcp: use OPTION_MPTCP_MPJ_SYN in subflow_check_req()
	mptcp: refine opt_mp_capable determination
	block: ensure we hold a queue reference when using queue limits
	udp: annotate data-races around up->pending
	net: ravb: Fix dma_addr_t truncation in error case
	dt-bindings: gpio: xilinx: Fix node address in gpio
	drm/amdkfd: Use resource_size() helper function
	drm/amdkfd: fixes for HMM mem allocation
	net: stmmac: ethtool: Fixed calltrace caused by unbalanced disable_irq_wake calls
	bpf: Reject variable offset alu on PTR_TO_FLOW_KEYS
	net: dsa: vsc73xx: Add null pointer check to vsc73xx_gpio_probe
	LoongArch: BPF: Prevent out-of-bounds memory access
	mptcp: relax check on MPC passive fallback
	netfilter: nf_tables: reject invalid set policy
	netfilter: nft_limit: do not ignore unsupported flags
	netfilter: nfnetlink_log: use proper helper for fetching physinif
	netfilter: nf_queue: remove excess nf_bridge variable
	netfilter: propagate net to nf_bridge_get_physindev
	netfilter: bridge: replace physindev with physinif in nf_bridge_info
	netfilter: nf_tables: do not allow mismatch field size and set key length
	netfilter: nf_tables: skip dead set elements in netlink dump
	netfilter: nf_tables: reject NFT_SET_CONCAT with not field length description
	ipvs: avoid stat macros calls from preemptible context
	kdb: Fix a potential buffer overflow in kdb_local()
	ethtool: netlink: Add missing ethnl_ops_begin/complete
	loop: fix the the direct I/O support check when used on top of block devices
	mlxsw: spectrum_acl_erp: Fix error flow of pool allocation failure
	selftests: mlxsw: qos_pfc: Adjust the test to support 8 lanes
	ipv6: mcast: fix data-race in ipv6_mc_down / mld_ifc_work
	i2c: s3c24xx: fix read transfers in polling mode
	i2c: s3c24xx: fix transferring more than one message in polling mode
	block: Remove special-casing of compound pages
	riscv: Fix wrong usage of lm_alias() when splitting a huge linear mapping
	Revert "KEYS: encrypted: Add check for strsep"
	arm64: dts: armada-3720-turris-mox: set irq type for RTC
	Revert "Revert "md/raid5: Wait for MD_SB_CHANGE_PENDING in raid5d""
	Linux 6.1.75

Change-Id: I60398ecc9a2e50206fd9d25c0d6c9ad6e1ca71a0
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2024-02-19 20:16:38 +00:00
Huacai Chen
9e584ea101 LoongArch/smp: Call rcutree_report_cpu_starting() at tlb_init()
commit 5056c596c3d1848021a4eaa76ee42f4c05c50346 upstream.

Machines which have more than 8 nodes fail to boot SMP after commit
a2ccf46333d7b2cf96 ("LoongArch/smp: Call rcutree_report_cpu_starting()
earlier"). Because such machines use tlb-based per-cpu base address
rather than dmw-based per-cpu base address, resulting per-cpu variables
can only be accessed after tlb_init(). But rcutree_report_cpu_starting()
is now called before tlb_init() and accesses per-cpu variables indeed.

Since the original patch want to avoid the lockdep warning caused by
page allocation in tlb_init(), we can move rcutree_report_cpu_starting()
to tlb_init() where after tlb exception configuration but before page
allocation.

Fixes: a2ccf46333d7b2cf96 ("LoongArch/smp: Call rcutree_report_cpu_starting() earlier")
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-02-05 20:13:02 +00:00
Huacai Chen
1d15da5601 LoongArch/smp: Call rcutree_report_cpu_starting() earlier
commit a2ccf46333d7b2cf9658f0d82ac74097c1542fae upstream.

rcutree_report_cpu_starting() must be called before cpu_probe() to avoid
the following lockdep splat that triggered by calling __alloc_pages() when
CONFIG_PROVE_RCU_LIST=y:

 =============================
 WARNING: suspicious RCU usage
 6.6.0+ #980 Not tainted
 -----------------------------
 kernel/locking/lockdep.c:3761 RCU-list traversed in non-reader section!!
 other info that might help us debug this:
 RCU used illegally from offline CPU!
 rcu_scheduler_active = 1, debug_locks = 1
 1 lock held by swapper/1/0:
  #0: 900000000c82ef98 (&pcp->lock){+.+.}-{2:2}, at: get_page_from_freelist+0x894/0x1790
 CPU: 1 PID: 0 Comm: swapper/1 Not tainted 6.6.0+ #980
 Stack : 0000000000000001 9000000004f79508 9000000004893670 9000000100310000
         90000001003137d0 0000000000000000 90000001003137d8 9000000004f79508
         0000000000000000 0000000000000001 0000000000000000 90000000048a3384
         203a656d616e2065 ca43677b3687e616 90000001002c3480 0000000000000008
         000000000000009d 0000000000000000 0000000000000001 80000000ffffe0b8
         000000000000000d 0000000000000033 0000000007ec0000 13bbf50562dad831
         9000000005140748 0000000000000000 9000000004f79508 0000000000000004
         0000000000000000 9000000005140748 90000001002bad40 0000000000000000
         90000001002ba400 0000000000000000 9000000003573ec8 0000000000000000
         00000000000000b0 0000000000000004 0000000000000000 0000000000070000
         ...
 Call Trace:
 [<9000000003573ec8>] show_stack+0x38/0x150
 [<9000000004893670>] dump_stack_lvl+0x74/0xa8
 [<900000000360d2bc>] lockdep_rcu_suspicious+0x14c/0x190
 [<900000000361235c>] __lock_acquire+0xd0c/0x2740
 [<90000000036146f4>] lock_acquire+0x104/0x2c0
 [<90000000048a955c>] _raw_spin_lock_irqsave+0x5c/0x90
 [<900000000381cd5c>] rmqueue_bulk+0x6c/0x950
 [<900000000381fc0c>] get_page_from_freelist+0xd4c/0x1790
 [<9000000003821c6c>] __alloc_pages+0x1bc/0x3e0
 [<9000000003583b40>] tlb_init+0x150/0x2a0
 [<90000000035742a0>] per_cpu_trap_init+0xf0/0x110
 [<90000000035712fc>] cpu_probe+0x3dc/0x7a0
 [<900000000357ed20>] start_secondary+0x40/0xb0
 [<9000000004897138>] smpboot_entry+0x54/0x58

raw_smp_processor_id() is required in order to avoid calling into lockdep
before RCU has declared the CPU to be watched for readers.

See also commit 29368e0939 ("x86/smpboot: Move rcu_cpu_starting() earlier"),
commit de5d9dae15 ("s390/smp: move rcu_cpu_starting() earlier") and commit
99f070b623 ("powerpc/smp: Call rcu_cpu_starting() earlier").

Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-01-31 16:17:03 -08:00
Greg Kroah-Hartman
48159eff53 This is the 6.1.74 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmWrpWwACgkQONu9yGCS
 aT4NCxAAy3cItCclN2JVrdjKW8htc81fhEhUdB1oDwz8+U9SJJ0E7psR0H8p8KTM
 2OTT9pVhfaZ2Usjml/PVjzBxR26o4jsUV3Ls/GMbrGnUBwPXFUXI4WAFhPKOvc4W
 IKffdO9SVFMQVygsCR02mld/BJiRp6Yak+p9z0Kmre74G+Wv7uq+yeYkqxJdIRZo
 owg6UwItEQ+gxhK+eRw0Cdp4pXr7NARY8l4POWuFxMylKwLPACdr/MxFsmG5a3u7
 Gzw+Gygmm9OZoX5R/qtgY2WodAO2WsAwiEKPfY1nNqQ/8lcGpmb6LqXwfY2ea4Mn
 UMGonnxYcN8Xca4Eq2OTsAfe9E7NmdvRbLrhVM0RNepVZWaiaGJO7BXKiyVV1OY0
 T5JJjZZexAuAJ183Vj8FYzp0V6FJn2f/U1rVaLwO4Fk4kBN5qaXWgaB3UP0BBlhM
 nI1yjPY0Ti0j9OcZpCxKGzwLIyNX9njbIINCt2rdkAw25aJyjuzG+h76IMyz1q5+
 cDf3Oet+FTkDr8W8FuH7AKMgRKhuXHm49xWnKHy4+PCA5zBnidNT8+ipaDgeCSS7
 2kMM+F1LSb031Oys0V7Xqf1diWvdhpAhmaTYSpzF1QNIbPv4dsQOgeuRP1rqZcMc
 RsqxNNkbqVIsuu9PE2x5pWQyqzeF6mDx+yJA/fSWm6N8akPEEpc=
 =AE28
 -----END PGP SIGNATURE-----

Merge 6.1.74 into android14-6.1-lts

Changes in 6.1.74
	f2fs: explicitly null-terminate the xattr list
	pinctrl: lochnagar: Don't build on MIPS
	ALSA: hda - Fix speaker and headset mic pin config for CHUWI CoreBook XPro
	mptcp: fix uninit-value in mptcp_incoming_options
	wifi: cfg80211: lock wiphy mutex for rfkill poll
	wifi: avoid offset calculation on NULL pointer
	wifi: mac80211: handle 320 MHz in ieee80211_ht_cap_ie_to_sta_ht_cap
	debugfs: fix automount d_fsdata usage
	ALSA: hda: intel-nhlt: Ignore vbps when looking for DMIC 32 bps format
	nvme-core: fix a memory leak in nvme_ns_info_from_identify()
	drm/amd/display: update dcn315 lpddr pstate latency
	drm/amdgpu: Fix cat debugfs amdgpu_regs_didt causes kernel null pointer
	smb: client, common: fix fortify warnings
	blk-mq: don't count completed flush data request as inflight in case of quiesce
	nvme-core: check for too small lba shift
	hwtracing: hisi_ptt: Handle the interrupt in hardirq context
	hwtracing: hisi_ptt: Don't try to attach a task
	ASoC: wm8974: Correct boost mixer inputs
	arm64: dts: rockchip: fix rk356x pcie msg interrupt name
	ASoC: Intel: Skylake: Fix mem leak in few functions
	ASoC: nau8822: Fix incorrect type in assignment and cast to restricted __be16
	ASoC: Intel: Skylake: mem leak in skl register function
	ASoC: cs43130: Fix the position of const qualifier
	ASoC: cs43130: Fix incorrect frame delay configuration
	ASoC: rt5650: add mutex to avoid the jack detection failure
	ASoC: Intel: skl_hda_dsp_generic: Drop HDMI routes when HDMI is not available
	nouveau/tu102: flush all pdbs on vmm flush
	ASoC: amd: yc: Add DMI entry to support System76 Pangolin 13
	ASoC: hdac_hda: Conditionally register dais for HDMI and Analog
	net/tg3: fix race condition in tg3_reset_task()
	ASoC: da7219: Support low DC impedance headset
	ASoC: ops: add correct range check for limiting volume
	nvme: introduce helper function to get ctrl state
	nvme: prevent potential spectre v1 gadget
	arm64: dts: rockchip: Fix PCI node addresses on rk3399-gru
	drm/amdgpu: Add NULL checks for function pointers
	drm/exynos: fix a potential error pointer dereference
	drm/exynos: fix a wrong error checking
	hwmon: (corsair-psu) Fix probe when built-in
	LoongArch: Preserve syscall nr across execve()
	clk: rockchip: rk3568: Add PLL rate for 292.5MHz
	clk: rockchip: rk3128: Fix HCLK_OTG gate register
	jbd2: correct the printing of write_flags in jbd2_write_superblock()
	jbd2: increase the journal IO's priority
	drm/crtc: Fix uninit-value bug in drm_mode_setcrtc
	neighbour: Don't let neigh_forced_gc() disable preemption for long
	platform/x86: intel-vbtn: Fix missing tablet-mode-switch events
	jbd2: fix soft lockup in journal_finish_inode_data_buffers()
	tracing: Have large events show up as '[LINE TOO BIG]' instead of nothing
	tracing: Add size check when printing trace_marker output
	stmmac: dwmac-loongson: drop useless check for compatible fallback
	MIPS: dts: loongson: drop incorrect dwmac fallback compatible
	tracing: Fix uaf issue when open the hist or hist_debug file
	ring-buffer: Do not record in NMI if the arch does not support cmpxchg in NMI
	Input: psmouse - enable Synaptics InterTouch for ThinkPad L14 G1
	reset: hisilicon: hi6220: fix Wvoid-pointer-to-enum-cast warning
	Input: atkbd - skip ATKBD_CMD_GETID in translated mode
	Input: i8042 - add nomux quirk for Acer P459-G2-M
	s390/scm: fix virtual vs physical address confusion
	ARC: fix spare error
	wifi: iwlwifi: pcie: avoid a NULL pointer dereference
	Input: xpad - add Razer Wolverine V2 support
	kselftest: alsa: fixed a print formatting warning
	HID: nintendo: fix initializer element is not constant error
	platform/x86: thinkpad_acpi: fix for incorrect fan reporting on some ThinkPad systems
	ASoC: Intel: bytcr_rt5640: Add quirk for the Medion Lifetab S10346
	ASoC: Intel: bytcr_rt5640: Add new swapped-speakers quirk
	ALSA: hda/realtek: Add quirks for ASUS Zenbook 2022 Models
	dm audit: fix Kconfig so DM_AUDIT depends on BLK_DEV_DM
	HID: nintendo: Prevent divide-by-zero on code
	smb: client: fix potential OOB in smb2_dump_detail()
	i2c: rk3x: fix potential spinlock recursion on poll
	drm/amd/display: get dprefclk ss info from integration info table
	pinctrl: cy8c95x0: Fix typo
	pinctrl: cy8c95x0: Fix get_pincfg
	ida: Fix crash in ida_free when the bitmap is empty
	virtio_blk: fix snprintf truncation compiler warning
	net: qrtr: ns: Return 0 if server port is not present
	ARM: sun9i: smp: fix return code check of of_property_match_string
	drm/crtc: fix uninitialized variable use
	ALSA: hda/realtek: Fix mute and mic-mute LEDs for HP Envy X360 13-ay0xxx
	ACPI: resource: Add another DMI match for the TongFang GMxXGxx
	ASoC: SOF: Intel: hda-codec: Delay the codec device registration
	btf, scripts: Exclude Rust CUs with pahole
	bpf: Add --skip_encoding_btf_inconsistent_proto, --btf_gen_optimized to pahole flags for v1.25
	ksmbd: don't allow O_TRUNC open on read-only share
	ksmbd: free ppace array on error in parse_dacl
	Revert "md/raid5: Wait for MD_SB_CHANGE_PENDING in raid5d"
	binder: use EPOLLERR from eventpoll.h
	binder: fix use-after-free in shinker's callback
	binder: fix trivial typo of binder_free_buf_locked()
	binder: fix comment on binder_alloc_new_buf() return value
	uio: Fix use-after-free in uio_open
	parport: parport_serial: Add Brainboxes BAR details
	parport: parport_serial: Add Brainboxes device IDs and geometry
	leds: ledtrig-tty: Free allocated ttyname buffer on deactivate
	PCI: Add ACS quirk for more Zhaoxin Root Ports
	coresight: etm4x: Fix width of CCITMIN field
	scripts/decode_stacktrace.sh: optionally use LLVM utilities
	Linux 6.1.74

Change-Id: Icd69871d2272d5c26e253cfe54d2a8b637e616b5
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2024-01-31 01:16:30 +00:00
Hengqi Chen
4631c2dd69 LoongArch: BPF: Prevent out-of-bounds memory access
[ Upstream commit 36a87385e31c9343af9a4756598e704741250a67 ]

The test_tag test triggers an unhandled page fault:

  # ./test_tag
  [  130.640218] CPU 0 Unable to handle kernel paging request at virtual address ffff80001b898004, era == 9000000003137f7c, ra == 9000000003139e70
  [  130.640501] Oops[#3]:
  [  130.640553] CPU: 0 PID: 1326 Comm: test_tag Tainted: G      D    O       6.7.0-rc4-loong-devel-gb62ab1a397cf #47 61985c1d94084daa2432f771daa45b56b10d8d2a
  [  130.640764] Hardware name: QEMU QEMU Virtual Machine, BIOS unknown 2/2/2022
  [  130.640874] pc 9000000003137f7c ra 9000000003139e70 tp 9000000104cb4000 sp 9000000104cb7a40
  [  130.641001] a0 ffff80001b894000 a1 ffff80001b897ff8 a2 000000006ba210be a3 0000000000000000
  [  130.641128] a4 000000006ba210be a5 00000000000000f1 a6 00000000000000b3 a7 0000000000000000
  [  130.641256] t0 0000000000000000 t1 00000000000007f6 t2 0000000000000000 t3 9000000004091b70
  [  130.641387] t4 000000006ba210be t5 0000000000000004 t6 fffffffffffffff0 t7 90000000040913e0
  [  130.641512] t8 0000000000000005 u0 0000000000000dc0 s9 0000000000000009 s0 9000000104cb7ae0
  [  130.641641] s1 00000000000007f6 s2 0000000000000009 s3 0000000000000095 s4 0000000000000000
  [  130.641771] s5 ffff80001b894000 s6 ffff80001b897fb0 s7 9000000004090c50 s8 0000000000000000
  [  130.641900]    ra: 9000000003139e70 build_body+0x1fcc/0x4988
  [  130.642007]   ERA: 9000000003137f7c build_body+0xd8/0x4988
  [  130.642112]  CRMD: 000000b0 (PLV0 -IE -DA +PG DACF=CC DACM=CC -WE)
  [  130.642261]  PRMD: 00000004 (PPLV0 +PIE -PWE)
  [  130.642353]  EUEN: 00000003 (+FPE +SXE -ASXE -BTE)
  [  130.642458]  ECFG: 00071c1c (LIE=2-4,10-12 VS=7)
  [  130.642554] ESTAT: 00010000 [PIL] (IS= ECode=1 EsubCode=0)
  [  130.642658]  BADV: ffff80001b898004
  [  130.642719]  PRID: 0014c010 (Loongson-64bit, Loongson-3A5000)
  [  130.642815] Modules linked in: [last unloaded: bpf_testmod(O)]
  [  130.642924] Process test_tag (pid: 1326, threadinfo=00000000f7f4015f, task=000000006499f9fd)
  [  130.643062] Stack : 0000000000000000 9000000003380724 0000000000000000 0000000104cb7be8
  [  130.643213]         0000000000000000 25af8d9b6e600558 9000000106250ea0 9000000104cb7ae0
  [  130.643378]         0000000000000000 0000000000000000 9000000104cb7be8 90000000049f6000
  [  130.643538]         0000000000000090 9000000106250ea0 ffff80001b894000 ffff80001b894000
  [  130.643685]         00007ffffb917790 900000000313ca94 0000000000000000 0000000000000000
  [  130.643831]         ffff80001b894000 0000000000000ff7 0000000000000000 9000000100468000
  [  130.643983]         0000000000000000 0000000000000000 0000000000000040 25af8d9b6e600558
  [  130.644131]         0000000000000bb7 ffff80001b894048 0000000000000000 0000000000000000
  [  130.644276]         9000000104cb7be8 90000000049f6000 0000000000000090 9000000104cb7bdc
  [  130.644423]         ffff80001b894000 0000000000000000 00007ffffb917790 90000000032acfb0
  [  130.644572]         ...
  [  130.644629] Call Trace:
  [  130.644641] [<9000000003137f7c>] build_body+0xd8/0x4988
  [  130.644785] [<900000000313ca94>] bpf_int_jit_compile+0x228/0x4ec
  [  130.644891] [<90000000032acfb0>] bpf_prog_select_runtime+0x158/0x1b0
  [  130.645003] [<90000000032b3504>] bpf_prog_load+0x760/0xb44
  [  130.645089] [<90000000032b6744>] __sys_bpf+0xbb8/0x2588
  [  130.645175] [<90000000032b8388>] sys_bpf+0x20/0x2c
  [  130.645259] [<9000000003f6ab38>] do_syscall+0x7c/0x94
  [  130.645369] [<9000000003121c5c>] handle_syscall+0xbc/0x158
  [  130.645507]
  [  130.645539] Code: 380839f6  380831f9  28412bae <24000ca6> 004081ad  0014cb50  004083e8  02bff34c  58008e91
  [  130.645729]
  [  130.646418] ---[ end trace 0000000000000000 ]---

On my machine, which has CONFIG_PAGE_SIZE_16KB=y, the test failed at
loading a BPF prog with 2039 instructions:

  prog = (struct bpf_prog *)ffff80001b894000
  insn = (struct bpf_insn *)(prog->insnsi)ffff80001b894048
  insn + 2039 = (struct bpf_insn *)ffff80001b898000 <- end of the page

In the build_insn() function, we are trying to access next instruction
unconditionally, i.e. `(insn + 1)->imm`. The address lies in the next
page and can be not owned by the current process, thus an page fault is
inevitable and then segfault.

So, let's access next instruction only under `dst = imm64` context.

With this fix, we have:

  # ./test_tag
  test_tag: OK (40945 tests)

Fixes: bbfddb904d ("LoongArch: BPF: Avoid declare variables in switch-case")
Tested-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Signed-off-by: Hengqi Chen <hengqi.chen@gmail.com>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-01-25 15:27:50 -08:00
Xi Ruoyao
516ecb2436 LoongArch: Fix and simplify fcsr initialization on execve()
commit c2396651309eba291c15e32db8fbe44c738b5921 upstream.

There has been a lingering bug in LoongArch Linux systems causing some
GCC tests to intermittently fail (see Closes link).  I've made a minimal
reproducer:

    zsh% cat measure.s
    .align 4
    .globl _start
    _start:
        movfcsr2gr  $a0, $fcsr0
        bstrpick.w  $a0, $a0, 16, 16
        beqz        $a0, .ok
        break       0
    .ok:
        li.w        $a7, 93
        syscall     0
    zsh% cc mesaure.s -o measure -nostdlib
    zsh% echo $((1.0/3))
    0.33333333333333331
    zsh% while ./measure; do ; done

This while loop should not stop as POSIX is clear that execve must set
fenv to the default, where FCSR should be zero.  But in fact it will
just stop after running for a while (normally less than 30 seconds).
Note that "$((1.0/3))" is needed to reproduce this issue because it
raises FE_INVALID and makes fcsr0 non-zero.

The problem is we are currently relying on SET_PERSONALITY2() to reset
current->thread.fpu.fcsr.  But SET_PERSONALITY2() is executed before
start_thread which calls lose_fpu(0).  We can see if kernel preempt is
enabled, we may switch to another thread after SET_PERSONALITY2() but
before lose_fpu(0).  Then bad thing happens: during the thread switch
the value of the fcsr0 register is stored into current->thread.fpu.fcsr,
making it dirty again.

The issue can be fixed by setting current->thread.fpu.fcsr after
lose_fpu(0) because lose_fpu() clears TIF_USEDFPU, then the thread
switch won't touch current->thread.fpu.fcsr.

The only other architecture setting FCSR in SET_PERSONALITY2() is MIPS.
I've ran a similar test on MIPS with mainline kernel and it turns out
MIPS is buggy, too.  Anyway MIPS do this for supporting different FP
flavors (NaN encodings, etc.) which do not exist on LoongArch.  So for
LoongArch, we can simply remove the current->thread.fpu.fcsr setting
from SET_PERSONALITY2() and do it in start_thread(), after lose_fpu(0).

The while loop failing with the mainline kernel has survived one hour
after this change on LoongArch.

Fixes: 803b0fc5c3 ("LoongArch: Add process management")
Closes: https://github.com/loongson-community/discussions/issues/7
Link: https://lore.kernel.org/linux-mips/7a6aa1bbdbbe2e63ae96ff163fab0349f58f1b9e.camel@xry111.site/
Cc: stable@vger.kernel.org
Signed-off-by: Xi Ruoyao <xry111@xry111.site>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-01-25 15:27:43 -08:00
Hengqi Chen
c3597996a3 LoongArch: Preserve syscall nr across execve()
[ Upstream commit d6c5f06e46a836e6a70c7cfd95bb38a67d9252ec ]

Currently, we store syscall nr in pt_regs::regs[11] and syscall execve()
accidentally overrides it during its execution:

    sys_execve()
      -> do_execve()
        -> do_execveat_common()
          -> bprm_execve()
            -> exec_binprm()
              -> search_binary_handler()
                -> load_elf_binary()
                  -> ELF_PLAT_INIT()

ELF_PLAT_INIT() reset regs[11] to 0, so in syscall_exit_to_user_mode()
we later get a wrong syscall nr. This breaks tools like execsnoop since
it relies on execve() tracepoints.

Skip pt_regs::regs[11] reset in ELF_PLAT_INIT() to fix the issue.

Signed-off-by: Hengqi Chen <hengqi.chen@gmail.com>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-01-20 11:50:06 +01:00
Greg Kroah-Hartman
d3d46ac25c Merge 6.1.69 into android14-6.1-lts
Changes in 6.1.69
	perf/x86/uncore: Don't WARN_ON_ONCE() for a broken discovery table
	r8152: add USB device driver for config selection
	r8152: add vendor/device ID pair for D-Link DUB-E250
	r8152: add vendor/device ID pair for ASUS USB-C2500
	powerpc/ftrace: Fix stack teardown in ftrace_no_trace
	ext4: fix warning in ext4_dio_write_end_io()
	ksmbd: fix memory leak in smb2_lock()
	afs: Fix refcount underflow from error handling race
	HID: lenovo: Restrict detection of patched firmware only to USB cptkbd
	net/mlx5e: Fix possible deadlock on mlx5e_tx_timeout_work
	net: ipv6: support reporting otherwise unknown prefix flags in RTM_NEWPREFIX
	qca_debug: Prevent crash on TX ring changes
	qca_debug: Fix ethtool -G iface tx behavior
	qca_spi: Fix reset behavior
	bnxt_en: Clear resource reservation during resume
	bnxt_en: Save ring error counters across reset
	bnxt_en: Fix wrong return value check in bnxt_close_nic()
	bnxt_en: Fix HWTSTAMP_FILTER_ALL packet timestamp logic
	atm: solos-pci: Fix potential deadlock on &cli_queue_lock
	atm: solos-pci: Fix potential deadlock on &tx_queue_lock
	net: vlan: introduce skb_vlan_eth_hdr()
	net: fec: correct queue selection
	octeontx2-af: fix a use-after-free in rvu_nix_register_reporters
	octeontx2-pf: Fix promisc mcam entry action
	octeontx2-af: Update RSS algorithm index
	atm: Fix Use-After-Free in do_vcc_ioctl
	net/rose: Fix Use-After-Free in rose_ioctl
	iavf: Introduce new state machines for flow director
	iavf: Handle ntuple on/off based on new state machines for flow director
	qed: Fix a potential use-after-free in qed_cxt_tables_alloc
	net: Remove acked SYN flag from packet in the transmit queue correctly
	net: ena: Destroy correct number of xdp queues upon failure
	net: ena: Fix xdp drops handling due to multibuf packets
	net: ena: Fix XDP redirection error
	stmmac: dwmac-loongson: Make sure MDIO is initialized before use
	sign-file: Fix incorrect return values check
	vsock/virtio: Fix unsigned integer wrap around in virtio_transport_has_space()
	dpaa2-switch: fix size of the dma_unmap
	dpaa2-switch: do not ask for MDB, VLAN and FDB replay
	net: stmmac: Handle disabled MDIO busses from devicetree
	appletalk: Fix Use-After-Free in atalk_ioctl
	net: atlantic: fix double free in ring reinit logic
	cred: switch to using atomic_long_t
	fuse: dax: set fc->dax to NULL in fuse_dax_conn_free()
	ALSA: hda/hdmi: add force-connect quirk for NUC5CPYB
	ALSA: hda/hdmi: add force-connect quirks for ASUSTeK Z170 variants
	ALSA: hda/realtek: Apply mute LED quirk for HP15-db
	Revert "PCI: acpiphp: Reassign resources on bridge if necessary"
	PCI: loongson: Limit MRRS to 256
	ksmbd: fix wrong name of SMB2_CREATE_ALLOCATION_SIZE
	drm/mediatek: Add spinlock for setting vblank event in atomic_begin
	x86/hyperv: Fix the detection of E820_TYPE_PRAM in a Gen2 VM
	usb: aqc111: check packet for fixup for true limit
	stmmac: dwmac-loongson: Add architecture dependency
	blk-throttle: fix lockdep warning of "cgroup_mutex or RCU read lock required!"
	blk-cgroup: bypass blkcg_deactivate_policy after destroying
	bcache: avoid oversize memory allocation by small stripe_size
	bcache: remove redundant assignment to variable cur_idx
	bcache: add code comments for bch_btree_node_get() and __bch_btree_node_alloc()
	bcache: avoid NULL checking to c->root in run_cache_set()
	nbd: fold nbd config initialization into nbd_alloc_config()
	nvme-auth: set explanation code for failure2 msgs
	nvme: catch errors from nvme_configure_metadata()
	selftests/bpf: fix bpf_loop_bench for new callback verification scheme
	LoongArch: Add dependency between vmlinuz.efi and vmlinux.efi
	LoongArch: Implement constant timer shutdown interface
	platform/x86: intel_telemetry: Fix kernel doc descriptions
	HID: glorious: fix Glorious Model I HID report
	HID: add ALWAYS_POLL quirk for Apple kb
	nbd: pass nbd_sock to nbd_read_reply() instead of index
	HID: hid-asus: reset the backlight brightness level on resume
	HID: multitouch: Add quirk for HONOR GLO-GXXX touchpad
	asm-generic: qspinlock: fix queued_spin_value_unlocked() implementation
	net: usb: qmi_wwan: claim interface 4 for ZTE MF290
	arm64: add dependency between vmlinuz.efi and Image
	HID: hid-asus: add const to read-only outgoing usb buffer
	perf: Fix perf_event_validate_size() lockdep splat
	btrfs: do not allow non subvolume root targets for snapshot
	soundwire: stream: fix NULL pointer dereference for multi_link
	ext4: prevent the normalized size from exceeding EXT_MAX_BLOCKS
	arm64: mm: Always make sw-dirty PTEs hw-dirty in pte_modify
	team: Fix use-after-free when an option instance allocation fails
	drm/amdgpu/sdma5.2: add begin/end_use ring callbacks
	dmaengine: stm32-dma: avoid bitfield overflow assertion
	mm/mglru: fix underprotected page cache
	mm/shmem: fix race in shmem_undo_range w/THP
	btrfs: free qgroup reserve when ORDERED_IOERR is set
	btrfs: don't clear qgroup reserved bit in release_folio
	drm/amdgpu: fix tear down order in amdgpu_vm_pt_free
	drm/amd/display: Disable PSR-SU on Parade 0803 TCON again
	drm/i915: Fix remapped stride with CCS on ADL+
	smb: client: fix OOB in receive_encrypted_standard()
	smb: client: fix NULL deref in asn1_ber_decoder()
	smb: client: fix OOB in smb2_query_reparse_point()
	ring-buffer: Fix memory leak of free page
	tracing: Update snapshot buffer on resize if it is allocated
	ring-buffer: Do not update before stamp when switching sub-buffers
	ring-buffer: Have saved event hold the entire event
	ring-buffer: Fix writing to the buffer with max_data_size
	ring-buffer: Fix a race in rb_time_cmpxchg() for 32 bit archs
	ring-buffer: Do not try to put back write_stamp
	ring-buffer: Have rb_time_cmpxchg() set the msb counter too
	net: tls, update curr on splice as well
	r8152: avoid to change cfg for all devices
	r8152: remove rtl_vendor_mode function
	r8152: fix the autosuspend doesn't work
	Linux 6.1.69

Change-Id: I695d1d50ca8c00ff505505918bdc59ce9d29d479
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2024-01-11 22:37:52 +00:00
Greg Kroah-Hartman
c9b484c69d This is the 6.1.68 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmV57F0ACgkQONu9yGCS
 aT5Ihg//f5xvyjEEbZyE7tFaBBgx8ceQCtteRyi+Jw3Hy65/9neETij0t97IhG37
 I89TIAddzNIl51ifl8UYZMWI780HbnW1YdbVLMElbngbmT5rHzIsGpAVCC+SDmMK
 NPWXrqWIw6yTVSbTwqKIqOLlEiLxGjdWnPxjoMXBVyje+EcmANBe+fe9qkLq98XC
 ZgzrRZyriS8QLMMscy/GmdxIyC32nxebdHDwwE6qgYM8GWNfqLLektX798VGFhra
 ByR9bvsJ0PD5m9siCGcx37lVusJDLMjJp4FtMIFTrH63i0sMQm7HKiggJmbCm4lH
 Sgbo4iwvSVa2xf1glPJagE9tiah5b0feLqgrQf/ONO2PdCjcERN47472IcQgRvQ+
 SDYKScZBSp1/Jd063dHiK/u79uxEBFEdisAkPG2MstjCySEDuhvDrV5R0iKDpQBP
 y2FXb4RArqZFrGwS4Zfxx/EQnj3MYJ11a4AE5I0yUGIj7vrFdddayBDBVdwhog84
 QhHPH0F/eC/zSMATYSQSCZTTSZ2UoR8NODXyOryoH5tmXlgxXWKq1oFi5nUnysoP
 SkGDT0dg+kbReQNA+eyj5qTS4lzincIyP2B4Ple9d75zpx1UENlqVm1xvWLccyFt
 3eV/XNRg8dAapsbqvEtW+iev6izutWgcG6p1hToObnbg5uHy6fI=
 =+iTJ
 -----END PGP SIGNATURE-----

Merge 6.1.68 into android14-6.1-lts

Changes in 6.1.68
	vdpa/mlx5: preserve CVQ vringh index
	hrtimers: Push pending hrtimers away from outgoing CPU earlier
	i2c: designware: Fix corrupted memory seen in the ISR
	netfilter: ipset: fix race condition between swap/destroy and kernel side add/del/test
	zstd: Fix array-index-out-of-bounds UBSAN warning
	tg3: Move the [rt]x_dropped counters to tg3_napi
	tg3: Increment tx_dropped in tg3_tso_bug()
	kconfig: fix memory leak from range properties
	drm/amdgpu: correct chunk_ptr to a pointer to chunk.
	x86: Introduce ia32_enabled()
	x86/coco: Disable 32-bit emulation by default on TDX and SEV
	x86/entry: Convert INT 0x80 emulation to IDTENTRY
	x86/entry: Do not allow external 0x80 interrupts
	x86/tdx: Allow 32-bit emulation by default
	dt: dt-extract-compatibles: Handle cfile arguments in generator function
	dt: dt-extract-compatibles: Don't follow symlinks when walking tree
	platform/x86: asus-wmi: Move i8042 filter install to shared asus-wmi code
	of: dynamic: Fix of_reconfig_get_state_change() return value documentation
	platform/x86: wmi: Skip blocks with zero instances
	ipv6: fix potential NULL deref in fib6_add()
	octeontx2-pf: Add missing mutex lock in otx2_get_pauseparam
	octeontx2-af: Check return value of nix_get_nixlf before using nixlf
	hv_netvsc: rndis_filter needs to select NLS
	r8152: Rename RTL8152_UNPLUG to RTL8152_INACCESSIBLE
	r8152: Add RTL8152_INACCESSIBLE checks to more loops
	r8152: Add RTL8152_INACCESSIBLE to r8156b_wait_loading_flash()
	r8152: Add RTL8152_INACCESSIBLE to r8153_pre_firmware_1()
	r8152: Add RTL8152_INACCESSIBLE to r8153_aldps_en()
	mlxbf-bootctl: correctly identify secure boot with development keys
	platform/mellanox: Add null pointer checks for devm_kasprintf()
	platform/mellanox: Check devm_hwmon_device_register_with_groups() return value
	arcnet: restoring support for multiple Sohard Arcnet cards
	octeontx2-pf: consider both Rx and Tx packet stats for adaptive interrupt coalescing
	net: stmmac: fix FPE events losing
	xsk: Skip polling event check for unbound socket
	octeontx2-af: fix a use-after-free in rvu_npa_register_reporters
	i40e: Fix unexpected MFS warning message
	iavf: validate tx_coalesce_usecs even if rx_coalesce_usecs is zero
	net: bnxt: fix a potential use-after-free in bnxt_init_tc
	tcp: fix mid stream window clamp.
	ionic: fix snprintf format length warning
	ionic: Fix dim work handling in split interrupt mode
	ipv4: ip_gre: Avoid skb_pull() failure in ipgre_xmit()
	net: atlantic: Fix NULL dereference of skb pointer in
	net: hns: fix wrong head when modify the tx feature when sending packets
	net: hns: fix fake link up on xge port
	octeontx2-af: Adjust Tx credits when MCS external bypass is disabled
	octeontx2-af: Fix mcs sa cam entries size
	octeontx2-af: Fix mcs stats register address
	octeontx2-af: Add missing mcs flr handler call
	octeontx2-af: Update Tx link register range
	dt-bindings: interrupt-controller: Allow #power-domain-cells
	netfilter: nft_exthdr: add boolean DCCP option matching
	netfilter: nf_tables: fix 'exist' matching on bigendian arches
	netfilter: nf_tables: bail out on mismatching dynset and set expressions
	netfilter: nf_tables: validate family when identifying table via handle
	netfilter: xt_owner: Fix for unsafe access of sk->sk_socket
	tcp: do not accept ACK of bytes we never sent
	bpf: sockmap, updating the sg structure should also update curr
	psample: Require 'CAP_NET_ADMIN' when joining "packets" group
	drop_monitor: Require 'CAP_SYS_ADMIN' when joining "events" group
	mm/damon/sysfs: eliminate potential uninitialized variable warning
	tee: optee: Fix supplicant based device enumeration
	RDMA/hns: Fix unnecessary err return when using invalid congest control algorithm
	RDMA/irdma: Do not modify to SQD on error
	RDMA/irdma: Add wait for suspend on SQD
	arm64: dts: rockchip: Expand reg size of vdec node for RK3328
	arm64: dts: rockchip: Expand reg size of vdec node for RK3399
	ASoC: fsl_sai: Fix no frame sync clock issue on i.MX8MP
	RDMA/rtrs-srv: Do not unconditionally enable irq
	RDMA/rtrs-clt: Start hb after path_up
	RDMA/rtrs-srv: Check return values while processing info request
	RDMA/rtrs-srv: Free srv_mr iu only when always_invalidate is true
	RDMA/rtrs-srv: Destroy path files after making sure no IOs in-flight
	RDMA/rtrs-clt: Fix the max_send_wr setting
	RDMA/rtrs-clt: Remove the warnings for req in_use check
	RDMA/bnxt_re: Correct module description string
	RDMA/irdma: Refactor error handling in create CQP
	RDMA/irdma: Fix UAF in irdma_sc_ccq_get_cqe_info()
	hwmon: (acpi_power_meter) Fix 4.29 MW bug
	ASoC: codecs: lpass-tx-macro: set active_decimator correct default value
	hwmon: (nzxt-kraken2) Fix error handling path in kraken2_probe()
	ASoC: wm_adsp: fix memleak in wm_adsp_buffer_populate
	RDMA/core: Fix umem iterator when PAGE_SIZE is greater then HCA pgsz
	RDMA/irdma: Avoid free the non-cqp_request scratch
	drm/bridge: tc358768: select CONFIG_VIDEOMODE_HELPERS
	arm64: dts: imx8mq: drop usb3-resume-missing-cas from usb
	arm64: dts: imx8mp: imx8mq: Add parkmode-disable-ss-quirk on DWC3
	ARM: dts: imx6ul-pico: Describe the Ethernet PHY clock
	tracing: Fix a warning when allocating buffered events fails
	scsi: be2iscsi: Fix a memleak in beiscsi_init_wrb_handle()
	ARM: imx: Check return value of devm_kasprintf in imx_mmdc_perf_init
	ARM: dts: imx7: Declare timers compatible with fsl,imx6dl-gpt
	ARM: dts: imx28-xea: Pass the 'model' property
	riscv: fix misaligned access handling of C.SWSP and C.SDSP
	md: introduce md_ro_state
	md: don't leave 'MD_RECOVERY_FROZEN' in error path of md_set_readonly()
	iommu: Avoid more races around device probe
	rethook: Use __rcu pointer for rethook::handler
	kprobes: consistent rcu api usage for kretprobe holder
	ASoC: amd: yc: Fix non-functional mic on ASUS E1504FA
	io_uring/af_unix: disable sending io_uring over sockets
	nvme-pci: Add sleep quirk for Kingston drives
	io_uring: fix mutex_unlock with unreferenced ctx
	ALSA: usb-audio: Add Pioneer DJM-450 mixer controls
	ALSA: pcm: fix out-of-bounds in snd_pcm_state_names
	ALSA: hda/realtek: Enable headset on Lenovo M90 Gen5
	ALSA: hda/realtek: add new Framework laptop to quirks
	ALSA: hda/realtek: Add Framework laptop 16 to quirks
	ring-buffer: Test last update in 32bit version of __rb_time_read()
	nilfs2: fix missing error check for sb_set_blocksize call
	nilfs2: prevent WARNING in nilfs_sufile_set_segment_usage()
	cgroup_freezer: cgroup_freezing: Check if not frozen
	checkstack: fix printed address
	tracing: Always update snapshot buffer size
	tracing: Disable snapshot buffer when stopping instance tracers
	tracing: Fix incomplete locking when disabling buffered events
	tracing: Fix a possible race when disabling buffered events
	packet: Move reference count in packet_sock to atomic_long_t
	r8169: fix rtl8125b PAUSE frames blasting when suspended
	regmap: fix bogus error on regcache_sync success
	platform/surface: aggregator: fix recv_buf() return value
	hugetlb: fix null-ptr-deref in hugetlb_vma_lock_write
	mm: fix oops when filemap_map_pmd() without prealloc_pte
	powercap: DTPM: Fix missing cpufreq_cpu_put() calls
	md/raid6: use valid sector values to determine if an I/O should wait on the reshape
	arm64: dts: mediatek: mt7622: fix memory node warning check
	arm64: dts: mediatek: mt8183-kukui-jacuzzi: fix dsi unnecessary cells properties
	arm64: dts: mediatek: cherry: Fix interrupt cells for MT6360 on I2C7
	arm64: dts: mediatek: mt8173-evb: Fix regulator-fixed node names
	arm64: dts: mediatek: mt8195: Fix PM suspend/resume with venc clocks
	arm64: dts: mediatek: mt8183: Fix unit address for scp reserved memory
	arm64: dts: mediatek: mt8183: Move thermal-zones to the root node
	arm64: dts: mediatek: mt8183-evb: Fix unit_address_vs_reg warning on ntc
	binder: fix memory leaks of spam and pending work
	coresight: etm4x: Make etm4_remove_dev() return void
	coresight: etm4x: Remove bogous __exit annotation for some functions
	hwtracing: hisi_ptt: Add dummy callback pmu::read()
	misc: mei: client.c: return negative error code in mei_cl_write
	misc: mei: client.c: fix problem of return '-EOVERFLOW' in mei_cl_write
	LoongArch: BPF: Don't sign extend memory load operand
	LoongArch: BPF: Don't sign extend function return value
	ring-buffer: Force absolute timestamp on discard of event
	tracing: Set actual size after ring buffer resize
	tracing: Stop current tracer when resizing buffer
	parisc: Reduce size of the bug_table on 64-bit kernel by half
	parisc: Fix asm operand number out of range build error in bug table
	arm64: dts: mediatek: add missing space before {
	arm64: dts: mt8183: kukui: Fix underscores in node names
	perf: Fix perf_event_validate_size()
	x86/sev: Fix kernel crash due to late update to read-only ghcb_version
	gpiolib: sysfs: Fix error handling on failed export
	drm/amdgpu: fix memory overflow in the IB test
	drm/amd/amdgpu: Fix warnings in amdgpu/amdgpu_display.c
	drm/amdgpu: correct the amdgpu runtime dereference usage count
	drm/amdgpu: Update ras eeprom support for smu v13_0_0 and v13_0_10
	drm/amdgpu: Add EEPROM I2C address support for ip discovery
	drm/amdgpu: Remove redundant I2C EEPROM address
	drm/amdgpu: Decouple RAS EEPROM addresses from chips
	drm/amdgpu: Add support for RAS table at 0x40000
	drm/amdgpu: Remove second moot switch to set EEPROM I2C address
	drm/amdgpu: Return from switch early for EEPROM I2C address
	drm/amdgpu: simplify amdgpu_ras_eeprom.c
	drm/amdgpu: Add I2C EEPROM support on smu v13_0_6
	drm/amdgpu: Update EEPROM I2C address for smu v13_0_0
	usb: gadget: f_hid: fix report descriptor allocation
	serial: 8250_dw: Add ACPI ID for Granite Rapids-D UART
	parport: Add support for Brainboxes IX/UC/PX parallel cards
	cifs: Fix non-availability of dedup breaking generic/304
	Revert "xhci: Loosen RPM as default policy to cover for AMD xHC 1.1"
	smb: client: fix potential NULL deref in parse_dfs_referrals()
	usb: typec: class: fix typec_altmode_put_partner to put plugs
	ARM: PL011: Fix DMA support
	serial: sc16is7xx: address RX timeout interrupt errata
	serial: 8250: 8250_omap: Clear UART_HAS_RHR_IT_DIS bit
	serial: 8250: 8250_omap: Do not start RX DMA on THRI interrupt
	serial: 8250_omap: Add earlycon support for the AM654 UART controller
	devcoredump: Send uevent once devcd is ready
	x86/CPU/AMD: Check vendor in the AMD microcode callback
	USB: gadget: core: adjust uevent timing on gadget unbind
	cifs: Fix flushing, invalidation and file size with copy_file_range()
	cifs: Fix flushing, invalidation and file size with FICLONE
	MIPS: kernel: Clear FPU states when setting up kernel threads
	KVM: s390/mm: Properly reset no-dat
	KVM: SVM: Update EFER software model on CR0 trap for SEV-ES
	MIPS: Loongson64: Reserve vgabios memory on boot
	MIPS: Loongson64: Handle more memory types passed from firmware
	MIPS: Loongson64: Enable DMA noncoherent support
	netfilter: nft_set_pipapo: skip inactive elements during set walk
	riscv: Kconfig: Add select ARM_AMBA to SOC_STARFIVE
	drm/i915/display: Drop check for doublescan mode in modevalid
	drm/i915/lvds: Use REG_BIT() & co.
	drm/i915/sdvo: stop caching has_hdmi_monitor in struct intel_sdvo
	drm/i915: Skip some timing checks on BXT/GLK DSI transcoders
	Linux 6.1.68

Change-Id: I0a824071a80b24dc4a2e0077f305b7cac42235b8
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2024-01-05 08:40:52 +00:00
Bibo Mao
355170a7ec LoongArch: Implement constant timer shutdown interface
[ Upstream commit d43f37b73468c172bc89ac4824a1511b411f0778 ]

When a cpu is hot-unplugged, it is put in idle state and the function
arch_cpu_idle_dead() is called. The timer interrupt for this processor
should be disabled, otherwise there will be pending timer interrupt for
the unplugged cpu, so that vcpu is prevented from giving up scheduling
when system is running in vm mode.

This patch implements the timer shutdown interface so that the constant
timer will be properly disabled when a CPU is hot-unplugged.

Reviewed-by: WANG Xuerui <git@xen0n.name>
Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-12-20 17:00:23 +01:00
Masahiro Yamada
adb6a90754 LoongArch: Add dependency between vmlinuz.efi and vmlinux.efi
[ Upstream commit d3ec75bc635cb0cb8185b63293d33a3d1b942d22 ]

A common issue in Makefile is a race in parallel building.

You need to be careful to prevent multiple threads from writing to the
same file simultaneously.

Commit 3939f33450 ("ARM: 8418/1: add boot image dependencies to not
generate invalid images") addressed such a bad scenario.

A similar symptom occurs with the following command:

  $ make -j$(nproc) ARCH=loongarch vmlinux.efi vmlinuz.efi
    [ snip ]
    SORTTAB vmlinux
    OBJCOPY arch/loongarch/boot/vmlinux.efi
    OBJCOPY arch/loongarch/boot/vmlinux.efi
    PAD     arch/loongarch/boot/vmlinux.bin
    GZIP    arch/loongarch/boot/vmlinuz
    OBJCOPY arch/loongarch/boot/vmlinuz.o
    LD      arch/loongarch/boot/vmlinuz.efi.elf
    OBJCOPY arch/loongarch/boot/vmlinuz.efi

The log "OBJCOPY arch/loongarch/boot/vmlinux.efi" is displayed twice.

It indicates that two threads simultaneously enter arch/loongarch/boot/
and write to arch/loongarch/boot/vmlinux.efi.

It occasionally leads to a build failure:

  $ make -j$(nproc) ARCH=loongarch vmlinux.efi vmlinuz.efi
    [ snip ]
    SORTTAB vmlinux
    OBJCOPY arch/loongarch/boot/vmlinux.efi
    PAD     arch/loongarch/boot/vmlinux.bin
  truncate: Invalid number: ‘arch/loongarch/boot/vmlinux.bin’
  make[2]: *** [drivers/firmware/efi/libstub/Makefile.zboot:13:
  arch/loongarch/boot/vmlinux.bin] Error 1
  make[2]: *** Deleting file 'arch/loongarch/boot/vmlinux.bin'
  make[1]: *** [arch/loongarch/Makefile:146: vmlinuz.efi] Error 2
  make[1]: *** Waiting for unfinished jobs....
  make: *** [Makefile:234: __sub-make] Error 2

vmlinuz.efi depends on vmlinux.efi, but such a dependency is not
specified in arch/loongarch/Makefile.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-12-20 17:00:23 +01:00
Hengqi Chen
40421e0cf3 LoongArch: BPF: Don't sign extend function return value
[ Upstream commit 5d47ec2e6f4c64e30e392cfe9532df98c9beb106 ]

The `cls_redirect` test triggers a kernel panic like:

  # ./test_progs -t cls_redirect
  Can't find bpf_testmod.ko kernel module: -2
  WARNING! Selftests relying on bpf_testmod.ko will be skipped.
  [   30.938489] CPU 3 Unable to handle kernel paging request at virtual address fffffffffd814de0, era == ffff800002009fb8, ra == ffff800002009f9c
  [   30.939331] Oops[#1]:
  [   30.939513] CPU: 3 PID: 1260 Comm: test_progs Not tainted 6.7.0-rc2-loong-devel-g2f56bb0d2327 #35 a896aca3f4164f09cc346f89f2e09832e07be5f6
  [   30.939732] Hardware name: QEMU QEMU Virtual Machine, BIOS unknown 2/2/2022
  [   30.939901] pc ffff800002009fb8 ra ffff800002009f9c tp 9000000104da4000 sp 9000000104da7ab0
  [   30.940038] a0 fffffffffd814de0 a1 9000000104da7a68 a2 0000000000000000 a3 9000000104da7c10
  [   30.940183] a4 9000000104da7c14 a5 0000000000000002 a6 0000000000000021 a7 00005555904d7f90
  [   30.940321] t0 0000000000000110 t1 0000000000000000 t2 fffffffffd814de0 t3 0004c4b400000000
  [   30.940456] t4 ffffffffffffffff t5 00000000c3f63600 t6 0000000000000000 t7 0000000000000000
  [   30.940590] t8 000000000006d803 u0 0000000000000020 s9 9000000104da7b10 s0 900000010504c200
  [   30.940727] s1 fffffffffd814de0 s2 900000010504c200 s3 9000000104da7c10 s4 9000000104da7ad0
  [   30.940866] s5 0000000000000000 s6 90000000030e65bc s7 9000000104da7b44 s8 90000000044f6fc0
  [   30.941015]    ra: ffff800002009f9c bpf_prog_846803e5ae81417f_cls_redirect+0xa0/0x590
  [   30.941535]   ERA: ffff800002009fb8 bpf_prog_846803e5ae81417f_cls_redirect+0xbc/0x590
  [   30.941696]  CRMD: 000000b0 (PLV0 -IE -DA +PG DACF=CC DACM=CC -WE)
  [   30.942224]  PRMD: 00000004 (PPLV0 +PIE -PWE)
  [   30.942330]  EUEN: 00000003 (+FPE +SXE -ASXE -BTE)
  [   30.942453]  ECFG: 00071c1c (LIE=2-4,10-12 VS=7)
  [   30.942612] ESTAT: 00010000 [PIL] (IS= ECode=1 EsubCode=0)
  [   30.942764]  BADV: fffffffffd814de0
  [   30.942854]  PRID: 0014c010 (Loongson-64bit, Loongson-3A5000)
  [   30.942974] Modules linked in:
  [   30.943078] Process test_progs (pid: 1260, threadinfo=00000000ce303226, task=000000007d10bb76)
  [   30.943306] Stack : 900000010a064000 90000000044f6fc0 9000000104da7b48 0000000000000000
  [   30.943495]         0000000000000000 9000000104da7c14 9000000104da7c10 900000010504c200
  [   30.943626]         0000000000000001 ffff80001b88c000 9000000104da7b70 90000000030e6668
  [   30.943785]         0000000000000000 9000000104da7b58 ffff80001b88c048 9000000003d05000
  [   30.943936]         900000000303ac88 0000000000000000 0000000000000000 9000000104da7b70
  [   30.944091]         0000000000000000 0000000000000001 0000000731eeab00 0000000000000000
  [   30.944245]         ffff80001b88c000 0000000000000000 0000000000000000 54b99959429f83b8
  [   30.944402]         ffff80001b88c000 90000000044f6fc0 9000000101d70000 ffff80001b88c000
  [   30.944538]         000000000000005a 900000010504c200 900000010a064000 900000010a067000
  [   30.944697]         9000000104da7d88 0000000000000000 9000000003d05000 90000000030e794c
  [   30.944852]         ...
  [   30.944924] Call Trace:
  [   30.945120] [<ffff800002009fb8>] bpf_prog_846803e5ae81417f_cls_redirect+0xbc/0x590
  [   30.945650] [<90000000030e6668>] bpf_test_run+0x1ec/0x2f8
  [   30.945958] [<90000000030e794c>] bpf_prog_test_run_skb+0x31c/0x684
  [   30.946065] [<90000000026d4f68>] __sys_bpf+0x678/0x2724
  [   30.946159] [<90000000026d7288>] sys_bpf+0x20/0x2c
  [   30.946253] [<90000000032dd224>] do_syscall+0x7c/0x94
  [   30.946343] [<9000000002541c5c>] handle_syscall+0xbc/0x158
  [   30.946492]
  [   30.946549] Code: 0015030e  5c0009c0  5001d000 <28c00304> 02c00484  29c00304  00150009  2a42d2e4  0280200d
  [   30.946793]
  [   30.946971] ---[ end trace 0000000000000000 ]---
  [   32.093225] Kernel panic - not syncing: Fatal exception in interrupt
  [   32.093526] Kernel relocated by 0x2320000
  [   32.093630]  .text @ 0x9000000002520000
  [   32.093725]  .data @ 0x9000000003400000
  [   32.093792]  .bss  @ 0x9000000004413200
  [   34.971998] ---[ end Kernel panic - not syncing: Fatal exception in interrupt ]---

This is because we signed-extend function return values. When subprog
mode is enabled, we have:

  cls_redirect()
    -> get_global_metrics() returns pcpu ptr 0xfffffefffc00b480

The pointer returned is later signed-extended to 0xfffffffffc00b480 at
`BPF_JMP | BPF_EXIT`. During BPF prog run, this triggers unhandled page
fault and a kernel panic.

Drop the unnecessary signed-extension on return values like other
architectures do.

With this change, we have:

  # ./test_progs -t cls_redirect
  Can't find bpf_testmod.ko kernel module: -2
  WARNING! Selftests relying on bpf_testmod.ko will be skipped.
  #51/1    cls_redirect/cls_redirect_inlined:OK
  #51/2    cls_redirect/IPv4 TCP accept unknown (no hops, flags: SYN):OK
  #51/3    cls_redirect/IPv6 TCP accept unknown (no hops, flags: SYN):OK
  #51/4    cls_redirect/IPv4 TCP accept unknown (no hops, flags: ACK):OK
  #51/5    cls_redirect/IPv6 TCP accept unknown (no hops, flags: ACK):OK
  #51/6    cls_redirect/IPv4 TCP forward unknown (one hop, flags: ACK):OK
  #51/7    cls_redirect/IPv6 TCP forward unknown (one hop, flags: ACK):OK
  #51/8    cls_redirect/IPv4 TCP accept known (one hop, flags: ACK):OK
  #51/9    cls_redirect/IPv6 TCP accept known (one hop, flags: ACK):OK
  #51/10   cls_redirect/IPv4 UDP accept unknown (no hops, flags: none):OK
  #51/11   cls_redirect/IPv6 UDP accept unknown (no hops, flags: none):OK
  #51/12   cls_redirect/IPv4 UDP forward unknown (one hop, flags: none):OK
  #51/13   cls_redirect/IPv6 UDP forward unknown (one hop, flags: none):OK
  #51/14   cls_redirect/IPv4 UDP accept known (one hop, flags: none):OK
  #51/15   cls_redirect/IPv6 UDP accept known (one hop, flags: none):OK
  #51/16   cls_redirect/cls_redirect_subprogs:OK
  #51/17   cls_redirect/IPv4 TCP accept unknown (no hops, flags: SYN):OK
  #51/18   cls_redirect/IPv6 TCP accept unknown (no hops, flags: SYN):OK
  #51/19   cls_redirect/IPv4 TCP accept unknown (no hops, flags: ACK):OK
  #51/20   cls_redirect/IPv6 TCP accept unknown (no hops, flags: ACK):OK
  #51/21   cls_redirect/IPv4 TCP forward unknown (one hop, flags: ACK):OK
  #51/22   cls_redirect/IPv6 TCP forward unknown (one hop, flags: ACK):OK
  #51/23   cls_redirect/IPv4 TCP accept known (one hop, flags: ACK):OK
  #51/24   cls_redirect/IPv6 TCP accept known (one hop, flags: ACK):OK
  #51/25   cls_redirect/IPv4 UDP accept unknown (no hops, flags: none):OK
  #51/26   cls_redirect/IPv6 UDP accept unknown (no hops, flags: none):OK
  #51/27   cls_redirect/IPv4 UDP forward unknown (one hop, flags: none):OK
  #51/28   cls_redirect/IPv6 UDP forward unknown (one hop, flags: none):OK
  #51/29   cls_redirect/IPv4 UDP accept known (one hop, flags: none):OK
  #51/30   cls_redirect/IPv6 UDP accept known (one hop, flags: none):OK
  #51/31   cls_redirect/cls_redirect_dynptr:OK
  #51/32   cls_redirect/IPv4 TCP accept unknown (no hops, flags: SYN):OK
  #51/33   cls_redirect/IPv6 TCP accept unknown (no hops, flags: SYN):OK
  #51/34   cls_redirect/IPv4 TCP accept unknown (no hops, flags: ACK):OK
  #51/35   cls_redirect/IPv6 TCP accept unknown (no hops, flags: ACK):OK
  #51/36   cls_redirect/IPv4 TCP forward unknown (one hop, flags: ACK):OK
  #51/37   cls_redirect/IPv6 TCP forward unknown (one hop, flags: ACK):OK
  #51/38   cls_redirect/IPv4 TCP accept known (one hop, flags: ACK):OK
  #51/39   cls_redirect/IPv6 TCP accept known (one hop, flags: ACK):OK
  #51/40   cls_redirect/IPv4 UDP accept unknown (no hops, flags: none):OK
  #51/41   cls_redirect/IPv6 UDP accept unknown (no hops, flags: none):OK
  #51/42   cls_redirect/IPv4 UDP forward unknown (one hop, flags: none):OK
  #51/43   cls_redirect/IPv6 UDP forward unknown (one hop, flags: none):OK
  #51/44   cls_redirect/IPv4 UDP accept known (one hop, flags: none):OK
  #51/45   cls_redirect/IPv6 UDP accept known (one hop, flags: none):OK
  #51      cls_redirect:OK
  Summary: 1/45 PASSED, 0 SKIPPED, 0 FAILED

Fixes: 5dc615520c ("LoongArch: Add BPF JIT support")
Signed-off-by: Hengqi Chen <hengqi.chen@gmail.com>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-12-13 18:39:23 +01:00
Hengqi Chen
ebb09d58df LoongArch: BPF: Don't sign extend memory load operand
[ Upstream commit fe5757553bf9ebe45ae8ecab5922f6937c8d8dfc ]

The `cgrp_local_storage` test triggers a kernel panic like:

  # ./test_progs -t cgrp_local_storage
  Can't find bpf_testmod.ko kernel module: -2
  WARNING! Selftests relying on bpf_testmod.ko will be skipped.
  [  550.930632] CPU 1 Unable to handle kernel paging request at virtual address 0000000000000080, era == ffff80000200be34, ra == ffff80000200be00
  [  550.931781] Oops[#1]:
  [  550.931966] CPU: 1 PID: 1303 Comm: test_progs Not tainted 6.7.0-rc2-loong-devel-g2f56bb0d2327 #35 a896aca3f4164f09cc346f89f2e09832e07be5f6
  [  550.932215] Hardware name: QEMU QEMU Virtual Machine, BIOS unknown 2/2/2022
  [  550.932403] pc ffff80000200be34 ra ffff80000200be00 tp 9000000108350000 sp 9000000108353dc0
  [  550.932545] a0 0000000000000000 a1 0000000000000517 a2 0000000000000118 a3 00007ffffbb15558
  [  550.932682] a4 00007ffffbb15620 a5 90000001004e7700 a6 0000000000000021 a7 0000000000000118
  [  550.932824] t0 ffff80000200bdc0 t1 0000000000000517 t2 0000000000000517 t3 00007ffff1c06ee0
  [  550.932961] t4 0000555578ae04d0 t5 fffffffffffffff8 t6 0000000000000004 t7 0000000000000020
  [  550.933097] t8 0000000000000040 u0 00000000000007b8 s9 9000000108353e00 s0 90000001004e7700
  [  550.933241] s1 9000000004005000 s2 0000000000000001 s3 0000000000000000 s4 0000555555eb2ec8
  [  550.933379] s5 00007ffffbb15bb8 s6 00007ffff1dafd60 s7 000055555663f610 s8 00007ffff1db0050
  [  550.933520]    ra: ffff80000200be00 bpf_prog_98f1b9e767be2a84_on_enter+0x40/0x200
  [  550.933911]   ERA: ffff80000200be34 bpf_prog_98f1b9e767be2a84_on_enter+0x74/0x200
  [  550.934105]  CRMD: 000000b0 (PLV0 -IE -DA +PG DACF=CC DACM=CC -WE)
  [  550.934596]  PRMD: 00000004 (PPLV0 +PIE -PWE)
  [  550.934712]  EUEN: 00000003 (+FPE +SXE -ASXE -BTE)
  [  550.934836]  ECFG: 00071c1c (LIE=2-4,10-12 VS=7)
  [  550.934976] ESTAT: 00010000 [PIL] (IS= ECode=1 EsubCode=0)
  [  550.935097]  BADV: 0000000000000080
  [  550.935181]  PRID: 0014c010 (Loongson-64bit, Loongson-3A5000)
  [  550.935291] Modules linked in:
  [  550.935391] Process test_progs (pid: 1303, threadinfo=000000006c3b1c41, task=0000000061f84a55)
  [  550.935643] Stack : 00007ffffbb15bb8 0000555555eb2ec8 0000000000000000 0000000000000001
  [  550.935844]         9000000004005000 ffff80001b864000 00007ffffbb15450 90000000029aa034
  [  550.935990]         0000000000000000 9000000108353ec0 0000000000000118 d07d9dfb09721a09
  [  550.936175]         0000000000000001 0000000000000000 9000000108353ec0 0000000000000118
  [  550.936314]         9000000101d46ad0 900000000290abf0 000055555663f610 0000000000000000
  [  550.936479]         0000000000000003 9000000108353ec0 00007ffffbb15450 90000000029d7288
  [  550.936635]         00007ffff1dafd60 000055555663f610 0000000000000000 0000000000000003
  [  550.936779]         9000000108353ec0 90000000035dd1f0 00007ffff1dafd58 9000000002841c5c
  [  550.936939]         0000000000000119 0000555555eea5a8 00007ffff1d78780 00007ffffbb153e0
  [  550.937083]         ffffffffffffffda 00007ffffbb15518 0000000000000040 00007ffffbb15558
  [  550.937224]         ...
  [  550.937299] Call Trace:
  [  550.937521] [<ffff80000200be34>] bpf_prog_98f1b9e767be2a84_on_enter+0x74/0x200
  [  550.937910] [<90000000029aa034>] bpf_trace_run2+0x90/0x154
  [  550.938105] [<900000000290abf0>] syscall_trace_enter.isra.0+0x1cc/0x200
  [  550.938224] [<90000000035dd1f0>] do_syscall+0x48/0x94
  [  550.938319] [<9000000002841c5c>] handle_syscall+0xbc/0x158
  [  550.938477]
  [  550.938607] Code: 580009ae  50016000  262402e4 <28c20085> 14092084  03a00084  16000024  03240084  00150006
  [  550.938851]
  [  550.939021] ---[ end trace 0000000000000000 ]---

Further investigation shows that this panic is triggered by memory
load operations:

  ptr = bpf_cgrp_storage_get(&map_a, task->cgroups->dfl_cgrp, 0,
                             BPF_LOCAL_STORAGE_GET_F_CREATE);

The expression `task->cgroups->dfl_cgrp` involves two memory load.
Since the field offset fits in imm12 or imm14, we use ldd or ldptrd
instructions. But both instructions have the side effect that it will
signed-extended the imm operand. Finally, we got the wrong addresses
and panics is inevitable.

Use a generic ldxd instruction to avoid this kind of issues.

With this change, we have:

  # ./test_progs -t cgrp_local_storage
  Can't find bpf_testmod.ko kernel module: -2
  WARNING! Selftests relying on bpf_testmod.ko will be skipped.
  test_cgrp_local_storage:PASS:join_cgroup /cgrp_local_storage 0 nsec
  #48/1    cgrp_local_storage/tp_btf:OK
  test_attach_cgroup:PASS:skel_open 0 nsec
  test_attach_cgroup:PASS:prog_attach 0 nsec
  test_attach_cgroup:PASS:prog_attach 0 nsec
  libbpf: prog 'update_cookie_tracing': failed to attach: ERROR: strerror_r(-524)=22
  test_attach_cgroup:FAIL:prog_attach unexpected error: -524
  #48/2    cgrp_local_storage/attach_cgroup:FAIL
  test_recursion:PASS:skel_open_and_load 0 nsec
  libbpf: prog 'on_lookup': failed to attach: ERROR: strerror_r(-524)=22
  libbpf: prog 'on_lookup': failed to auto-attach: -524
  test_recursion:FAIL:skel_attach unexpected error: -524 (errno 524)
  #48/3    cgrp_local_storage/recursion:FAIL
  #48/4    cgrp_local_storage/negative:OK
  #48/5    cgrp_local_storage/cgroup_iter_sleepable:OK
  test_yes_rcu_lock:PASS:skel_open 0 nsec
  test_yes_rcu_lock:PASS:skel_load 0 nsec
  libbpf: prog 'yes_rcu_lock': failed to attach: ERROR: strerror_r(-524)=22
  libbpf: prog 'yes_rcu_lock': failed to auto-attach: -524
  test_yes_rcu_lock:FAIL:skel_attach unexpected error: -524 (errno 524)
  #48/6    cgrp_local_storage/yes_rcu_lock:FAIL
  #48/7    cgrp_local_storage/no_rcu_lock:OK
  #48      cgrp_local_storage:FAIL

  All error logs:
  test_cgrp_local_storage:PASS:join_cgroup /cgrp_local_storage 0 nsec
  test_attach_cgroup:PASS:skel_open 0 nsec
  test_attach_cgroup:PASS:prog_attach 0 nsec
  test_attach_cgroup:PASS:prog_attach 0 nsec
  libbpf: prog 'update_cookie_tracing': failed to attach: ERROR: strerror_r(-524)=22
  test_attach_cgroup:FAIL:prog_attach unexpected error: -524
  #48/2    cgrp_local_storage/attach_cgroup:FAIL
  test_recursion:PASS:skel_open_and_load 0 nsec
  libbpf: prog 'on_lookup': failed to attach: ERROR: strerror_r(-524)=22
  libbpf: prog 'on_lookup': failed to auto-attach: -524
  test_recursion:FAIL:skel_attach unexpected error: -524 (errno 524)
  #48/3    cgrp_local_storage/recursion:FAIL
  test_yes_rcu_lock:PASS:skel_open 0 nsec
  test_yes_rcu_lock:PASS:skel_load 0 nsec
  libbpf: prog 'yes_rcu_lock': failed to attach: ERROR: strerror_r(-524)=22
  libbpf: prog 'yes_rcu_lock': failed to auto-attach: -524
  test_yes_rcu_lock:FAIL:skel_attach unexpected error: -524 (errno 524)
  #48/6    cgrp_local_storage/yes_rcu_lock:FAIL
  #48      cgrp_local_storage:FAIL
  Summary: 0/4 PASSED, 0 SKIPPED, 1 FAILED

No panics any more (The test still failed because lack of BPF trampoline
which I am actively working on).

Fixes: 5dc615520c ("LoongArch: Add BPF JIT support")
Signed-off-by: Hengqi Chen <hengqi.chen@gmail.com>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-12-13 18:39:23 +01:00
Greg Kroah-Hartman
f1bc13cb9d This is the 6.1.64 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmVmHpsACgkQONu9yGCS
 aT5uvw//SzcE0GImnHnfeN7iXtpFE9O0fhTxsjZCi8/HTXmGWPtQgWscd9y81bAd
 EHBVr456GXqd6KuIF+03g/r/FYinwWqK375meLfaybw1vSBP+fZttrEGqz6nTnYD
 yqOxw2bqgz8Xjp63UeNHD6mifpBvVtuAvzrfO1E2Ie/U1OU2uKdjRRv0iijKNeWN
 liOYTXaddIkVfZR0z6dVTl0hb5dPWsxNmF77kfVpKz4ALIHJcO13DlUuKtQz6Sb6
 0ElmJpuonHuUxHzb8e9LLsFy3IvbBqomSscwcd0tngtdUTzhMYFIZLjg2+WQ9Ovq
 raMGqvS/bKsoyoTBNKL83QB2NyXQb3vkfL0NgLsq9IwDl+r96mP9ctANYGwSjhND
 o/4sa/fbMFzeInA8Rzh7i56RCNstOBKApJPhBzWuY0f/6b1BZpvZaONyX3fFksWO
 dMeYT16GgO4lhQXnG3O6mtDT8eoZ1fLf7ZdGEZ2NktcOzXYelNc4aXJke7qdlIop
 CVxM+Ur+juj+DJymo59a6baXjEgIROdHq83N3CZwetGviPHneGqgYc0K7ETtA33H
 sH/0KGYAT8SzzjMlnXB0lpjp68WViJfzzo9Wxdf2aDZbL3SdI14GPKMUeDqqeSyU
 8bB2Hb4ItccRFW9RriiE3BPGnLGu7PDTkn5TgXDG/bDX54Cb5DQ=
 =YPzI
 -----END PGP SIGNATURE-----

Merge 6.1.64 into android14-6.1-lts

Changes in 6.1.64
	locking/ww_mutex/test: Fix potential workqueue corruption
	lib/generic-radix-tree.c: Don't overflow in peek()
	perf/core: Bail out early if the request AUX area is out of bound
	srcu: Fix srcu_struct node grpmask overflow on 64-bit systems
	selftests/lkdtm: Disable CONFIG_UBSAN_TRAP in test config
	clocksource/drivers/timer-imx-gpt: Fix potential memory leak
	clocksource/drivers/timer-atmel-tcb: Fix initialization on SAM9 hardware
	smp,csd: Throw an error if a CSD lock is stuck for too long
	cpu/hotplug: Don't offline the last non-isolated CPU
	workqueue: Provide one lock class key per work_on_cpu() callsite
	x86/mm: Drop the 4 MB restriction on minimal NUMA node memory size
	wifi: plfxlc: fix clang-specific fortify warning
	wifi: mac80211_hwsim: fix clang-specific fortify warning
	wifi: mac80211: don't return unset power in ieee80211_get_tx_power()
	atl1c: Work around the DMA RX overflow issue
	bpf: Detect IP == ksym.end as part of BPF program
	wifi: ath9k: fix clang-specific fortify warnings
	wifi: ath10k: fix clang-specific fortify warning
	net: annotate data-races around sk->sk_tx_queue_mapping
	net: annotate data-races around sk->sk_dst_pending_confirm
	wifi: ath10k: Don't touch the CE interrupt registers after power up
	vsock: read from socket's error queue
	bpf: Ensure proper register state printing for cond jumps
	Bluetooth: btusb: Add date->evt_skb is NULL check
	Bluetooth: Fix double free in hci_conn_cleanup
	ACPI: EC: Add quirk for HP 250 G7 Notebook PC
	tsnep: Fix tsnep_request_irq() format-overflow warning
	platform/chrome: kunit: initialize lock for fake ec_dev
	platform/x86: thinkpad_acpi: Add battery quirk for Thinkpad X120e
	drm/gma500: Fix call trace when psb_gem_mm_init() fails
	drm/komeda: drop all currently held locks if deadlock happens
	drm/amdgpu: not to save bo in the case of RAS err_event_athub
	drm/amdkfd: Fix a race condition of vram buffer unref in svm code
	drm/amd: Update `update_pcie_parameters` functions to use uint8_t arguments
	drm/amd/display: use full update for clip size increase of large plane source
	string.h: add array-wrappers for (v)memdup_user()
	kernel: kexec: copy user-array safely
	kernel: watch_queue: copy user-array safely
	drm_lease.c: copy user-array safely
	drm: vmwgfx_surface.c: copy user-array safely
	drm/msm/dp: skip validity check for DP CTS EDID checksum
	drm/amd: Fix UBSAN array-index-out-of-bounds for SMU7
	drm/amd: Fix UBSAN array-index-out-of-bounds for Polaris and Tonga
	drm/amdgpu: Fix potential null pointer derefernce
	drm/panel: fix a possible null pointer dereference
	drm/panel/panel-tpo-tpg110: fix a possible null pointer dereference
	drm/radeon: fix a possible null pointer dereference
	drm/amdgpu/vkms: fix a possible null pointer dereference
	drm/panel: st7703: Pick different reset sequence
	drm/amdkfd: Fix shift out-of-bounds issue
	drm/amdgpu: Fix a null pointer access when the smc_rreg pointer is NULL
	arm64: dts: ls208xa: use a pseudo-bus to constrain usb dma size
	selftests/efivarfs: create-read: fix a resource leak
	ASoC: soc-card: Add storage for PCI SSID
	ASoC: SOF: Pass PCI SSID to machine driver
	crypto: pcrypt - Fix hungtask for PADATA_RESET
	ASoC: SOF: ipc4: handle EXCEPTION_CAUGHT notification from firmware
	RDMA/hfi1: Use FIELD_GET() to extract Link Width
	scsi: hisi_sas: Set debugfs_dir pointer to NULL after removing debugfs
	scsi: ibmvfc: Remove BUG_ON in the case of an empty event pool
	fs/jfs: Add check for negative db_l2nbperpage
	fs/jfs: Add validity check for db_maxag and db_agpref
	jfs: fix array-index-out-of-bounds in dbFindLeaf
	jfs: fix array-index-out-of-bounds in diAlloc
	HID: lenovo: Detect quirk-free fw on cptkbd and stop applying workaround
	ARM: 9320/1: fix stack depot IRQ stack filter
	ALSA: hda: Fix possible null-ptr-deref when assigning a stream
	PCI: tegra194: Use FIELD_GET()/FIELD_PREP() with Link Width fields
	PCI: mvebu: Use FIELD_PREP() with Link Width
	atm: iphase: Do PCI error checks on own line
	PCI: Do error check on own line to split long "if" conditions
	scsi: libfc: Fix potential NULL pointer dereference in fc_lport_ptp_setup()
	PCI: Use FIELD_GET() to extract Link Width
	PCI: Extract ATS disabling to a helper function
	PCI: Disable ATS for specific Intel IPU E2000 devices
	misc: pci_endpoint_test: Add Device ID for R-Car S4-8 PCIe controller
	PCI: Use FIELD_GET() in Sapphire RX 5600 XT Pulse quirk
	ASoC: Intel: soc-acpi-cht: Add Lenovo Yoga Tab 3 Pro YT3-X90 quirk
	crypto: hisilicon/qm - prevent soft lockup in receive loop
	HID: Add quirk for Dell Pro Wireless Keyboard and Mouse KM5221W
	exfat: support handle zero-size directory
	mfd: intel-lpss: Add Intel Lunar Lake-M PCI IDs
	iio: adc: stm32-adc: harden against NULL pointer deref in stm32_adc_probe()
	thunderbolt: Apply USB 3.x bandwidth quirk only in software connection manager
	tty: vcc: Add check for kstrdup() in vcc_probe()
	usb: dwc3: core: configure TX/RX threshold for DWC3_IP
	soundwire: dmi-quirks: update HP Omen match
	f2fs: fix error handling of __get_node_page
	usb: gadget: f_ncm: Always set current gadget in ncm_bind()
	9p/trans_fd: Annotate data-racy writes to file::f_flags
	9p: v9fs_listxattr: fix %s null argument warning
	i3c: mipi-i3c-hci: Fix out of bounds access in hci_dma_irq_handler
	i2c: fix memleak in i2c_new_client_device()
	i2c: sun6i-p2wi: Prevent potential division by zero
	virtio-blk: fix implicit overflow on virtio_max_dma_size
	i3c: master: mipi-i3c-hci: Fix a kernel panic for accessing DAT_data.
	media: gspca: cpia1: shift-out-of-bounds in set_flicker
	media: vivid: avoid integer overflow
	gfs2: ignore negated quota changes
	gfs2: fix an oops in gfs2_permission
	media: cobalt: Use FIELD_GET() to extract Link Width
	media: ccs: Fix driver quirk struct documentation
	media: imon: fix access to invalid resource for the second interface
	drm/amd/display: Avoid NULL dereference of timing generator
	kgdb: Flush console before entering kgdb on panic
	i2c: dev: copy userspace array safely
	ASoC: ti: omap-mcbsp: Fix runtime PM underflow warnings
	drm/qxl: prevent memory leak
	ALSA: hda/realtek: Add quirk for ASUS UX7602ZM
	drm/amdgpu: fix software pci_unplug on some chips
	pwm: Fix double shift bug
	mtd: rawnand: tegra: add missing check for platform_get_irq()
	wifi: iwlwifi: Use FW rate for non-data frames
	sched/core: Optimize in_task() and in_interrupt() a bit
	SUNRPC: ECONNRESET might require a rebind
	mtd: rawnand: intel: check return value of devm_kasprintf()
	mtd: rawnand: meson: check return value of devm_kasprintf()
	NFSv4.1: fix handling NFS4ERR_DELAY when testing for session trunking
	SUNRPC: Add an IS_ERR() check back to where it was
	NFSv4.1: fix SP4_MACH_CRED protection for pnfs IO
	SUNRPC: Fix RPC client cleaned up the freed pipefs dentries
	gfs2: Silence "suspicious RCU usage in gfs2_permission" warning
	vhost-vdpa: fix use after free in vhost_vdpa_probe()
	net: set SOCK_RCU_FREE before inserting socket into hashtable
	ipvlan: add ipvlan_route_v6_outbound() helper
	tty: Fix uninit-value access in ppp_sync_receive()
	net: hns3: fix add VLAN fail issue
	net: hns3: add barrier in vf mailbox reply process
	net: hns3: fix incorrect capability bit display for copper port
	net: hns3: fix out-of-bounds access may occur when coalesce info is read via debugfs
	net: hns3: fix variable may not initialized problem in hns3_init_mac_addr()
	net: hns3: fix VF reset fail issue
	net: hns3: fix VF wrong speed and duplex issue
	tipc: Fix kernel-infoleak due to uninitialized TLV value
	net: mvneta: fix calls to page_pool_get_stats
	ppp: limit MRU to 64K
	xen/events: fix delayed eoi list handling
	ptp: annotate data-race around q->head and q->tail
	bonding: stop the device in bond_setup_by_slave()
	net: ethernet: cortina: Fix max RX frame define
	net: ethernet: cortina: Handle large frames
	net: ethernet: cortina: Fix MTU max setting
	af_unix: fix use-after-free in unix_stream_read_actor()
	netfilter: nf_conntrack_bridge: initialize err to 0
	netfilter: nf_tables: fix pointer math issue in nft_byteorder_eval()
	net: stmmac: fix rx budget limit check
	net: stmmac: avoid rx queue overrun
	net/mlx5e: fix double free of encap_header
	net/mlx5e: fix double free of encap_header in update funcs
	net/mlx5e: Fix pedit endianness
	net/mlx5e: Reduce the size of icosq_str
	net/mlx5e: Check return value of snprintf writing to fw_version buffer
	net/mlx5e: Check return value of snprintf writing to fw_version buffer for representors
	macvlan: Don't propagate promisc change to lower dev in passthru
	tools/power/turbostat: Fix a knl bug
	tools/power/turbostat: Enable the C-state Pre-wake printing
	cifs: spnego: add ';' in HOST_KEY_LEN
	cifs: fix check of rc in function generate_smb3signingkey
	i915/perf: Fix NULL deref bugs with drm_dbg() calls
	media: venus: hfi: add checks to perform sanity on queue pointers
	perf intel-pt: Fix async branch flags
	powerpc/perf: Fix disabling BHRB and instruction sampling
	randstruct: Fix gcc-plugin performance mode to stay in group
	bpf: Fix check_stack_write_fixed_off() to correctly spill imm
	bpf: Fix precision tracking for BPF_ALU | BPF_TO_BE | BPF_END
	scsi: mpt3sas: Fix loop logic
	scsi: megaraid_sas: Increase register read retry rount from 3 to 30 for selected registers
	scsi: qla2xxx: Fix system crash due to bad pointer access
	crypto: x86/sha - load modules based on CPU features
	x86/cpu/hygon: Fix the CPU topology evaluation for real
	KVM: x86: hyper-v: Don't auto-enable stimer on write from user-space
	KVM: x86: Ignore MSR_AMD64_TW_CFG access
	KVM: x86: Clear bit12 of ICR after APIC-write VM-exit
	audit: don't take task_lock() in audit_exe_compare() code path
	audit: don't WARN_ON_ONCE(!current->mm) in audit_exe_compare()
	proc: sysctl: prevent aliased sysctls from getting passed to init
	tty/sysrq: replace smp_processor_id() with get_cpu()
	tty: serial: meson: fix hard LOCKUP on crtscts mode
	hvc/xen: fix console unplug
	hvc/xen: fix error path in xen_hvc_init() to always register frontend driver
	hvc/xen: fix event channel handling for secondary consoles
	PCI/sysfs: Protect driver's D3cold preference from user space
	mm/damon/sysfs: remove requested targets when online-commit inputs
	mm/damon/sysfs: update monitoring target regions for online input commit
	watchdog: move softlockup_panic back to early_param
	mm/damon/lru_sort: avoid divide-by-zero in hot threshold calculation
	mm/damon/ops-common: avoid divide-by-zero during region hotness calculation
	mm/damon: implement a function for max nr_accesses safe calculation
	mm/damon/sysfs: check error from damon_sysfs_update_target()
	ACPI: resource: Do IRQ override on TongFang GMxXGxx
	regmap: Ensure range selector registers are updated after cache sync
	wifi: ath11k: fix temperature event locking
	wifi: ath11k: fix dfs radar event locking
	wifi: ath11k: fix htt pktlog locking
	wifi: ath11k: fix gtk offload status event locking
	mmc: meson-gx: Remove setting of CMD_CFG_ERROR
	genirq/generic_chip: Make irq_remove_generic_chip() irqdomain aware
	KEYS: trusted: tee: Refactor register SHM usage
	KEYS: trusted: Rollback init_trusted() consistently
	PCI: keystone: Don't discard .remove() callback
	PCI: keystone: Don't discard .probe() callback
	arm64: Restrict CPU_BIG_ENDIAN to GNU as or LLVM IAS 15.x or newer
	parisc/pdc: Add width field to struct pdc_model
	parisc/power: Add power soft-off when running on qemu
	clk: socfpga: Fix undefined behavior bug in struct stratix10_clock_data
	clk: qcom: ipq8074: drop the CLK_SET_RATE_PARENT flag from PLL clocks
	clk: qcom: ipq6018: drop the CLK_SET_RATE_PARENT flag from PLL clocks
	ksmbd: handle malformed smb1 message
	ksmbd: fix slab out of bounds write in smb_inherit_dacl()
	mmc: vub300: fix an error code
	mmc: sdhci_am654: fix start loop index for TAP value parsing
	mmc: Add quirk MMC_QUIRK_BROKEN_CACHE_FLUSH for Micron eMMC Q2J54A
	PCI/ASPM: Fix L1 substate handling in aspm_attr_store_common()
	PCI: kirin: Don't discard .remove() callback
	PCI: exynos: Don't discard .remove() callback
	wifi: wilc1000: use vmm_table as array in wilc struct
	svcrdma: Drop connection after an RDMA Read error
	rcu/tree: Defer setting of jiffies during stall reset
	arm64: dts: qcom: ipq6018: Fix hwlock index for SMEM
	PM: hibernate: Use __get_safe_page() rather than touching the list
	PM: hibernate: Clean up sync_read handling in snapshot_write_next()
	rcu: kmemleak: Ignore kmemleak false positives when RCU-freeing objects
	btrfs: don't arbitrarily slow down delalloc if we're committing
	arm64: dts: qcom: ipq8074: Fix hwlock index for SMEM
	firmware: qcom_scm: use 64-bit calling convention only when client is 64-bit
	ACPI: FPDT: properly handle invalid FPDT subtables
	arm64: dts: qcom: ipq6018: Fix tcsr_mutex register size
	mfd: qcom-spmi-pmic: Fix reference leaks in revid helper
	mfd: qcom-spmi-pmic: Fix revid implementation
	ima: annotate iint mutex to avoid lockdep false positive warnings
	ima: detect changes to the backing overlay file
	netfilter: nf_tables: remove catchall element in GC sync path
	netfilter: nf_tables: split async and sync catchall in two functions
	selftests/resctrl: Remove duplicate feature check from CMT test
	selftests/resctrl: Move _GNU_SOURCE define into Makefile
	selftests/resctrl: Reduce failures due to outliers in MBA/MBM tests
	hid: lenovo: Resend all settings on reset_resume for compact keyboards
	ASoC: codecs: wsa-macro: fix uninitialized stack variables with name prefix
	jbd2: fix potential data lost in recovering journal raced with synchronizing fs bdev
	quota: explicitly forbid quota files from being encrypted
	kernel/reboot: emergency_restart: Set correct system_state
	i2c: core: Run atomic i2c xfer when !preemptible
	tracing: Have the user copy of synthetic event address use correct context
	driver core: Release all resources during unbind before updating device links
	mcb: fix error handling for different scenarios when parsing
	dmaengine: stm32-mdma: correct desc prep when channel running
	s390/cmma: fix detection of DAT pages
	mm/cma: use nth_page() in place of direct struct page manipulation
	mm/memory_hotplug: use pfn math in place of direct struct page manipulation
	mtd: cfi_cmdset_0001: Byte swap OTP info
	i3c: master: cdns: Fix reading status register
	i3c: master: svc: fix race condition in ibi work thread
	i3c: master: svc: fix wrong data return when IBI happen during start frame
	i3c: master: svc: fix ibi may not return mandatory data byte
	i3c: master: svc: fix check wrong status register in irq handler
	i3c: master: svc: fix SDA keep low when polling IBIWON timeout happen
	parisc: Prevent booting 64-bit kernels on PA1.x machines
	parisc/pgtable: Do not drop upper 5 address bits of physical address
	parisc/power: Fix power soft-off when running on qemu
	xhci: Enable RPM on controllers that support low-power states
	fs: add ctime accessors infrastructure
	smb3: fix creating FIFOs when mounting with "sfu" mount option
	smb3: fix touch -h of symlink
	smb3: fix caching of ctime on setxattr
	smb: client: fix use-after-free bug in cifs_debug_data_proc_show()
	smb: client: fix potential deadlock when releasing mids
	cifs: reconnect helper should set reconnect for the right channel
	cifs: force interface update before a fresh session setup
	cifs: do not reset chan_max if multichannel is not supported at mount
	xfs: recovery should not clear di_flushiter unconditionally
	btrfs: zoned: wait for data BG to be finished on direct IO allocation
	ALSA: info: Fix potential deadlock at disconnection
	ALSA: hda/realtek: Enable Mute LED on HP 255 G8
	ALSA: hda/realtek - Add Dell ALC295 to pin fall back table
	ALSA: hda/realtek - Enable internal speaker of ASUS K6500ZC
	ALSA: hda/realtek: Enable Mute LED on HP 255 G10
	ALSA: hda/realtek: Add quirks for HP Laptops
	pmdomain: bcm: bcm2835-power: check if the ASB register is equal to enable
	pmdomain: imx: Make imx pgc power domain also set the fwnode
	cpufreq: stats: Fix buffer overflow detection in trans_stats()
	clk: visconti: remove unused visconti_pll_provider::regmap
	clk: visconti: Fix undefined behavior bug in struct visconti_pll_provider
	Bluetooth: btusb: Add Realtek RTL8852BE support ID 0x0cb8:0xc559
	bluetooth: Add device 0bda:887b to device tables
	bluetooth: Add device 13d3:3571 to device tables
	Bluetooth: btusb: Add RTW8852BE device 13d3:3570 to device tables
	Bluetooth: btusb: Add 0bda:b85b for Fn-Link RTL8852BE
	drm/amd/display: enable dsc_clk even if dsc_pg disabled
	cxl/region: Validate region mode vs decoder mode
	cxl/region: Cleanup target list on attach error
	cxl/region: Move region-position validation to a helper
	cxl/region: Do not try to cleanup after cxl_region_setup_targets() fails
	i3c: master: svc: add NACK check after start byte sent
	i3c: master: svc: fix random hot join failure since timeout error
	cxl: Unify debug messages when calling devm_cxl_add_port()
	cxl/mem: Move devm_cxl_add_endpoint() from cxl_core to cxl_mem
	tools/testing/cxl: Define a fixed volatile configuration to parse
	cxl/region: Fix x1 root-decoder granularity calculations
	Revert ncsi: Propagate carrier gain/loss events to the NCSI controller
	Revert "i2c: pxa: move to generic GPIO recovery"
	lsm: fix default return value for vm_enough_memory
	lsm: fix default return value for inode_getsecctx
	sbsa_gwdt: Calculate timeout with 64-bit math
	i2c: designware: Disable TX_EMPTY irq while waiting for block length byte
	s390/ap: fix AP bus crash on early config change callback invocation
	net: ethtool: Fix documentation of ethtool_sprintf()
	net: dsa: lan9303: consequently nested-lock physical MDIO
	net: phylink: initialize carrier state at creation
	i2c: i801: fix potential race in i801_block_transaction_byte_by_byte
	f2fs: do not return EFSCORRUPTED, but try to run online repair
	f2fs: avoid format-overflow warning
	media: lirc: drop trailing space from scancode transmit
	media: sharp: fix sharp encoding
	media: venus: hfi_parser: Add check to keep the number of codecs within range
	media: venus: hfi: fix the check to handle session buffer requirement
	media: venus: hfi: add checks to handle capabilities from firmware
	media: ccs: Correctly initialise try compose rectangle
	drm/mediatek/dp: fix memory leak on ->get_edid callback audio detection
	drm/mediatek/dp: fix memory leak on ->get_edid callback error path
	dm-verity: don't use blocking calls from tasklets
	nfsd: fix file memleak on client_opens_release
	LoongArch: Mark __percpu functions as always inline
	riscv: mm: Update the comment of CONFIG_PAGE_OFFSET
	riscv: correct pt_level name via pgtable_l5/4_enabled
	riscv: kprobes: allow writing to x0
	mmc: sdhci-pci-gli: A workaround to allow GL9750 to enter ASPM L1.2
	mm: fix for negative counter: nr_file_hugepages
	mm: kmem: drop __GFP_NOFAIL when allocating objcg vectors
	mptcp: deal with large GSO size
	mptcp: add validity check for sending RM_ADDR
	mptcp: fix setsockopt(IP_TOS) subflow locking
	r8169: fix network lost after resume on DASH systems
	r8169: add handling DASH when DASH is disabled
	mmc: sdhci-pci-gli: GL9750: Mask the replay timer timeout of AER
	media: qcom: camss: Fix pm_domain_on sequence in probe
	media: qcom: camss: Fix vfe_get() error jump
	media: qcom: camss: Fix VFE-17x vfe_disable_output()
	media: qcom: camss: Fix VFE-480 vfe_disable_output()
	media: qcom: camss: Fix missing vfe_lite clocks check
	media: qcom: camss: Fix invalid clock enable bit disjunction
	media: qcom: camss: Fix csid-gen2 for test pattern generator
	Revert "net: r8169: Disable multicast filter for RTL8168H and RTL8107E"
	ext4: apply umask if ACL support is disabled
	ext4: correct offset of gdb backup in non meta_bg group to update_backups
	ext4: mark buffer new if it is unwritten to avoid stale data exposure
	ext4: correct return value of ext4_convert_meta_bg
	ext4: correct the start block of counting reserved clusters
	ext4: remove gdb backup copy for meta bg in setup_new_flex_group_blocks
	ext4: add missed brelse in update_backups
	ext4: properly sync file size update after O_SYNC direct IO
	drm/amd/pm: Handle non-terminated overdrive commands.
	drm/i915: Bump GLK CDCLK frequency when driving multiple pipes
	drm/i915: Fix potential spectre vulnerability
	drm/amd/pm: Fix error of MACO flag setting code
	drm/amdgpu/smu13: drop compute workload workaround
	drm/amdgpu: don't use pci_is_thunderbolt_attached()
	drm/amdgpu: don't use ATRM for external devices
	drm/amdgpu: fix error handling in amdgpu_bo_list_get()
	drm/amdgpu: lower CS errors to debug severity
	drm/amd/display: fix a NULL pointer dereference in amdgpu_dm_i2c_xfer()
	drm/amd/display: Enable fast plane updates on DCN3.2 and above
	drm/amd/display: Change the DMCUB mailbox memory location from FB to inbox
	powerpc/powernv: Fix fortify source warnings in opal-prd.c
	tracing: Have trace_event_file have ref counters
	Input: xpad - add VID for Turtle Beach controllers
	mmc: sdhci-pci-gli: GL9755: Mask the replay timer timeout of AER
	cxl/port: Fix NULL pointer access in devm_cxl_add_port()
	RISC-V: drop error print from riscv_hartid_to_cpuid()
	Linux 6.1.64

Change-Id: I9284282aeae5d0f9da957a58147efe0114f8e60a
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2023-12-12 18:41:13 +00:00
Nathan Chancellor
9f74b261e4 LoongArch: Mark __percpu functions as always inline
commit 71945968d8b128c955204baa33ec03bdd91bdc26 upstream.

A recent change to the optimization pipeline in LLVM reveals some
fragility around the inlining of LoongArch's __percpu functions, which
manifests as a BUILD_BUG() failure:

  In file included from kernel/sched/build_policy.c:17:
  In file included from include/linux/sched/cputime.h:5:
  In file included from include/linux/sched/signal.h:5:
  In file included from include/linux/rculist.h:11:
  In file included from include/linux/rcupdate.h:26:
  In file included from include/linux/irqflags.h:18:
  arch/loongarch/include/asm/percpu.h:97:3: error: call to '__compiletime_assert_51' declared with 'error' attribute: BUILD_BUG failed
     97 |                 BUILD_BUG();
        |                 ^
  include/linux/build_bug.h:59:21: note: expanded from macro 'BUILD_BUG'
     59 | #define BUILD_BUG() BUILD_BUG_ON_MSG(1, "BUILD_BUG failed")
        |                     ^
  include/linux/build_bug.h:39:37: note: expanded from macro 'BUILD_BUG_ON_MSG'
     39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
        |                                     ^
  include/linux/compiler_types.h:425:2: note: expanded from macro 'compiletime_assert'
    425 |         _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
        |         ^
  include/linux/compiler_types.h:413:2: note: expanded from macro '_compiletime_assert'
    413 |         __compiletime_assert(condition, msg, prefix, suffix)
        |         ^
  include/linux/compiler_types.h:406:4: note: expanded from macro '__compiletime_assert'
    406 |                         prefix ## suffix();                             \
        |                         ^
  <scratch space>:86:1: note: expanded from here
     86 | __compiletime_assert_51
        | ^
  1 error generated.

If these functions are not inlined (which the compiler is free to do
even with functions marked with the standard 'inline' keyword), the
BUILD_BUG() in the default case cannot be eliminated since the compiler
cannot prove it is never used, resulting in a build failure due to the
error attribute.

Mark these functions as __always_inline to guarantee inlining so that
the BUILD_BUG() only triggers when the default case genuinely cannot be
eliminated due to an unexpected size.

Cc:  <stable@vger.kernel.org>
Closes: https://github.com/ClangBuiltLinux/linux/issues/1955
Fixes: 46859ac8af ("LoongArch: Add multi-processor (SMP) support")
Link: 1a2e77cf9e
Suggested-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-11-28 17:07:19 +00:00
Greg Kroah-Hartman
0d9fb52165 Merge 6.1.62 into android14-6.1-lts
Changes in 6.1.62
	ASoC: simple-card: fixup asoc_simple_probe() error handling
	coresight: tmc-etr: Disable warnings for allocation failures
	ASoC: tlv320adc3xxx: BUG: Correct micbias setting
	net: sched: cls_u32: Fix allocation size in u32_init()
	irqchip/riscv-intc: Mark all INTC nodes as initialized
	irqchip/stm32-exti: add missing DT IRQ flag translation
	dmaengine: ste_dma40: Fix PM disable depth imbalance in d40_probe
	powerpc/85xx: Fix math emulation exception
	Input: synaptics-rmi4 - handle reset delay when using SMBus trsnsport
	fbdev: atyfb: only use ioremap_uc() on i386 and ia64
	fs/ntfs3: Add ckeck in ni_update_parent()
	fs/ntfs3: Write immediately updated ntfs state
	fs/ntfs3: Use kvmalloc instead of kmalloc(... __GFP_NOWARN)
	fs/ntfs3: Fix possible NULL-ptr-deref in ni_readpage_cmpr()
	fs/ntfs3: Fix NULL pointer dereference on error in attr_allocate_frame()
	fs/ntfs3: Fix directory element type detection
	fs/ntfs3: Avoid possible memory leak
	spi: npcm-fiu: Fix UMA reads when dummy.nbytes == 0
	netfilter: nfnetlink_log: silence bogus compiler warning
	efi: fix memory leak in krealloc failure handling
	ASoC: rt5650: fix the wrong result of key button
	ASoC: codecs: tas2780: Fix log of failed reset via I2C.
	drm/ttm: Reorder sys manager cleanup step
	fbdev: omapfb: fix some error codes
	fbdev: uvesafb: Call cn_del_callback() at the end of uvesafb_exit()
	scsi: mpt3sas: Fix in error path
	drm/amdgpu: Unset context priority is now invalid
	gpu/drm: Eliminate DRM_SCHED_PRIORITY_UNSET
	LoongArch: Export symbol invalid_pud_table for modules building
	LoongArch: Replace kmap_atomic() with kmap_local_page() in copy_user_highpage()
	netfilter: nf_tables: audit log object reset once per table
	platform/mellanox: mlxbf-tmfifo: Fix a warning message
	drm/amdgpu: Reserve fences for VM update
	net: chelsio: cxgb4: add an error code check in t4_load_phy_fw
	r8152: Check for unplug in rtl_phy_patch_request()
	r8152: Check for unplug in r8153b_ups_en() / r8153c_ups_en()
	powerpc/mm: Fix boot crash with FLATMEM
	io_uring: kiocb_done() should *not* trust ->ki_pos if ->{read,write}_iter() failed
	ceph_wait_on_conflict_unlink(): grab reference before dropping ->d_lock
	power: supply: core: Use blocking_notifier_call_chain to avoid RCU complaint
	perf evlist: Avoid frequency mode for the dummy event
	x86: KVM: SVM: always update the x2avic msr interception
	mm/mempolicy: fix set_mempolicy_home_node() previous VMA pointer
	mmap: fix error paths with dup_anon_vma()
	ALSA: usb-audio: add quirk flag to enable native DSD for McIntosh devices
	PCI: Prevent xHCI driver from claiming AMD VanGogh USB3 DRD device
	usb: storage: set 1.50 as the lower bcdDevice for older "Super Top" compatibility
	usb: typec: tcpm: Fix NULL pointer dereference in tcpm_pd_svdm()
	usb: raw-gadget: properly handle interrupted requests
	tty: n_gsm: fix race condition in status line change on dead connections
	tty: 8250: Remove UC-257 and UC-431
	tty: 8250: Add support for additional Brainboxes UC cards
	tty: 8250: Add support for Brainboxes UP cards
	tty: 8250: Add support for Intashield IS-100
	tty: 8250: Fix port count of PX-257
	tty: 8250: Fix up PX-803/PX-857
	tty: 8250: Add support for additional Brainboxes PX cards
	tty: 8250: Add support for Intashield IX cards
	tty: 8250: Add Brainboxes Oxford Semiconductor-based quirks
	misc: pci_endpoint_test: Add deviceID for J721S2 PCIe EP device support
	ALSA: hda: intel-dsp-config: Fix JSL Chromebook quirk detection
	ASoC: SOF: sof-pci-dev: Fix community key quirk detection
	Linux 6.1.62

Change-Id: I2f696c88b48e82eb0d925a26ce6716693595d421
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2023-11-27 14:58:20 +00:00
Huacai Chen
ec80ad4585 LoongArch: Replace kmap_atomic() with kmap_local_page() in copy_user_highpage()
[ Upstream commit 477a0ebec101359f49d92796e3b609857d564b52 ]

Replace kmap_atomic()/kunmap_atomic() calls with kmap_local_page()/
kunmap_local() in copy_user_highpage() which can be invoked from both
preemptible and atomic context [1].

[1] https://lore.kernel.org/all/20201029222652.302358281@linutronix.de/

Suggested-by: Deepak R Varma <drv@mailo.com>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-11-08 14:11:01 +01:00
Huacai Chen
afe80b58ee LoongArch: Export symbol invalid_pud_table for modules building
[ Upstream commit 449c2756c2323c9e32b2a2fa9c8b59ce91b5819d ]

Export symbol invalid_pud_table for modules building (such as the KVM
module) if 4-level page tables enabled. Otherwise we get:

ERROR: modpost: "invalid_pud_table" [arch/loongarch/kvm/kvm.ko] undefined!

Reported-by: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Tianrui Zhao <zhaotianrui@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-11-08 14:11:01 +01:00
Greg Kroah-Hartman
2950de8b2d Merge 6.1.56 into android14-6.1-lts
Changes in 6.1.56
	NFS: Fix error handling for O_DIRECT write scheduling
	NFS: Fix O_DIRECT locking issues
	NFS: More O_DIRECT accounting fixes for error paths
	NFS: Use the correct commit info in nfs_join_page_group()
	NFS: More fixes for nfs_direct_write_reschedule_io()
	NFS/pNFS: Report EINVAL errors from connect() to the server
	SUNRPC: Mark the cred for revalidation if the server rejects it
	NFSv4.1: use EXCHGID4_FLAG_USE_PNFS_DS for DS server
	NFSv4.1: fix pnfs MDS=DS session trunking
	media: v4l: Use correct dependency for camera sensor drivers
	media: via: Use correct dependency for camera sensor drivers
	netfs: Only call folio_start_fscache() one time for each folio
	dm: fix a race condition in retrieve_deps
	btrfs: improve error message after failure to add delayed dir index item
	btrfs: remove BUG() after failure to insert delayed dir index item
	ext4: replace the traditional ternary conditional operator with with max()/min()
	ext4: move setting of trimmed bit into ext4_try_to_trim_range()
	ext4: do not let fstrim block system suspend
	netfilter: nf_tables: don't skip expired elements during walk
	netfilter: nf_tables: GC transaction API to avoid race with control plane
	netfilter: nf_tables: adapt set backend to use GC transaction API
	netfilter: nft_set_hash: mark set element as dead when deleting from packet path
	netfilter: nf_tables: remove busy mark and gc batch API
	netfilter: nf_tables: don't fail inserts if duplicate has expired
	netfilter: nf_tables: fix GC transaction races with netns and netlink event exit path
	netfilter: nf_tables: GC transaction race with netns dismantle
	netfilter: nf_tables: GC transaction race with abort path
	netfilter: nf_tables: use correct lock to protect gc_list
	netfilter: nf_tables: defer gc run if previous batch is still pending
	netfilter: nft_set_rbtree: skip sync GC for new elements in this transaction
	netfilter: nft_set_rbtree: use read spinlock to avoid datapath contention
	netfilter: nft_set_pipapo: call nft_trans_gc_queue_sync() in catchall GC
	netfilter: nft_set_pipapo: stop GC iteration if GC transaction allocation fails
	netfilter: nft_set_hash: try later when GC hits EAGAIN on iteration
	netfilter: nf_tables: fix memleak when more than 255 elements expired
	ASoC: meson: spdifin: start hw on dai probe
	netfilter: nf_tables: disallow element removal on anonymous sets
	bpf: Avoid deadlock when using queue and stack maps from NMI
	ASoC: rt5640: Revert "Fix sleep in atomic context"
	ASoC: rt5640: Fix IRQ not being free-ed for HDA jack detect mode
	ALSA: hda/realtek: Splitting the UX3402 into two separate models
	netfilter: conntrack: fix extension size table
	selftests: tls: swap the TX and RX sockets in some tests
	net/core: Fix ETH_P_1588 flow dissector
	ASoC: hdaudio.c: Add missing check for devm_kstrdup
	ASoC: imx-audmix: Fix return error with devm_clk_get()
	octeon_ep: fix tx dma unmap len values in SG
	iavf: do not process adminq tasks when __IAVF_IN_REMOVE_TASK is set
	ASoC: SOF: core: Only call sof_ops_free() on remove if the probe was successful
	iavf: add iavf_schedule_aq_request() helper
	iavf: schedule a request immediately after add/delete vlan
	i40e: Fix VF VLAN offloading when port VLAN is configured
	netfilter, bpf: Adjust timeouts of non-confirmed CTs in bpf_ct_insert_entry()
	ionic: fix 16bit math issue when PAGE_SIZE >= 64KB
	igc: Fix infinite initialization loop with early XDP redirect
	ipv4: fix null-deref in ipv4_link_failure
	scsi: iscsi_tcp: restrict to TCP sockets
	powerpc/perf/hv-24x7: Update domain value check
	dccp: fix dccp_v4_err()/dccp_v6_err() again
	x86/mm, kexec, ima: Use memblock_free_late() from ima_free_kexec_buffer()
	net: hsr: Properly parse HSRv1 supervisor frames.
	platform/x86: intel_scu_ipc: Check status after timeout in busy_loop()
	platform/x86: intel_scu_ipc: Check status upon timeout in ipc_wait_for_interrupt()
	platform/x86: intel_scu_ipc: Don't override scu in intel_scu_ipc_dev_simple_command()
	platform/x86: intel_scu_ipc: Fail IPC send if still busy
	x86/srso: Fix srso_show_state() side effect
	x86/srso: Fix SBPB enablement for spec_rstack_overflow=off
	net: hns3: add cmdq check for vf periodic service task
	net: hns3: fix GRE checksum offload issue
	net: hns3: only enable unicast promisc when mac table full
	net: hns3: fix fail to delete tc flower rules during reset issue
	net: hns3: add 5ms delay before clear firmware reset irq source
	net: bridge: use DEV_STATS_INC()
	team: fix null-ptr-deref when team device type is changed
	net: rds: Fix possible NULL-pointer dereference
	netfilter: nf_tables: disable toggling dormant table state more than once
	netfilter: ipset: Fix race between IPSET_CMD_CREATE and IPSET_CMD_SWAP
	i915/pmu: Move execlist stats initialization to execlist specific setup
	locking/seqlock: Do the lockdep annotation before locking in do_write_seqcount_begin_nested()
	net: ena: Flush XDP packets on error.
	bnxt_en: Flush XDP for bnxt_poll_nitroa0()'s NAPI
	octeontx2-pf: Do xdp_do_flush() after redirects.
	igc: Expose tx-usecs coalesce setting to user
	proc: nommu: /proc/<pid>/maps: release mmap read lock
	proc: nommu: fix empty /proc/<pid>/maps
	cifs: Fix UAF in cifs_demultiplex_thread()
	gpio: tb10x: Fix an error handling path in tb10x_gpio_probe()
	i2c: mux: demux-pinctrl: check the return value of devm_kstrdup()
	i2c: mux: gpio: Add missing fwnode_handle_put()
	i2c: xiic: Correct return value check for xiic_reinit()
	ARM: dts: BCM5301X: Extend RAM to full 256MB for Linksys EA6500 V2
	ARM: dts: samsung: exynos4210-i9100: Fix LCD screen's physical size
	ARM: dts: qcom: msm8974pro-castor: correct inverted X of touchscreen
	ARM: dts: qcom: msm8974pro-castor: correct touchscreen function names
	ARM: dts: qcom: msm8974pro-castor: correct touchscreen syna,nosleep-mode
	f2fs: optimize iteration over sparse directories
	f2fs: get out of a repeat loop when getting a locked data page
	s390/pkey: fix PKEY_TYPE_EP11_AES handling in PKEY_CLR2SECK2 IOCTL
	arm64: dts: qcom: sdm845-db845c: Mark cont splash memory region as reserved
	wifi: ath11k: fix tx status reporting in encap offload mode
	wifi: ath11k: Cleanup mac80211 references on failure during tx_complete
	scsi: qla2xxx: Select qpair depending on which CPU post_cmd() gets called
	scsi: qla2xxx: Use raw_smp_processor_id() instead of smp_processor_id()
	drm/amdkfd: Flush TLB after unmapping for GFX v9.4.3
	drm/amdkfd: Insert missing TLB flush on GFX10 and later
	btrfs: reset destination buffer when read_extent_buffer() gets invalid range
	vfio/mdev: Fix a null-ptr-deref bug for mdev_unregister_parent()
	MIPS: Alchemy: only build mmc support helpers if au1xmmc is enabled
	spi: spi-gxp: BUG: Correct spi write return value
	drm/bridge: ti-sn65dsi83: Do not generate HFP/HBP/HSA and EOT packet
	bus: ti-sysc: Use fsleep() instead of usleep_range() in sysc_reset()
	bus: ti-sysc: Fix missing AM35xx SoC matching
	firmware: arm_scmi: Harden perf domain info access
	firmware: arm_scmi: Fixup perf power-cost/microwatt support
	power: supply: mt6370: Fix missing error code in mt6370_chg_toggle_cfo()
	clk: sprd: Fix thm_parents incorrect configuration
	clk: tegra: fix error return case for recalc_rate
	ARM: dts: omap: correct indentation
	ARM: dts: ti: omap: Fix bandgap thermal cells addressing for omap3/4
	ARM: dts: Unify pwm-omap-dmtimer node names
	ARM: dts: Unify pinctrl-single pin group nodes for omap4
	ARM: dts: ti: omap: motorola-mapphone: Fix abe_clkctrl warning on boot
	bus: ti-sysc: Fix SYSC_QUIRK_SWSUP_SIDLE_ACT handling for uart wake-up
	power: supply: ucs1002: fix error code in ucs1002_get_property()
	firmware: imx-dsp: Fix an error handling path in imx_dsp_setup_channels()
	xtensa: add default definition for XCHAL_HAVE_DIV32
	xtensa: iss/network: make functions static
	xtensa: boot: don't add include-dirs
	xtensa: umulsidi3: fix conditional expression
	xtensa: boot/lib: fix function prototypes
	power: supply: rk817: Fix node refcount leak
	selftests/powerpc: Use CLEAN macro to fix make warning
	selftests/powerpc: Pass make context to children
	selftests/powerpc: Fix emit_tests to work with run_kselftest.sh
	soc: imx8m: Enable OCOTP clock for imx8mm before reading registers
	arm64: dts: imx: Add imx8mm-prt8mm.dtb to build
	firmware: arm_ffa: Don't set the memory region attributes for MEM_LEND
	gpio: pmic-eic-sprd: Add can_sleep flag for PMIC EIC chip
	i2c: npcm7xx: Fix callback completion ordering
	x86/reboot: VMCLEAR active VMCSes before emergency reboot
	ceph: drop messages from MDS when unmounting
	dma-debug: don't call __dma_entry_alloc_check_leak() under free_entries_lock
	bpf: Annotate bpf_long_memcpy with data_race
	spi: sun6i: reduce DMA RX transfer width to single byte
	spi: sun6i: fix race between DMA RX transfer completion and RX FIFO drain
	nvme-fc: Prevent null pointer dereference in nvme_fc_io_getuuid()
	parisc: sba: Fix compile warning wrt list of SBA devices
	parisc: iosapic.c: Fix sparse warnings
	parisc: drivers: Fix sparse warning
	parisc: irq: Make irq_stack_union static to avoid sparse warning
	scsi: qedf: Add synchronization between I/O completions and abort
	scsi: ufs: core: Move __ufshcd_send_uic_cmd() outside host_lock
	scsi: ufs: core: Poll HCS.UCRDY before issuing a UIC command
	selftests/ftrace: Correctly enable event in instance-event.tc
	ring-buffer: Avoid softlockup in ring_buffer_resize()
	btrfs: assert delayed node locked when removing delayed item
	selftests: fix dependency checker script
	ring-buffer: Do not attempt to read past "commit"
	net/smc: bugfix for smcr v2 server connect success statistic
	ata: sata_mv: Fix incorrect string length computation in mv_dump_mem()
	platform/mellanox: mlxbf-bootctl: add NET dependency into Kconfig
	platform/x86: asus-wmi: Support 2023 ROG X16 tablet mode
	thermal/of: add missing of_node_put()
	drm/amd/display: Don't check registers, if using AUX BL control
	drm/amdgpu/soc21: don't remap HDP registers for SR-IOV
	drm/amdgpu/nbio4.3: set proper rmmio_remap.reg_offset for SR-IOV
	drm/amdgpu: Handle null atom context in VBIOS info ioctl
	riscv: errata: fix T-Head dcache.cva encoding
	scsi: pm80xx: Use phy-specific SAS address when sending PHY_START command
	scsi: pm80xx: Avoid leaking tags when processing OPC_INB_SET_CONTROLLER_CONFIG command
	smb3: correct places where ENOTSUPP is used instead of preferred EOPNOTSUPP
	ata: libata-eh: do not clear ATA_PFLAG_EH_PENDING in ata_eh_reset()
	spi: nxp-fspi: reset the FLSHxCR1 registers
	spi: stm32: add a delay before SPI disable
	ASoC: fsl: imx-pcm-rpmsg: Add SNDRV_PCM_INFO_BATCH flag
	spi: intel-pci: Add support for Granite Rapids SPI serial flash
	bpf: Clarify error expectations from bpf_clone_redirect
	ALSA: hda: intel-sdw-acpi: Use u8 type for link index
	ASoC: cs42l42: Ensure a reset pulse meets minimum pulse width.
	ASoC: cs42l42: Don't rely on GPIOD_OUT_LOW to set RESET initially low
	firmware: cirrus: cs_dsp: Only log list of algorithms in debug build
	memblock tests: fix warning: "__ALIGN_KERNEL" redefined
	memblock tests: fix warning ‘struct seq_file’ declared inside parameter list
	ASoC: imx-rpmsg: Set ignore_pmdown_time for dai_link
	media: vb2: frame_vector.c: replace WARN_ONCE with a comment
	NFSv4.1: fix zero value filehandle in post open getattr
	ASoC: SOF: Intel: MTL: Reduce the DSP init timeout
	powerpc/watchpoints: Disable preemption in thread_change_pc()
	powerpc/watchpoint: Disable pagefaults when getting user instruction
	powerpc/watchpoints: Annotate atomic context in more places
	ncsi: Propagate carrier gain/loss events to the NCSI controller
	net: hsr: Add __packed to struct hsr_sup_tlv.
	tsnep: Fix NAPI scheduling
	tsnep: Fix NAPI polling with budget 0
	LoongArch: Set all reserved memblocks on Node#0 at initialization
	fbdev/sh7760fb: Depend on FB=y
	perf build: Define YYNOMEM as YYNOABORT for bison < 3.81
	nvme-pci: factor the iod mempool creation into a helper
	nvme-pci: factor out a nvme_pci_alloc_dev helper
	nvme-pci: do not set the NUMA node of device if it has none
	wifi: ath11k: Don't drop tx_status when peer cannot be found
	scsi: qla2xxx: Fix NULL pointer dereference in target mode
	nvme-pci: always return an ERR_PTR from nvme_pci_alloc_dev
	smack: Record transmuting in smk_transmuted
	smack: Retrieve transmuting information in smack_inode_getsecurity()
	iommu/arm-smmu-v3: Fix soft lockup triggered by arm_smmu_mm_invalidate_range
	x86/sgx: Resolves SECS reclaim vs. page fault for EAUG race
	x86/srso: Add SRSO mitigation for Hygon processors
	KVM: SVM: INTERCEPT_RDTSCP is never intercepted anyway
	KVM: SVM: Fix TSC_AUX virtualization setup
	KVM: x86/mmu: Open code leaf invalidation from mmu_notifier
	KVM: x86/mmu: Do not filter address spaces in for_each_tdp_mmu_root_yield_safe()
	mptcp: fix bogus receive window shrinkage with multiple subflows
	misc: rtsx: Fix some platforms can not boot and move the l1ss judgment to probe
	Revert "tty: n_gsm: fix UAF in gsm_cleanup_mux"
	serial: 8250_port: Check IRQ data before use
	nilfs2: fix potential use after free in nilfs_gccache_submit_read_data()
	netfilter: nf_tables: disallow rule removal from chain binding
	ALSA: hda: Disable power save for solving pop issue on Lenovo ThinkCentre M70q
	LoongArch: Define relocation types for ABI v2.10
	LoongArch: numa: Fix high_memory calculation
	ata: libata-scsi: link ata port and scsi device
	ata: libata-scsi: ignore reserved bits for REPORT SUPPORTED OPERATION CODES
	io_uring/fs: remove sqe->rw_flags checking from LINKAT
	i2c: i801: unregister tco_pdev in i801_probe() error path
	ASoC: amd: yc: Fix non-functional mic on Lenovo 82QF and 82UG
	kernel/sched: Modify initial boot task idle setup
	sched/rt: Fix live lock between select_fallback_rq() and RT push
	netfilter: nf_tables: fix kdoc warnings after gc rework
	Revert "SUNRPC dont update timeout value on connection reset"
	timers: Tag (hr)timer softirq as hotplug safe
	drm/tests: Fix incorrect argument in drm_test_mm_insert_range
	arm64: defconfig: remove CONFIG_COMMON_CLK_NPCM8XX=y
	mm/damon/vaddr-test: fix memory leak in damon_do_test_apply_three_regions()
	mm/slab_common: fix slab_caches list corruption after kmem_cache_destroy()
	mm: memcontrol: fix GFP_NOFS recursion in memory.high enforcement
	ring-buffer: Update "shortest_full" in polling
	btrfs: properly report 0 avail for very full file systems
	media: uvcvideo: Fix OOB read
	bpf: Add override check to kprobe multi link attach
	bpf: Fix BTF_ID symbol generation collision
	bpf: Fix BTF_ID symbol generation collision in tools/
	net: thunderbolt: Fix TCPv6 GSO checksum calculation
	fs/smb/client: Reset password pointer to NULL
	ata: libata-core: Fix ata_port_request_pm() locking
	ata: libata-core: Fix port and device removal
	ata: libata-core: Do not register PM operations for SAS ports
	ata: libata-sata: increase PMP SRST timeout to 10s
	drm/i915/gt: Fix reservation address in ggtt_reserve_guc_top
	power: supply: rk817: Add missing module alias
	power: supply: ab8500: Set typing and props
	fs: binfmt_elf_efpic: fix personality for ELF-FDPIC
	drm/amdkfd: Use gpu_offset for user queue's wptr
	drm/meson: fix memory leak on ->hpd_notify callback
	memcg: drop kmem.limit_in_bytes
	mm, memcg: reconsider kmem.limit_in_bytes deprecation
	ASoC: amd: yc: Fix a non-functional mic on Lenovo 82TL
	Linux 6.1.56

Change-Id: Id110614d91d6d60fb6c7622c5af82f219a84a30f
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2023-10-27 09:17:04 +00:00
Huacai Chen
490f3b805e LoongArch: numa: Fix high_memory calculation
commit 1943feecf80e73ecc03ce40271f29c6cea142bac upstream.

For 64bit kernel without HIGHMEM, high_memory is the virtual address of
the highest physical address in the system. But __va(get_num_physpages()
<< PAGE_SHIFT) is not what we want for high_memory because there may be
holes in the physical address space. On the other hand, max_low_pfn is
calculated from memblock_end_of_DRAM(), which is exactly corresponding
to the highest physical address, so use it for high_memory calculation.

Cc: <stable@vger.kernel.org>
Fixes: d4b6f1562a ("LoongArch: Add Non-Uniform Memory Access (NUMA) support")
Signed-off-by: Chong Qiao <qiaochong@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-10-06 14:57:01 +02:00
Tiezhu Yang
7bc8585aa0 LoongArch: Define relocation types for ABI v2.10
commit 2761498876adebff77a43574639005b29e912c43 upstream.

The relocation types from 101 to 109 are used by GNU binutils >= 2.41,
add their definitions to use them in later patches.

Link: https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=include/elf/loongarch.h#l230
Cc: <stable@vger.kernel.org>
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-10-06 14:57:01 +02:00
Huacai Chen
f105e893a8 LoongArch: Set all reserved memblocks on Node#0 at initialization
[ Upstream commit b795fb9f5861ee256070d59e33130980a01fadd7 ]

After commit 61167ad5fecdea ("mm: pass nid to reserve_bootmem_region()")
we get a panic if DEFERRED_STRUCT_PAGE_INIT is enabled:

[    0.000000] CPU 0 Unable to handle kernel paging request at virtual address 0000000000002b82, era == 90000000040e3f28, ra == 90000000040e3f18
[    0.000000] Oops[#1]:
[    0.000000] CPU: 0 PID: 0 Comm: swapper Not tainted 6.5.0+ #733
[    0.000000] pc 90000000040e3f28 ra 90000000040e3f18 tp 90000000046f4000 sp 90000000046f7c90
[    0.000000] a0 0000000000000001 a1 0000000000200000 a2 0000000000000040 a3 90000000046f7ca0
[    0.000000] a4 90000000046f7ca4 a5 0000000000000000 a6 90000000046f7c38 a7 0000000000000000
[    0.000000] t0 0000000000000002 t1 9000000004b00ac8 t2 90000000040e3f18 t3 90000000040f0800
[    0.000000] t4 00000000000f0000 t5 80000000ffffe07e t6 0000000000000003 t7 900000047fff5e20
[    0.000000] t8 aaaaaaaaaaaaaaab u0 0000000000000018 s9 0000000000000000 s0 fffffefffe000000
[    0.000000] s1 0000000000000000 s2 0000000000000080 s3 0000000000000040 s4 0000000000000000
[    0.000000] s5 0000000000000000 s6 fffffefffe000000 s7 900000000470b740 s8 9000000004ad4000
[    0.000000]    ra: 90000000040e3f18 reserve_bootmem_region+0xec/0x21c
[    0.000000]   ERA: 90000000040e3f28 reserve_bootmem_region+0xfc/0x21c
[    0.000000]  CRMD: 000000b0 (PLV0 -IE -DA +PG DACF=CC DACM=CC -WE)
[    0.000000]  PRMD: 00000000 (PPLV0 -PIE -PWE)
[    0.000000]  EUEN: 00000000 (-FPE -SXE -ASXE -BTE)
[    0.000000]  ECFG: 00070800 (LIE=11 VS=7)
[    0.000000] ESTAT: 00010800 [PIL] (IS=11 ECode=1 EsubCode=0)
[    0.000000]  BADV: 0000000000002b82
[    0.000000]  PRID: 0014d000 (Loongson-64bit, Loongson-3A6000)
[    0.000000] Modules linked in:
[    0.000000] Process swapper (pid: 0, threadinfo=(____ptrval____), task=(____ptrval____))
[    0.000000] Stack : 0000000000000000 9000000002eb5430 0000003a00000020 90000000045ccd00
[    0.000000]         900000000470e000 90000000002c1918 0000000000000000 9000000004110780
[    0.000000]         00000000fe6c0000 0000000480000000 9000000004b4e368 9000000004110748
[    0.000000]         0000000000000000 900000000421ca84 9000000004620000 9000000004564970
[    0.000000]         90000000046f7d78 9000000002cc9f70 90000000002c1918 900000000470e000
[    0.000000]         9000000004564970 90000000040bc0e0 90000000046f7d78 0000000000000000
[    0.000000]         0000000000004000 90000000045ccd00 0000000000000000 90000000002c1918
[    0.000000]         90000000002c1900 900000000470b700 9000000004b4df78 9000000004620000
[    0.000000]         90000000046200a8 90000000046200a8 0000000000000000 9000000004218b2c
[    0.000000]         9000000004270008 0000000000000001 0000000000000000 90000000045ccd00
[    0.000000]         ...
[    0.000000] Call Trace:
[    0.000000] [<90000000040e3f28>] reserve_bootmem_region+0xfc/0x21c
[    0.000000] [<900000000421ca84>] memblock_free_all+0x114/0x350
[    0.000000] [<9000000004218b2c>] mm_core_init+0x138/0x3cc
[    0.000000] [<9000000004200e38>] start_kernel+0x488/0x7a4
[    0.000000] [<90000000040df0d8>] kernel_entry+0xd8/0xdc
[    0.000000]
[    0.000000] Code: 02eb21ad  00410f4c  380c31ac <262b818d> 6800b70d  02c1c196  0015001c  57fe4bb1  260002cd

The reason is early memblock_reserve() in memblock_init() set node id to
MAX_NUMNODES, making NODE_DATA(nid) a NULL dereference in the call chain
reserve_bootmem_region() -> init_reserved_page(). After memblock_init(),
those late calls of memblock_reserve() operate on subregions of memblock
.memory regions. As a result, these reserved regions will be set to the
correct node at the first iteration of memmap_init_reserved_pages().

So set all reserved memblocks on Node#0 at initialization can avoid this
panic.

Reported-by: WANG Xuerui <git@xen0n.name>
Tested-by: WANG Xuerui <git@xen0n.name>
Reviewed-by: WANG Xuerui <git@xen0n.name>  # with nits addressed
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-10-06 14:56:58 +02:00
Greg Kroah-Hartman
dbb69752f7 This is the 6.1.53 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmUBaBUACgkQONu9yGCS
 aT6OkBAArqBSUyCYQJrhoUlFYBnBqF7BLSkj0GwINGSUOlt5ilJ3kZwH9ftjvpWp
 ZtO0Rp/1yH2H5PpcsaLljPl055Sf30e0oCkz6vX16vy17NGnzI4rJi55+nRZbFRH
 tBMhMjblgIJoTiTPEQPSGghENok+QzJ9Imffo4/Wru3w5ytkBnGcPPXreHJw+8V5
 Pjhzg5tcjhz23rk2wzVtR4VfEqWaHQaapv49rKB1Yls578WYn4QXl4jgUyB7rCo7
 9vBB7xy77H1hr9m8ifB/9v1ToV/vw6L1xGPWWWbhsSikFAMBoq34SCsq+6RdeURo
 43CCcFsx1s5acM7NQWvxkoV5Hgl8Hc3WgFsx5eVBlNd+vS6ezkgdYuGmN76t+dF/
 hZ7XGEoEFuoz9NKQC/5rKjdBd2p/IQYx6vf8EpK0IxFPD4h+DY9pn0FvwuAmxAcA
 M41xLYGbXX5l/QJR016B1AYiB3DqVxRRRyQT0yNip+PDAh2N06MOJ84KgMSR9lg7
 jyeFKZM2vQ619RopMIspuHTWxNiMw7x94aUhBnY1oD+fDzaRn+VNL8po6QYHLK8U
 QTDhrWplTbTuGIF72h+1IyX1aUj6ozoCewl9Y9ry1u9jBb7LZoupVd0s1dwqORIk
 2OSo74pDu5F2BT+4hEcCpDRcYvWlfKbZWBunRrMqvHN8BON0Mks=
 =aFyS
 -----END PGP SIGNATURE-----

Merge 6.1.53 into android14-6.1-lts

Changes in 6.1.53
	Revert "bridge: Add extack warning when enabling STP in netns."
	Partially revert "drm/amd/display: Fix possible underflow for displays with large vblank"
	scsi: ufs: Try harder to change the power mode
	Revert "Revert drm/amd/display: Enable Freesync Video Mode by default"
	ARM: dts: imx: Set default tuning step for imx7d usdhc
	ALSA: hda/realtek: Enable 4 amplifiers instead of 2 on a HP platform
	powerpc/boot: Disable power10 features after BOOTAFLAGS assignment
	media: uapi: HEVC: Add num_delta_pocs_of_ref_rps_idx field
	Revert "MIPS: unhide PATA_PLATFORM"
	phy: qcom-snps-femto-v2: use qcom_snps_hsphy_suspend/resume error code
	media: amphion: use dev_err_probe
	media: pulse8-cec: handle possible ping error
	media: pci: cx23885: fix error handling for cx23885 ATSC boards
	9p: virtio: fix unlikely null pointer deref in handle_rerror
	9p: virtio: make sure 'offs' is initialized in zc_request
	ksmbd: fix out of bounds in smb3_decrypt_req()
	ksmbd: validate session id and tree id in compound request
	ksmbd: no response from compound read
	ksmbd: fix out of bounds in init_smb2_rsp_hdr()
	ASoC: da7219: Flush pending AAD IRQ when suspending
	ASoC: da7219: Check for failure reading AAD IRQ events
	ASoC: nau8821: Add DMI quirk mechanism for active-high jack-detect
	ethernet: atheros: fix return value check in atl1c_tso_csum()
	m68k: Fix invalid .section syntax
	s390/dasd: use correct number of retries for ERP requests
	s390/dasd: fix hanging device after request requeue
	fs/nls: make load_nls() take a const parameter
	ASoC: rt5682-sdw: fix for JD event handling in ClockStop Mode0
	ASoc: codecs: ES8316: Fix DMIC config
	ASoC: rt711: fix for JD event handling in ClockStop Mode0
	ASoC: rt711-sdca: fix for JD event handling in ClockStop Mode0
	ASoC: atmel: Fix the 8K sample parameter in I2SC master
	ALSA: usb-audio: Add quirk for Microsoft Modern Wireless Headset
	platform/x86: intel: hid: Always call BTNL ACPI method
	platform/x86/intel/hid: Add HP Dragonfly G2 to VGBS DMI quirks
	platform/x86: think-lmi: Use kfree_sensitive instead of kfree
	platform/x86: asus-wmi: Fix setting RGB mode on some TUF laptops
	platform/x86: huawei-wmi: Silence ambient light sensor
	drm/amd/smu: use AverageGfxclkFrequency* to replace previous GFX Curr Clock
	drm/amd/display: Guard DCN31 PHYD32CLK logic against chip family
	drm/amd/display: Exit idle optimizations before attempt to access PHY
	ovl: Always reevaluate the file signature for IMA
	ata: pata_arasan_cf: Use dev_err_probe() instead dev_err() in data_xfer()
	ALSA: usb-audio: Update for native DSD support quirks
	staging: fbtft: ili9341: use macro FBTFT_REGISTER_SPI_DRIVER
	security: keys: perform capable check only on privileged operations
	kprobes: Prohibit probing on CFI preamble symbol
	clk: fixed-mmio: make COMMON_CLK_FIXED_MMIO depend on HAS_IOMEM
	vmbus_testing: fix wrong python syntax for integer value comparison
	Revert "wifi: ath6k: silence false positive -Wno-dangling-pointer warning on GCC 12"
	net: dsa: microchip: KSZ9477 register regmap alignment to 32 bit boundaries
	net: annotate data-races around sk->sk_{rcv|snd}timeo
	net: usb: qmi_wwan: add Quectel EM05GV2
	wifi: brcmfmac: Fix field-spanning write in brcmf_scan_params_v2_to_v1()
	powerpc/powermac: Use early_* IO variants in via_calibrate_decr()
	idmaengine: make FSL_EDMA and INTEL_IDMA64 depends on HAS_IOMEM
	platform/x86/amd/pmf: Fix unsigned comparison with less than zero
	scsi: lpfc: Remove reftag check in DIF paths
	scsi: qedi: Fix potential deadlock on &qedi_percpu->p_work_lock
	net: hns3: restore user pause configure when disable autoneg
	drm/amdgpu: Match against exact bootloader status
	wifi: cfg80211: remove links only on AP
	wifi: mac80211: Use active_links instead of valid_links in Tx
	netlabel: fix shift wrapping bug in netlbl_catmap_setlong()
	bnx2x: fix page fault following EEH recovery
	cifs: fix sockaddr comparison in iface_cmp
	cifs: fix max_credits implementation
	sctp: handle invalid error codes without calling BUG()
	scsi: aacraid: Reply queue mapping to CPUs based on IRQ affinity
	scsi: storvsc: Always set no_report_opcodes
	scsi: lpfc: Fix incorrect big endian type assignment in bsg loopback path
	LoongArch: Let pmd_present() return true when splitting pmd
	LoongArch: Fix the write_fcsr() macro
	ALSA: seq: oss: Fix racy open/close of MIDI devices
	net: sfp: handle 100G/25G active optical cables in sfp_parse_support
	tracing: Introduce pipe_cpumask to avoid race on trace_pipes
	platform/mellanox: Fix mlxbf-tmfifo not handling all virtio CONSOLE notifications
	of: property: Simplify of_link_to_phandle()
	cpufreq: intel_pstate: set stale CPU frequency to minimum
	crypto: rsa-pkcs1pad - Use helper to set reqsize
	tpm: Enable hwrng only for Pluton on AMD CPUs
	KVM: x86/mmu: Use kstrtobool() instead of strtobool()
	KVM: x86/mmu: Add "never" option to allow sticky disabling of nx_huge_pages
	net: Avoid address overwrite in kernel_connect
	drm/amd/display: ensure async flips are only accepted for fast updates
	udf: Check consistency of Space Bitmap Descriptor
	udf: Handle error when adding extent to a file
	Input: i8042 - add quirk for TUXEDO Gemini 17 Gen1/Clevo PD70PN
	Revert "PCI: tegra194: Enable support for 256 Byte payload"
	Revert "net: macsec: preserve ingress frame ordering"
	tools lib subcmd: Add install target
	tools lib subcmd: Make install_headers clearer
	tools lib subcmd: Add dependency test to install_headers
	tools/resolve_btfids: Use pkg-config to locate libelf
	tools/resolve_btfids: Install subcmd headers
	tools/resolve_btfids: Alter how HOSTCC is forced
	tools/resolve_btfids: Compile resolve_btfids as host program
	tools/resolve_btfids: Tidy HOST_OVERRIDES
	tools/resolve_btfids: Pass HOSTCFLAGS as EXTRA_CFLAGS to prepare targets
	tools/resolve_btfids: Fix setting HOSTCFLAGS
	reiserfs: Check the return value from __getblk()
	eventfd: prevent underflow for eventfd semaphores
	fs: Fix error checking for d_hash_and_lookup()
	iomap: Remove large folio handling in iomap_invalidate_folio()
	tmpfs: verify {g,u}id mount options correctly
	selftests/harness: Actually report SKIP for signal tests
	vfs, security: Fix automount superblock LSM init problem, preventing NFS sb sharing
	ARM: ptrace: Restore syscall restart tracing
	ARM: ptrace: Restore syscall skipping for tracers
	refscale: Fix uninitalized use of wait_queue_head_t
	OPP: Fix passing 0 to PTR_ERR in _opp_attach_genpd()
	selftests/resctrl: Add resctrl.h into build deps
	selftests/resctrl: Don't leak buffer in fill_cache()
	selftests/resctrl: Unmount resctrl FS if child fails to run benchmark
	selftests/resctrl: Close perf value read fd on errors
	arm64/ptrace: Clean up error handling path in sve_set_common()
	sched/psi: Select KERNFS as needed
	x86/decompressor: Don't rely on upper 32 bits of GPRs being preserved
	arm64/sme: Don't use streaming mode to probe the maximum SME VL
	arm64/fpsimd: Only provide the length to cpufeature for xCR registers
	sched/rt: Fix sysctl_sched_rr_timeslice intial value
	perf/imx_ddr: don't enable counter0 if none of 4 counters are used
	selftests/futex: Order calls to futex_lock_pi
	s390/pkey: fix/harmonize internal keyblob headers
	s390/pkey: fix PKEY_TYPE_EP11_AES handling in PKEY_GENSECK2 IOCTL
	s390/pkey: fix PKEY_TYPE_EP11_AES handling for sysfs attributes
	s390/paes: fix PKEY_TYPE_EP11_AES handling for secure keyblobs
	irqchip/loongson-eiointc: Fix return value checking of eiointc_index
	ACPI: x86: s2idle: Post-increment variables when getting constraints
	ACPI: x86: s2idle: Fix a logic error parsing AMD constraints table
	thermal/of: Fix potential uninitialized value access
	cpufreq: amd-pstate-ut: Remove module parameter access
	cpufreq: amd-pstate-ut: Fix kernel panic when loading the driver
	x86/efistub: Fix PCI ROM preservation in mixed mode
	cpufreq: powernow-k8: Use related_cpus instead of cpus in driver.exit()
	selftests/bpf: Fix bpf_nf failure upon test rerun
	bpftool: use a local copy of perf_event to fix accessing :: Bpf_cookie
	bpftool: Define a local bpf_perf_link to fix accessing its fields
	bpftool: Use a local copy of BPF_LINK_TYPE_PERF_EVENT in pid_iter.bpf.c
	bpftool: Use a local bpf_perf_event_value to fix accessing its fields
	libbpf: Fix realloc API handling in zero-sized edge cases
	bpf: Clear the probe_addr for uprobe
	bpf: Fix an error in verifying a field in a union
	crypto: qat - change value of default idle filter
	tcp: tcp_enter_quickack_mode() should be static
	hwrng: nomadik - keep clock enabled while hwrng is registered
	hwrng: pic32 - use devm_clk_get_enabled
	regmap: rbtree: Use alloc_flags for memory allocations
	wifi: rtw89: debug: Fix error handling in rtw89_debug_priv_btc_manual_set()
	wifi: mt76: mt7921: fix non-PSC channel scan fail
	udp: re-score reuseport groups when connected sockets are present
	bpf: reject unhashed sockets in bpf_sk_assign
	wifi: mt76: testmode: add nla_policy for MT76_TM_ATTR_TX_LENGTH
	spi: tegra20-sflash: fix to check return value of platform_get_irq() in tegra_sflash_probe()
	can: gs_usb: gs_usb_receive_bulk_callback(): count RX overflow errors also in case of OOM
	wifi: mt76: mt7915: fix power-limits while chan_switch
	wifi: mwifiex: Fix OOB and integer underflow when rx packets
	wifi: mwifiex: fix error recovery in PCIE buffer descriptor management
	selftests/bpf: fix static assert compilation issue for test_cls_*.c
	kbuild: rust_is_available: remove -v option
	kbuild: rust_is_available: fix version check when CC has multiple arguments
	kbuild: rust_is_available: add check for `bindgen` invocation
	kbuild: rust_is_available: fix confusion when a version appears in the path
	crypto: stm32 - Properly handle pm_runtime_get failing
	crypto: api - Use work queue in crypto_destroy_instance
	Bluetooth: nokia: fix value check in nokia_bluetooth_serdev_probe()
	Bluetooth: Fix potential use-after-free when clear keys
	Bluetooth: hci_sync: Don't double print name in add/remove adv_monitor
	Bluetooth: hci_sync: Avoid use-after-free in dbg for hci_add_adv_monitor()
	net: tcp: fix unexcepted socket die when snd_wnd is 0
	selftests/bpf: Fix repeat option when kfunc_call verification fails
	selftests/bpf: Clean up fmod_ret in bench_rename test script
	net-memcg: Fix scope of sockmem pressure indicators
	ice: ice_aq_check_events: fix off-by-one check when filling buffer
	crypto: caam - fix unchecked return value error
	hwrng: iproc-rng200 - Implement suspend and resume calls
	lwt: Fix return values of BPF xmit ops
	lwt: Check LWTUNNEL_XMIT_CONTINUE strictly
	fs: ocfs2: namei: check return value of ocfs2_add_entry()
	net: annotate data-races around sk->sk_lingertime
	wifi: mwifiex: fix memory leak in mwifiex_histogram_read()
	wifi: mwifiex: Fix missed return in oob checks failed path
	ARM: dts: Add .dts files missing from the build
	samples/bpf: fix bio latency check with tracepoint
	samples/bpf: fix broken map lookup probe
	wifi: ath9k: fix races between ath9k_wmi_cmd and ath9k_wmi_ctrl_rx
	wifi: ath9k: protect WMI command response buffer replacement with a lock
	wifi: nl80211/cfg80211: add forgotten nla_policy for BSS color attribute
	mac80211: make ieee80211_tx_info padding explicit
	wifi: mwifiex: avoid possible NULL skb pointer dereference
	Bluetooth: btusb: Do not call kfree_skb() under spin_lock_irqsave()
	arm64: mm: use ptep_clear() instead of pte_clear() in clear_flush()
	wifi: ath9k: use IS_ERR() with debugfs_create_dir()
	ice: avoid executing commands on other ports when driving sync
	net: arcnet: Do not call kfree_skb() under local_irq_disable()
	mlxsw: i2c: Fix chunk size setting in output mailbox buffer
	mlxsw: i2c: Limit single transaction buffer size
	mlxsw: core_hwmon: Adjust module label names based on MTCAP sensor counter
	hwmon: (tmp513) Fix the channel number in tmp51x_is_visible()
	octeontx2-pf: Refactor schedular queue alloc/free calls
	octeontx2-pf: Fix PFC TX scheduler free
	cteonxt2-pf: Fix backpressure config for multiple PFC priorities to work simultaneously
	sfc: Check firmware supports Ethernet PTP filter
	net/sched: sch_hfsc: Ensure inner classes have fsc curve
	netrom: Deny concurrent connect().
	drm/bridge: tc358764: Fix debug print parameter order
	ASoC: cs43130: Fix numerator/denominator mixup
	quota: factor out dquot_write_dquot()
	quota: rename dquot_active() to inode_quota_active()
	quota: add new helper dquot_active()
	quota: fix dqput() to follow the guarantees dquot_srcu should provide
	drm/amd/display: Do not set drr on pipe commit
	drm/hyperv: Fix a compilation issue because of not including screen_info.h
	ASoC: stac9766: fix build errors with REGMAP_AC97
	soc: qcom: ocmem: Add OCMEM hardware version print
	soc: qcom: ocmem: Fix NUM_PORTS & NUM_MACROS macros
	arm64: dts: qcom: sm6350: Fix ZAP region
	arm64: dts: qcom: sm8250: correct dynamic power coefficients
	arm64: dts: qcom: msm8916-l8150: correct light sensor VDDIO supply
	arm64: dts: qcom: sm8250-edo: Add gpio line names for TLMM
	arm64: dts: qcom: sm8250-edo: Add GPIO line names for PMIC GPIOs
	arm64: dts: qcom: sm8250-edo: Rectify gpio-keys
	arm64: dts: qcom: sc8280xp-crd: Correct vreg_misc_3p3 GPIO
	arm64: dts: qcom: sc8280xp: Add missing SCM interconnect
	arm64: dts: qcom: msm8996: Add missing interrupt to the USB2 controller
	arm64: dts: qcom: sdm845-tama: Set serial indices and stdout-path
	arm64: dts: qcom: sm8350: Fix CPU idle state residency times
	arm64: dts: qcom: sm8350: Add missing LMH interrupts to cpufreq
	arm64: dts: qcom: sm8350: Use proper CPU compatibles
	arm64: dts: qcom: pm8350: fix thermal zone name
	arm64: dts: qcom: pm8350b: fix thermal zone name
	arm64: dts: qcom: pmr735b: fix thermal zone name
	arm64: dts: qcom: pmk8350: fix ADC-TM compatible string
	arm64: dts: qcom: sm8250: Mark PCIe hosts as DMA coherent
	ARM: dts: stm32: Rename mdio0 to mdio
	ARM: dts: stm32: YAML validation fails for Argon Boards
	ARM: dts: stm32: adopt generic iio bindings for adc channels on emstamp-argon
	ARM: dts: stm32: Add missing detach mailbox for emtrion emSBC-Argon
	ARM: dts: stm32: YAML validation fails for Odyssey Boards
	ARM: dts: stm32: Add missing detach mailbox for Odyssey SoM
	ARM: dts: stm32: Update to generic ADC channel binding on DHSOM systems
	ARM: dts: stm32: Add missing detach mailbox for DHCOM SoM
	firmware: ti_sci: Use system_state to determine polling
	drm/amdgpu: avoid integer overflow warning in amdgpu_device_resize_fb_bar()
	ARM: dts: BCM53573: Drop nonexistent #usb-cells
	ARM: dts: BCM53573: Add cells sizes to PCIe node
	ARM: dts: BCM53573: Use updated "spi-gpio" binding properties
	arm64: tegra: Fix HSUART for Jetson AGX Orin
	arm64: dts: qcom: sm8250-sony-xperia: correct GPIO keys wakeup again
	arm64: dts: qcom: pm6150l: Add missing short interrupt
	arm64: dts: qcom: pm660l: Add missing short interrupt
	arm64: dts: qcom: pmi8994: Add missing OVP interrupt
	arm64: tegra: Fix HSUART for Smaug
	drm/etnaviv: fix dumping of active MMU context
	block: cleanup queue_wc_store
	block: don't allow enabling a cache on devices that don't support it
	x86/mm: Fix PAT bit missing from page protection modify mask
	drm/bridge: anx7625: Use common macros for DP power sequencing commands
	drm/bridge: anx7625: Use common macros for HDCP capabilities
	ARM: dts: samsung: s3c6410-mini6410: correct ethernet reg addresses (split)
	ARM: dts: s5pv210: add dummy 5V regulator for backlight on SMDKv210
	ARM: dts: samsung: s5pv210-smdkv210: correct ethernet reg addresses (split)
	drm: adv7511: Fix low refresh rate register for ADV7533/5
	ARM: dts: BCM53573: Fix Ethernet info for Luxul devices
	arm64: dts: qcom: sdm845: Add missing RPMh power domain to GCC
	arm64: dts: qcom: sdm845: Fix the min frequency of "ice_core_clk"
	arm64: dts: qcom: msm8996-gemini: fix touchscreen VIO supply
	drm/amdgpu: Update min() to min_t() in 'amdgpu_info_ioctl'
	md: Factor out is_md_suspended helper
	md: Change active_io to percpu
	md: restore 'noio_flag' for the last mddev_resume()
	md/raid10: factor out dereference_rdev_and_rrdev()
	md/raid10: use dereference_rdev_and_rrdev() to get devices
	md/md-bitmap: remove unnecessary local variable in backlog_store()
	md/md-bitmap: hold 'reconfig_mutex' in backlog_store()
	drm/msm: Update dev core dump to not print backwards
	drm/tegra: dpaux: Fix incorrect return value of platform_get_irq
	of: unittest: fix null pointer dereferencing in of_unittest_find_node_by_name()
	arm64: dts: qcom: sm8150: Fix the I2C7 interrupt
	ARM: dts: BCM53573: Fix Tenda AC9 switch CPU port
	drm/armada: Fix off-by-one error in armada_overlay_get_property()
	drm/repaper: Reduce temporary buffer size in repaper_fb_dirty()
	drm/panel: simple: Add missing connector type and pixel format for AUO T215HVN01
	ima: Remove deprecated IMA_TRUSTED_KEYRING Kconfig
	drm: xlnx: zynqmp_dpsub: Add missing check for dma_set_mask
	soc: qcom: smem: Fix incompatible types in comparison
	drm/msm/mdp5: Don't leak some plane state
	firmware: meson_sm: fix to avoid potential NULL pointer dereference
	drm/msm/dpu: fix the irq index in dpu_encoder_phys_wb_wait_for_commit_done
	smackfs: Prevent underflow in smk_set_cipso()
	drm/amd/pm: fix variable dereferenced issue in amdgpu_device_attr_create()
	drm/msm/a2xx: Call adreno_gpu_init() earlier
	audit: fix possible soft lockup in __audit_inode_child()
	block/mq-deadline: use correct way to throttling write requests
	io_uring: fix drain stalls by invalid SQE
	drm/mediatek: dp: Add missing error checks in mtk_dp_parse_capabilities
	bus: ti-sysc: Fix build warning for 64-bit build
	drm/mediatek: Remove freeing not dynamic allocated memory
	ARM: dts: qcom: ipq4019: correct SDHCI XO clock
	drm/mediatek: Fix potential memory leak if vmap() fail
	arm64: dts: qcom: apq8016-sbc: Fix ov5640 regulator supply names
	arm64: dts: qcom: msm8998: Drop bus clock reference from MMSS SMMU
	arm64: dts: qcom: msm8998: Add missing power domain to MMSS SMMU
	arm64: dts: qcom: msm8996: Fix dsi1 interrupts
	arm64: dts: qcom: sc8280xp-x13s: Unreserve NC pins
	bus: ti-sysc: Fix cast to enum warning
	md/raid5-cache: fix a deadlock in r5l_exit_log()
	md/raid5-cache: fix null-ptr-deref for r5l_flush_stripe_to_raid()
	firmware: cs_dsp: Fix new control name check
	md: add error_handlers for raid0 and linear
	md/raid0: Factor out helper for mapping and submitting a bio
	md/raid0: Fix performance regression for large sequential writes
	md: raid0: account for split bio in iostat accounting
	ASoC: SOF: amd: clear dsp to host interrupt status
	of: overlay: Call of_changeset_init() early
	of: unittest: Fix overlay type in apply/revert check
	ALSA: ac97: Fix possible error value of *rac97
	ipmi:ssif: Add check for kstrdup
	ipmi:ssif: Fix a memory leak when scanning for an adapter
	clk: qcom: gpucc-sm6350: Introduce index-based clk lookup
	clk: qcom: gpucc-sm6350: Fix clock source names
	clk: qcom: gcc-sc8280xp: Add EMAC GDSCs
	clk: qcom: gcc-sc8280xp: Add missing GDSC flags
	dt-bindings: clock: qcom,gcc-sc8280xp: Add missing GDSCs
	clk: qcom: gcc-sc8280xp: Add missing GDSCs
	clk: rockchip: rk3568: Fix PLL rate setting for 78.75MHz
	PCI: apple: Initialize pcie->nvecs before use
	PCI: qcom-ep: Switch MHI bus master clock off during L1SS
	drivers: clk: keystone: Fix parameter judgment in _of_pll_clk_init()
	PCI/DOE: Fix destroy_work_on_stack() race
	clk: sunxi-ng: Modify mismatched function name
	clk: qcom: gcc-sc7180: Fix up gcc_sdcc2_apps_clk_src
	EDAC/igen6: Fix the issue of no error events
	ext4: correct grp validation in ext4_mb_good_group
	ext4: avoid potential data overflow in next_linear_group
	clk: qcom: gcc-sm8250: Fix gcc_sdcc2_apps_clk_src
	kvm/vfio: Prepare for accepting vfio device fd
	kvm/vfio: ensure kvg instance stays around in kvm_vfio_group_add()
	clk: qcom: reset: Use the correct type of sleep/delay based on length
	clk: qcom: gcc-sm6350: Fix gcc_sdcc2_apps_clk_src
	PCI: microchip: Correct the DED and SEC interrupt bit offsets
	PCI: Mark NVIDIA T4 GPUs to avoid bus reset
	pinctrl: mcp23s08: check return value of devm_kasprintf()
	PCI: Allow drivers to request exclusive config regions
	PCI: Add locking to RMW PCI Express Capability Register accessors
	PCI: pciehp: Use RMW accessors for changing LNKCTL
	PCI/ASPM: Use RMW accessors for changing LNKCTL
	clk: qcom: gcc-sm8450: Use floor ops for SDCC RCGs
	clk: imx: pllv4: Fix SPLL2 MULT range
	clk: imx: imx8ulp: update SPLL2 type
	clk: imx8mp: fix sai4 clock
	clk: imx: composite-8m: fix clock pauses when set_rate would be a no-op
	powerpc/radix: Move some functions into #ifdef CONFIG_KVM_BOOK3S_HV_POSSIBLE
	vfio/type1: fix cap_migration information leak
	nvdimm: Fix memleak of pmu attr_groups in unregister_nvdimm_pmu()
	nvdimm: Fix dereference after free in register_nvdimm_pmu()
	powerpc/fadump: reset dump area size if fadump memory reserve fails
	powerpc/perf: Convert fsl_emb notifier to state machine callbacks
	drm/amdgpu: Use RMW accessors for changing LNKCTL
	drm/radeon: Use RMW accessors for changing LNKCTL
	net/mlx5: Use RMW accessors for changing LNKCTL
	wifi: ath11k: Use RMW accessors for changing LNKCTL
	wifi: ath10k: Use RMW accessors for changing LNKCTL
	NFSv4.2: Rework scratch handling for READ_PLUS
	NFSv4.2: Fix READ_PLUS smatch warnings
	NFSv4.2: Fix up READ_PLUS alignment
	NFSv4.2: Fix READ_PLUS size calculations
	powerpc: Don't include lppaca.h in paca.h
	powerpc/pseries: Rework lppaca_shared_proc() to avoid DEBUG_PREEMPT
	nfs/blocklayout: Use the passed in gfp flags
	powerpc/pseries: Fix hcall tracepoints with JUMP_LABEL=n
	powerpc/mpc5xxx: Add missing fwnode_handle_put()
	powerpc/iommu: Fix notifiers being shared by PCI and VIO buses
	ext4: fix unttached inode after power cut with orphan file feature enabled
	jfs: validate max amount of blocks before allocation.
	fs: lockd: avoid possible wrong NULL parameter
	NFSD: da_addr_body field missing in some GETDEVICEINFO replies
	NFS: Guard against READDIR loop when entry names exceed MAXNAMELEN
	NFSv4.2: fix handling of COPY ERR_OFFLOAD_NO_REQ
	pNFS: Fix assignment of xprtdata.cred
	cgroup/cpuset: Inherit parent's load balance state in v2
	RDMA/qedr: Remove a duplicate assignment in irdma_query_ah()
	media: ov5640: fix low resolution image abnormal issue
	media: ad5820: Drop unsupported ad5823 from i2c_ and of_device_id tables
	media: i2c: tvp5150: check return value of devm_kasprintf()
	media: v4l2-core: Fix a potential resource leak in v4l2_fwnode_parse_link()
	iommu/amd/iommu_v2: Fix pasid_state refcount dec hit 0 warning on pasid unbind
	iommu: rockchip: Fix directory table address encoding
	drivers: usb: smsusb: fix error handling code in smsusb_init_device
	media: dib7000p: Fix potential division by zero
	media: dvb-usb: m920x: Fix a potential memory leak in m920x_i2c_xfer()
	media: cx24120: Add retval check for cx24120_message_send()
	RDMA/siw: Fabricate a GID on tun and loopback devices
	scsi: hisi_sas: Fix warnings detected by sparse
	scsi: hisi_sas: Fix normally completed I/O analysed as failed
	dt-bindings: extcon: maxim,max77843: restrict connector properties
	media: amphion: reinit vpu if reqbufs output 0
	media: amphion: add helper function to get id name
	media: mtk-jpeg: Fix use after free bug due to uncanceled work
	media: rkvdec: increase max supported height for H.264
	media: amphion: fix CHECKED_RETURN issues reported by coverity
	media: amphion: fix REVERSE_INULL issues reported by coverity
	media: amphion: fix UNINIT issues reported by coverity
	media: amphion: fix UNUSED_VALUE issue reported by coverity
	media: amphion: ensure the bitops don't cross boundaries
	media: mediatek: vcodec: Return NULL if no vdec_fb is found
	media: mediatek: vcodec: fix potential double free
	media: mediatek: vcodec: fix resource leaks in vdec_msg_queue_init()
	usb: phy: mxs: fix getting wrong state with mxs_phy_is_otg_host()
	scsi: RDMA/srp: Fix residual handling
	scsi: iscsi: Rename iscsi_set_param() to iscsi_if_set_param()
	scsi: iscsi: Add length check for nlattr payload
	scsi: iscsi: Add strlen() check in iscsi_if_set{_host}_param()
	scsi: be2iscsi: Add length check when parsing nlattrs
	scsi: qla4xxx: Add length check when parsing nlattrs
	iio: accel: adxl313: Fix adxl313_i2c_id[] table
	serial: sprd: Assign sprd_port after initialized to avoid wrong access
	serial: sprd: Fix DMA buffer leak issue
	x86/APM: drop the duplicate APM_MINOR_DEV macro
	RDMA/rxe: Split rxe_run_task() into two subroutines
	RDMA/rxe: Fix incomplete state save in rxe_requester
	scsi: qedf: Do not touch __user pointer in qedf_dbg_stop_io_on_error_cmd_read() directly
	scsi: qedf: Do not touch __user pointer in qedf_dbg_debug_cmd_read() directly
	scsi: qedf: Do not touch __user pointer in qedf_dbg_fp_int_cmd_read() directly
	RDMA/irdma: Replace one-element array with flexible-array member
	coresight: tmc: Explicit type conversions to prevent integer overflow
	interconnect: qcom: qcm2290: Enable sync state
	dma-buf/sync_file: Fix docs syntax
	driver core: test_async: fix an error code
	driver core: Call dma_cleanup() on the test_remove path
	kernfs: add stub helper for kernfs_generic_poll()
	extcon: cht_wc: add POWER_SUPPLY dependency
	iommu/mediatek: Remove unused "mapping" member from mtk_iommu_data
	iommu/mediatek: Fix two IOMMU share pagetable issue
	iommu/sprd: Add missing force_aperture
	RDMA/hns: Fix port active speed
	RDMA/hns: Fix incorrect post-send with direct wqe of wr-list
	RDMA/hns: Fix inaccurate error label name in init instance
	RDMA/hns: Fix CQ and QP cache affinity
	IB/uverbs: Fix an potential error pointer dereference
	fsi: aspeed: Reset master errors after CFAM reset
	iommu/qcom: Disable and reset context bank before programming
	iommu/vt-d: Fix to flush cache of PASID directory table
	platform/x86: dell-sysman: Fix reference leak
	media: cec: core: add adap_nb_transmit_canceled() callback
	media: cec: core: add adap_unconfigured() callback
	media: go7007: Remove redundant if statement
	media: venus: hfi_venus: Only consider sys_idle_indicator on V1
	docs: ABI: fix spelling/grammar in SBEFIFO timeout interface
	USB: gadget: core: Add missing kerneldoc for vbus_work
	USB: gadget: f_mass_storage: Fix unused variable warning
	drivers: base: Free devm resources when unregistering a device
	HID: input: Support devices sending Eraser without Invert
	media: ov5640: Enable MIPI interface in ov5640_set_power_mipi()
	media: ov5640: Fix initial RESETB state and annotate timings
	media: i2c: ov2680: Set V4L2_CTRL_FLAG_MODIFY_LAYOUT on flips
	media: ov2680: Remove auto-gain and auto-exposure controls
	media: ov2680: Fix ov2680_bayer_order()
	media: ov2680: Fix vflip / hflip set functions
	media: ov2680: Remove VIDEO_V4L2_SUBDEV_API ifdef-s
	media: ov2680: Don't take the lock for try_fmt calls
	media: ov2680: Add ov2680_fill_format() helper function
	media: ov2680: Fix ov2680_set_fmt() which == V4L2_SUBDEV_FORMAT_TRY not working
	media: ov2680: Fix regulators being left enabled on ov2680_power_on() errors
	media: i2c: rdacm21: Fix uninitialized value
	f2fs: fix to avoid mmap vs set_compress_option case
	f2fs: judge whether discard_unit is section only when have CONFIG_BLK_DEV_ZONED
	f2fs: Only lfs mode is allowed with zoned block device feature
	Revert "f2fs: fix to do sanity check on extent cache correctly"
	cgroup:namespace: Remove unused cgroup_namespaces_init()
	coresight: trbe: Fix TRBE potential sleep in atomic context
	RDMA/irdma: Prevent zero-length STAG registration
	scsi: core: Use 32-bit hostnum in scsi_host_lookup()
	scsi: fcoe: Fix potential deadlock on &fip->ctlr_lock
	interconnect: qcom: sm8450: Enable sync_state
	interconnect: qcom: bcm-voter: Improve enable_mask handling
	interconnect: qcom: bcm-voter: Use enable_maks for keepalive voting
	serial: tegra: handle clk prepare error in tegra_uart_hw_init()
	amba: bus: fix refcount leak
	Revert "IB/isert: Fix incorrect release of isert connection"
	RDMA/siw: Balance the reference of cep->kref in the error path
	RDMA/siw: Correct wrong debug message
	RDMA/efa: Fix wrong resources deallocation order
	HID: logitech-dj: Fix error handling in logi_dj_recv_switch_to_dj_mode()
	HID: uclogic: Correct devm device reference for hidinput input_dev name
	HID: multitouch: Correct devm device reference for hidinput input_dev name
	platform/x86/amd/pmf: Fix a missing cleanup path
	tick/rcu: Fix false positive "softirq work is pending" messages
	x86/speculation: Mark all Skylake CPUs as vulnerable to GDS
	tracing: Remove extra space at the end of hwlat_detector/mode
	tracing: Fix race issue between cpu buffer write and swap
	mtd: rawnand: brcmnand: Fix mtd oobsize
	dmaengine: idxd: Modify the dependence of attribute pasid_enabled
	phy/rockchip: inno-hdmi: use correct vco_div_5 macro on rk3328
	phy/rockchip: inno-hdmi: round fractal pixclock in rk3328 recalc_rate
	phy/rockchip: inno-hdmi: do not power on rk3328 post pll on reg write
	rpmsg: glink: Add check for kstrdup
	leds: pwm: Fix error code in led_pwm_create_fwnode()
	leds: multicolor: Use rounded division when calculating color components
	leds: Fix BUG_ON check for LED_COLOR_ID_MULTI that is always false
	leds: trigger: tty: Do not use LED_ON/OFF constants, use led_blink_set_oneshot instead
	mtd: spi-nor: Check bus width while setting QE bit
	mtd: rawnand: fsmc: handle clk prepare error in fsmc_nand_resume()
	um: Fix hostaudio build errors
	dmaengine: ste_dma40: Add missing IRQ check in d40_probe
	Drivers: hv: vmbus: Don't dereference ACPI root object handle
	cpufreq: Fix the race condition while updating the transition_task of policy
	virtio_ring: fix avail_wrap_counter in virtqueue_add_packed
	igmp: limit igmpv3_newpack() packet size to IP_MAX_MTU
	netfilter: ipset: add the missing IP_SET_HASH_WITH_NET0 macro for ip_set_hash_netportnet.c
	netfilter: nft_exthdr: Fix non-linear header modification
	netfilter: xt_u32: validate user space input
	netfilter: xt_sctp: validate the flag_info count
	skbuff: skb_segment, Call zero copy functions before using skbuff frags
	igb: set max size RX buffer when store bad packet is enabled
	PM / devfreq: Fix leak in devfreq_dev_release()
	ALSA: pcm: Fix missing fixup call in compat hw_refine ioctl
	rcu: dump vmalloc memory info safely
	printk: ringbuffer: Fix truncating buffer size min_t cast
	scsi: core: Fix the scsi_set_resid() documentation
	mm/vmalloc: add a safer version of find_vm_area() for debug
	cpu/hotplug: Prevent self deadlock on CPU hot-unplug
	media: i2c: ccs: Check rules is non-NULL
	media: i2c: Add a camera sensor top level menu
	PCI: rockchip: Use 64-bit mask on MSI 64-bit PCI address
	ipmi_si: fix a memleak in try_smi_init()
	ARM: OMAP2+: Fix -Warray-bounds warning in _pwrdm_state_switch()
	XArray: Do not return sibling entries from xa_load()
	io_uring: break iopolling on signal
	backlight/gpio_backlight: Compare against struct fb_info.device
	backlight/bd6107: Compare against struct fb_info.device
	backlight/lv5207lp: Compare against struct fb_info.device
	drm/amd/display: register edp_backlight_control() for DCN301
	xtensa: PMU: fix base address for the newer hardware
	LoongArch: mm: Add p?d_leaf() definitions
	i3c: master: svc: fix probe failure when no i3c device exist
	arm64: csum: Fix OoB access in IP checksum code for negative lengths
	ALSA: hda/cirrus: Fix broken audio on hardware with two CS42L42 codecs.
	media: dvb: symbol fixup for dvb_attach()
	media: venus: hfi_venus: Write to VIDC_CTRL_INIT after unmasking interrupts
	Revert "scsi: qla2xxx: Fix buffer overrun"
	scsi: mpt3sas: Perform additional retries if doorbell read returns 0
	PCI: Free released resource after coalescing
	PCI: hv: Fix a crash in hv_pci_restore_msi_msg() during hibernation
	PCI/PM: Only read PCI_PM_CTRL register when available
	ntb: Drop packets when qp link is down
	ntb: Clean up tx tail index on link down
	ntb: Fix calculation ntb_transport_tx_free_entry()
	Revert "PCI: Mark NVIDIA T4 GPUs to avoid bus reset"
	block: don't add or resize partition on the disk with GENHD_FL_NO_PART
	procfs: block chmod on /proc/thread-self/comm
	parisc: Fix /proc/cpuinfo output for lscpu
	drm/amd/display: Add smu write msg id fail retry process
	bpf: Fix issue in verifying allow_ptr_leaks
	dlm: fix plock lookup when using multiple lockspaces
	dccp: Fix out of bounds access in DCCP error handler
	x86/sev: Make enc_dec_hypercall() accept a size instead of npages
	r8169: fix ASPM-related issues on a number of systems with NIC version from RTL8168h
	X.509: if signature is unsupported skip validation
	net: handle ARPHRD_PPP in dev_is_mac_header_xmit()
	fsverity: skip PKCS#7 parser when keyring is empty
	x86/MCE: Always save CS register on AMD Zen IF Poison errors
	platform/chrome: chromeos_acpi: print hex string for ACPI_TYPE_BUFFER
	mmc: renesas_sdhi: register irqs before registering controller
	pstore/ram: Check start of empty przs during init
	arm64: sdei: abort running SDEI handlers during crash
	s390/dcssblk: fix kernel crash with list_add corruption
	s390/ipl: add missing secure/has_secure file to ipl type 'unknown'
	s390/dasd: fix string length handling
	crypto: stm32 - fix loop iterating through scatterlist for DMA
	cpufreq: brcmstb-avs-cpufreq: Fix -Warray-bounds bug
	of: property: fw_devlink: Add a devlink for panel followers
	usb: typec: tcpm: set initial svdm version based on pd revision
	usb: typec: bus: verify partner exists in typec_altmode_attention
	USB: core: Unite old scheme and new scheme descriptor reads
	USB: core: Change usb_get_device_descriptor() API
	USB: core: Fix race by not overwriting udev->descriptor in hub_port_init()
	USB: core: Fix oversight in SuperSpeed initialization
	x86/sgx: Break up long non-preemptible delays in sgx_vepc_release()
	perf/x86/uncore: Correct the number of CHAs on EMR
	serial: sc16is7xx: remove obsolete out_thread label
	serial: sc16is7xx: fix regression with GPIO configuration
	tracing: Zero the pipe cpumask on alloc to avoid spurious -EBUSY
	Revert "drm/amd/display: Do not set drr on pipe commit"
	md: Free resources in __md_stop
	NFSv4.2: Fix a potential double free with READ_PLUS
	NFSv4.2: Rework scratch handling for READ_PLUS (again)
	md: fix regression for null-ptr-deference in __md_stop()
	clk: Mark a fwnode as initialized when using CLK_OF_DECLARE() macro
	treewide: Fix probing of devices in DT overlays
	clk: Avoid invalid function names in CLK_OF_DECLARE()
	udf: initialize newblock to 0
	Linux 6.1.53

Change-Id: I6f5858bce0f20963ae42515eac36ac14cb686f24
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2023-09-18 09:57:37 +00:00
Greg Kroah-Hartman
094c282d92 Merge 6.1.46 into android14-6.1-lts
Changes in 6.1.46
	gcc-plugins: Reorganize gimple includes for GCC 13
	Revert "loongarch/cpu: Switch to arch_cpu_finalize_init()"
	tpm: Disable RNG for all AMD fTPMs
	tpm: Add a helper for checking hwrng enabled
	ksmbd: validate command request size
	ksmbd: fix wrong next length validation of ea buffer in smb2_set_ea()
	KVM: SEV: snapshot the GHCB before accessing it
	KVM: SEV: only access GHCB fields once
	wifi: nl80211: fix integer overflow in nl80211_parse_mbssid_elems()
	wifi: rtw89: fix 8852AE disconnection caused by RX full flags
	selftests: forwarding: Set default IPv6 traceroute utility
	wireguard: allowedips: expand maximum node depth
	mmc: moxart: read scr register without changing byte order
	ipv6: adjust ndisc_is_useropt() to also return true for PIO
	selftests: mptcp: join: fix 'delete and re-add' test
	selftests: mptcp: join: fix 'implicit EP' test
	mptcp: avoid bogus reset on fallback close
	mptcp: fix disconnect vs accept race
	dmaengine: pl330: Return DMA_PAUSED when transaction is paused
	net: mana: Fix MANA VF unload when hardware is unresponsive
	riscv/kexec: load initrd high in available memory
	riscv,mmio: Fix readX()-to-delay() ordering
	riscv/kexec: handle R_RISCV_CALL_PLT relocation type
	nvme-pci: add NVME_QUIRK_BOGUS_NID for Samsung PM9B1 256G and 512G
	drm/nouveau/gr: enable memory loads on helper invocation on all channels
	drm/nouveau/nvkm/dp: Add workaround to fix DP 1.3+ DPCD issues
	drm/shmem-helper: Reset vma->vm_ops before calling dma_buf_mmap()
	drm/amdgpu: fix possible UAF in amdgpu_cs_pass1()
	drm/amd/display: check attr flag before set cursor degamma on DCN3+
	drm/amdgpu: add S/G display parameter
	drm/amd: Disable S/G for APUs when 64GB or more host memory
	drm/amd/display: limit DPIA link rate to HBR3
	cpuidle: dt_idle_genpd: Add helper function to remove genpd topology
	hwmon: (pmbus/bel-pfe) Enable PMBUS_SKIP_STATUS_CHECK for pfe1100
	radix tree test suite: fix incorrect allocation size for pthreads
	nilfs2: fix use-after-free of nilfs_root in dirtying inodes via iput
	drm/amd/pm: fulfill swsmu peak profiling mode shader/memory clock settings
	drm/amd/pm: expose swctf threshold setting for legacy powerplay
	drm/amd/pm: fulfill powerplay peak profiling mode shader/memory clock settings
	drm/amd/pm: avoid unintentional shutdown due to temperature momentary fluctuation
	drm/amd/display: Handle virtual hardware detect
	drm/amd/display: Add function for validate and update new stream
	drm/amd/display: Handle seamless boot stream
	drm/amd/display: Update OTG instance in the commit stream
	drm/amd/display: Avoid ABM when ODM combine is enabled for eDP
	drm/amd/display: Use update plane and stream routine for DCN32x
	drm/amd/display: Disable phantom OTG after enable for plane disable
	drm/amd/display: Retain phantom plane/stream if validation fails
	drm/amd/display: fix the build when DRM_AMD_DC_DCN is not set
	drm/amd/display: trigger timing sync only if TG is running
	io_uring: correct check for O_TMPFILE
	iio: cros_ec: Fix the allocation size for cros_ec_command
	iio: frequency: admv1013: propagate errors from regulator_get_voltage()
	iio: adc: ad7192: Fix ac excitation feature
	iio: adc: ina2xx: avoid NULL pointer dereference on OF device match
	binder: fix memory leak in binder_init()
	misc: rtsx: judge ASPM Mode to set PETXCFG Reg
	usb-storage: alauda: Fix uninit-value in alauda_check_media()
	usb: dwc3: Properly handle processing of pending events
	USB: Gadget: core: Help prevent panic during UVC unconfigure
	usb: common: usb-conn-gpio: Prevent bailing out if initial role is none
	usb: typec: tcpm: Fix response to vsafe0V event
	usb: typec: altmodes/displayport: Signal hpd when configuring pin assignment
	x86/srso: Fix build breakage with the LLVM linker
	x86/cpu/amd: Enable Zenbleed fix for AMD Custom APU 0405
	x86/mm: Fix VDSO and VVAR placement on 5-level paging machines
	x86/sev: Do not try to parse for the CC blob on non-AMD hardware
	x86/speculation: Add cpu_show_gds() prototype
	x86: Move gds_ucode_mitigated() declaration to header
	drm/nouveau/disp: Revert a NULL check inside nouveau_connector_get_modes
	iio: core: Prevent invalid memory access when there is no parent
	interconnect: qcom: Add support for mask-based BCMs
	interconnect: qcom: sm8450: add enable_mask for bcm nodes
	selftests/rseq: Fix build with undefined __weak
	selftests: forwarding: Add a helper to skip test when using veth pairs
	selftests: forwarding: ethtool: Skip when using veth pairs
	selftests: forwarding: ethtool_extended_state: Skip when using veth pairs
	selftests: forwarding: hw_stats_l3_gre: Skip when using veth pairs
	selftests: forwarding: Skip test when no interfaces are specified
	selftests: forwarding: Switch off timeout
	selftests: forwarding: tc_flower: Relax success criterion
	net: core: remove unnecessary frame_sz check in bpf_xdp_adjust_tail()
	bpf, sockmap: Fix map type error in sock_map_del_link
	bpf, sockmap: Fix bug that strp_done cannot be called
	mISDN: Update parameter type of dsp_cmx_send()
	macsec: use DEV_STATS_INC()
	mptcp: fix the incorrect judgment for msk->cb_flags
	net/packet: annotate data-races around tp->status
	net/smc: Use correct buffer sizes when switching between TCP and SMC
	tcp: add missing family to tcp_set_ca_state() tracepoint
	tunnels: fix kasan splat when generating ipv4 pmtu error
	xsk: fix refcount underflow in error path
	bonding: Fix incorrect deletion of ETH_P_8021AD protocol vid from slaves
	dccp: fix data-race around dp->dccps_mss_cache
	drivers: net: prevent tun_build_skb() to exceed the packet size limit
	drivers: vxlan: vnifilter: free percpu vni stats on error path
	iavf: fix potential races for FDIR filters
	IB/hfi1: Fix possible panic during hotplug remove
	drm/rockchip: Don't spam logs in atomic check
	wifi: cfg80211: fix sband iftype data lookup for AP_VLAN
	RDMA/umem: Set iova in ODP flow
	net: tls: avoid discarding data on record close
	net: marvell: prestera: fix handling IPv4 routes with nhid
	net: phy: at803x: remove set/get wol callbacks for AR8032
	net: dsa: ocelot: call dsa_tag_8021q_unregister() under rtnl_lock() on driver remove
	net: hns3: refactor hclge_mac_link_status_wait for interface reuse
	net: hns3: add wait until mac link down
	net: hns3: fix deadlock issue when externel_lb and reset are executed together
	nexthop: Fix infinite nexthop dump when using maximum nexthop ID
	nexthop: Make nexthop bucket dump more efficient
	nexthop: Fix infinite nexthop bucket dump when using maximum nexthop ID
	net: hns3: fix strscpy causing content truncation issue
	dmaengine: mcf-edma: Fix a potential un-allocated memory access
	dmaengine: owl-dma: Modify mismatched function name
	net/mlx5: Allow 0 for total host VFs
	net/mlx5: LAG, Check correct bucket when modifying LAG
	net/mlx5: Skip clock update work when device is in error state
	net/mlx5: Reload auxiliary devices in pci error handlers
	ibmvnic: Enforce stronger sanity checks on login response
	ibmvnic: Unmap DMA login rsp buffer on send login fail
	ibmvnic: Handle DMA unmapping of login buffs in release functions
	ibmvnic: Do partial reset on login failure
	ibmvnic: Ensure login failure recovery is safe from other resets
	gpio: ws16c48: Fix off-by-one error in WS16C48 resource region extent
	gpio: sim: mark the GPIO chip as a one that can sleep
	btrfs: wait for actual caching progress during allocation
	btrfs: don't stop integrity writeback too early
	btrfs: properly clear end of the unreserved range in cow_file_range
	btrfs: exit gracefully if reloc roots don't match
	btrfs: reject invalid reloc tree root keys with stack dump
	btrfs: set cache_block_group_error if we find an error
	nvme-tcp: fix potential unbalanced freeze & unfreeze
	nvme-rdma: fix potential unbalanced freeze & unfreeze
	netfilter: nf_tables: report use refcount overflow
	scsi: core: Fix legacy /proc parsing buffer overflow
	scsi: storvsc: Fix handling of virtual Fibre Channel timeouts
	scsi: ufs: renesas: Fix private allocation
	scsi: 53c700: Check that command slot is not NULL
	scsi: snic: Fix possible memory leak if device_add() fails
	scsi: core: Fix possible memory leak if device_add() fails
	scsi: fnic: Replace return codes in fnic_clean_pending_aborts()
	scsi: qedi: Fix firmware halt over suspend and resume
	scsi: qedf: Fix firmware halt over suspend and resume
	platform/x86: serial-multi-instantiate: Auto detect IRQ resource for CSC3551
	ACPI: scan: Create platform device for CS35L56
	alpha: remove __init annotation from exported page_is_ram()
	sch_netem: fix issues in netem_change() vs get_dist_table()
	drm/amd/pm/smu7: move variables to where they are used
	Linux 6.1.46

Change-Id: I679c85c2fa9609364ba40c4d6e665447a67a87fd
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2023-09-13 19:34:21 +00:00
Hongchen Zhang
cc9bf2d62f LoongArch: mm: Add p?d_leaf() definitions
commit 303be4b33562a5b689261ced1616bf16ad49efa7 upstream.

When I do LTP test, LTP test case ksm06 caused panic at
	break_ksm_pmd_entry
	  -> pmd_leaf (Huge page table but False)
	  -> pte_present (panic)

The reason is pmd_leaf() is not defined, So like commit 501b810467
("mips: mm: add p?d_leaf() definitions") add p?d_leaf() definition for
LoongArch.

Fixes: 09cfefb7fa ("LoongArch: Add memory management")
Cc: stable@vger.kernel.org
Acked-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Hongchen Zhang <zhanghongchen@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-09-13 09:43:01 +02:00
Qi Hu
ab5c5c10d0 LoongArch: Fix the write_fcsr() macro
[ Upstream commit 346dc929623cef70ff7832a4fa0ffd1b696e312a ]

The "write_fcsr()" macro uses wrong the positions for val and dest in
asm. Fix it!

Reported-by: Miao HAO <haomiao19@mails.ucas.ac.cn>
Signed-off-by: Qi Hu <huqi@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-09-13 09:42:25 +02:00
Hongchen Zhang
9920a52362 LoongArch: Let pmd_present() return true when splitting pmd
[ Upstream commit ddc1729b07cc84bb29f577698b8d2e74a4004a6e ]

When we split a pmd into ptes, pmd_present() and pmd_trans_huge() should
return true, otherwise it would be treated as a swap pmd.

This is the same as arm64 does in commit b65399f611 ("arm64/mm: Change
THP helpers to comply with generic MM semantics"), we also add a new bit
named _PAGE_PRESENT_INVALID for LoongArch.

Signed-off-by: Hongchen Zhang <zhanghongchen@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-09-13 09:42:25 +02:00
Greg Kroah-Hartman
f474c6446c Merge 6.1.44 into android14-6.1-lts
Changes in 6.1.44
	init: Provide arch_cpu_finalize_init()
	x86/cpu: Switch to arch_cpu_finalize_init()
	ARM: cpu: Switch to arch_cpu_finalize_init()
	ia64/cpu: Switch to arch_cpu_finalize_init()
	loongarch/cpu: Switch to arch_cpu_finalize_init()
	m68k/cpu: Switch to arch_cpu_finalize_init()
	mips/cpu: Switch to arch_cpu_finalize_init()
	sh/cpu: Switch to arch_cpu_finalize_init()
	sparc/cpu: Switch to arch_cpu_finalize_init()
	um/cpu: Switch to arch_cpu_finalize_init()
	init: Remove check_bugs() leftovers
	init: Invoke arch_cpu_finalize_init() earlier
	init, x86: Move mem_encrypt_init() into arch_cpu_finalize_init()
	x86/init: Initialize signal frame size late
	x86/fpu: Remove cpuinfo argument from init functions
	x86/fpu: Mark init functions __init
	x86/fpu: Move FPU initialization into arch_cpu_finalize_init()
	x86/speculation: Add Gather Data Sampling mitigation
	x86/speculation: Add force option to GDS mitigation
	x86/speculation: Add Kconfig option for GDS
	KVM: Add GDS_NO support to KVM
	x86/mem_encrypt: Unbreak the AMD_MEM_ENCRYPT=n build
	x86/xen: Fix secondary processors' FPU initialization
	x86/mm: fix poking_init() for Xen PV guests
	x86/mm: Use mm_alloc() in poking_init()
	mm: Move mm_cachep initialization to mm_init()
	x86/mm: Initialize text poking earlier
	Documentation/x86: Fix backwards on/off logic about YMM support
	x86/bugs: Increase the x86 bugs vector size to two u32s
	x86/cpu, kvm: Add support for CPUID_80000021_EAX
	x86/srso: Add a Speculative RAS Overflow mitigation
	x86/srso: Add IBPB_BRTYPE support
	x86/srso: Add SRSO_NO support
	x86/srso: Add IBPB
	x86/srso: Add IBPB on VMEXIT
	x86/srso: Fix return thunks in generated code
	x86/srso: Add a forgotten NOENDBR annotation
	x86/srso: Tie SBPB bit setting to microcode patch detection
	xen/netback: Fix buffer overrun triggered by unusual packet
	x86: fix backwards merge of GDS/SRSO bit
	Linux 6.1.44

Change-Id: Ia40e37c806ae2a2daf2127415aa28d0151660667
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2023-09-12 15:09:42 +00:00
Greg Kroah-Hartman
7f81705800 Merge 6.1.43 into android14-6.1-lts
Changes in 6.1.43
	netfilter: nf_tables: fix underflow in object reference counter
	netfilter: nf_tables: fix underflow in chain reference counter
	platform/x86/amd/pmf: Notify OS power slider update
	platform/x86/amd/pmf: reduce verbosity of apmf_get_system_params
	drm/amd/display: Keep PHY active for dp config
	ovl: fix null pointer dereference in ovl_permission()
	drm/amd: Move helper for dynamic speed switch check out of smu13
	drm/amd: Align SMU11 SMU_MSG_OverridePcieParameters implementation with SMU13
	jbd2: Fix wrongly judgement for buffer head removing while doing checkpoint
	blk-mq: Fix stall due to recursive flush plug
	powerpc/pseries/vas: Hold mmap_mutex after mmap lock during window close
	KVM: s390: pv: fix index value of replaced ASCE
	io_uring: don't audit the capability check in io_uring_create()
	gpio: tps68470: Make tps68470_gpio_output() always set the initial value
	pwm: Add a stub for devm_pwmchip_add()
	gpio: mvebu: Make use of devm_pwmchip_add
	gpio: mvebu: fix irq domain leak
	btrfs: fix race between quota disable and relocation
	i2c: Delete error messages for failed memory allocations
	i2c: Improve size determinations
	i2c: nomadik: Remove unnecessary goto label
	i2c: nomadik: Use devm_clk_get_enabled()
	i2c: nomadik: Remove a useless call in the remove function
	MIPS: Loongson: Move arch cflags to MIPS top level Makefile
	MIPS: Loongson: Fix build error when make modules_install
	PCI/ASPM: Return 0 or -ETIMEDOUT from pcie_retrain_link()
	PCI/ASPM: Factor out pcie_wait_for_retrain()
	PCI/ASPM: Avoid link retraining race
	PCI: rockchip: Remove writes to unused registers
	PCI: rockchip: Fix window mapping and address translation for endpoint
	PCI: rockchip: Don't advertise MSI-X in PCIe capabilities
	drm/amd/display: add FB_DAMAGE_CLIPS support
	drm/amd/display: Check if link state is valid
	drm/amd/display: Rework context change check
	drm/amd/display: Enable new commit sequence only for DCN32x
	drm/amd/display: Copy DC context in the commit streams
	drm/amd/display: Include surface of unaffected streams
	drm/amd/display: Use min transition for all SubVP plane add/remove
	drm/amd/display: add ODM case when looking for first split pipe
	drm/amd/display: use low clocks for no plane configs
	drm/amd/display: fix unbounded requesting for high pixel rate modes on dcn315
	drm/amd/display: add pixel rate based CRB allocation support
	drm/amd/display: fix dcn315 single stream crb allocation
	drm/amd/display: Update correct DCN314 register header
	drm/amd/display: Set minimum requirement for using PSR-SU on Rembrandt
	drm/amd/display: Set minimum requirement for using PSR-SU on Phoenix
	drm/ttm: Don't print error message if eviction was interrupted
	drm/ttm: Don't leak a resource on eviction error
	n_tty: Rename tail to old_tail in n_tty_read()
	tty: fix hang on tty device with no_room set
	drm/ttm: never consider pinned BOs for eviction&swap
	KVM: arm64: Condition HW AF updates on config option
	arm64: errata: Mitigate Ampere1 erratum AC03_CPU_38 at stage-2
	mptcp: introduce 'sk' to replace 'sock->sk' in mptcp_listen()
	mptcp: do not rely on implicit state check in mptcp_listen()
	tracing/probes: Add symstr type for dynamic events
	tracing/probes: Fix to avoid double count of the string length on the array
	tracing: Allow synthetic events to pass around stacktraces
	Revert "tracing: Add "(fault)" name injection to kernel probes"
	tracing/probes: Fix to record 0-length data_loc in fetch_store_string*() if fails
	test_maple_tree: test modifications while iterating
	maple_tree: add __init and __exit to test module
	maple_tree: fix 32 bit mas_next testing
	drm/amd/display: Rework comments on dc file
	drm/amd/display: fix dc/core/dc.c kernel-doc
	drm/amd/display: Add FAMS validation before trying to use it
	drm/amd/display: update extended blank for dcn314 onwards
	drm/amd/display: Fix possible underflow for displays with large vblank
	drm/amd/display: Prevent vtotal from being set to 0
	phy: phy-mtk-dp: Fix an error code in probe()
	phy: qcom-snps: correct struct qcom_snps_hsphy kerneldoc
	phy: qcom-snps-femto-v2: keep cfg_ahb_clk enabled during runtime suspend
	phy: qcom-snps-femto-v2: properly enable ref clock
	soundwire: qcom: update status correctly with mask
	media: staging: atomisp: select V4L2_FWNODE
	media: amphion: Fix firmware path to match linux-firmware
	i40e: Fix an NULL vs IS_ERR() bug for debugfs_create_dir()
	iavf: fix potential deadlock on allocation failure
	iavf: check for removal state before IAVF_FLAG_PF_COMMS_FAILED
	net: phy: marvell10g: fix 88x3310 power up
	net: hns3: fix the imp capability bit cannot exceed 32 bits issue
	net: hns3: fix wrong tc bandwidth weight data issue
	net: hns3: fix wrong bw weight of disabled tc issue
	vxlan: calculate correct header length for GPE
	vxlan: generalize vxlan_parse_gpe_hdr and remove unused args
	vxlan: fix GRO with VXLAN-GPE
	phy: hisilicon: Fix an out of bounds check in hisi_inno_phy_probe()
	atheros: fix return value check in atl1_tso()
	ethernet: atheros: fix return value check in atl1e_tso_csum()
	ipv6 addrconf: fix bug where deleting a mngtmpaddr can create a new temporary address
	tcp: Reduce chance of collisions in inet6_hashfn().
	ice: Fix memory management in ice_ethtool_fdir.c
	bonding: reset bond's flags when down link is P2P device
	team: reset team's flags when down link is P2P device
	octeontx2-af: Removed unnecessary debug messages.
	octeontx2-af: Fix hash extraction enable configuration
	net: stmmac: Apply redundant write work around on 4.xx too
	platform/x86: msi-laptop: Fix rfkill out-of-sync on MSI Wind U100
	x86/traps: Fix load_unaligned_zeropad() handling for shared TDX memory
	igc: Fix Kernel Panic during ndo_tx_timeout callback
	netfilter: nft_set_rbtree: fix overlap expiration walk
	netfilter: nf_tables: skip immediate deactivate in _PREPARE_ERROR
	netfilter: nf_tables: disallow rule addition to bound chain via NFTA_RULE_CHAIN_ID
	mm: suppress mm fault logging if fatal signal already pending
	net/sched: mqprio: refactor nlattr parsing to a separate function
	net/sched: mqprio: add extack to mqprio_parse_nlattr()
	net/sched: mqprio: Add length check for TCA_MQPRIO_{MAX/MIN}_RATE64
	benet: fix return value check in be_lancer_xmit_workarounds()
	tipc: check return value of pskb_trim()
	tipc: stop tipc crypto on failure in tipc_node_create
	RDMA/mlx4: Make check for invalid flags stricter
	drm/msm/dpu: drop enum dpu_core_perf_data_bus_id
	drm/msm/adreno: Fix snapshot BINDLESS_DATA size
	RDMA/irdma: Add missing read barriers
	RDMA/irdma: Fix data race on CQP completion stats
	RDMA/irdma: Fix data race on CQP request done
	RDMA/mthca: Fix crash when polling CQ for shared QPs
	RDMA/bnxt_re: Prevent handling any completions after qp destroy
	drm/msm: Fix IS_ERR_OR_NULL() vs NULL check in a5xx_submit_in_rb()
	cxl/acpi: Fix a use-after-free in cxl_parse_cfmws()
	cxl/acpi: Return 'rc' instead of '0' in cxl_parse_cfmws()
	ASoC: fsl_spdif: Silence output on stop
	block: Fix a source code comment in include/uapi/linux/blkzoned.h
	smb3: do not set NTLMSSP_VERSION flag for negotiate not auth request
	drm/i915: Fix an error handling path in igt_write_huge()
	xenbus: check xen_domain in xenbus_probe_initcall
	dm raid: fix missing reconfig_mutex unlock in raid_ctr() error paths
	dm raid: clean up four equivalent goto tags in raid_ctr()
	dm raid: protect md_stop() with 'reconfig_mutex'
	drm/amd: Fix an error handling mistake in psp_sw_init()
	drm/amd/display: Unlock on error path in dm_handle_mst_sideband_msg_ready_event()
	RDMA/irdma: Fix op_type reporting in CQEs
	RDMA/irdma: Report correct WC error
	drm/msm: Switch idr_lock to spinlock
	drm/msm: Disallow submit with fence id 0
	ublk_drv: move ublk_get_device_from_id into ublk_ctrl_uring_cmd
	ublk: fail to start device if queue setup is interrupted
	ublk: fail to recover device if queue setup is interrupted
	ata: pata_ns87415: mark ns87560_tf_read static
	ring-buffer: Fix wrong stat of cpu_buffer->read
	tracing: Fix warning in trace_buffered_event_disable()
	Revert "usb: gadget: tegra-xudc: Fix error check in tegra_xudc_powerdomain_init()"
	usb: gadget: call usb_gadget_check_config() to verify UDC capability
	USB: gadget: Fix the memory leak in raw_gadget driver
	usb: gadget: core: remove unbalanced mutex_unlock in usb_gadget_activate
	KVM: Grab a reference to KVM for VM and vCPU stats file descriptors
	KVM: VMX: Don't fudge CR0 and CR4 for restricted L2 guest
	KVM: x86: Disallow KVM_SET_SREGS{2} if incoming CR0 is invalid
	serial: qcom-geni: drop bogus runtime pm state update
	serial: 8250_dw: Preserve original value of DLF register
	serial: sifive: Fix sifive_serial_console_setup() section
	USB: serial: option: support Quectel EM060K_128
	USB: serial: option: add Quectel EC200A module support
	USB: serial: simple: add Kaufmann RKS+CAN VCP
	USB: serial: simple: sort driver entries
	can: gs_usb: gs_can_close(): add missing set of CAN state to CAN_STATE_STOPPED
	usb: typec: Set port->pd before adding device for typec_port
	usb: typec: Iterate pds array when showing the pd list
	usb: typec: Use sysfs_emit_at when concatenating the string
	Revert "usb: dwc3: core: Enable AutoRetry feature in the controller"
	usb: dwc3: pci: skip BYT GPIO lookup table for hardwired phy
	usb: dwc3: don't reset device side if dwc3 was configured as host-only
	usb: misc: ehset: fix wrong if condition
	usb: ohci-at91: Fix the unhandle interrupt when resume
	USB: quirks: add quirk for Focusrite Scarlett
	usb: cdns3: fix incorrect calculation of ep_buf_size when more than one config
	usb: xhci-mtk: set the dma max_seg_size
	Revert "usb: xhci: tegra: Fix error check"
	Documentation: security-bugs.rst: update preferences when dealing with the linux-distros group
	Documentation: security-bugs.rst: clarify CVE handling
	staging: r8712: Fix memory leak in _r8712_init_xmit_priv()
	staging: ks7010: potential buffer overflow in ks_wlan_set_encode_ext()
	tty: n_gsm: fix UAF in gsm_cleanup_mux
	Revert "xhci: add quirk for host controllers that don't update endpoint DCS"
	ALSA: hda/realtek: Support ASUS G713PV laptop
	ALSA: hda/relatek: Enable Mute LED on HP 250 G8
	hwmon: (k10temp) Enable AMD3255 Proc to show negative temperature
	hwmon: (nct7802) Fix for temp6 (PECI1) processed even if PECI1 disabled
	btrfs: account block group tree when calculating global reserve size
	btrfs: check if the transaction was aborted at btrfs_wait_for_commit()
	btrfs: check for commit error at btrfs_attach_transaction_barrier()
	x86/MCE/AMD: Decrement threshold_bank refcount when removing threshold blocks
	file: always lock position for FMODE_ATOMIC_POS
	nfsd: Remove incorrect check in nfsd4_validate_stateid
	ACPI/IORT: Remove erroneous id_count check in iort_node_get_rmr_info()
	tpm_tis: Explicitly check for error code
	irq-bcm6345-l1: Do not assume a fixed block to cpu mapping
	irqchip/gic-v4.1: Properly lock VPEs when doing a directLPI invalidation
	locking/rtmutex: Fix task->pi_waiters integrity
	proc/vmcore: fix signedness bug in read_from_oldmem()
	xen: speed up grant-table reclaim
	virtio-net: fix race between set queues and probe
	net: dsa: qca8k: fix search_and_insert wrong handling of new rule
	net: dsa: qca8k: fix broken search_and_del
	net: dsa: qca8k: fix mdb add/del case with 0 VID
	selftests: mptcp: join: only check for ip6tables if needed
	soundwire: fix enumeration completion
	Revert "um: Use swap() to make code cleaner"
	LoongArch: BPF: Fix check condition to call lu32id in move_imm()
	LoongArch: BPF: Enable bpf_probe_read{, str}() on LoongArch
	s390/dasd: fix hanging device after quiesce/resume
	s390/dasd: print copy pair message only for the correct error
	ASoC: wm8904: Fill the cache for WM8904_ADC_TEST_0 register
	arm64/sme: Set new vector length before reallocating
	PM: sleep: wakeirq: fix wake irq arming
	ceph: never send metrics if disable_send_metrics is set
	drm/i915/dpt: Use shmem for dpt objects
	dm cache policy smq: ensure IO doesn't prevent cleaner policy progress
	rbd: make get_lock_owner_info() return a single locker or NULL
	rbd: harden get_lock_owner_info() a bit
	rbd: retrieve and check lock owner twice before blocklisting
	drm/amd/display: set per pipe dppclk to 0 when dpp is off
	tracing: Fix trace_event_raw_event_synth() if else statement
	drm/amd/display: perform a bounds check before filling dirty rectangles
	drm/amd/display: Write to correct dirty_rect
	ACPI: processor: perflib: Use the "no limit" frequency QoS
	ACPI: processor: perflib: Avoid updating frequency QoS unnecessarily
	cpufreq: intel_pstate: Drop ACPI _PSS states table patching
	mptcp: ensure subflow is unhashed before cleaning the backlog
	selftests: mptcp: sockopt: use 'iptables-legacy' if available
	test_firmware: return ENOMEM instead of ENOSPC on failed memory allocation
	dma-buf: keep the signaling time of merged fences v3
	dma-buf: fix an error pointer vs NULL bug
	Linux 6.1.43

Change-Id: Id1d61f2351c51edad33ab654f1f3d911b9a75830
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2023-09-12 12:36:39 +00:00
Greg Kroah-Hartman
8b02e8901d Merge branch 'android14-6.1' into 'android14-6.1-lts'
Catches the android14-6.1-lts branch up with the android14-6.1 branch
which has had a lot of changes that are needed here to resolve future
LTS merges and to ensure that the ABI is kept stable.

It contains the following commits:

* 9fd41ac172 ANDROID: Delete build.config.gki.aarch64.16k.
* 073df44c36 FROMGIT: usb: typec: tcpm: Refactor the PPS APDO selection
* 078410e73f UPSTREAM: usb: typec: tcpm: Fix response to vsafe0V event
* 722f6cc09c ANDROID: Revert "ANDROID: allmodconfig: disable WERROR"
* c2611a04b9 ANDROID: GKI: update symbol list file for xiaomi
* 34fde9ec08 FROMGIT: usb: typec: tcpm: not sink vbus if operational current is 0mA
* 3ebafb7b46 BACKPORT: FROMGIT: mm: handle faults that merely update the accessed bit under the VMA lock
* 9e066d4b35 FROMLIST: mm: Allow fault_dirty_shared_page() to be called under the VMA lock
* 83ab986324 FROMGIT: mm: handle swap and NUMA PTE faults under the VMA lock
* ffcebdef16 FROMGIT: mm: run the fault-around code under the VMA lock
* 072c35fb69 FROMGIT: mm: move FAULT_FLAG_VMA_LOCK check down from do_fault()
* fa9a8adff0 FROMGIT: mm: move FAULT_FLAG_VMA_LOCK check down in handle_pte_fault()
* dd621869c1 BACKPORT: FROMGIT: mm: handle some PMD faults under the VMA lock
* 8594d6a30f BACKPORT: FROMGIT: mm: handle PUD faults under the VMA lock
* 66cbbe6b31 FROMGIT: mm: move FAULT_FLAG_VMA_LOCK check from handle_mm_fault()
* e26044769f BACKPORT: FROMGIT: mm: allow per-VMA locks on file-backed VMAs
* 4cb518a06f FROMGIT: mm: remove CONFIG_PER_VMA_LOCK ifdefs
* f4b32b7f15 FROMGIT: mm: fix a lockdep issue in vma_assert_write_locked
* 250f19771f FROMGIT: mm: handle userfaults under VMA lock
* e704d0e4f9 FROMGIT: mm: handle swap page faults under per-VMA lock
* f8a65b694b FROMGIT: mm: change folio_lock_or_retry to use vm_fault directly
* 693d905ec0 BACKPORT: FROMGIT: mm: drop per-VMA lock when returning VM_FAULT_RETRY or VM_FAULT_COMPLETED
* 939d4b1ccc BACKPORT: FROMGIT: mm: move vma locking out of vma_prepare and dup_anon_vma
* 0f0b09c02c BACKPORT: FROMGIT: mm: always lock new vma before inserting into vma tree
* a8a479ed96 FROMGIT: mm: lock vma explicitly before doing vm_flags_reset and vm_flags_reset_once
* ad18923856 FROMGIT: mm: replace mmap with vma write lock assertions when operating on a vma
* 5f0ca924aa FROMGIT: mm: for !CONFIG_PER_VMA_LOCK equate write lock assertion for vma and mmap
* abb0f2767e FROMGIT: mm: don't drop VMA locks in mm_drop_all_locks()
* 365af746f5 BACKPORT: riscv: mm: try VMA lock-based page fault handling first
* 3c187b4a12 BACKPORT: FROMGIT: mm: enable page walking API to lock vmas during the walk
* b6093c47fe BACKPORT: mm: lock VMA in dup_anon_vma() before setting ->anon_vma
* 0ee0062c94 UPSTREAM: mm: fix memory ordering for mm_lock_seq and vm_lock_seq
* 3378cbd264 FROMGIT: usb: host: ehci-sched: try to turn on io watchdog as long as periodic_count > 0
* 2d3351bd5e FROMGIT: BACKPORT: usb: ehci: add workaround for chipidea PORTSC.PEC bug
* 7fa8861130 UPSTREAM: tty: n_gsm: fix UAF in gsm_cleanup_mux
* 683966ac69 UPSTREAM: mm/mmap: Fix extra maple tree write
* f86c79eb86 FROMGIT: Multi-gen LRU: skip CMA pages when they are not eligible
* 7ae1e02abb UPSTREAM: mm: skip CMA pages when they are not available
* 7666325265 UPSTREAM: dma-buf: fix an error pointer vs NULL bug
* e61d76121f UPSTREAM: dma-buf: keep the signaling time of merged fences v3
* fda157ce15 UPSTREAM: netfilter: nf_tables: skip bound chain on rule flush
* 110a26edd1 UPSTREAM: net/sched: sch_qfq: account for stab overhead in qfq_enqueue
* 9db1437238 UPSTREAM: net/sched: sch_qfq: refactor parsing of netlink parameters
* 7688102949 UPSTREAM: netfilter: nft_set_pipapo: fix improper element removal
* 37f4509407 ANDROID: Add checkpatch target.
* d7dacaa439 UPSTREAM: USB: Gadget: core: Help prevent panic during UVC unconfigure
* 4dc009c3a8 ANDROID: GKI: Update symbols to symbol list
* fadc35923d ANDROID: vendor_hook: fix the error record position of mutex
* 3fc69d3f70 ANDROID: ABI: add allowed list for galaxy
* a5a662187f ANDROID: gfp: add __GFP_CMA in gfpflag_names
* b520b90913 ANDROID: ABI: Update to fix slab-out-of-bounds in xhci_vendor_get_ops
* c2cbb3cc24 ANDROID: usb: host: fix slab-out-of-bounds in xhci_vendor_get_ops
* 64787ee451 ANDROID: GKI: update pixel symbol list for xhci
* b0c06048a8 FROMGIT: fs: drop_caches: draining pages before dropping caches
* 2f76bb83b1 ANDROID: GKI: update symbol list file for xiaomi
* 8e86825eec ANDROID: uid_sys_stats: Use a single work for deferred updates
* 960d9828ee ANDROID: ABI: Update symbol for Exynos SoC
* 3926cc6ef8 ANDROID: GKI: Add symbols to symbol list for vivo
* dbb09068c1 ANDROID: vendor_hooks: Add tune scan type hook in get_scan_count()
* 5e1d25ac2a FROMGIT: BACKPORT: Multi-gen LRU: Fix can_swap in lru_gen_look_around()
* addf1a9a65 FROMGIT: Multi-gen LRU: Avoid race in inc_min_seq()
* a7adb98897 FROMGIT: Multi-gen LRU: Fix per-zone reclaim
* 03812b904e ANDROID: ABI: update symbol list for galaxy
* b283f9b41f ANDROID: oplus: Update the ABI xml and symbol list
* c3d26e2b5a ANDROID: vendor_hooks: Add hooks for lookaround
* 29e2f3e3d1 ANDROID: ABI: Update STG ABI to format version 2
* 3bd3d13701 ANDROID: ABI: Update symbol list for imx
* ad0b008167 FROMGIT: erofs: fix wrong primary bvec selection on deduplicated extents
* 126ef64cba UPSTREAM: media: Add ABGR64_12 video format
* 86e2e8fd05 BACKPORT: media: Add BGR48_12 video format
* 892293272c UPSTREAM: media: Add YUV48_12 video format
* b2cf7e4268 UPSTREAM: media: Add Y212 v4l2 format info
* 0f3f7a21af UPSTREAM: media: Add Y210, Y212 and Y216 formats
* ca7b45b128 UPSTREAM: media: Add Y012 video format
* 343b85ecad UPSTREAM: media: Add P012 and P012M video format
* 7beed73af0 ANDROID: GKI: Create symbol files in include/config
* 295e779e8f ANDROID: fuse-bpf: Use stored bpf for create_open
* 74d9daa59a ANDROID: fuse-bpf: Add bpf to negative fuse_dentry
* 6aef06abba ANDROID: fuse-bpf: Check inode not null
* 4bbda90bd8 ANDROID: fuse-bpf: Fix flock test compile error
* 84ac22a0d3 ANDROID: fuse-bpf: Add partial ioctl support
* e341d2312c ANDROID: ABI: Update oplus symbol list
* f5c707dc65 UPSTREAM: mm/mempolicy: Take VMA lock before replacing policy
* 890b1aabb1 BACKPORT: mm: lock_vma_under_rcu() must check vma->anon_vma under vma lock
* d3b37a712a BACKPORT: FROMGIT: irqchip/gic-v3: Workaround for GIC-700 erratum 2941627
* a89e2cbbc0 ANDROID: GKI: update xiaomi symbol list
* 371f8d901a UPSTREAM: mm: lock newly mapped VMA with corrected ordering
* 0d9960403c UPSTREAM: fork: lock VMAs of the parent process when forking
* e3601b25ae UPSTREAM: mm: lock newly mapped VMA which can be modified after it becomes visible
* 05f7c7fe72 UPSTREAM: mm: lock a vma before stack expansion
* c0ba567af1 ANDROID: GKI: bring back find_extend_vma()
* 188ce9572f BACKPORT: mm: always expand the stack with the mmap write lock held
* 74efdc0966 BACKPORT: execve: expand new process stack manually ahead of time
* c8ad906849 ANDROID: abi_gki_aarch64_qcom: ufshcd_mcq_poll_cqe_lock
* 1afccd4255 UPSTREAM: mm: make find_extend_vma() fail if write lock not held
* 4087cac574 UPSTREAM: powerpc/mm: convert coprocessor fault to lock_mm_and_find_vma()
* 6c33246824 UPSTREAM: mm/fault: convert remaining simple cases to lock_mm_and_find_vma()
* add0a1ea04 UPSTREAM: arm/mm: Convert to using lock_mm_and_find_vma()
* 9f136450af UPSTREAM: riscv/mm: Convert to using lock_mm_and_find_vma()
* 053053fc68 UPSTREAM: mips/mm: Convert to using lock_mm_and_find_vma()
* 9cdce804c0 UPSTREAM: powerpc/mm: Convert to using lock_mm_and_find_vma()
* 1016faf509 BACKPORT: arch/arm64/mm/fault: Fix undeclared variable error in do_page_fault()
* 89298b8b3c BACKPORT: arm64/mm: Convert to using lock_mm_and_find_vma()
* cf70cb4f1f UPSTREAM: mm: make the page fault mmap locking killable
* 544ae28cf6 ANDROID: Inherit "user-aware property" across rtmutex.
* 5e4a5dc820 BACKPORT: blk-crypto: use dynamic lock class for blk_crypto_profile::lock
* db2c29e53d ANDROID: ABI: update symbol list for Xclipse GPU
* 7edb035c79 ANDROID: drm/ttm: export ttm_tt_unpopulate()
* b61f298c0d ANDROID: GKI: Add ABI symbol list(devlink) for MTK
* ec419af28f ANDROID: devlink: Select CONFIG_NET_DEVLINK in Kconfig.gki
* 1e114e6efa ANDROID: KVM: arm64: Fix memory ordering for pKVM module callbacks
* 3803ae4a28 BACKPORT: mm: introduce new 'lock_mm_and_find_vma()' page fault helper
* 66b5ad3507 BACKPORT: maple_tree: fix potential out-of-bounds access in mas_wr_end_piv()
* 19dd4101e0 UPSTREAM: x86/smp: Cure kexec() vs. mwait_play_dead() breakage
* 26260c4bd1 UPSTREAM: x86/smp: Use dedicated cache-line for mwait_play_dead()
* d8cb0365cb UPSTREAM: x86/smp: Remove pointless wmb()s from native_stop_other_cpus()
* 6744547e95 UPSTREAM: x86/smp: Dont access non-existing CPUID leaf
* ba2ccba863 UPSTREAM: x86/smp: Make stop_other_cpus() more robust
* 5c9836e66d UPSTREAM: x86/microcode/AMD: Load late on both threads too
* 53048f151c BACKPORT: mm, hwpoison: when copy-on-write hits poison, take page offline
* a2dff37b0c UPSTREAM: mm, hwpoison: try to recover from copy-on write faults
* 466448f55f BACKPORT: mm/mmap: Fix error return in do_vmi_align_munmap()
* 41b30362e9 BACKPORT: mm/mmap: Fix error path in do_vmi_align_munmap()
* d45a054f9c UPSTREAM: HID: logitech-hidpp: add HIDPP_QUIRK_DELAYED_INIT for the T651.
* 0e477a82e6 UPSTREAM: HID: hidraw: fix data race on device refcount
* af2d741bf3 UPSTREAM: can: isotp: isotp_sendmsg(): fix return error fix on TX path
* 5887040491 UPSTREAM: fbdev: fix potential OOB read in fast_imageblit()
* 6c48edb9c9 ANDROID: GKI: add function symbols for unisoc
* 342aff08ae ANDROID: cgroup: Cleanup android_rvh_cgroup_force_kthread_migration
* fcdea346bb UPSTREAM: net/sched: cls_fw: Fix improper refcount update leads to use-after-free
* f091cc7434 UPSTREAM: netfilter: nf_tables: fix chain binding transaction logic
* 1bb5e7fb37 ANDROID: abi_gki_aarch64_qcom: update abi

Change-Id: I6f86301f218a60c00d03e09a4e3bfebe42bad0d5
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2023-08-23 18:31:43 +00:00
Greg Kroah-Hartman
ed2f8701fb Revert "loongarch/cpu: Switch to arch_cpu_finalize_init()"
This reverts commit 08e86d42e2 which is
commit 9841c423164787feb8f1442f922b7d80a70c82f1 upstream.

As Gunter reports:
	Building loongarch:defconfig ... failed
	--------------
	Error log:
	<stdin>:569:2: warning: #warning syscall fstat not implemented [-Wcpp]
	arch/loongarch/kernel/setup.c: In function 'arch_cpu_finalize_init':
	arch/loongarch/kernel/setup.c:86:9: error: implicit declaration of function 'alternative_instructions'

	Actually introduced in v6.1.44 with commit 08e86d42e2 ("loongarch/cpu:
	Switch to arch_cpu_finalize_init()"). Alternative instruction support
	was only introduced for loongarch in v6.2 with commit 19e5eb15b00c
	("LoongArch: Add alternative runtime patching mechanism").

So revert it from 6.1.y.

Reported-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/fcd7b764-9047-22ba-a040-41b6ff99959c@roeck-us.net
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Daniel Sneddon <daniel.sneddon@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-08-16 18:27:20 +02:00
Thomas Gleixner
08e86d42e2 loongarch/cpu: Switch to arch_cpu_finalize_init()
commit 9841c423164787feb8f1442f922b7d80a70c82f1 upstream

check_bugs() is about to be phased out. Switch over to the new
arch_cpu_finalize_init() implementation.

No functional change.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20230613224545.195288218@linutronix.de
Signed-off-by: Daniel Sneddon <daniel.sneddon@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-08-08 20:03:46 +02:00
Chenguang Zhao
2b58bd3847 LoongArch: BPF: Enable bpf_probe_read{, str}() on LoongArch
commit de0e30bee86d0f99c696a1fea34474e556a946ec upstream.

Currently nettrace does not work on LoongArch due to missing
bpf_probe_read{,str}() support, with the error message:

     ERROR: failed to load kprobe-based eBPF
     ERROR: failed to load kprobe-based bpf

According to commit 0ebeea8ca8 ("bpf: Restrict bpf_probe_read{,
str}() only to archs where they work"), we only need to select
CONFIG_ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE to add said support,
because LoongArch does have non-overlapping address ranges for kernel
and userspace.

Cc: stable@vger.kernel.org # 6.1
Signed-off-by: Chenguang Zhao <zhaochenguang@kylinos.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-08-03 10:24:16 +02:00
Tiezhu Yang
8a5e0c1f71 LoongArch: BPF: Fix check condition to call lu32id in move_imm()
commit 4eece7e6de94d833c8aeed2f438faf487cbf94ff upstream.

As the code comment says, the initial aim is to reduce one instruction
in some corner cases, if bit[51:31] is all 0 or all 1, no need to call
lu32id. That is to say, it should call lu32id only if bit[51:31] is not
all 0 and not all 1. The current code always call lu32id, the result is
right but the logic is unexpected and wrong, fix it.

Cc: stable@vger.kernel.org # 6.1
Fixes: 5dc615520c ("LoongArch: Add BPF JIT support")
Reported-by: Colin King (gmail) <colin.i.king@gmail.com>
Closes: https://lore.kernel.org/all/bcf97046-e336-712a-ac68-7fd194f2953e@gmail.com/
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-08-03 10:24:15 +02:00
Linus Torvalds
6c33246824 UPSTREAM: mm/fault: convert remaining simple cases to lock_mm_and_find_vma()
commit a050ba1e7422f2cc60ff8bfde3f96d34d00cb585 upstream.

This does the simple pattern conversion of alpha, arc, csky, hexagon,
loongarch, nios2, sh, sparc32, and xtensa to the lock_mm_and_find_vma()
helper.  They all have the regular fault handling pattern without odd
special cases.

The remaining architectures all have something that keeps us from a
straightforward conversion: ia64 and parisc have stacks that can grow
both up as well as down (and ia64 has special address region checks).

And m68k, microblaze, openrisc, sparc64, and um end up having extra
rules about only expanding the stack down a limited amount below the
user space stack pointer.  That is something that x86 used to do too
(long long ago), and it probably could just be skipped, but it still
makes the conversion less than trivial.

Note that this conversion was done manually and with the exception of
alpha without any build testing, because I have a fairly limited cross-
building environment.  The cases are all simple, and I went through the
changes several times, but...

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Samuel Mendoza-Jonas <samjonas@amazon.com>
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Change-Id: I93e4ce3cb077329e202699a16db576be3a40285b
(cherry picked from commit a050ba1e7422f2cc60ff8bfde3f96d34d00cb585)
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2023-07-27 05:04:57 +00:00
Linus Torvalds
21ee33d51b mm/fault: convert remaining simple cases to lock_mm_and_find_vma()
commit a050ba1e7422f2cc60ff8bfde3f96d34d00cb585 upstream.

This does the simple pattern conversion of alpha, arc, csky, hexagon,
loongarch, nios2, sh, sparc32, and xtensa to the lock_mm_and_find_vma()
helper.  They all have the regular fault handling pattern without odd
special cases.

The remaining architectures all have something that keeps us from a
straightforward conversion: ia64 and parisc have stacks that can grow
both up as well as down (and ia64 has special address region checks).

And m68k, microblaze, openrisc, sparc64, and um end up having extra
rules about only expanding the stack down a limited amount below the
user space stack pointer.  That is something that x86 used to do too
(long long ago), and it probably could just be skipped, but it still
makes the conversion less than trivial.

Note that this conversion was done manually and with the exception of
alpha without any build testing, because I have a fairly limited cross-
building environment.  The cases are all simple, and I went through the
changes several times, but...

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Samuel Mendoza-Jonas <samjonas@amazon.com>
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-07-01 13:16:25 +02:00
Greg Kroah-Hartman
1e4b07ffa3 This is the 6.1.35 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmSTArUACgkQONu9yGCS
 aT7L1w//S9q9UHGxXd4awCjyj3doC4UMaMjH0b/BT8GmDM5lpbqqvWBgWe7zrvnK
 L/VOGj6pkgBuH7uBLmRVZKkRwnyFcxKnW+BwVxn3WFE5UjCBrxqjry228Wp9FCR9
 i/4C/6ls+vA+Ll2GkvSVogPkTwtC1A8hsI6r4qQMbNyeTySd9SF6nfo3uR2olBW6
 UN3NdIY6Lzo7t/Jbn+4zLhgDbQ28bn3IymS8jPAFQBoRHNOeKh6UFEu7Mzjbn6Nb
 YrcHxr4/xAjnof7JV1JZOVVA2BoUCIStB4INv6Ke9XucIs8Y0UzU7MeeqPLh1lBO
 aKhGADdO3shj0OGsLfmzfYlGu5+5lQ3yFN8ZVTzQTYTZUFLnddUjB3a/DwKR0Nza
 A6LjUID2jRmoNtMWDHlX9Wqyv5iuIzl2hqs2jGc3o/EHAQ2IFlMMee+mjkEqmalO
 iRyCt5Ekr/P8MrTQHPcJ26uPh+TGvcooBSGSKu6WNFozNQ7sxSl7QJONLMs0tUtk
 JzcTxw7cAtbxcsfDX0k3z2Mp6d1YuQvwo22mVYioO7+nhB6MaRNVPkhbVf3koMeD
 lB/ISmr8Lv4CZLS4xYUlYHQyPGT+YTkLpbncV+WQe4+9ounbuz71tKpoB7XbBVgY
 52Qc9aLAAKi8yyFbNRoxWo98RXx5fWTzQMMqM2N2KExsF75EW/k=
 =/x/n
 -----END PGP SIGNATURE-----

Merge 6.1.35 into android14-6.1-lts

Changes in 6.1.35
	x86/head/64: Switch to KERNEL_CS as soon as new GDT is installed
	test_firmware: Use kstrtobool() instead of strtobool()
	test_firmware: prevent race conditions by a correct implementation of locking
	cgroup: bpf: use cgroup_lock()/cgroup_unlock() wrappers
	cgroup: always put cset in cgroup_css_set_put_fork
	cgroup: fix missing cpus_read_{lock,unlock}() in cgroup_transfer_tasks()
	qcom: llcc/edac: Fix the base address used for accessing LLCC banks
	EDAC/qcom: Get rid of hardcoded register offsets
	ksmbd: validate smb request protocol id
	of: overlay: Fix missing of_node_put() in error case of init_overlay_changeset()
	power: supply: ab8500: Fix external_power_changed race
	power: supply: sc27xx: Fix external_power_changed race
	power: supply: bq27xxx: Use mod_delayed_work() instead of cancel() + schedule()
	ARM: dts: vexpress: add missing cache properties
	tools: gpio: fix debounce_period_us output of lsgpio
	selftests: gpio: gpio-sim: Fix BUG: test FAILED due to recent change
	power: supply: Ratelimit no data debug output
	PCI/DPC: Quirk PIO log size for Intel Ice Lake Root Ports
	platform/x86: asus-wmi: Ignore WMI events with codes 0x7B, 0xC0
	regulator: Fix error checking for debugfs_create_dir
	irqchip/gic-v3: Disable pseudo NMIs on Mediatek devices w/ firmware issues
	irqchip/meson-gpio: Mark OF related data as maybe unused
	power: supply: Fix logic checking if system is running from battery
	drm: panel-orientation-quirks: Change Air's quirk to support Air Plus
	btrfs: scrub: try harder to mark RAID56 block groups read-only
	btrfs: handle memory allocation failure in btrfs_csum_one_bio
	ASoC: soc-pcm: test if a BE can be prepared
	ASoC: Intel: avs: Account for UID of ACPI device
	ASoC: Intel: avs: Add missing checks on FE startup
	parisc: Improve cache flushing for PCXL in arch_sync_dma_for_cpu()
	parisc: Flush gatt writes and adjust gatt mask in parisc_agp_mask_memory()
	MIPS: unhide PATA_PLATFORM
	MIPS: Restore Au1300 support
	MIPS: Alchemy: fix dbdma2
	mips: Move initrd_start check after initrd address sanitisation.
	ASoC: cs35l41: Fix default regmap values for some registers
	ASoC: dwc: move DMA init to snd_soc_dai_driver probe()
	xen/blkfront: Only check REQ_FUA for writes
	drm:amd:amdgpu: Fix missing buffer object unlock in failure path
	io_uring: unlock sqd->lock before sq thread release CPU
	NVMe: Add MAXIO 1602 to bogus nid list.
	irqchip/gic: Correctly validate OF quirk descriptors
	wifi: cfg80211: fix locking in regulatory disconnect
	wifi: cfg80211: fix double lock bug in reg_wdev_chan_valid()
	epoll: ep_autoremove_wake_function should use list_del_init_careful
	ocfs2: fix use-after-free when unmounting read-only filesystem
	ocfs2: check new file size on fallocate call
	zswap: do not shrink if cgroup may not zswap
	nios2: dts: Fix tse_mac "max-frame-size" property
	nilfs2: fix incomplete buffer cleanup in nilfs_btnode_abort_change_key()
	nilfs2: fix possible out-of-bounds segment allocation in resize ioctl
	nilfs2: reject devices with insufficient block count
	LoongArch: Fix perf event id calculation
	io_uring/net: save msghdr->msg_control for retries
	kexec: support purgatories with .text.hot sections
	x86/purgatory: remove PGO flags
	riscv/purgatory: remove PGO flags
	powerpc/purgatory: remove PGO flags
	btrfs: do not ASSERT() on duplicated global roots
	btrfs: fix iomap_begin length for nocow writes
	btrfs: can_nocow_file_extent should pass down args->strict from callers
	ALSA: usb-audio: Fix broken resume due to UAC3 power state
	ALSA: usb-audio: Add quirk flag for HEM devices to enable native DSD playback
	dm thin metadata: check fail_io before using data_sm
	dm thin: fix issue_discard to pass GFP_NOIO to __blkdev_issue_discard
	net: ethernet: stmicro: stmmac: fix possible memory leak in __stmmac_open
	nouveau: fix client work fence deletion race
	RDMA/uverbs: Restrict usage of privileged QKEYs
	drm/amdgpu: vcn_4_0 set instance 0 init sched score to 1
	net: usb: qmi_wwan: add support for Compal RXM-G1
	drm/amd/display: edp do not add non-edid timings
	drm/amd: Make sure image is written to trigger VBIOS image update flow
	drm/amd: Tighten permissions on VBIOS flashing attributes
	drm/amd/pm: workaround for compute workload type on some skus
	drm/amdgpu: add missing radeon secondary PCI ID
	ALSA: hda/realtek: Add a quirk for Compaq N14JP6
	thunderbolt: Do not touch CL state configuration during discovery
	thunderbolt: dma_test: Use correct value for absent rings when creating paths
	thunderbolt: Mask ring interrupt on Intel hardware as well
	clk: pxa: fix NULL pointer dereference in pxa3xx_clk_update_accr
	USB: serial: option: add Quectel EM061KGL series
	serial: lantiq: add missing interrupt ack
	usb: typec: ucsi: Fix command cancellation
	usb: typec: Fix fast_role_swap_current show function
	usb: gadget: udc: core: Offload usb_udc_vbus_handler processing
	usb: gadget: udc: core: Prevent soft_connect_store() race
	USB: dwc3: qcom: fix NULL-deref on suspend
	USB: dwc3: fix use-after-free on core driver unbind
	usb: dwc3: gadget: Reset num TRBs before giving back the request
	RDMA/rtrs: Fix the last iu->buf leak in err path
	RDMA/rtrs: Fix rxe_dealloc_pd warning
	RDMA/rxe: Fix packet length checks
	RDMA/rxe: Fix ref count error in check_rkey()
	spi: cadence-quadspi: Add missing check for dma_set_mask
	spi: fsl-dspi: avoid SCK glitches with continuous transfers
	netfilter: nf_tables: integrate pipapo into commit protocol
	netfilter: nfnetlink: skip error delivery on batch in case of ENOMEM
	ice: Fix XDP memory leak when NIC is brought up and down
	netfilter: nf_tables: incorrect error path handling with NFT_MSG_NEWRULE
	net: enetc: correct the indexes of highest and 2nd highest TCs
	ping6: Fix send to link-local addresses with VRF.
	igb: Fix extts capture value format for 82580/i354/i350
	net/sched: simplify tcf_pedit_act
	net/sched: act_pedit: remove extra check for key type
	net/sched: act_pedit: Parse L3 Header for L4 offset
	octeontx2-af: Fix promiscuous mode
	net/sched: cls_u32: Fix reference counter leak leading to overflow
	wifi: mac80211: fix link activation settings order
	wifi: cfg80211: fix link del callback to call correct handler
	wifi: mac80211: take lock before setting vif links
	RDMA/rxe: Removed unused name from rxe_task struct
	RDMA/rxe: Fix the use-before-initialization error of resp_pkts
	iavf: remove mask from iavf_irq_enable_queues()
	octeontx2-af: fixed resource availability check
	octeontx2-af: fix lbk link credits on cn10k
	RDMA/mlx5: Initiate dropless RQ for RAW Ethernet functions
	RDMA/mlx5: Create an indirect flow table for steering anchor
	RDMA/cma: Always set static rate to 0 for RoCE
	IB/uverbs: Fix to consider event queue closing also upon non-blocking mode
	RDMA/mlx5: Fix affinity assignment
	IB/isert: Fix dead lock in ib_isert
	IB/isert: Fix possible list corruption in CMA handler
	IB/isert: Fix incorrect release of isert connection
	net: ethtool: correct MAX attribute value for stats
	ipvlan: fix bound dev checking for IPv6 l3s mode
	sctp: fix an error code in sctp_sf_eat_auth()
	igc: Clean the TX buffer and TX descriptor ring
	igc: Fix possible system crash when loading module
	igb: fix nvm.ops.read() error handling
	net: phylink: report correct max speed for QUSGMII
	net: phylink: use a dedicated helper to parse usgmii control word
	drm/nouveau: don't detect DSM for non-NVIDIA device
	drm/bridge: ti-sn65dsi86: Avoid possible buffer overflow
	drm/nouveau/dp: check for NULL nv_connector->native_mode
	drm/nouveau: add nv_encoder pointer check for NULL
	selftests/tc-testing: Fix Error: Specified qdisc kind is unknown.
	selftests/tc-testing: Fix Error: failed to find target LOG
	selftests/tc-testing: Fix SFB db test
	sched: add new attr TCA_EXT_WARN_MSG to report tc extact message
	net/sched: Refactor qdisc_graft() for ingress and clsact Qdiscs
	net/sched: qdisc_destroy() old ingress and clsact Qdiscs before grafting
	selftests: forwarding: hw_stats_l3: Set addrgenmode in a separate step
	cifs: fix lease break oops in xfstest generic/098
	ext4: drop the call to ext4_error() from ext4_get_group_info()
	net/sched: cls_api: Fix lockup on flushing explicitly created chain
	net: dsa: felix: fix taprio guard band overflow at 10Mbps with jumbo frames
	net: lapbether: only support ethernet devices
	net: macsec: fix double free of percpu stats
	sfc: fix XDP queues mode with legacy IRQ
	dm: don't lock fs when the map is NULL during suspend or resume
	net: tipc: resize nlattr array to correct size
	selftests/ptp: Fix timestamp printf format for PTP_SYS_OFFSET
	octeon_ep: Add missing check for ioremap
	afs: Fix vlserver probe RTT handling
	parisc: Delete redundant register definitions in <asm/assembly.h>
	rcu/kvfree: Avoid freeing new kfree_rcu() memory after old grace period
	drm/amdgpu: Don't set struct drm_driver.output_poll_changed
	net/sched: act_api: move TCA_EXT_WARN_MSG to the correct hierarchy
	Revert "net/sched: act_api: move TCA_EXT_WARN_MSG to the correct hierarchy"
	net/sched: act_api: add specific EXT_WARN_MSG for tc action
	neighbour: delete neigh_lookup_nodev as not used
	scsi: target: core: Fix error path in target_setup_session()
	x86/boot/compressed: prefer cc-option for CFLAGS additions
	MIPS: Move '-Wa,-msoft-float' check from as-option to cc-option
	MIPS: Prefer cc-option for additions to cflags
	kbuild: Update assembler calls to use proper flags and language target
	Linux 6.1.35

Change-Id: Ib27a87c9bcf16c70a0f4dd567551c2ae44702a4b
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2023-06-21 18:23:46 +00:00
Huacai Chen
cffaa97ffb LoongArch: Fix perf event id calculation
commit 962369120d750cbc9c4dc492f32b4304669ff6aa upstream.

LoongArch PMCFG has 10bit event id rather than 8 bit, so fix it.

Cc: stable@vger.kernel.org
Signed-off-by: Jun Yi <yijun@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-06-21 16:00:54 +02:00
Suren Baghdasaryan
5dd0547a3e UPSTREAM: mm: replace vma->vm_flags direct modifications with modifier calls
Replace direct modifications to vma->vm_flags with calls to modifier
functions to be able to track flag changes and to keep vma locking
correctness.

[akpm@linux-foundation.org: fix drivers/misc/open-dice.c, per Hyeonggon Yoo]
Link: https://lkml.kernel.org/r/20230126193752.297968-5-surenb@google.com
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Acked-by: Michal Hocko <mhocko@suse.com>
Acked-by: Mel Gorman <mgorman@techsingularity.net>
Acked-by: Mike Rapoport (IBM) <rppt@kernel.org>
Acked-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Reviewed-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
Reviewed-by: Hyeonggon Yoo <42.hyeyoo@gmail.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Arjun Roy <arjunroy@google.com>
Cc: Axel Rasmussen <axelrasmussen@google.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Davidlohr Bueso <dave@stgolabs.net>
Cc: David Rientjes <rientjes@google.com>
Cc: Eric Dumazet <edumazet@google.com>
Cc: Greg Thelen <gthelen@google.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jann Horn <jannh@google.com>
Cc: Joel Fernandes <joelaf@google.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Kent Overstreet <kent.overstreet@linux.dev>
Cc: Laurent Dufour <ldufour@linux.ibm.com>
Cc: Lorenzo Stoakes <lstoakes@gmail.com>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Minchan Kim <minchan@google.com>
Cc: Paul E. McKenney <paulmck@kernel.org>
Cc: Peter Oskolkov <posk@google.com>
Cc: Peter Xu <peterx@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Punit Agrawal <punit.agrawal@bytedance.com>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Shakeel Butt <shakeelb@google.com>
Cc: Soheil Hassas Yeganeh <soheil@google.com>
Cc: Song Liu <songliubraving@fb.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Will Deacon <will@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

(cherry picked from commit 1c71222e5f2393b5ea1a41795c67589eea7e3490)

Bug: 161210518
Change-Id: Ifc352b487db109adab17dd33a83f5c7e68c0bbc6
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2023-06-07 14:24:57 +00:00
Huacai Chen
be100a8460 LoongArch: Mark 3 symbol exports as non-GPL
commit dce5ea1d0f45fa612f5760b88614a3f32bc75e3f upstream.

vm_map_base, empty_zero_page and invalid_pmd_table could be accessed
widely by some out-of-tree non-GPL but important file systems or drivers
(e.g. OpenZFS). Let's use EXPORT_SYMBOL() instead of EXPORT_SYMBOL_GPL()
to export them, so as to avoid build errors.

1, Details about vm_map_base:

This is a LoongArch-specific symbol and may be referenced through macros
PCI_IOBASE, VMALLOC_START and VMALLOC_END.

2, Details about empty_zero_page:

As it stands today, only 3 architectures export empty_zero_page as a GPL
symbol: IA64, LoongArch and MIPS. LoongArch gets the GPL export by
inheriting from MIPS, and the MIPS export was first introduced in commit
497d2adcbf ("[MIPS] Export empty_zero_page for sake of the ext4
module."). The IA64 export was similar: commit a7d57ecf42 ("[IA64]
Export three symbols for module use") did so for kvm.

In both IA64 and MIPS, the export of empty_zero_page was done for
satisfying some in-kernel component built as module (kvm and ext4
respectively), and given its reasonably low-level nature, GPL is a
reasonable choice. But looking at the bigger picture it is evident most
other architectures do not regard it as GPL, so in effect the symbol
probably should not be treated as such, in favor of consistency.

3, Details about invalid_pmd_table:

Keep consistency with invalid_pte_table and make it be possible by some
modules.

Cc: stable@vger.kernel.org
Reviewed-by: WANG Xuerui <git@xen0n.name>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-04-26 14:28:38 +02:00
Huacai Chen
e82caab689 LoongArch: Fix probing of the CRC32 feature
commit df830336045db1246d3245d3737fee9939c5f731 upstream.

Not all LoongArch processors support CRC32 instructions. This feature
is indicated by CPUCFG1.CRC32 (Bit25) but it is wrongly defined in the
previous versions of the ISA manual (and so does in loongarch.h). The
CRC32 feature is set unconditionally now, so fix it.

BTW, expose the CRC32 feature in /proc/cpuinfo.

Cc: stable@vger.kernel.org
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-04-26 14:28:38 +02:00
George Guo
37b39345b9 LoongArch, bpf: Fix jit to skip speculation barrier opcode
[ Upstream commit a6f6a95f25803500079513780d11a911ce551d76 ]

Just skip the opcode(BPF_ST | BPF_NOSPEC) in the BPF JIT instead of
failing to JIT the entire program, given LoongArch currently has no
couterpart of a speculation barrier instruction. To verify the issue,
use the ltp testcase as shown below.

Also, Wang says:

  I can confirm there's currently no speculation barrier equivalent
  on LonogArch. (Loongson says there are builtin mitigations for
  Spectre-V1 and V2 on their chips, and AFAIK efforts to port the
  exploits to mips/LoongArch have all failed a few years ago.)

Without this patch:

  $ ./bpf_prog02
  [...]
  bpf_common.c:123: TBROK: Failed verification: ??? (524)
  [...]
  Summary:
  passed   0
  failed   0
  broken   1
  skipped  0
  warnings 0

With this patch:

  $ ./bpf_prog02
  [...]
  Summary:
  passed   0
  failed   0
  broken   0
  skipped  0
  warnings 0

Fixes: 5dc615520c ("LoongArch: Add BPF JIT support")
Signed-off-by: George Guo <guodongtai@kylinos.cn>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: WANG Xuerui <git@xen0n.name>
Cc: Tiezhu Yang <yangtiezhu@loongson.cn>
Link: https://lore.kernel.org/bpf/20230328071335.2664966-1-guodongtai@kylinos.cn
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-04-20 12:35:08 +02:00
Tiezhu Yang
b9c379e1d7 LoongArch: Only call get_timer_irq() once in constant_clockevent_init()
[ Upstream commit bb7a78e343468873bf00b2b181fcfd3c02d8cb56 ]

Under CONFIG_DEBUG_ATOMIC_SLEEP=y and CONFIG_DEBUG_PREEMPT=y, we can see
the following messages on LoongArch, this is because using might_sleep()
in preemption disable context.

[    0.001127] smp: Bringing up secondary CPUs ...
[    0.001222] Booting CPU#1...
[    0.001244] 64-bit Loongson Processor probed (LA464 Core)
[    0.001247] CPU1 revision is: 0014c012 (Loongson-64bit)
[    0.001250] FPU1 revision is: 00000000
[    0.001252] BUG: sleeping function called from invalid context at kernel/locking/mutex.c:283
[    0.001255] in_atomic(): 1, irqs_disabled(): 1, non_block: 0, pid: 0, name: swapper/1
[    0.001257] preempt_count: 1, expected: 0
[    0.001258] RCU nest depth: 0, expected: 0
[    0.001259] Preemption disabled at:
[    0.001261] [<9000000000223800>] arch_dup_task_struct+0x20/0x110
[    0.001272] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 6.2.0-rc7+ #43
[    0.001275] Hardware name: Loongson Loongson-3A5000-7A1000-1w-A2101/Loongson-LS3A5000-7A1000-1w-A2101, BIOS vUDK2018-LoongArch-V4.0.05132-beta10 12/13/202
[    0.001277] Stack : 0072617764726148 0000000000000000 9000000000222f1c 90000001001e0000
[    0.001286]         90000001001e3be0 90000001001e3be8 0000000000000000 0000000000000000
[    0.001292]         90000001001e3be8 0000000000000040 90000001001e3cb8 90000001001e3a50
[    0.001297]         9000000001642000 90000001001e3be8 be694d10ce4139dd 9000000100174500
[    0.001303]         0000000000000001 0000000000000001 00000000ffffe0a2 0000000000000020
[    0.001309]         000000000000002f 9000000001354116 00000000056b0000 ffffffffffffffff
[    0.001314]         0000000000000000 0000000000000000 90000000014f6e90 9000000001642000
[    0.001320]         900000000022b69c 0000000000000001 0000000000000000 9000000001736a90
[    0.001325]         9000000100038000 0000000000000000 9000000000222f34 0000000000000000
[    0.001331]         00000000000000b0 0000000000000004 0000000000000000 0000000000070000
[    0.001337]         ...
[    0.001339] Call Trace:
[    0.001342] [<9000000000222f34>] show_stack+0x5c/0x180
[    0.001346] [<90000000010bdd80>] dump_stack_lvl+0x60/0x88
[    0.001352] [<9000000000266418>] __might_resched+0x180/0x1cc
[    0.001356] [<90000000010c742c>] mutex_lock+0x20/0x64
[    0.001359] [<90000000002a8ccc>] irq_find_matching_fwspec+0x48/0x124
[    0.001364] [<90000000002259c4>] constant_clockevent_init+0x68/0x204
[    0.001368] [<900000000022acf4>] start_secondary+0x40/0xa8
[    0.001371] [<90000000010c0124>] smpboot_entry+0x60/0x64

Here are the complete call chains:

smpboot_entry()
  start_secondary()
    constant_clockevent_init()
      get_timer_irq()
        irq_find_matching_fwnode()
          irq_find_matching_fwspec()
            mutex_lock()
              might_sleep()
                __might_sleep()
                  __might_resched()

In order to avoid the above issue, we should break the call chains,
using timer_irq_installed variable as check condition to only call
get_timer_irq() once in constant_clockevent_init() is a simple and
proper way.

Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-03-22 13:33:54 +01:00
Hengqi Chen
30651cff1e LoongArch, bpf: Use 4 instructions for function address in JIT
[ Upstream commit 64f50f6575721ef03d001e907455cbe3baa2a5b1 ]

This patch fixes the following issue of function calls in JIT, like:

  [   29.346981] multi-func JIT bug 105 != 103

The issus can be reproduced by running the "inline simple bpf_loop call"
verifier test.

This is because we are emiting 2-4 instructions for 64-bit immediate moves.
During the first pass of JIT, the placeholder address is zero, emiting two
instructions for it. In the extra pass, the function address is in XKVRANGE,
emiting four instructions for it. This change the instruction index in
JIT context. Let's always use 4 instructions for function address in JIT.
So that the instruction sequences don't change between the first pass and
the extra pass for function calls.

Fixes: 5dc615520c ("LoongArch: Add BPF JIT support")
Signed-off-by: Hengqi Chen <hengqi.chen@gmail.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Tested-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Link: https://lore.kernel.org/bpf/20230214152633.2265699-1-hengqi.chen@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-03-10 09:33:06 +01:00
Jinyang He
efc1058831 LoongArch: Get frame info in unwind_start() when regs is not available
[ Upstream commit 429a9671f235c94fc4b5d6687308714b74adc820 ]

At unwind_start(), it is better to get its frame info here rather than
get them outside, even we don't have 'regs'. In this way we can simply
use unwind_{start, next_frame, done} outside.

Signed-off-by: Jinyang He <hejinyang@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-02-06 08:06:32 +01:00
Huacai Chen
87615c0e53 LoongArch: Add HWCAP_LOONGARCH_CPUCFG to elf_hwcap
commit d52fec86a465355b379e839fa372ead0334d62e6 upstream.

HWCAP_LOONGARCH_CPUCFG is missing in elf_hwcap, so add it for glibc's
later use.

Cc: stable@vger.kernel.org
Reported-by: Yinyu Cai <caiyinyu@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-24 07:24:33 +01:00
Huacai Chen
b681604eda LoongArch: mm: Fix huge page entry update for virtual machine
In virtual machine (guest mode), the tlbwr instruction can not write the
last entry of MTLB, so we need to make it non-present by invtlb and then
write it by tlbfill. This also simplify the whole logic.

Signed-off-by: Rui Wang <wangrui@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
2022-12-08 14:59:15 +08:00
Bibo Mao
143d64bdbd LoongArch: Export symbol for function smp_send_reschedule()
Function smp_send_reschedule() is standard kernel API, which is defined
in header file include/linux/smp.h. However, on LoongArch it is defined
as an inline function, this is confusing and kernel modules can not use
this function.

Now we define smp_send_reschedule() as a general function, and add a
EXPORT_SYMBOL_GPL on this function, so that kernel modules can use it.

Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
2022-12-08 14:59:15 +08:00