Commit Graph

1170014 Commits

Author SHA1 Message Date
Greg Kroah-Hartman
a70a8dc18f Merge 6.1.137 into android14-6.1-lts
Changes in 6.1.137
	LoongArch: Fix build error due to backport
	Linux 6.1.137

Change-Id: I5732c2bb8a70a90bfa0bbed6a0eb6c0ddae4a7eb
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2025-05-07 15:49:17 +00:00
Greg Kroah-Hartman
3b32124339 ANDROID: GKI: Add bpf_redirect_info to virtual_device symbol list.
In commit ae43d74d45 ("xdp: Reset bpf_redirect_info before running a
xdp's BPF prog."), the bpf_redirect_info symbol is added to the
virtio_net module, but that symbol is not currently exported by the GKI
symbol lists.  Fix this up by adding it to the symbol tables.

Fixes: ae43d74d45 ("xdp: Reset bpf_redirect_info before running a xdp's BPF prog.")
Change-Id: Ia5751e5c09127d875d8e5e44c71fa1c13f251054
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2025-05-07 09:03:38 +00:00
Greg Kroah-Hartman
6751b87143 ANDROID: GKI: fix up crc issue in crypto_get_default_null_skcipher()
In commit e27244cbe1 ("crypto: null - Use spin lock instead of
mutex"), the .h files get shuffled around a bit, which causes a CRC
mismatch in crypto_get_default_null_skcipher().  Put them back to the
way they were if we are calculating crcs, to keep the build clean.

Bug: 161946584
Fixes: e27244cbe1 ("crypto: null - Use spin lock instead of mutex")
Change-Id: I7d1490944efbbd3bdc99e4116014b5f32ab3d708
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2025-05-07 06:32:31 +00:00
Greg Kroah-Hartman
0b32b5b8c1 Revert "module: sign with sha512 instead of sha1 by default"
This reverts commit 7c2f874c63 which is
commit f3b93547b91ad849b58eb5ab2dd070950ad7beb3 upstream.

It breaks the Android kernel build as BoringSSL can only sign with SHA1
for this Android branch, and we do not want to break the ABI by changing
the module signing process in this stable kernel branch.

It was only added upstream by Greg to get his ARM64 stable builds to
compile properly on the latest version of Fedora, which did NOT like to
sign with SHA1, so blame him :)

Bug: 161946584
Change-Id: I4901a37dd9ac4bdd54a712331e1288053f0d9fb9
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2025-05-07 06:27:25 +00:00
Greg Kroah-Hartman
e63ea17387 Merge 6.1.136 into android14-6.1-lts
Changes in 6.1.136
	module: sign with sha512 instead of sha1 by default
	tracing: Add __cpumask to denote a trace event field that is a cpumask_t
	tracing: Fix cpumask() example typo
	tracing: Add __string_len() example
	tracing: Add __print_dynamic_array() helper
	tracing: Verify event formats that have "%*p.."
	auxdisplay: hd44780: Convert to platform remove callback returning void
	auxdisplay: hd44780: Fix an API misuse in hd44780.c
	net: dsa: mv88e6xxx: don't dispose of Global2 IRQ mappings from mdiobus code
	net: dsa: add support for mac_prepare() and mac_finish() calls
	net: dsa: mv88e6xxx: move link forcing to mac_prepare/mac_finish
	net: dsa: mv88e6xxx: pass directly chip structure to mv88e6xxx_phy_is_internal
	net: dsa: mv88e6xxx: add field to specify internal phys layout
	net: dsa: mv88e6xxx: fix internal PHYs for 6320 family
	net: dsa: mv88e6xxx: fix VTU methods for 6320 family
	iio: adc: ad7768-1: Move setting of val a bit later to avoid unnecessary return value check
	iio: adc: ad7768-1: Fix conversion result sign
	backlight: led_bl: Convert to platform remove callback returning void
	backlight: led_bl: Hold led_access lock when calling led_sysfs_disable()
	clk: renesas: rzg2l: Use u32 for flag and mux_flags
	clk: renesas: rzg2l: Add struct clk_hw_data
	clk: renesas: rzg2l: Remove CPG_SDHI_DSEL from generic header
	clk: renesas: rzg2l: Refactor SD mux driver
	clk: renesas: r9a07g04[34]: Use SEL_SDHI1_STS status configuration for SD1 mux
	clk: renesas: r9a07g04[34]: Fix typo for sel_shdi variable
	clk: renesas: r9a07g043: Fix HP clock source for RZ/Five
	of: resolver: Simplify of_resolve_phandles() using __free()
	of: resolver: Fix device node refcount leakage in of_resolve_phandles()
	PCI: Assign PCI domain IDs by ida_alloc()
	PCI: Fix reference leak in pci_register_host_bridge()
	phy: freescale: imx8m-pcie: Add i.MX8MP PCIe PHY support
	phy: freescale: imx8m-pcie: assert phy reset and perst in power off
	ASoC: qcom: q6dsp: add support to more display ports
	ASoC: qcom: Fix sc7280 lpass potential buffer overflow
	selftests/mm: generate a temporary mountpoint for cgroup filesystem
	dma/contiguous: avoid warning about unused size_bytes
	cpufreq: scmi: Fix null-ptr-deref in scmi_cpufreq_get_rate()
	cpufreq: scpi: Fix null-ptr-deref in scpi_cpufreq_get_rate()
	cpufreq: cppc: Fix invalid return value in .get() callback
	btrfs: avoid page_lockend underflow in btrfs_punch_hole_lock_range()
	scsi: core: Clear flags for scsi_cmnd that did not complete
	net: lwtunnel: disable BHs when required
	net: phy: leds: fix memory leak
	tipc: fix NULL pointer dereference in tipc_mon_reinit_self()
	net_sched: hfsc: Fix a UAF vulnerability in class handling
	net_sched: hfsc: Fix a potential UAF in hfsc_dequeue() too
	iommu/amd: Return an error if vCPU affinity is set for non-vCPU IRTE
	perf/x86: Fix non-sampling (counting) events on certain x86 platforms
	LoongArch: Select ARCH_USE_MEMTEST
	LoongArch: Make regs_irqs_disabled() more clear
	wifi: mac80211: export ieee80211_purge_tx_queue() for drivers
	wifi: rtw88: use ieee80211_purge_tx_queue() to purge TX skb
	virtio_console: fix missing byte order handling for cols and rows
	xen-netfront: handle NULL returned by xdp_convert_buff_to_frame()
	net: selftests: initialize TCP header and skb payload with zero
	drm/amd/display: Fix gpu reset in multidisplay config
	drm/amd/display: Force full update in gpu reset
	LoongArch: Return NULL from huge_pte_offset() for invalid PMD
	LoongArch: Remove a bogus reference to ZONE_DMA
	KVM: SVM: Allocate IR data using atomic allocation
	mcb: fix a double free bug in chameleon_parse_gdd()
	USB: storage: quirk for ADATA Portable HDD CH94
	mei: me: add panther lake H DID
	KVM: x86: Explicitly treat routing entry type changes as changes
	KVM: x86: Reset IRTE to host control if *new* route isn't postable
	misc: microchip: pci1xxxx: Fix Kernel panic during IRQ handler registration
	misc: microchip: pci1xxxx: Fix incorrect IRQ status handling during ack
	serial: msm: Configure correct working mode before starting earlycon
	serial: sifive: lock port in startup()/shutdown() callbacks
	USB: serial: ftdi_sio: add support for Abacus Electrics Optical Probe
	USB: serial: option: add Sierra Wireless EM9291
	USB: serial: simple: add OWON HDS200 series oscilloscope support
	usb: cdns3: Fix deadlock when using NCM gadget
	usb: chipidea: ci_hdrc_imx: fix usbmisc handling
	usb: chipidea: ci_hdrc_imx: fix call balance of regulator routines
	usb: chipidea: ci_hdrc_imx: implement usb_phy_init() error handling
	USB: OHCI: Add quirk for LS7A OHCI controller (rev 0x02)
	usb: dwc3: gadget: check that event count does not exceed event buffer length
	usb: dwc3: xilinx: Prevent spike in reset signal
	usb: quirks: add DELAY_INIT quirk for Silicon Motion Flash Drive
	usb: quirks: Add delay init quirk for SanDisk 3.2Gen1 Flash Drive
	USB: VLI disk crashes if LPM is used
	USB: wdm: handle IO errors in wdm_wwan_port_start
	USB: wdm: close race between wdm_open and wdm_wwan_port_stop
	USB: wdm: wdm_wwan_port_tx_complete mutex in atomic context
	USB: wdm: add annotation
	pinctrl: renesas: rza2: Fix potential NULL pointer dereference
	MIPS: cm: Detect CM quirks from device tree
	crypto: null - Use spin lock instead of mutex
	bpf: Fix deadlock between rcu_tasks_trace and event_mutex.
	clk: check for disabled clock-provider in of_clk_get_hw_from_clkspec()
	parisc: PDT: Fix missing prototype warning
	s390/sclp: Add check for get_zeroed_page()
	s390/tty: Fix a potential memory leak bug
	usb: host: max3421-hcd: Add missing spi_device_id table
	fs/ntfs3: Fix WARNING in ntfs_extend_initialized_size
	usb: dwc3: gadget: Refactor loop to avoid NULL endpoints
	usb: dwc3: gadget: Avoid using reserved endpoints on Intel Merrifield
	sound/virtio: Fix cancel_sync warnings on uninitialized work_structs
	dmaengine: dmatest: Fix dmatest waiting less when interrupted
	usb: xhci: Avoid Stop Endpoint retry loop if the endpoint seems Running
	usb: gadget: aspeed: Add NULL pointer check in ast_vhub_init_dev()
	usb: host: xhci-plat: mvebu: use ->quirks instead of ->init_quirk() func
	thunderbolt: Scan retimers after device router has been enumerated
	objtool: Silence more KCOV warnings
	objtool, ASoC: codecs: wcd934x: Remove potential undefined behavior in wcd934x_slim_irq_handler()
	objtool, lkdtm: Obfuscate the do_nothing() pointer
	qibfs: fix _another_ leak
	ntb: reduce stack usage in idt_scan_mws
	ntb_hw_amd: Add NTB PCI ID for new gen CPU
	9p/net: fix improper handling of bogus negative read/write replies
	rtc: pcf85063: do a SW reset if POR failed
	sched/isolation: Make CONFIG_CPU_ISOLATION depend on CONFIG_SMP
	KVM: s390: Don't use %pK through tracepoints
	udmabuf: fix a buf size overflow issue during udmabuf creation
	selftests: ublk: fix test_stripe_04
	xen: Change xen-acpi-processor dom0 dependency
	nvme: requeue namespace scan on missed AENs
	ACPI: EC: Set ec_no_wakeup for Lenovo Go S
	ACPI PPTT: Fix coding mistakes in a couple of sizeof() calls
	nvme: re-read ANA log page after ns scan completes
	objtool: Stop UNRET validation on UD2
	selftests/mincore: Allow read-ahead pages to reach the end of the file
	x86/bugs: Use SBPB in write_ibpb() if applicable
	x86/bugs: Don't fill RSB on VMEXIT with eIBRS+retpoline
	x86/bugs: Don't fill RSB on context switch with eIBRS
	nvmet-fc: take tgtport reference only once
	nvmet-fc: put ref when assoc->del_work is already scheduled
	ext4: make block validity check resistent to sb bh corruption
	scsi: hisi_sas: Fix I/O errors caused by hardware port ID changes
	scsi: ufs: exynos: Ensure pre_link() executes before exynos_ufs_phy_init()
	scsi: pm80xx: Set phy_attached to zero when device is gone
	x86/i8253: Call clockevent_i8253_disable() with interrupts disabled
	loop: aio inherit the ioprio of original request
	spi: tegra210-quad: use WARN_ON_ONCE instead of WARN_ON for timeouts
	spi: tegra210-quad: add rate limiting and simplify timeout error message
	ubsan: Fix panic from test_ubsan_out_of_bounds
	md/raid1: Add check for missing source disk in process_checks()
	spi: spi-imx: Add check for spi_imx_setupxfer()
	of: module: add buffer overflow check in of_modalias()
	jfs: define xtree root and page independently
	comedi: jr3_pci: Fix synchronous deletion of timer
	crypto: atmel-sha204a - Set hwrng quality to lowest possible
	net/sched: act_mirred: don't override retval if we already lost the skb
	net: dsa: mv88e6xxx: fix atu_move_port_mask for 6341 family
	net: dsa: mv88e6xxx: enable PVT for 6321 switch
	net: dsa: mv88e6xxx: enable .port_set_policy() for 6320 family
	net: dsa: mv88e6xxx: enable STU methods for 6320 family
	xdp: Reset bpf_redirect_info before running a xdp's BPF prog.
	MIPS: cm: Fix warning if MIPS_CM is disabled
	nvme: fixup scan failure for non-ANA multipath controllers
	phy: freescale: imx8m-pcie: Do CMN_RST just before PHY PLL lock check
	phy: freescale: imx8m-pcie: Add one missing error return
	tracing: Remove pointer (asterisk) and brackets from cpumask_t field
	PCI: Fix use-after-free in pci_bus_release_domain_nr()
	ASoC: qcom: q6afe-dai: fix Display Port Playback stream name
	objtool: Silence more KCOV warnings, part 2
	Linux 6.1.136

Change-Id: I0649fe0aedec1cc3666200fb579b48f449380179
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2025-05-07 06:27:07 +00:00
Greg Kroah-Hartman
ae9d2e99d9 Merge 6.1.135 into android14-6.1-lts
Changes in 6.1.135
	selftests/futex: futex_waitv wouldblock test should fail
	ata: pata_pxa: Fix potential NULL pointer dereference in pxa_ata_probe()
	tipc: fix memory leak in tipc_link_xmit
	codel: remove sch->q.qlen check before qdisc_tree_reduce_backlog()
	net: tls: explicitly disallow disconnect
	rtnl: add helper to check if rtnl group has listeners
	rtnl: add helper to check if a notification is needed
	net/sched: cls_api: conditional notification of events
	tc: Ensure we have enough buffer space when sending filter netlink notifications
	net: ethtool: Don't call .cleanup_data when prepare_data fails
	ata: sata_sx4: Add error handling in pdc20621_i2c_read()
	nvmet-fcloop: swap list_add_tail arguments
	net_sched: sch_sfq: use a temporary work area for validating configuration
	net_sched: sch_sfq: move the limit validation
	ipv6: Align behavior across nexthops during path selection
	net: ppp: Add bound checking for skb data on ppp_sync_txmung
	nft_set_pipapo: fix incorrect avx2 match of 5th field octet
	iommu/mediatek: Fix NULL pointer deference in mtk_iommu_device_group
	fs: consistently deref the files table with rcu_dereference_raw()
	umount: Allow superblock owners to force umount
	pm: cpupower: bench: Prevent NULL dereference on malloc failure
	x86/cpu: Don't clear X86_FEATURE_LAHF_LM flag in init_amd_k8() on AMD when running in a virtual machine
	perf: arm_pmu: Don't disable counter in armpmu_add()
	arm64: cputype: Add QCOM_CPU_PART_KRYO_3XX_GOLD
	xen/mcelog: Add __nonstring annotations for unterminated strings
	HID: pidff: Convert infinite length from Linux API to PID standard
	HID: pidff: Do not send effect envelope if it's empty
	HID: pidff: Fix null pointer dereference in pidff_find_fields
	ALSA: hda: intel: Fix Optimus when GPU has no sound
	ALSA: hda: intel: Add Lenovo IdeaPad Z570 to probe denylist
	ASoC: fsl_audmix: register card device depends on 'dais' property
	mmc: dw_mmc: add a quirk for accessing 64-bit FIFOs in two halves
	ALSA: usb-audio: Fix CME quirk for UF series keyboards
	ASoC: amd: Add DMI quirk for ACP6X mic support
	f2fs: don't retry IO for corrupted data scenario
	page_pool: avoid infinite loop to schedule delayed worker
	jfs: Fix uninit-value access of imap allocated in the diMount() function
	fs/jfs: cast inactags to s64 to prevent potential overflow
	fs/jfs: Prevent integer overflow in AG size calculation
	jfs: Prevent copying of nlink with value 0 from disk inode
	jfs: add sanity check for agwidth in dbMount
	ata: libata-eh: Do not use ATAPI DMA for a device limited to PIO mode
	f2fs: fix to avoid out-of-bounds access in f2fs_truncate_inode_blocks()
	ahci: add PCI ID for Marvell 88SE9215 SATA Controller
	ext4: protect ext4_release_dquot against freezing
	ext4: ignore xattrs past end
	scsi: st: Fix array overflow in st_setup()
	wifi: mt76: mt76x2u: add TP-Link TL-WDN6200 ID to device table
	net: vlan: don't propagate flags on open
	tracing: fix return value in __ftrace_event_enable_disable for TRACE_REG_UNREGISTER
	Bluetooth: hci_uart: fix race during initialization
	Bluetooth: qca: simplify WCN399x NVM loading
	drm: allow encoder mode_set even when connectors change for crtc
	drm/amd/display: Update Cursor request mode to the beginning prefetch always
	drm: panel-orientation-quirks: Add support for AYANEO 2S
	drm: panel-orientation-quirks: Add quirks for AYA NEO Flip DS and KB
	drm: panel-orientation-quirks: Add quirk for AYA NEO Slide
	drm: panel-orientation-quirks: Add new quirk for GPD Win 2
	drm: panel-orientation-quirks: Add quirk for OneXPlayer Mini (Intel)
	drm/bridge: panel: forbid initializing a panel with unknown connector type
	drivers: base: devres: Allow to release group on device release
	drm/amdkfd: clamp queue size to minimum
	drm/amdkfd: Fix mode1 reset crash issue
	drm/amdkfd: Fix pqm_destroy_queue race with GPU reset
	drm/mediatek: mtk_dpi: Move the input_2p_en bit to platform data
	drm/mediatek: mtk_dpi: Explicitly manage TVD clock in power on/off
	drm/amdgpu: handle amdgpu_cgs_create_device() errors in amd_powerplay_create()
	PCI: vmd: Make vmd_dev::cfg_lock a raw_spinlock_t type
	drm/amdgpu: grab an additional reference on the gang fence v2
	fbdev: omapfb: Add 'plane' value check
	ktest: Fix Test Failures Due to Missing LOG_FILE Directories
	tpm, tpm_tis: Workaround failed command reception on Infineon devices
	pwm: mediatek: Prevent divide-by-zero in pwm_mediatek_config()
	pwm: rcar: Improve register calculation
	pwm: fsl-ftm: Handle clk_get_rate() returning 0
	bpf: support SKF_NET_OFF and SKF_LL_OFF on skb frags
	ext4: don't treat fhandle lookup of ea_inode as FS corruption
	media: i2c: adv748x: Fix test pattern selection mask
	media: venus: hfi: add a check to handle OOB in sfr region
	media: venus: hfi: add check to handle incorrect queue size
	media: vim2m: print device name after registering device
	media: siano: Fix error handling in smsdvb_module_init()
	xenfs/xensyms: respect hypervisor's "next" indication
	arm64: cputype: Add MIDR_CORTEX_A76AE
	arm64: errata: Add QCOM_KRYO_4XX_GOLD to the spectre_bhb_k24_list
	arm64: errata: Assume that unknown CPUs _are_ vulnerable to Spectre BHB
	arm64: errata: Add KRYO 2XX/3XX/4XX silver cores to Spectre BHB safe list
	KVM: arm64: Tear down vGIC on failed vCPU creation
	spi: cadence-qspi: Fix probe on AM62A LP SK
	mtd: rawnand: brcmnand: fix PM resume warning
	tpm, tpm_tis: Fix timeout handling when waiting for TPM status
	media: streamzap: prevent processing IR data on URB failure
	media: platform: stm32: Add check for clk_enable()
	media: v4l2-dv-timings: prevent possible overflow in v4l2_detect_gtf()
	media: i2c: ccs: Set the device's runtime PM status correctly in remove
	media: i2c: ccs: Set the device's runtime PM status correctly in probe
	media: i2c: ov7251: Set enable GPIO low in probe
	media: i2c: ov7251: Introduce 1 ms delay between regulators and en GPIO
	media: venus: hfi_parser: add check to avoid out of bound access
	media: venus: hfi_parser: refactor hfi packet parsing logic
	mptcp: sockopt: fix getting IPV6_V6ONLY
	mtd: Add check for devm_kcalloc()
	net: dsa: mv88e6xxx: workaround RGMII transmit delay erratum for 6320 family
	mtd: Replace kcalloc() with devm_kcalloc()
	clocksource/drivers/stm32-lptimer: Use wakeup capable instead of init wakeup
	wifi: mt76: Add check for devm_kstrdup()
	wifi: mac80211: fix integer overflow in hwmp_route_info_get()
	io_uring/kbuf: reject zero sized provided buffers
	ASoC: qdsp6: q6apm-dai: set 10 ms period and buffer alignment.
	ASoC: qdsp6: q6apm-dai: fix capture pipeline overruns.
	ASoC: qdsp6: q6asm-dai: fix q6asm_dai_compr_set_params error path
	bus: mhi: host: Fix race between unprepare and queue_buf
	ext4: fix off-by-one error in do_split
	vdpa/mlx5: Fix oversized null mkey longer than 32bit
	soc: samsung: exynos-chipid: Add NULL pointer check in exynos_chipid_probe()
	smb311 client: fix missing tcon check when mounting with linux/posix extensions
	i3c: master: svc: Use readsb helper for reading MDB
	i3c: Add NULL pointer check in i3c_master_queue_ibi()
	jbd2: remove wrong sb->s_sequence check
	mfd: ene-kb3930: Fix a potential NULL pointer dereference
	locking/lockdep: Decrease nr_unused_locks if lock unused in zap_class()
	lib: scatterlist: fix sg_split_phys to preserve original scatterlist offsets
	mptcp: fix NULL pointer in can_accept_new_subflow
	mptcp: only inc MPJoinAckHMacFailure for HMAC failures
	mtd: inftlcore: Add error check for inftl_read_oob()
	mtd: rawnand: Add status chack in r852_ready()
	arm64: mm: Correct the update of max_pfn
	arm64: dts: mediatek: mt8173: Fix disp-pwm compatible string
	btrfs: fix non-empty delayed iputs list on unmount due to compressed write workers
	sparc/mm: disable preemption in lazy mmu mode
	mm/rmap: reject hugetlb folios in folio_make_device_exclusive()
	mm: add missing release barrier on PGDAT_RECLAIM_LOCKED unlock
	mm/hwpoison: do not send SIGBUS to processes with recovered clean pages
	sctp: detect and prevent references to a freed transport in sendmsg
	thermal/drivers/rockchip: Add missing rk3328 mapping entry
	cifs: avoid NULL pointer dereference in dbg call
	cifs: fix integer overflow in match_server()
	clk: qcom: gdsc: Release pm subdomains in reverse add order
	clk: qcom: gdsc: Capture pm_genpd_add_subdomain result code
	clk: qcom: gdsc: Set retain_ff before moving to HW CTRL
	crypto: ccp - Fix check for the primary ASP device
	dm-ebs: fix prefetch-vs-suspend race
	dm-integrity: set ti->error on memory allocation failure
	dm-verity: fix prefetch-vs-suspend race
	ftrace: Add cond_resched() to ftrace_graph_set_hash()
	gpio: tegra186: fix resource handling in ACPI probe path
	gpio: zynq: Fix wakeup source leaks on device unbind
	gve: handle overflow when reporting TX consumed descriptors
	KVM: x86: Acquire SRCU in KVM_GET_MP_STATE to protect guest memory accesses
	ntb: use 64-bit arithmetic for the MSI doorbell mask
	of/irq: Fix device node refcount leakage in API of_irq_parse_one()
	of/irq: Fix device node refcount leakage in API of_irq_parse_raw()
	of/irq: Fix device node refcount leakages in of_irq_count()
	of/irq: Fix device node refcount leakage in API irq_of_parse_and_map()
	of/irq: Fix device node refcount leakages in of_irq_init()
	PCI: brcmstb: Fix missing of_node_put() in brcm_pcie_probe()
	PCI: Fix reference leak in pci_alloc_child_bus()
	pinctrl: qcom: Clear latched interrupt status when changing IRQ type
	selftests: mptcp: close fd_in before returning in main_loop
	arm64: errata: Add newer ARM cores to the spectre_bhb_loop_affected() lists
	ACPI: platform-profile: Fix CFI violation when accessing sysfs files
	x86/e820: Fix handling of subpage regions when calculating nosave ranges in e820__register_nosave_regions()
	Bluetooth: hci_uart: Fix another race during initialization
	HSI: ssi_protocol: Fix use after free vulnerability in ssi_protocol Driver Due to Race Condition
	scsi: hisi_sas: Enable force phy when SATA disk directly connected
	wifi: at76c50x: fix use after free access in at76_disconnect
	wifi: mac80211: Update skb's control block key in ieee80211_tx_dequeue()
	wifi: mac80211: Purge vif txq in ieee80211_do_stop()
	wifi: wl1251: fix memory leak in wl1251_tx_work
	scsi: iscsi: Fix missing scsi_host_put() in error path
	md/raid10: fix missing discard IO accounting
	md/md-bitmap: fix stats collection for external bitmaps
	RDMA/usnic: Fix passing zero to PTR_ERR in usnic_ib_pci_probe()
	RDMA/hns: Fix wrong maximum DMA segment size
	RDMA/core: Silence oversized kvmalloc() warning
	Bluetooth: hci_event: Fix sending MGMT_EV_DEVICE_FOUND for invalid address
	Bluetooth: btrtl: Prevent potential NULL dereference
	Bluetooth: l2cap: Check encryption key size on incoming connection
	Revert "wifi: mac80211: Update skb's control block key in ieee80211_tx_dequeue()"
	igc: fix PTM cycle trigger logic
	igc: move ktime snapshot into PTM retry loop
	igc: handle the IGC_PTP_ENABLED flag correctly
	igc: cleanup PTP module if probe fails
	test suite: use %zu to print size_t
	net: mctp: Set SOCK_RCU_FREE
	net: openvswitch: fix nested key length validation in the set() action
	cxgb4: fix memory leak in cxgb4_init_ethtool_filters() error path
	net: b53: enable BPDU reception for management port
	net: bridge: switchdev: do not notify new brentries as changed
	net: dsa: mv88e6xxx: avoid unregistering devlink regions which were never registered
	net: dsa: mv88e6xxx: fix -ENOENT when deleting VLANs and MST is unsupported
	net: dsa: avoid refcount warnings when ds->ops->tag_8021q_vlan_del() fails
	ptp: ocp: fix start time alignment in ptp_ocp_signal_set
	riscv: Properly export reserved regions in /proc/iomem
	riscv: KGDB: Do not inline arch_kgdb_breakpoint()
	riscv: KGDB: Remove ".option norvc/.option rvc" for kgdb_compiled_break
	cpufreq/sched: Fix the usage of CPUFREQ_NEED_UPDATE_LIMITS
	writeback: fix false warning in inode_to_wb()
	Revert "PCI: Avoid reset when disabled via sysfs"
	ASoC: codecs:lpass-wsa-macro: Fix vi feedback rate
	ASoC: codecs:lpass-wsa-macro: Fix logic of enabling vi channels
	asus-laptop: Fix an uninitialized variable
	nfs: move nfs_fhandle_hash to common include file
	nfs: add missing selections of CONFIG_CRC32
	nfsd: decrease sc_count directly if fail to queue dl_recall
	btrfs: correctly escape subvol in btrfs_show_options()
	crypto: caam/qi - Fix drv_ctx refcount bug
	hfs/hfsplus: fix slab-out-of-bounds in hfs_bnode_read_key
	i2c: cros-ec-tunnel: defer probe if parent EC is not present
	isofs: Prevent the use of too small fid
	loop: properly send KOBJ_CHANGED uevent for disk device
	loop: LOOP_SET_FD: send uevents for partitions
	mm/gup: fix wrongly calculated returned value in fault_in_safe_writeable()
	mm: fix filemap_get_folios_contig returning batches of identical folios
	ksmbd: Fix dangling pointer in krb_authenticate
	ksmbd: Prevent integer overflow in calculation of deadtime
	ksmbd: fix the warning from __kernel_write_iter
	riscv: Avoid fortify warning in syscall_get_arguments()
	smb3 client: fix open hardlink on deferred close file error
	string: Add load_unaligned_zeropad() code path to sized_strscpy()
	tracing: Fix filter string testing
	virtiofs: add filesystem context source name check
	scsi: megaraid_sas: Block zero-length ATA VPD inquiry
	scsi: ufs: exynos: Ensure consistent phy reference counts
	RDMA/cma: Fix workqueue crash in cma_netevent_work_handler
	perf/x86/intel: Allow to update user space GPRs from PEBS records
	perf/x86/intel/uncore: Fix the scale of IIO free running counters on SNR
	perf/x86/intel/uncore: Fix the scale of IIO free running counters on ICX
	perf/x86/intel/uncore: Fix the scale of IIO free running counters on SPR
	drm/repaper: fix integer overflows in repeat functions
	drm/msm/a6xx: Fix stale rpmh votes from GPU
	drm/amd: Handle being compiled without SI or CIK support better
	drm/amd/pm: Prevent division by zero
	drm/amd/pm/powerplay: Prevent division by zero
	drm/amd/pm/smu11: Prevent division by zero
	drm/amd/pm/powerplay/hwmgr/smu7_thermal: Prevent division by zero
	drm/amd/pm/swsmu/smu13/smu_v13_0: Prevent division by zero
	drm/amd/pm/powerplay/hwmgr/vega20_thermal: Prevent division by zero
	drm/amdgpu/dma_buf: fix page_link check
	drm/nouveau: prime: fix ttm_bo_delayed_delete oops
	drm/sti: remove duplicate object names
	drm/i915/gvt: fix unterminated-string-initialization warning
	io_uring/net: fix accept multishot handling
	KVM: arm64: Discard any SVE state when entering KVM guests
	arm64/fpsimd: Track the saved FPSIMD state type separately to TIF_SVE
	arm64/fpsimd: Have KVM explicitly say which FP registers to save
	arm64/fpsimd: Stop using TIF_SVE to manage register saving in KVM
	KVM: arm64: Unconditionally save+flush host FPSIMD/SVE/SME state
	KVM: arm64: Remove host FPSIMD saving for non-protected KVM
	KVM: arm64: Remove VHE host restore of CPACR_EL1.ZEN
	KVM: arm64: Remove VHE host restore of CPACR_EL1.SMEN
	KVM: arm64: Refactor exit handlers
	KVM: arm64: Mark some header functions as inline
	KVM: arm64: Calculate cptr_el2 traps on activating traps
	KVM: arm64: Eagerly switch ZCR_EL{1,2}
	cpufreq: Reference count policy in cpufreq_update_limits()
	kbuild: Add '-fno-builtin-wcslen'
	media: mediatek: vcodec: mark vdec_vp9_slice_map_counts_eob_coef noinline
	mptcp: sockopt: fix getting freebind & transparent
	misc: pci_endpoint_test: Avoid issue of interrupts remaining after request_irq error
	misc: pci_endpoint_test: Fix displaying 'irq_type' after 'request_irq' error
	misc: pci_endpoint_test: Fix 'irq_type' to convey the correct type
	mm: Fix is_zero_page() usage in try_grab_page()
	x86/split_lock: Fix the delayed detection logic
	x86/pvh: Call C code via the kernel virtual mapping
	powerpc/rtas: Prevent Spectre v1 gadget construction in sys_rtas()
	LoongArch: Eliminate superfluous get_numa_distances_cnt()
	btrfs: fix qgroup reserve leaks in cow_file_range
	btrfs: zoned: fix zone activation with missing devices
	btrfs: zoned: fix zone finishing with missing devices
	Revert "Xen/swiotlb: mark xen_swiotlb_fixup() __init"
	drm/amd/display: Stop amdgpu_dm initialize when link nums greater than max_links
	landlock: Add the errata interface
	Revert "LoongArch: BPF: Fix off-by-one error in build_prologue()"
	nvmet-fc: Remove unused functions
	smb/server: fix potential null-ptr-deref of lease_ctx_info in smb2_open()
	cifs: use origin fullpath for automounts
	btrfs: fix the length of reserved qgroup to free
	bpf: avoid holding freeze_mutex during mmap operation
	bpf: Prevent tail call between progs attached to different hooks
	blk-cgroup: support to track if policy is online
	blk-iocost: do not WARN if iocg was already offlined
	mm: fix apply_to_existing_page_range()
	sign-file,extract-cert: move common SSL helper functions to a header
	sign-file,extract-cert: avoid using deprecated ERR_get_error_line()
	sign-file,extract-cert: use pkcs11 provider for OPENSSL MAJOR >= 3
	MIPS: dec: Declare which_prom() as static
	MIPS: cevt-ds1287: Add missing ds1287.h include
	MIPS: ds1287: Match ds1287_set_base_clock() function types
	md: factor out a helper from mddev_put()
	md: fix mddev uaf while iterating all_mddevs list
	ALSA: hda/realtek: Fix built-in mic on another ASUS VivoBook model
	Linux 6.1.135

Change-Id: Iace9cb12069e55ebb2510d265e1e8c4cbb280395
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2025-05-06 06:58:30 +00:00
Greg Kroah-Hartman
fcf8d4d8b3 Merge f331105699 ("sign-file,extract-cert: use pkcs11 provider for OPENSSL MAJOR >= 3") into android14-6.1-lts
Steps on the way to 6.1.135

Resolves merge conflicts in:
	certs/extract-cert.c
	scripts/sign-file.c

by merging around the following commits:
  3437e90d15 sign-file,extract-cert: move common SSL helper functions to a header
  6e3319a2e0 sign-file,extract-cert: avoid using deprecated ERR_get_error_line()
  f331105699 sign-file,extract-cert: use pkcs11 provider for OPENSSL MAJOR >= 3

As signing needs to stay the same in the android14-6.1-lts branch.

Change-Id: I00e9e098e095b6acbf3e1f6791a894ec5a510f61
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2025-05-06 06:56:58 +00:00
Greg Kroah-Hartman
816b54a70d Revert "blk-cgroup: support to track if policy is online"
This reverts commit 3154d64ff9 which is
commit dfd6200a09 upstream.

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

Bug: 161946584
Change-Id: I5d09f94759c130efe2d3490c23a251d4d71e6140
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2025-05-05 13:08:31 +00:00
Greg Kroah-Hartman
44fe4b43e9 Revert "blk-iocost: do not WARN if iocg was already offlined"
This reverts commit aed0aac18f which is
commit 01bc4fda9ea0a6b52f12326486f07a4910666cf6 upstream.

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

Bug: 161946584
Change-Id: Ib364e34f99f0350e81819022fb2eb1fd060b3ddd
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2025-05-05 13:08:31 +00:00
Greg Kroah-Hartman
ac80043d0f Revert "bpf: Prevent tail call between progs attached to different hooks"
This reverts commit d9a807fb7c which is
commit 28ead3eaabc16ecc907cfb71876da028080f6356 upstream.

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

Bug: 161946584
Change-Id: I8a5f9e59898eb41170e6562631ac23ab81f1271c
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2025-05-05 13:04:12 +00:00
Greg Kroah-Hartman
ac7079a42e Linux 6.1.137
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-05-05 10:59:01 +02:00
Huacai Chen
8b4c07bb51 LoongArch: Fix build error due to backport
In 6.1 there is no pmdp_get() definition, so use *pmd directly, in order
to avoid such build error due to a recently backport:

arch/loongarch/mm/hugetlbpage.c: In function 'huge_pte_offset':
arch/loongarch/mm/hugetlbpage.c:50:25: error: implicit declaration of function 'pmdp_get'; did you mean 'ptep_get'?  [-Wimplicit-function-declaration]
   50 |         return pmd_none(pmdp_get(pmd)) ? NULL : (pte_t *) pmd;
      |                         ^~~~~~~~
      |                         ptep_get

Reported-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/f978ec9a-b103-40af-b116-6a9238197110@roeck-us.net
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-05-05 10:59:01 +02:00
Greg Kroah-Hartman
92d048684a Merge 16c54d6a49 ("mm: fix apply_to_existing_page_range()") into android14-6.1-lts
Steps on the way to 6.1.135

Change-Id: I789088e35ba0c1f8c14466c6440828e3249159df
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2025-05-02 11:27:38 +00:00
Greg Kroah-Hartman
b6736e0375 Linux 6.1.136
Link: https://lore.kernel.org/r/20250429161051.743239894@linuxfoundation.org
Tested-by: Pavel Machek (CIP) <pavel@denx.de>
Tested-by: Peter Schneider <pschneider1968@googlemail.com>
Tested-by: Hardik Garg <hargar@linux.microsoft.com>
Tested-by: Miguel Ojeda <ojeda@kernel.org>
Tested-by: Shuah Khan <skhan@linuxfoundation.org>
Tested-by: Salvatore Bonaccorso <carnil@debian.org>
Tested-by: Ron Economos <re@w6rz.net>
Link: https://lore.kernel.org/r/20250501080849.930068482@linuxfoundation.org
Tested-by: Jon Hunter <jonathanh@nvidia.com>
Tested-by: Miguel Ojeda <ojeda@kernel.org>
Tested-by: Peter Schneider <pschneider1968@googlemail.com>
Tested-by: Mark Brown <broonie@kernel.org>
Tested-by: Hardik Garg <hargar@linux.microsoft.com>
Tested-by: Linux Kernel Functional Testing <lkft@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-05-02 07:47:11 +02:00
Josh Poimboeuf
715b345153 objtool: Silence more KCOV warnings, part 2
commit 55c78035a1a8dfb05f1472018ce2a651701adb7d upstream.

Similar to GCOV, KCOV can leave behind dead code and undefined behavior.
Warnings related to those should be ignored.

The previous commit:

  6b023c784204 ("objtool: Silence more KCOV warnings")

... only did so for CONFIG_CGOV_KERNEL.  Also do it for CONFIG_KCOV, but
for real this time.

Fixes the following warning:

  vmlinux.o: warning: objtool: synaptics_report_mt_data: unexpected end of section .text.synaptics_report_mt_data

Fixes: 6b023c784204 ("objtool: Silence more KCOV warnings")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: https://lore.kernel.org/r/a44ba16e194bcbc52c1cef3d3cd9051a62622723.1743481539.git.jpoimboe@kernel.org
Closes: https://lore.kernel.org/oe-kbuild-all/202503282236.UhfRsF3B-lkp@intel.com/
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-05-02 07:47:10 +02:00
Srinivas Kandagatla
cfe7fd06a1 ASoC: qcom: q6afe-dai: fix Display Port Playback stream name
commit 4f3fcf5f6d upstream.

With recent changes to add more display ports did not change the Stream
name in q6afe-dai. This results in below error
"ASoC: Failed to add route DISPLAY_PORT_RX -> Display Port Playback(*)"
and sound card fails to probe.

Fix this by adding correct stream name.

Fixes: 90848a2557 ("ASoC: qcom: q6dsp: add support to more display ports")
Reported-by: Amit Pundir <amit.pundir@linaro.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20230705124850.40069-1-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-05-02 07:47:10 +02:00
Rob Herring
fbf45385e3 PCI: Fix use-after-free in pci_bus_release_domain_nr()
commit 30ba2d09ed upstream.

Commit c14f7ccc9f ("PCI: Assign PCI domain IDs by ida_alloc()")
introduced a use-after-free bug in the bus removal cleanup. The issue was
found with kfence:

  [   19.293351] BUG: KFENCE: use-after-free read in pci_bus_release_domain_nr+0x10/0x70

  [   19.302817] Use-after-free read at 0x000000007f3b80eb (in kfence-#115):
  [   19.309677]  pci_bus_release_domain_nr+0x10/0x70
  [   19.309691]  dw_pcie_host_deinit+0x28/0x78
  [   19.309702]  tegra_pcie_deinit_controller+0x1c/0x38 [pcie_tegra194]
  [   19.309734]  tegra_pcie_dw_probe+0x648/0xb28 [pcie_tegra194]
  [   19.309752]  platform_probe+0x90/0xd8
  ...

  [   19.311457] kfence-#115: 0x00000000063a155a-0x00000000ba698da8, size=1072, cache=kmalloc-2k

  [   19.311469] allocated by task 96 on cpu 10 at 19.279323s:
  [   19.311562]  __kmem_cache_alloc_node+0x260/0x278
  [   19.311571]  kmalloc_trace+0x24/0x30
  [   19.311580]  pci_alloc_bus+0x24/0xa0
  [   19.311590]  pci_register_host_bridge+0x48/0x4b8
  [   19.311601]  pci_scan_root_bus_bridge+0xc0/0xe8
  [   19.311613]  pci_host_probe+0x18/0xc0
  [   19.311623]  dw_pcie_host_init+0x2c0/0x568
  [   19.311630]  tegra_pcie_dw_probe+0x610/0xb28 [pcie_tegra194]
  [   19.311647]  platform_probe+0x90/0xd8
  ...

  [   19.311782] freed by task 96 on cpu 10 at 19.285833s:
  [   19.311799]  release_pcibus_dev+0x30/0x40
  [   19.311808]  device_release+0x30/0x90
  [   19.311814]  kobject_put+0xa8/0x120
  [   19.311832]  device_unregister+0x20/0x30
  [   19.311839]  pci_remove_bus+0x78/0x88
  [   19.311850]  pci_remove_root_bus+0x5c/0x98
  [   19.311860]  dw_pcie_host_deinit+0x28/0x78
  [   19.311866]  tegra_pcie_deinit_controller+0x1c/0x38 [pcie_tegra194]
  [   19.311883]  tegra_pcie_dw_probe+0x648/0xb28 [pcie_tegra194]
  [   19.311900]  platform_probe+0x90/0xd8
  ...

  [   19.313579] CPU: 10 PID: 96 Comm: kworker/u24:2 Not tainted 6.2.0 #4
  [   19.320171] Hardware name:  /, BIOS 1.0-d7fb19b 08/10/2022
  [   19.325852] Workqueue: events_unbound deferred_probe_work_func

The stack trace is a bit misleading as dw_pcie_host_deinit() doesn't
directly call pci_bus_release_domain_nr(). The issue turns out to be in
pci_remove_root_bus() which first calls pci_remove_bus() which frees the
struct pci_bus when its struct device is released. Then
pci_bus_release_domain_nr() is called and accesses the freed struct
pci_bus. Reordering these fixes the issue.

Fixes: c14f7ccc9f ("PCI: Assign PCI domain IDs by ida_alloc()")
Link: https://lore.kernel.org/r/20230329123835.2724518-1-robh@kernel.org
Link: https://lore.kernel.org/r/b529cb69-0602-9eed-fc02-2f068707a006@nvidia.com
Reported-by: Jon Hunter <jonathanh@nvidia.com>
Tested-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
Cc: stable@vger.kernel.org	# v6.2+
Cc: Pali Rohár <pali@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-05-02 07:47:10 +02:00
Steven Rostedt (Google)
353e182012 tracing: Remove pointer (asterisk) and brackets from cpumask_t field
commit fab89a09c8 upstream.

To differentiate between long arrays and cpumasks, the __cpumask() field
was created. Part of the TRACE_EVENT() macros test if the type is signed
or not by using the is_signed_type() macro. The __cpumask() field used the
__dynamic_array() helper but because cpumask_t is a structure, it could
not be used in the is_signed_type() macro as that would fail to build, so
instead it passed in the pointer to cpumask_t.

Unfortunately, that creates in the format file:

  field:__data_loc cpumask_t *[] mask;    offset:36;      size:4; signed:0;

Which looks like an array of pointers to cpumask_t and not a cpumask_t
type, which is misleading to user space parsers.

Douglas Raillard pointed out that the "[]" are also misleading, as
cpumask_t is not an array.

Since cpumask() hasn't been created yet, and the parsers currently fail on
it (but will still produce the raw output), make it be:

  field:__data_loc cpumask_t mask;    offset:36;      size:4; signed:0;

Which is the correct type of the field.

Then the parsers can be updated to handle this.

Link: https://lore.kernel.org/lkml/6dda5e1d-9416-b55e-88f3-31d148bc925f@arm.com/
Link: https://lore.kernel.org/linux-trace-kernel/20221212193814.0e3f1e43@gandalf.local.home

Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Valentin Schneider <vschneid@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Fixes: 8230f27b1c ("tracing: Add __cpumask to denote a trace event field that is a cpumask_t")
Reported-by: Douglas Raillard <douglas.raillard@arm.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-05-02 07:47:10 +02:00
Richard Zhu
c8cbb6179c phy: freescale: imx8m-pcie: Add one missing error return
commit b574baa64c upstream.

There should be one error return when fail to fetch the perst reset.
Add the missing error return.

Fixes: dce9edff16 ("phy: freescale: imx8m-pcie: Add i.MX8MP PCIe PHY support")

Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
Reviewed-by: Marek Vasut <marex@denx.de>
Link: https://lore.kernel.org/r/1671433941-2037-1-git-send-email-hongxing.zhu@nxp.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-05-02 07:47:10 +02:00
Richard Zhu
fc053d2df4 phy: freescale: imx8m-pcie: Do CMN_RST just before PHY PLL lock check
commit f89263b69731e0144d275fff777ee0dd92069200 upstream.

When enable initcall_debug together with higher debug level below.
CONFIG_CONSOLE_LOGLEVEL_DEFAULT=9
CONFIG_CONSOLE_LOGLEVEL_QUIET=9
CONFIG_MESSAGE_LOGLEVEL_DEFAULT=7

The initialization of i.MX8MP PCIe PHY might be timeout failed randomly.
To fix this issue, adjust the sequence of the resets refer to the power
up sequence listed below.

i.MX8MP PCIe PHY power up sequence:
                          /---------------------------------------------
1.8v supply     ---------/
                    /---------------------------------------------------
0.8v supply     ---/

                ---\ /--------------------------------------------------
                    X        REFCLK Valid
Reference Clock ---/ \--------------------------------------------------
                             -------------------------------------------
                             |
i_init_restn    --------------
                                    ------------------------------------
                                    |
i_cmn_rstn      ---------------------
                                         -------------------------------
                                         |
o_pll_lock_done --------------------------

Logs:
imx6q-pcie 33800000.pcie: host bridge /soc@0/pcie@33800000 ranges:
imx6q-pcie 33800000.pcie:       IO 0x001ff80000..0x001ff8ffff -> 0x0000000000
imx6q-pcie 33800000.pcie:      MEM 0x0018000000..0x001fefffff -> 0x0018000000
probe of clk_imx8mp_audiomix.reset.0 returned 0 after 1052 usecs
probe of 30e20000.clock-controller returned 0 after 32971 usecs
phy phy-32f00000.pcie-phy.4: phy poweron failed --> -110
probe of 30e10000.dma-controller returned 0 after 10235 usecs
imx6q-pcie 33800000.pcie: waiting for PHY ready timeout!
dwhdmi-imx 32fd8000.hdmi: Detected HDMI TX controller v2.13a with HDCP (samsung_dw_hdmi_phy2)
imx6q-pcie 33800000.pcie: probe with driver imx6q-pcie failed with error -110

Fixes: dce9edff16 ("phy: freescale: imx8m-pcie: Add i.MX8MP PCIe PHY support")
Cc: stable@vger.kernel.org
Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
Signed-off-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

v2 changes:
- Rebase to latest fixes branch of linux-phy git repo.
- Richard's environment have problem and can't sent out patch. So I help
post this fix patch.

Link: https://lore.kernel.org/r/20241021155241.943665-1-Frank.Li@nxp.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
2025-05-02 07:47:10 +02:00
Hannes Reinecke
1a9e5875c5 nvme: fixup scan failure for non-ANA multipath controllers
commit 26d7fb4fd4ca1180e2fa96587dea544563b4962a upstream.

Commit 62baf70c3274 caused the ANA log page to be re-read, even on
controllers that do not support ANA.  While this should generally
harmless, some controllers hang on the unsupported log page and
never finish probing.

Fixes: 62baf70c3274 ("nvme: re-read ANA log page after ns scan completes")
Signed-off-by: Hannes Reinecke <hare@kernel.org>
Tested-by: Srikanth Aithal <sraithal@amd.com>
[hch: more detailed commit message]
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-05-02 07:47:10 +02:00
Thomas Bogendoerfer
48600cbc4b MIPS: cm: Fix warning if MIPS_CM is disabled
commit b73c3ccdca95c237750c981054997c71d33e09d7 upstream.

Commit e27fbe16af5c ("MIPS: cm: Detect CM quirks from device tree")
introduced

arch/mips/include/asm/mips-cm.h:119:13: error: ‘mips_cm_update_property’
	defined but not used [-Werror=unused-function]

Fix this by making empty function implementation inline

Fixes: e27fbe16af5c ("MIPS: cm: Detect CM quirks from device tree")
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-05-02 07:47:09 +02:00
Sebastian Andrzej Siewior
ae43d74d45 xdp: Reset bpf_redirect_info before running a xdp's BPF prog.
Ricardo reported a KASAN discovered use after free in v6.6-stable.

The syzbot starts a BPF program via xdp_test_run_batch() which assigns
ri->tgt_value via dev_hash_map_redirect() and the return code isn't
XDP_REDIRECT it looks like nonsense. So the output in
bpf_warn_invalid_xdp_action() appears once.
Then the TUN driver runs another BPF program (on the same CPU) which
returns XDP_REDIRECT without setting ri->tgt_value first. It invokes
bpf_trace_printk() to print four characters and obtain the required
return value. This is enough to get xdp_do_redirect() invoked which
then accesses the pointer in tgt_value which might have been already
deallocated.

This problem does not affect upstream because since commit
	401cb7dae8130 ("net: Reference bpf_redirect_info via task_struct on PREEMPT_RT.")

the per-CPU variable is referenced via task's task_struct and exists on
the stack during NAPI callback. Therefore it is cleared once before the
first invocation and remains valid within the RCU section of the NAPI
callback.

Instead of performing the huge backport of the commit (plus its fix ups)
here is an alternative version which only resets the variable in
question prior invoking the BPF program.

Acked-by: Toke Høiland-Jørgensen <toke@kernel.org>
Reported-by: Ricardo Cañuelo Navarro <rcn@igalia.com>
Closes: https://lore.kernel.org/all/20250226-20250204-kasan-slab-use-after-free-read-in-dev_map_enqueue__submit-v3-0-360efec441ba@igalia.com/
Fixes: 97f91a7cf0 ("bpf: add bpf_redirect_map helper routine")
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-05-02 07:47:09 +02:00
Marek Behún
3aaca46e8f net: dsa: mv88e6xxx: enable STU methods for 6320 family
commit 1428a6109b20e356188c3fb027bdb7998cc2fb98 upstream.

Commit c050f5e91b ("net: dsa: mv88e6xxx: Fill in STU support for all
supported chips") introduced STU methods, but did not add them to the
6320 family. Fix it.

Fixes: c050f5e91b ("net: dsa: mv88e6xxx: Fill in STU support for all supported chips")
Signed-off-by: Marek Behún <kabel@kernel.org>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://patch.msgid.link/20250317173250.28780-6-kabel@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-05-02 07:47:09 +02:00
Marek Behún
503d67b31c net: dsa: mv88e6xxx: enable .port_set_policy() for 6320 family
commit a2ef58e2c4aea4de166fc9832eb2b621e88c98d5 upstream.

Commit f3a2cd326e ("net: dsa: mv88e6xxx: introduce .port_set_policy")
did not add the .port_set_policy() method for the 6320 family. Fix it.

Fixes: f3a2cd326e ("net: dsa: mv88e6xxx: introduce .port_set_policy")
Signed-off-by: Marek Behún <kabel@kernel.org>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://patch.msgid.link/20250317173250.28780-5-kabel@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-05-02 07:47:09 +02:00
Marek Behún
9ff467ae32 net: dsa: mv88e6xxx: enable PVT for 6321 switch
commit f85c69369854a43af2c5d3b3896da0908d713133 upstream.

Commit f364565221 ("net: dsa: mv88e6xxx: move PVT description in
info") did not enable PVT for 6321 switch. Fix it.

Fixes: f364565221 ("net: dsa: mv88e6xxx: move PVT description in info")
Signed-off-by: Marek Behún <kabel@kernel.org>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://patch.msgid.link/20250317173250.28780-4-kabel@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-05-02 07:47:09 +02:00
Marek Behún
dc6b55cfe7 net: dsa: mv88e6xxx: fix atu_move_port_mask for 6341 family
commit 4ae01ec007716986e1a20f1285eb013cbf188830 upstream.

The atu_move_port_mask for 6341 family (Topaz) is 0xf, not 0x1f. The
PortVec field is 8 bits wide, not 11 as in 6390 family. Fix this.

Fixes: e606ca36bb ("net: dsa: mv88e6xxx: rework ATU Remove")
Signed-off-by: Marek Behún <kabel@kernel.org>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://patch.msgid.link/20250317173250.28780-3-kabel@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-05-02 07:47:09 +02:00
Jakub Kicinski
e873e8f7d0 net/sched: act_mirred: don't override retval if we already lost the skb
commit 166c2c8a6a4dc2e4ceba9e10cfe81c3e469e3210 upstream.

If we're redirecting the skb, and haven't called tcf_mirred_forward(),
yet, we need to tell the core to drop the skb by setting the retcode
to SHOT. If we have called tcf_mirred_forward(), however, the skb
is out of our hands and returning SHOT will lead to UaF.

Move the retval override to the error path which actually need it.

Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
Fixes: e5cf1baf92 ("act_mirred: use TC_ACT_REINSERT when possible")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[Minor conflict resolved due to code context change.]
Signed-off-by: Jianqi Ren <jianqi.ren.cn@windriver.com>
Signed-off-by: He Zhe <zhe.he@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-05-02 07:47:09 +02:00
Marek Behún
4f9f61598b crypto: atmel-sha204a - Set hwrng quality to lowest possible
commit 8006aff15516a170640239c5a8e6696c0ba18d8e upstream.

According to the review by Bill Cox [1], the Atmel SHA204A random number
generator produces random numbers with very low entropy.

Set the lowest possible entropy for this chip just to be safe.

[1] https://www.metzdowd.com/pipermail/cryptography/2014-December/023858.html

Fixes: da001fb651 ("crypto: atmel-i2c - add support for SHA204A random number generator")
Cc: <stable@vger.kernel.org>
Signed-off-by: Marek Behún <kabel@kernel.org>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Marek Behún <kabel@kernel.org>
2025-05-02 07:47:08 +02:00
Ian Abbott
3a57f45b91 comedi: jr3_pci: Fix synchronous deletion of timer
commit 44d9b3f584c59a606b521e7274e658d5b866c699 upstream.

When `jr3_pci_detach()` is called during device removal, it calls
`timer_delete_sync()` to stop the timer, but the timer expiry function
always reschedules the timer, so the synchronization is ineffective.

Call `timer_shutdown_sync()` instead.  It does not matter that the timer
expiry function pointer is cleared, because the device is being removed.

Fixes: 07b509e658 ("Staging: comedi: add jr3_pci driver")
Cc: stable <stable@kernel.org>
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Link: https://lore.kernel.org/r/20250415123901.13483-1-abbotti@mev.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-05-02 07:47:08 +02:00
Dave Kleikamp
63d956acbf jfs: define xtree root and page independently
commit a779ed754e52d582b8c0e17959df063108bd0656 upstream.

In order to make array bounds checking sane, provide a separate
definition of the in-inode xtree root and the external xtree page.

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Tested-by: Manas Ghandat <ghandatmanas@gmail.com>
Closes: https://syzkaller.appspot.com/bug?extid=7cb897779f3c479d0615
Closes: https://syzkaller.appspot.com/bug?extid=6b1d79dad6cc6b3eef41
Closes: https://syzkaller.appspot.com/bug?extid=67f714a53ce18d5b542e
Closes: https://syzkaller.appspot.com/bug?extid=e829cfdd0de521302df4
Reported-by: syzbot+7cb897779f3c479d0615@syzkaller.appspotmail.com
Reported-by: syzbot+6b1d79dad6cc6b3eef41@syzkaller.appspotmail.com
Reported-by: syzbot+67f714a53ce18d5b542e@syzkaller.appspotmail.com
Reported-by: syzbot+e829cfdd0de521302df4@syzkaller.appspotmail.com
Signed-off-by: Aditya Dutt <duttaditya18@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-05-02 07:47:08 +02:00
Sergey Shtylyov
5d59fd637a of: module: add buffer overflow check in of_modalias()
commit cf7385cb26ac4f0ee6c7385960525ad534323252 upstream.

In of_modalias(), if the buffer happens to be too small even for the 1st
snprintf() call, the len parameter will become negative and str parameter
(if not NULL initially) will point beyond the buffer's end. Add the buffer
overflow check after the 1st snprintf() call and fix such check after the
strlen() call (accounting for the terminating NUL char).

Fixes: bc575064d6 ("of/device: use of_property_for_each_string to parse compatible strings")
Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
Link: https://lore.kernel.org/r/bbfc6be0-c687-62b6-d015-5141b93f313e@omp.ru
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Uwe Kleine-König <ukleinek@debian.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-05-02 07:47:08 +02:00
Tamura Dai
2fea0d6d7b spi: spi-imx: Add check for spi_imx_setupxfer()
[ Upstream commit 951a04ab3a2db4029debfa48d380ef834b93207e ]

Add check for the return value of spi_imx_setupxfer().
spi_imx->rx and spi_imx->tx function pointer can be NULL when
spi_imx_setupxfer() return error, and make NULL pointer dereference.

 Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000
 Call trace:
  0x0
  spi_imx_pio_transfer+0x50/0xd8
  spi_imx_transfer_one+0x18c/0x858
  spi_transfer_one_message+0x43c/0x790
  __spi_pump_transfer_message+0x238/0x5d4
  __spi_sync+0x2b0/0x454
  spi_write_then_read+0x11c/0x200

Signed-off-by: Tamura Dai <kirinode0@gmail.com>
Reviewed-by: Carlos Song <carlos.song@nxp.com>
Link: https://patch.msgid.link/20250417011700.14436-1-kirinode0@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-05-02 07:47:08 +02:00
Meir Elisha
fc9629651b md/raid1: Add check for missing source disk in process_checks()
[ Upstream commit b7c178d9e57c8fd4238ff77263b877f6f16182ba ]

During recovery/check operations, the process_checks function loops
through available disks to find a 'primary' source with successfully
read data.

If no suitable source disk is found after checking all possibilities,
the 'primary' index will reach conf->raid_disks * 2. Add an explicit
check for this condition after the loop. If no source disk was found,
print an error message and return early to prevent further processing
without a valid primary source.

Link: https://lore.kernel.org/linux-raid/20250408143808.1026534-1-meir.elisha@volumez.com
Signed-off-by: Meir Elisha <meir.elisha@volumez.com>
Suggested-and-reviewed-by: Yu Kuai <yukuai3@huawei.com>
Signed-off-by: Yu Kuai <yukuai3@huawei.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-05-02 07:47:08 +02:00
Mostafa Saleh
61b36bdc70 ubsan: Fix panic from test_ubsan_out_of_bounds
[ Upstream commit 9b044614be12d78d3a93767708b8d02fb7dfa9b0 ]

Running lib_ubsan.ko on arm64 (without CONFIG_UBSAN_TRAP) panics the
kernel:

[   31.616546] Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: test_ubsan_out_of_bounds+0x158/0x158 [test_ubsan]
[   31.646817] CPU: 3 UID: 0 PID: 179 Comm: insmod Not tainted 6.15.0-rc2 #1 PREEMPT
[   31.648153] Hardware name: linux,dummy-virt (DT)
[   31.648970] Call trace:
[   31.649345]  show_stack+0x18/0x24 (C)
[   31.650960]  dump_stack_lvl+0x40/0x84
[   31.651559]  dump_stack+0x18/0x24
[   31.652264]  panic+0x138/0x3b4
[   31.652812]  __ktime_get_real_seconds+0x0/0x10
[   31.653540]  test_ubsan_load_invalid_value+0x0/0xa8 [test_ubsan]
[   31.654388]  init_module+0x24/0xff4 [test_ubsan]
[   31.655077]  do_one_initcall+0xd4/0x280
[   31.655680]  do_init_module+0x58/0x2b4

That happens because the test corrupts other data in the stack:
400:   d5384108        mrs     x8, sp_el0
404:   f9426d08        ldr     x8, [x8, #1240]
408:   f85f83a9        ldur    x9, [x29, #-8]
40c:   eb09011f        cmp     x8, x9
410:   54000301        b.ne    470 <test_ubsan_out_of_bounds+0x154>  // b.any

As there is no guarantee the compiler will order the local variables
as declared in the module:
        volatile char above[4] = { }; /* Protect surrounding memory. */
        volatile int arr[4];
        volatile char below[4] = { }; /* Protect surrounding memory. */

There is another problem where the out-of-bound index is 5 which is larger
than the extra surrounding memory for protection.

So, use a struct to enforce the ordering, and fix the index to be 4.
Also, remove some of the volatiles and rely on OPTIMIZER_HIDE_VAR()

Signed-off-by: Mostafa Saleh <smostafa@google.com>
Link: https://lore.kernel.org/r/20250415203354.4109415-1-smostafa@google.com
Signed-off-by: Kees Cook <kees@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-05-02 07:47:08 +02:00
Breno Leitao
af1c735e21 spi: tegra210-quad: add rate limiting and simplify timeout error message
[ Upstream commit 21f4314e66ed8d40b2ee24185d1a06a07a512eb1 ]

On malfunctioning hardware, timeout error messages can appear thousands
of times, creating unnecessary system pressure and log bloat. This patch
makes two improvements:

1. Replace dev_err() with dev_err_ratelimited() to prevent log flooding
   when hardware errors persist
2. Remove the redundant timeout value parameter from the error message,
   as 'ret' is always zero in this error path

These changes reduce logging overhead while maintaining necessary error
reporting for debugging purposes.

Signed-off-by: Breno Leitao <leitao@debian.org>
Link: https://patch.msgid.link/20250401-tegra-v2-2-126c293ec047@debian.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-05-02 07:47:07 +02:00
Breno Leitao
009847bd69 spi: tegra210-quad: use WARN_ON_ONCE instead of WARN_ON for timeouts
[ Upstream commit 41c721fc093938745d116c3a21326a0ee03bb491 ]

Some machines with tegra_qspi_combined_seq_xfer hardware issues generate
excessive kernel warnings, severely polluting the logs:

    dmesg | grep -i "WARNING:.*tegra_qspi_transfer_one_message" | wc -l
    94451

This patch replaces WARN_ON with WARN_ON_ONCE for timeout conditions to
reduce log spam. The subsequent error message still prints on each
occurrence, providing sufficient information about the failure, while
the stack trace is only needed once for debugging purposes.

Signed-off-by: Breno Leitao <leitao@debian.org>
Link: https://patch.msgid.link/20250401-tegra-v2-1-126c293ec047@debian.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-05-02 07:47:07 +02:00
Yunlong Xing
342a5dfc21 loop: aio inherit the ioprio of original request
[ Upstream commit 1fdb8188c3d505452b40cdb365b1bb32be533a8e ]

Set cmd->iocb.ki_ioprio to the ioprio of loop device's request.
The purpose is to inherit the original request ioprio in the aio
flow.

Signed-off-by: Yunlong Xing <yunlong.xing@unisoc.com>
Signed-off-by: Zhiguo Niu <zhiguo.niu@unisoc.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20250414030159.501180-1-yunlong.xing@unisoc.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-05-02 07:47:07 +02:00
Fernando Fernandez Mancera
ddc9ef51bc x86/i8253: Call clockevent_i8253_disable() with interrupts disabled
[ Upstream commit 3940f5349b476197fb079c5aa19c9a988de64efb ]

There's a lockdep false positive warning related to i8253_lock:

  WARNING: HARDIRQ-safe -> HARDIRQ-unsafe lock order detected
  ...
  systemd-sleep/3324 [HC0[0]:SC0[0]:HE0:SE1] is trying to acquire:
  ffffffffb2c23398 (i8253_lock){+.+.}-{2:2}, at: pcspkr_event+0x3f/0xe0 [pcspkr]

  ...
  ... which became HARDIRQ-irq-unsafe at:
  ...
    lock_acquire+0xd0/0x2f0
    _raw_spin_lock+0x30/0x40
    clockevent_i8253_disable+0x1c/0x60
    pit_timer_init+0x25/0x50
    hpet_time_init+0x46/0x50
    x86_late_time_init+0x1b/0x40
    start_kernel+0x962/0xa00
    x86_64_start_reservations+0x24/0x30
    x86_64_start_kernel+0xed/0xf0
    common_startup_64+0x13e/0x141
  ...

Lockdep complains due pit_timer_init() using the lock in an IRQ-unsafe
fashion, but it's a false positive, because there is no deadlock
possible at that point due to init ordering: at the point where
pit_timer_init() is called there is no other possible usage of
i8253_lock because the system is still in the very early boot stage
with no interrupts.

But in any case, pit_timer_init() should disable interrupts before
calling clockevent_i8253_disable() out of general principle, and to
keep lockdep working even in this scenario.

Use scoped_guard() for that, as suggested by Thomas Gleixner.

[ mingo: Cleaned up the changelog. ]

Suggested-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Fernando Fernandez Mancera <ffmancera@riseup.net>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/Z-uwd4Bnn7FcCShX@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-05-02 07:47:07 +02:00
Igor Pylypiv
30e482dfb8 scsi: pm80xx: Set phy_attached to zero when device is gone
[ Upstream commit f7b705c238d1483f0a766e2b20010f176e5c0fb7 ]

When a fatal error occurs, a phy down event may not be received to set
phy->phy_attached to zero.

Signed-off-by: Igor Pylypiv <ipylypiv@google.com>
Signed-off-by: Salomon Dushimirimana <salomondush@google.com>
Link: https://lore.kernel.org/r/20250319230305.3172920-1-salomondush@google.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-05-02 07:47:07 +02:00
Peter Griffin
dae1e15fcc scsi: ufs: exynos: Ensure pre_link() executes before exynos_ufs_phy_init()
[ Upstream commit 3d101165e72316775947d71321d97194f03dfef3 ]

Ensure clocks are enabled before configuring unipro. Additionally move
the pre_link() hook before the exynos_ufs_phy_init() calls. This means
the register write sequence more closely resembles the ordering of the
downstream driver.

Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
Link: https://lore.kernel.org/r/20250319-exynos-ufs-stability-fixes-v2-1-96722cc2ba1b@linaro.org
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-05-02 07:47:07 +02:00
Xingui Yang
9e3014d786 scsi: hisi_sas: Fix I/O errors caused by hardware port ID changes
[ Upstream commit daff37f00c7506ca322ccfce95d342022f06ec58 ]

The hw port ID of phy may change when inserting disks in batches, causing
the port ID in hisi_sas_port and itct to be inconsistent with the hardware,
resulting in I/O errors. The solution is to set the device state to gone to
intercept I/O sent to the device, and then execute linkreset to discard and
find the disk to re-update its information.

Signed-off-by: Xingui Yang <yangxingui@huawei.com>
Link: https://lore.kernel.org/r/20250312095135.3048379-3-yangxingui@huawei.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-05-02 07:47:07 +02:00
Ojaswin Mujoo
39ebdc2d51 ext4: make block validity check resistent to sb bh corruption
[ Upstream commit ccad447a3d331a239477c281533bacb585b54a98 ]

Block validity checks need to be skipped in case they are called
for journal blocks since they are part of system's protected
zone.

Currently, this is done by checking inode->ino against
sbi->s_es->s_journal_inum, which is a direct read from the ext4 sb
buffer head. If someone modifies this underneath us then the
s_journal_inum field might get corrupted. To prevent against this,
change the check to directly compare the inode with journal->j_inode.

**Slight change in behavior**: During journal init path,
check_block_validity etc might be called for journal inode when
sbi->s_journal is not set yet. In this case we now proceed with
ext4_inode_block_valid() instead of returning early. Since systems zones
have not been set yet, it is okay to proceed so we can perform basic
checks on the blocks.

Suggested-by: Baokun Li <libaokun1@huawei.com>
Reviewed-by: Baokun Li <libaokun1@huawei.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Zhang Yi <yi.zhang@huawei.com>
Signed-off-by: Ojaswin Mujoo <ojaswin@linux.ibm.com>
Link: https://patch.msgid.link/0c06bc9ebfcd6ccfed84a36e79147bf45ff5adc1.1743142920.git.ojaswin@linux.ibm.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-05-02 07:47:06 +02:00
Daniel Wagner
0c2aea3235 nvmet-fc: put ref when assoc->del_work is already scheduled
[ Upstream commit 70289ae5cac4d3a39575405aaf63330486cea030 ]

Do not leak the tgtport reference when the work is already scheduled.

Signed-off-by: Daniel Wagner <wagi@kernel.org>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-05-02 07:47:06 +02:00
Daniel Wagner
b7f235cb88 nvmet-fc: take tgtport reference only once
[ Upstream commit b0b26ad0e1943de25ce82a7e5af3574f31b1cf99 ]

The reference counting code can be simplified. Instead taking a tgtport
refrerence at the beginning of nvmet_fc_alloc_hostport and put it back
if not a new hostport object is allocated, only take it when a new
hostport object is allocated.

Signed-off-by: Daniel Wagner <wagi@kernel.org>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-05-02 07:47:06 +02:00
Josh Poimboeuf
2184c42971 x86/bugs: Don't fill RSB on context switch with eIBRS
[ Upstream commit 27ce8299bc1ec6df8306073785ff82b30b3cc5ee ]

User->user Spectre v2 attacks (including RSB) across context switches
are already mitigated by IBPB in cond_mitigation(), if enabled globally
or if either the prev or the next task has opted in to protection.  RSB
filling without IBPB serves no purpose for protecting user space, as
indirect branches are still vulnerable.

User->kernel RSB attacks are mitigated by eIBRS.  In which case the RSB
filling on context switch isn't needed, so remove it.

Suggested-by: Pawan Gupta <pawan.kumar.gupta@linux.intel.com>
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Pawan Gupta <pawan.kumar.gupta@linux.intel.com>
Reviewed-by: Amit Shah <amit.shah@amd.com>
Reviewed-by: Nikolay Borisov <nik.borisov@suse.com>
Link: https://lore.kernel.org/r/98cdefe42180358efebf78e3b80752850c7a3e1b.1744148254.git.jpoimboe@kernel.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-05-02 07:47:06 +02:00
Josh Poimboeuf
3b2efa5695 x86/bugs: Don't fill RSB on VMEXIT with eIBRS+retpoline
[ Upstream commit 18bae0dfec15b24ec14ca17dc18603372f5f254f ]

eIBRS protects against guest->host RSB underflow/poisoning attacks.
Adding retpoline to the mix doesn't change that.  Retpoline has a
balanced CALL/RET anyway.

So the current full RSB filling on VMEXIT with eIBRS+retpoline is
overkill.  Disable it or do the VMEXIT_LITE mitigation if needed.

Suggested-by: Pawan Gupta <pawan.kumar.gupta@linux.intel.com>
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Pawan Gupta <pawan.kumar.gupta@linux.intel.com>
Reviewed-by: Amit Shah <amit.shah@amd.com>
Reviewed-by: Nikolay Borisov <nik.borisov@suse.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Vitaly Kuznetsov <vkuznets@redhat.com>
Cc: Sean Christopherson <seanjc@google.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Link: https://lore.kernel.org/r/84a1226e5c9e2698eae1b5ade861f1b8bf3677dc.1744148254.git.jpoimboe@kernel.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-05-02 07:47:06 +02:00
Josh Poimboeuf
14b1cbf034 x86/bugs: Use SBPB in write_ibpb() if applicable
[ Upstream commit fc9fd3f98423367c79e0bd85a9515df26dc1b3cc ]

write_ibpb() does IBPB, which (among other things) flushes branch type
predictions on AMD.  If the CPU has SRSO_NO, or if the SRSO mitigation
has been disabled, branch type flushing isn't needed, in which case the
lighter-weight SBPB can be used.

The 'x86_pred_cmd' variable already keeps track of whether IBPB or SBPB
should be used.  Use that instead of hardcoding IBPB.

Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/17c5dcd14b29199b75199d67ff7758de9d9a4928.1744148254.git.jpoimboe@kernel.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-05-02 07:47:06 +02:00
Qiuxu Zhuo
6c94a16ba2 selftests/mincore: Allow read-ahead pages to reach the end of the file
[ Upstream commit 197c1eaa7ba633a482ed7588eea6fd4aa57e08d4 ]

When running the mincore_selftest on a system with an XFS file system, it
failed the "check_file_mmap" test case due to the read-ahead pages reaching
the end of the file. The failure log is as below:

   RUN           global.check_file_mmap ...
  mincore_selftest.c:264:check_file_mmap:Expected i (1024) < vec_size (1024)
  mincore_selftest.c:265:check_file_mmap:Read-ahead pages reached the end of the file
  check_file_mmap: Test failed
           FAIL  global.check_file_mmap

This is because the read-ahead window size of the XFS file system on this
machine is 4 MB, which is larger than the size from the #PF address to the
end of the file. As a result, all the pages for this file are populated.

  blockdev --getra /dev/nvme0n1p5
    8192
  blockdev --getbsz /dev/nvme0n1p5
    512

This issue can be fixed by extending the current FILE_SIZE 4MB to a larger
number, but it will still fail if the read-ahead window size of the file
system is larger enough. Additionally, in the real world, read-ahead pages
reaching the end of the file can happen and is an expected behavior.
Therefore, allowing read-ahead pages to reach the end of the file is a
better choice for the "check_file_mmap" test case.

Link: https://lore.kernel.org/r/20250311080940.21413-1-qiuxu.zhuo@intel.com
Reported-by: Yi Lai <yi1.lai@intel.com>
Signed-off-by: Qiuxu Zhuo <qiuxu.zhuo@intel.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-05-02 07:47:06 +02:00
Josh Poimboeuf
4aebc6708c objtool: Stop UNRET validation on UD2
[ Upstream commit 9f9cc012c2cbac4833746a0182e06a8eec940d19 ]

In preparation for simplifying INSN_SYSCALL, make validate_unret()
terminate control flow on UD2 just like validate_branch() already does.

Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: https://lore.kernel.org/r/ce841269e7e28c8b7f32064464a9821034d724ff.1744095216.git.jpoimboe@kernel.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-05-02 07:47:05 +02:00