Commit Graph

1157134 Commits

Author SHA1 Message Date
Greg Kroah-Hartman
8a7ce2ee18 Revert "mmc: Add quirk MMC_QUIRK_BROKEN_CACHE_FLUSH for Micron eMMC Q2J54A"
This reverts commit 51dcd20a4a which is
commit ed9009ad300c0f15a3ecfe9613547b1962bde02c upstream.

It breaks the current Android ABI, and if needed, can be brought back in an
abi-safe way in the future.

Bug: 161946584
Change-Id: I3ad21a32875dc77bd655c6a788ca1e2dee924f93
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2023-12-12 18:42:07 +00:00
Greg Kroah-Hartman
dcea2ba909 Revert "ASoC: soc-card: Add storage for PCI SSID"
This reverts commit 14107cbeb5 which is
commit 47f56e38a199bd45514b8e0142399cba4feeaf1a upstream.

It breaks the current Android ABI, and if needed, can be brought back in an
abi-safe way in the future.

Bug: 161946584
Change-Id: Id1365ae92d3fef88cb8e0575b6b258d244092404
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2023-12-12 18:42:07 +00:00
Greg Kroah-Hartman
88487f809a Revert "tracing: Have trace_event_file have ref counters"
This reverts commit 2fa74d29fc which is
commit bb32500fb9b78215e4ef6ee8b4345c5f5d7eafb4 upstream.

It breaks the current Android ABI, and if needed, can be brought back in
an abi-safe way in the future.

Bug: 161946584
Change-Id: If981a67442122352b1836c6e75ba2a462cbc731d
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2023-12-12 18:42:07 +00:00
Greg Kroah-Hartman
fd71493204 Revert "workqueue: Provide one lock class key per work_on_cpu() callsite"
This reverts commit 2652d199dd which is
commit 265f3ed077036f053981f5eea0b5b43e7c5b39ff upstream.

It turns the work_on_cpu() function into an #define, which messes with
the systems that were previously depending on that abi symbol.  As this
is a change only for when lockdep is enabled, which is NOT in any
running Android system, it is safe to revert for now.

Bug: 161946584
Change-Id: I5f117cccfb411efb742a4faf1cefcb4826faae15
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2023-12-12 18:42:07 +00:00
Greg Kroah-Hartman
f1bc13cb9d 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
Greg Kroah-Hartman
0c2e40b9a3 Merge branch 'android14-6.1' into branch 'android14-6.1-lts'
This catches the android14-6.1-lts branch up with the latest changes in
the android14-6.1 branch, including a number of important symbols being
added for tracking.

This includes the following commits:

* 2d8a5ddebb ANDROID: Update the ABI symbol list
* ddf142e5a8 ANDROID: netlink: add netlink poll and hooks
* c9b5c232e7 ANDROID: Update the ABI symbol list
* 3c9cb9c06f ANDROID: GKI: Update symbol list for mtk
* 5723833390 ANDROID: mm: lru_cache_disable skips lru cache drainnig
* 0de2f42977 ANDROID: mm: cma: introduce __cma_alloc API
* db9d7ba706 ANDROID: Update the ABI representation
* 6b972d6047 BACKPORT: fscrypt: support crypto data unit size less than filesystem block size
* 72bdb74622 UPSTREAM: netfilter: nf_tables: remove catchall element in GC sync path
* 924116f1b8 ANDROID: GKI: Update oplus symbol list
* 0ad2a3cd4d ANDROID: vendor_hooks: export tracepoint symbol trace_mm_vmscan_kswapd_wake
* 6465e29536 BACKPORT: HID: input: map battery system charging
* cfdfc17a46 ANDROID: fuse-bpf: Ignore readaheads unless they go to the daemon
* 354b1b716c FROMGIT: f2fs: skip adding a discard command if exists
* ccbea4f458 UPSTREAM: f2fs: clean up zones when not successfully unmounted
* 88cccede6d UPSTREAM: f2fs: use finish zone command when closing a zone
* b2d3a555d3 UPSTREAM: f2fs: check zone write pointer points to the end of zone
* c9e29a0073 UPSTREAM: f2fs: close unused open zones while mounting
* e92b866e22 UPSTREAM: f2fs: maintain six open zones for zoned devices
* 088f228370 ANDROID: update symbol for unisoc whitelist
* aa71a02cf3 ANDROID: vendor_hooks: mm: add hook to count the number pages allocated for each slab
* 4326c78f84 ANDROID: Update the ABI symbol list
* eb67f58322 ANDROID: sched: Add trace_android_rvh_set_user_nice_locked
* 855511173d UPSTREAM: ASoC: soc-compress: Fix deadlock in soc_compr_open_fe
* 6cb2109589 BACKPORT: ASoC: add snd_soc_card_mutex_lock/unlock()
* edfef8fdc9 BACKPORT: ASoC: expand snd_soc_dpcm_mutex_lock/unlock()
* 52771d9792 BACKPORT: ASoC: expand snd_soc_dapm_mutex_lock/unlock()

Change-Id: I81dd834d6a7b6a32fae56cdc3ebd6a29f0decb80
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2023-12-12 16:15:56 +00:00
Richard Chang
2d8a5ddebb ANDROID: Update the ABI symbol list
Adding the following symbol:
  - __cma_alloc

Bug: 308881290
Change-Id: I5b3ffb0c804dc636355c1462aaa6e96b1189446b
Signed-off-by: Richard Chang <richardycc@google.com>
2023-12-11 02:12:31 +00:00
Jong eon Park
ddf142e5a8 ANDROID: netlink: add netlink poll and hooks
In huge uevents generating system, especially for user apps who have
small size of rcvbuf socket, it has been reported that netlink overrun
happens quite frequently.

Moreover, if there's no POLLERR (caused by this netlink overrun) handler
in user apps, the system can almost be stucked by calling 'poll' repeatedly.

Regarding this issue, I have sent a kernel netlink patch to linux
maintainers and got replied that this is absolutely user app's problem,
must not addressing kernel.

Until Android team look into this issue and some modification comes out,
we need kernel patch for temporary. To minimize the effect by this patch
to the others who have never met this issue, I would like to just add
netlink's dedicated poll and its hooks.

Please refer to below v1/v2 patch links for history.

v1: https://lore.kernel.org/netdev/20231110110002.7279f895@kernel.org/T/#t
v2: https://lore.kernel.org/netdev/d599922fd89b3e61c7cf531a03ea8b81cbcb003e.camel@redhat.com/T/#t

Bug: 300009377
Link: https://lore.kernel.org/netdev/d599922fd89b3e61c7cf531a03ea8b81cbcb003e.camel@redhat.com/T/#t

Change-Id: I4f11399d61c10332ba05bac64cfa1e92bb111565
Signed-off-by: Jong eon Park <jongeon.park@samsung.com>
2023-12-08 20:50:05 +00:00
Taylor Nelms
c9b5c232e7 ANDROID: Update the ABI symbol list
Adding the following symbols:
  - devm_drm_of_get_bridge
  - drm_kms_helper_connector_hotplug_event
  - of_find_mipi_dsi_host_by_node
  - of_get_parent
  - of_graph_get_remote_node

1 function symbol(s) added
  'void drm_kms_helper_connector_hotplug_event(struct drm_connector*)'

Bug: 303500701
Change-Id: Ief76bed701a62cb89cad78cc3d141ee6c6a84dad
Signed-off-by: Taylor Nelms <tknelms@google.com>
2023-12-07 19:24:02 +00:00
Seiya Wang
3c9cb9c06f ANDROID: GKI: Update symbol list for mtk
ABI impact

8 function symbol(s) added
  'struct mii_bus* devm_mdiobus_alloc_size(struct device*, int)'
  'struct phy_device* of_phy_get_and_connect(struct net_device*, struct device_node*, void(*)(struct net_device*))'
  'int pci_enable_device_mem(struct pci_dev*)'
  'int pci_prepare_to_sleep(struct pci_dev*)'
  'int pci_select_bars(struct pci_dev*, unsigned long)'
  'void phy_support_asym_pause(struct phy_device*)'
  'int ptp_find_pin(struct ptp_clock*, enum ptp_pin_function, unsigned int)'
  'int ptp_schedule_worker(struct ptp_clock*, unsigned long)'

1 variable symbol(s) added
  'struct efi efi'

Add following symbols

devm_alloc_etherdev_mqs
devm_mdiobus_alloc_size
efi
eth_prepare_mac_addr_change
of_get_mac_address
of_phy_get_and_connect
pci_disable_msi
pci_disable_msix
pci_enable_device_mem
pci_enable_msi
pci_enable_msix_range
pci_prepare_to_sleep
pci_release_selected_regions
pci_request_selected_regions
pci_select_bars
pci_set_power_state
phy_connect_direct
phy_ethtool_get_eee
phy_ethtool_get_wol
phy_ethtool_set_eee
phy_ethtool_set_wol
phy_find_first
phy_init_eee
phy_mii_ioctl
phy_remove_link_mode
phy_start_aneg
phy_support_asym_pause
ptp_clock_event
ptp_clock_index
ptp_clock_register
ptp_clock_unregister
ptp_find_pin
ptp_schedule_worker

Bug: 315023870
Signed-off-by: Seiya Wang <seiya.wang@mediatek.com>
Change-Id: I046b656fe9049a701ca6a440111eb4bfa420cf52
2023-12-06 19:32:59 +00:00
Richard Chang
5723833390 ANDROID: mm: lru_cache_disable skips lru cache drainnig
lru_cache_disable is not trivial cost since it should run work
from every cores in the system. Thus, repeated call of the
function whenever alloc_contig_range in the cma's allocation loop
is called is expensive.

This patch makes the lru_cache_disable smarter in that it will
not run __lru_add_drain_all since it knows the cache was already
disabled by someone else.
With that, user of alloc_contig_range can disable the lru cache
in advance in their context so that subsequent alloc_contig_range
for user's operation will avoid the costly function call.

Bug: 313795505
Change-Id: Icbb0e6dbf74644d45f562fd1d845888ca1f1f347
Signed-off-by: Richard Chang <richardycc@google.com>
(cherry picked from commit 816567b17866ca3f9a11e670bd52c82335cbb448)
2023-12-06 18:54:20 +00:00
Richard Chang
0de2f42977 ANDROID: mm: cma: introduce __cma_alloc API
This patch enhances the CMA API with support for failfast mode,
utilizing the __GFP_NORETRY flag. This mode is specifically designed
for high-order bulk allocation scenarios, enabling the CMA API to
avoid prolonged stalls resulting from blocking pages such as those
undergoing page writeback or page locking. Instead of stalling, the
API will continue searching for readily migratable pages across
different pageblocks.

The original patch link:
Link: https://lore.kernel.org/linux-mm/YAnM5PbNJZlk%2F%2FiX@google.com/T/#m36b144ff81fe0a8f0ecaf6813de4819ecc41f8fe

Bug: 308881290
Change-Id: I1c623f17fb49c26005aaffc17330cf820ce6585c
Signed-off-by: Richard Chang <richardycc@google.com>
(cherry picked from commit 3390547fec36527ed15dd213ee55d397f83ffa46)
2023-12-06 18:54:20 +00:00
Eric Biggers
db9d7ba706 ANDROID: Update the ABI representation
INFO: type 'struct fscrypt_info' changed
  member 'u8 ci_data_unit_bits' was added
  member 'u8 ci_data_units_per_block_bits' was added

type 'struct fscrypt_policy_v2' changed
  member '__u8 log2_data_unit_size' was added
  member changed from '__u8 __reserved[4]' to '__u8 __reserved[3]'
    offset changed from 32 to 40
    type changed from '__u8[4]' to '__u8[3]'
      number of elements changed from 4 to 3

Bug: 299136786
Bug: 302588300
Change-Id: Idbbc2123961a41d395323c72cef67d94bdd17ab0
Signed-off-by: Eric Biggers <ebiggers@google.com>
2023-12-06 17:54:14 +00:00
Eric Biggers
6b972d6047 BACKPORT: fscrypt: support crypto data unit size less than filesystem block size
Until now, fscrypt has always used the filesystem block size as the
granularity of file contents encryption.  Two scenarios have come up
where a sub-block granularity of contents encryption would be useful:

1. Inline crypto hardware that only supports a crypto data unit size
   that is less than the filesystem block size.

2. Support for direct I/O at a granularity less than the filesystem
   block size, for example at the block device's logical block size in
   order to match the traditional direct I/O alignment requirement.

(1) first came up with older eMMC inline crypto hardware that only
supports a crypto data unit size of 512 bytes.  That specific case
ultimately went away because all systems with that hardware continued
using out of tree code and never actually upgraded to the upstream
inline crypto framework.  But, now it's coming back in a new way: some
current UFS controllers only support a data unit size of 4096 bytes, and
there is a proposal to increase the filesystem block size to 16K.

(2) was discussed as a "nice to have" feature, though not essential,
when support for direct I/O on encrypted files was being upstreamed.

Still, the fact that this feature has come up several times does suggest
it would be wise to have available.  Therefore, this patch implements it
by using one of the reserved bytes in fscrypt_policy_v2 to allow users
to select a sub-block data unit size.  Supported data unit sizes are
powers of 2 between 512 and the filesystem block size, inclusively.
Support is implemented for both the FS-layer and inline crypto cases.

This patch focuses on the basic support for sub-block data units.  Some
things are out of scope for this patch but may be addressed later:

- Supporting sub-block data units in combination with
  FSCRYPT_POLICY_FLAG_IV_INO_LBLK_64, in most cases.  Unfortunately this
  combination usually causes data unit indices to exceed 32 bits, and
  thus fscrypt_supported_policy() correctly disallows it.  The users who
  potentially need this combination are using f2fs.  To support it, f2fs
  would need to provide an option to slightly reduce its max file size.

- Supporting sub-block data units in combination with
  FSCRYPT_POLICY_FLAG_IV_INO_LBLK_32.  This has the same problem
  described above, but also it will need special code to make DUN
  wraparound still happen on a FS block boundary.

- Supporting use case (2) mentioned above.  The encrypted direct I/O
  code will need to stop requiring and assuming FS block alignment.
  This won't be hard, but it belongs in a separate patch.

- Supporting this feature on filesystems other than ext4 and f2fs.
  (Filesystems declare support for it via their fscrypt_operations.)
  On UBIFS, sub-block data units don't make sense because UBIFS encrypts
  variable-length blocks as a result of compression.  CephFS could
  support it, but a bit more work would be needed to make the
  fscrypt_*_block_inplace functions play nicely with sub-block data
  units.  I don't think there's a use case for this on CephFS anyway.

Link: https://lore.kernel.org/r/20230925055451.59499-6-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@google.com>

Bug: 299136786
Bug: 302588300
(cherry picked from commit 5b11888471806edf699316d4dcb9b426caebbef2)
(Reworked this commit to not change struct fscrypt_operations and not
 depend on other commits that changed struct fscrypt_operations.  Also
 resolved conflicts with the HW-wrapped key support.)
Change-Id: Ic3dc56ef3f42d123f812e9037e2cc6f0b24bacc1
Signed-off-by: Eric Biggers <ebiggers@google.com>
2023-12-06 17:54:14 +00:00
Pablo Neira Ayuso
72bdb74622 UPSTREAM: netfilter: nf_tables: remove catchall element in GC sync path
[ Upstream commit 93995bf4af2c5a99e2a87f0cd5ce547d31eb7630 ]

The expired catchall element is not deactivated and removed from GC sync
path. This path holds mutex so just call nft_setelem_data_deactivate()
and nft_setelem_catchall_remove() before queueing the GC work.

Bug: 310691882
Fixes: 4a9e12ea7e ("netfilter: nft_set_pipapo: call nft_trans_gc_queue_sync() in catchall GC")
Reported-by: lonial con <kongln9170@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit 13e2d49647)
Signed-off-by: Lee Jones <joneslee@google.com>
Change-Id: Ic5d1d98fe5a749e759869f0789cbb77c4ab5e6c2
2023-12-06 14:44:26 +00:00
liwei
924116f1b8 ANDROID: GKI: Update oplus symbol list
1 function symbol(s) added
  'int __traceiter_mm_vmscan_kswapd_wake(void*, int, int, int)'

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

Bug: 309352303
Change-Id: Id46347110c482eca8d0fb12bd1dd69a14ad8a337
Signed-off-by: liwei <liwei1234@oppo.com>
2023-12-05 20:22:28 +00:00
liwei
0ad2a3cd4d ANDROID: vendor_hooks: export tracepoint symbol trace_mm_vmscan_kswapd_wake
export tracepoint symbol trace_mm_vmscan_kswapd_wake so we can hook it in our ko
to capture some kswapd running info.

Bug: 309352303
Change-Id: Ieb37f544502f33e708dacda6cbb552792dfbbc6b
Signed-off-by: liwei <liwei1234@oppo.com>
2023-12-05 20:22:28 +00:00
luguohong
6465e29536 BACKPORT: HID: input: map battery system charging
HID descriptors with Battery System (0x85) Charging (0x44) usage are
ignored and POWER_SUPPLY_STATUS_DISCHARGING is always reported to user
space, even when the device is charging.

Map this usage and when it is reported set the right charging status.

In addition, add KUnit tests to make sure that the charging status is
correctly set and reported. They can be run with the usual command:

    $ ./tools/testing/kunit/kunit.py run --kunitconfig=drivers/hid

Signed-off-by: José Expósito <jose.exposito89@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>

Bug: 305125317
Change-Id: Iad6a8177ad6954ad8ac2b714cc35acffcf2f226f
(cherry picked from commit a608dc1c06)
Signed-off-by: luguohong <luguohong@xiaomi.corp-partner.google.com>
2023-12-01 19:04:48 +00:00
Paul Lawrence
cfdfc17a46 ANDROID: fuse-bpf: Ignore readaheads unless they go to the daemon
readpages will be triggered on the fuse fs in passthrough mode though
system calls like fadvise. If the daemon isn't aware of the file, this
will likely cause a hang.

For the moment, simply ignore fadvise in this situation

Bug: 301201239
Test: fuse_test, atest ScopedStorageDeviceTest both pass
Signed-off-by: Paul Lawrence <paullawrence@google.com>
Change-Id: I524a84aeeb1b1593e51264fcc37f7cfa66757168
2023-12-01 18:11:28 +00:00
Jaegeuk Kim
354b1b716c FROMGIT: f2fs: skip adding a discard command if exists
When recovering zoned UFS, sometimes we add the same zone to discard multiple
times. Simple workaround is to bypass adding it.

Reviewed-by: Chao Yu <chao@kernel.org>
Change-Id: Ic1501caa02aea8bdc9d7f00a8bd0d35be2ef4ba1
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
(cherry picked from commit bbd3efed3383e332191c665786c61653826d2ac3
 https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git dev)
2023-11-30 12:27:28 -08:00
Daeho Jeong
ccbea4f458 UPSTREAM: f2fs: clean up zones when not successfully unmounted
We can't trust write pointers when the previous mount was not
successfully unmounted.

Change-Id: If67696db9ab820a805711b43cabb50c796c9f75f
Signed-off-by: Daeho Jeong <daehojeong@google.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
(cherry picked from commit 9f792ab8e33de727993bbd84ece892e72de18c85)
2023-11-30 12:25:22 -08:00
Daeho Jeong
88cccede6d UPSTREAM: f2fs: use finish zone command when closing a zone
Use the finish zone command first when a zone should be closed.

Change-Id: Ie38800c2787392980f7914ad10b5f92f6d59e99b
Signed-off-by: Daeho Jeong <daehojeong@google.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
(cherry picked from commit 3b71661214)
2023-11-30 12:24:46 -08:00
Daeho Jeong
b2d3a555d3 UPSTREAM: f2fs: check zone write pointer points to the end of zone
We don't need to report an issue, when the zone write pointer already
points to the end of the zone, since the zone mismatch is already taken
care.

Change-Id: Ifc967abe44521cd239ebac509353c25e36cc7a18
Signed-off-by: Daeho Jeong <daehojeong@google.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
(cherry picked from commit c9667b19e2)
2023-11-30 12:24:00 -08:00
Daeho Jeong
c9e29a0073 UPSTREAM: f2fs: close unused open zones while mounting
Zoned UFS allows only 6 open zones at the same time, so we need to take
care of the count of open zones while mounting.

Change-Id: Ie197b9e9e47b3397446ce2cf97168c9f68fea431
Signed-off-by: Daeho Jeong <daehojeong@google.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
(cherry picked from commit 04abeb699d)
2023-11-30 12:23:09 -08:00
Daeho Jeong
e92b866e22 UPSTREAM: f2fs: maintain six open zones for zoned devices
To keep six open zone constraints, make them not to be open over six
open zones.

Change-Id: If5d02581073f90db4cadd8f928cef9abc5bac8a7
Signed-off-by: Daeho Jeong <daehojeong@google.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
(cherry picked from commit e067dc3c6b)
2023-11-30 12:20:46 -08:00
Fangzheng Zhang
088f228370 ANDROID: update symbol for unisoc whitelist
Add kmalloc_large_order_alloced

1 function symbol(s) added
  'int __traceiter_android_vh_kmalloc_large_alloced(void*, struct page*, unsigned int, gfp_t)'

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

Bug: 312897430
Change-Id: I586956fb3cef3d9c5dde63f08de9ed46715163c6
Signed-off-by: Fangzheng Zhang <fangzheng.zhang@unisoc.com>
2023-11-30 18:19:39 +00:00
Fangzheng Zhang
aa71a02cf3 ANDROID: vendor_hooks: mm: add hook to count the number pages
allocated for each slab

Add the tracing interface on the kmalloc_large allocation path,
which can detect the number of pages allocated by the slab,
and if exceeds a threshold, trigger a panic or other actions.

Bug: 312897430
Change-Id: I5575d0e4f91dab1c6e074f3e907fee8ea9327fd7
Signed-off-by: Fangzheng Zhang <fangzheng.zhang@unisoc.com>
2023-11-30 18:19:39 +00:00
Rick Yiu
4326c78f84 ANDROID: Update the ABI symbol list
Adding the following symbols:
  - __traceiter_android_rvh_set_user_nice_locked
  - __tracepoint_android_rvh_set_user_nice_locked

Bug: 300872872
Change-Id: I370d51175efc5ac1bf997bc2425cff8ab00b9b19
Signed-off-by: Rick Yiu <rickyiu@google.com>
2023-11-30 18:18:44 +00:00
Rick Yiu
eb67f58322 ANDROID: sched: Add trace_android_rvh_set_user_nice_locked
We will need vendor hook of set_user_nice with lock to avoid race
condition.

Bug: 300872872
Change-Id: I24fc1e13cc6578dcc418d956a5146ad29ff76a56
Signed-off-by: Rick Yiu <rickyiu@google.com>
2023-11-30 18:18:44 +00:00
yixuanjiang
855511173d UPSTREAM: ASoC: soc-compress: Fix deadlock in soc_compr_open_fe
[ Upstream commit 2222214749 ]

Modify the error handling flow by release lock.
The require mutex will keep holding if open fail.

Fixes: aa9ff6a495 ("ASoC: soc-compress: Reposition and add pcm_mutex")
Signed-off-by: yixuanjiang <yixuanjiang@google.com>
Link: https://lore.kernel.org/r/20230619033127.2522477-1-yixuanjiang@google.com
Signed-off-by: Mark Brown <broonie@kernel.org>

Bug: 303236405
Change-Id: I64172b9d40b061239c7e4087f34759c3b23cfa6a
Signed-off-by: Yixuan Jiang <yixuanjiang@google.com>
2023-11-30 18:09:27 +00:00
Kuninori Morimoto
6cb2109589 BACKPORT: ASoC: add snd_soc_card_mutex_lock/unlock()
ASoC need to use card->mutex with _INIT or _RUNTIME,
but there is no helper function for it.

This patch adds its helper function and use it.

Because people might misunderstand that _init() is mutex initialization,
this patch renames _INIT to _ROOT and adds new
snd_soc_card_mutex_lock_root() for it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87a5zlx3tw.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>

Bug: 303236405
(cherry picked from commit 0f3b818486)
[ Yixuan Jiang: Fix minor conflict ]
Change-Id: Ie8cd7aeeea759576423760d25b5fb5b2c9ae0d12
Signed-off-by: Yixuan Jiang <yixuanjiang@google.com>
2023-11-30 18:09:27 +00:00
Kuninori Morimoto
edfef8fdc9 BACKPORT: ASoC: expand snd_soc_dpcm_mutex_lock/unlock()
soc-pcm.c has snd_soc_dpcm_mutex_lock/unlock(),
but other files can't use it because it is static function.

It requests snd_soc_pcm_runtime as parameter (A), but sometimes we
want to use it by snd_soc_card (B).

(A)	static inline void snd_soc_dpcm_mutex_lock(struct snd_soc_pcm_runtime *rtd)
	{
		mutex_lock_nested(&rtd->card->pcm_mutex, rtd->card->pcm_subclass);
	}			   ^^^^^^^^^

(B)	mutex_lock_nested(&card->pcm_mutex, card->pcm_subclass);
			   ^^^^

We want to use it with both "rtd" and "card" for dapm lock/unlock.
To enable it, this patch uses _Generic macro.

This patch makes snd_soc_dpcm_mutex_{un}lock() global function, and use it on
each files.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87bkk1x3ud.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>

Bug: 303236405
(cherry picked from commit 38e42f6d6c)
[ Yixuan Jiang: Fix minor conflict ]
Change-Id: Id942841c7ca1642b44b1229a7bf4ab1bc5373707
Signed-off-by: Yixuan Jiang <yixuanjiang@google.com>
2023-11-30 18:09:27 +00:00
Kuninori Morimoto
52771d9792 BACKPORT: ASoC: expand snd_soc_dapm_mutex_lock/unlock()
soc.h has snd_soc_dapm_mutex_lock/unlock() definition and
many drivers are using it, but soc-dapm.c is not.

1st reason is snd_soc_dapm_mutex_lock/unlock() requests
snd_soc_dapm_context pointer as parameter (A), but sometimes soc-dapm.c
needs to use snd_soc_card (B).

(A)	static inline void snd_soc_dapm_mutex_lock(struct snd_soc_dapm_context *dapm)
	{
		mutex_lock_nested(&dapm->card->dapm_mutex, SND_SOC_DAPM_CLASS_RUNTIME);
	}			   ^^^^^^^^^^

(B)	mutex_lock_nested(&card->dapm_mutex, SND_SOC_DAPM_CLASS_RUNTIME);
			   ^^^^

2nd reason is it want to use SND_SOC_DAPM_CLASS_INIT for mutex_lock_nested(),
but helper is using _RUNTIME (A).

The conclusion is we want to use "dapm vs card" and "_RUNTIME vs _INIT"
for dapm lock/unlock. To enable this selfish request, this patch uses
_Generic macro. We can use snd_soc_dapm_mutex_lock/unlock() for both
dapm and card case.

	snd_soc_dapm_mutex_lock(dapm);	snd_soc_dapm_mutex_unlock(dapm);
	snd_soc_dapm_mutex_lock(card);	snd_soc_dapm_mutex_unlock(card);

Current soc-dapm.c is using both mutex_lock() and mutex_lock_nested().
This patch handles mutex_lock() as mutex_lock_nested(..., 0),
in other words, handles below as same.

	mutex_lock(&card->dapm_mutex);
	mutex_lock_nested(&card->dapm_mutex, SND_SOC_DAPM_CLASS_INIT);

Because people might misunderstand that _init() is mutex initialization,
this patch renames _INIT to _ROOT and adds new
snd_soc_dapm_mutex_lock_root() for it.

This patch also moves snd_soc_dapm_subclass definition from soc-dapm.h
to soc.h to keep related code together.

Because very complex soc.h vs soc-dapm.h relationship,
it is difficult/impossible to define these helper into soc-dapm.h.

Change-Id: I064718bbad9d053a0c84549be0a5e942f29a5dee
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87cz4hx3v0.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>

Bug: 303236405
(cherry picked from commit 4a778bdc7a)
[ Yixuan Jiang: Fix minor conflict ]
Change-Id: I0fa12ec9272847c320ccdb0d69eceb2a03853d4e
Signed-off-by: Yixuan Jiang <yixuanjiang@google.com>
2023-11-30 18:09:27 +00:00
Greg Kroah-Hartman
3e0f75c1a4 Merge branch 'android14-6.1' into branch 'android14-6.1-lts'
This merges the latest changes from branch android14-6.1 into the
android14-6.1-lts branch to catch up on bugfixes and some new symbols to
track.

Included in here are the following commits:

*   dc61d0ccd6 Merge "Merge tag 'android14-6.1.57_r00' into branch 'android14-6.1'" into android14-6.1
|\
| * bf9a785d04 Merge tag 'android14-6.1.57_r00' into branch 'android14-6.1'
* ceb6ff1a69 ANDROID: Update the ABI symbol list
* 0d97bca80a ANDROID: sched: Add vendor hook for update_load_sum
* eba89bbb6f FROMGIT: freezer,sched: clean saved_state when restoring it during thaw
* 2a5c5d7c47 FROMGIT: freezer,sched: do not restore saved_state of a thawed task
* 6e3127c7ba ANDROID: GKI: add allowed list for Exynosauto SoC
* af85ead8ce ANDROID: KVM: arm64: pkvm_module_ops documentation
* c331f5b7af ANDROID: Update the ABI symbol list
* bcb7dfe013 UPSTREAM: usb: typec: tcpm: Fix NULL pointer dereference in tcpm_pd_svdm()
* 61ca1246d9 ANDROID: GKI: Update oplus symbol list
* d3787b952a UPSTREAM: drm/qxl: fix UAF on handle creation
* a2377cc135 FROMGIT: usb:gadget:uvc Do not use worker thread to pump isoc usb requests
* 82a411cec6 FROMGIT: usb: gadget: uvc: Fix use-after-free for inflight usb_requests
* 3c26a5d92f FROMGIT: usb: gadget: uvc: move video disable logic to its own function
* 20853add09 FROMGIT: usb: gadget: uvc: Allocate uvc_requests one at a time
* 5f3550218b FROMGIT: usb: gadget: uvc: prevent use of disabled endpoint
* 9673df54cd UPSTREAM: drm/fourcc: Add NV20 and NV30 YUV formats
* 3ee517981d FROMLIST: virt: geniezone: Add memory relinquish support
* c57b152c45 FROMGIT: Input: uinput - allow injecting event times
* df6e6fc38f UPSTREAM: PM: hibernate: Fix copying the zero bitmap to safe pages
* 7181d45e36 UPSTREAM: PM: hibernate: don't store zero pages in the image file
* 7385b83107 UPSTREAM: PM: hibernate: Complain about memory map mismatches during resume

Change-Id: I41e7aa4c8a3ab86f9421e32a0acd0fb8f991bb81
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2023-11-30 10:26:17 +00:00
Greg Kroah-Hartman
dc61d0ccd6 Merge "Merge tag 'android14-6.1.57_r00' into branch 'android14-6.1'" into android14-6.1 2023-11-30 10:20:44 +00:00
Chungkai Mei
ceb6ff1a69 ANDROID: Update the ABI symbol list
Adding the following symbols:
  - __traceiter_android_rvh_update_load_sum
  - __tracepoint_android_rvh_update_load_sum

Bug: 181105055
Change-Id: Ie70d640f252f40af86aff48bcf2d5cfd80485393
Signed-off-by: Chungkai Mei <chungkai@google.com>
2023-11-29 21:33:45 +00:00
Chungkai Mei
0d97bca80a ANDROID: sched: Add vendor hook for update_load_sum
vendor may have the need to modify update_load_sum function

Bug: 181105055
Change-Id: I35964977a4b8917c62773d48a37340f880774e38
Signed-off-by: Chungkai Mei <chungkai@google.com>
(cherry picked from commit 984523c368)
2023-11-29 21:33:45 +00:00
Elliot Berman
eba89bbb6f FROMGIT: freezer,sched: clean saved_state when restoring it during thaw
Clean saved_state after using it during thaw. Cleaning the saved_state
allows us to avoid some unnecessary branches in ttwu_state_match.

Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/20231120-freezer-state-multiple-thaws-v1-2-f2e1dd7ce5a2@quicinc.com

Bug: 292064955
Bug: 312992017
(cherry picked from commit 418146e39891ef1fb2284dee4cabbfe616cd21cf
 https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git sched/core)
Change-Id: I245593122edecb1dc9c354c36b59da057d4f4e00
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
2023-11-29 20:08:28 +00:00
Elliot Berman
2a5c5d7c47 FROMGIT: freezer,sched: do not restore saved_state of a thawed task
It is possible for a task to be thawed multiple times when mixing the
*legacy* cgroup freezer and system-wide freezer. To do this, freeze the
cgroup, do system-wide freeze/thaw, then thaw the cgroup. When this
happens, then a stale saved_state can be written to the task's state
and cause task to hang indefinitely. Fix this by only trying to thaw
tasks that are actually frozen.

This change also has the marginal benefit avoiding unnecessary
wake_up_state(p, TASK_FROZEN) if we know the task is already thawed.
There is not possibility of time-of-compare/time-of-use race when we skip
the wake_up_state because entering/exiting TASK_FROZEN is guarded by
freezer_lock.

Fixes: 8f0eed4a78a8 ("freezer,sched: Use saved_state to reduce some spurious wakeups")
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Abhijeet Dharmapurikar <quic_adharmap@quicinc.com>
Link: https://lore.kernel.org/r/20231120-freezer-state-multiple-thaws-v1-1-f2e1dd7ce5a2@quicinc.com

Bug: 292064955
Bug: 312992017
(cherry picked from commit 23ab79e8e469e2605beec2e3ccb40d19c68dd2e0
 https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git sched/urgent)
Change-Id: I09cb09a3ef3641c71e3b3156bc3a9a3e69d4966e
Signed-off-by: Qi Feng <fengqi@xiaomi.corp-partner.google.com>
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
2023-11-29 20:08:28 +00:00
Junho Cha
6e3127c7ba ANDROID: GKI: add allowed list for Exynosauto SoC
This patch adds GKI symbol list for Exynosauto SoC.
We need to add below 3 function symbols and it required
by DP MST of DRM(Direct Rendering Manager) driver.

3 function symbol(s) added
  'int drm_connector_set_path_property(struct drm_connector*, const char*)'
  'int drm_helper_probe_detect(struct drm_connector*, struct drm_modeset_acquire_ctx*, bool)'
  'int of_graph_get_endpoint_count(const struct device_node*)'

Bug: 313751443
Change-Id: I3a7e212f598d50f21ee2272ccb18ceaa5af72f42
Signed-off-by: Junho Cha <junhomax.cha@samsung.com>
2023-11-29 19:33:55 +00:00
Vincent Donnefort
af85ead8ce ANDROID: KVM: arm64: pkvm_module_ops documentation
This structure is at the heart of the module support for pKVM. Add a
description to help anyone trying to create a module.

Bug: 312200309
Change-Id: Ie1d9043a6a94d15dd8ef25c6f0f8d442da26bc1f
Signed-off-by: Vincent Donnefort <vdonnefort@google.com>
2023-11-29 15:43:49 +00:00
Greg Kroah-Hartman
0dfb0f3c97 Revert "inet: shrink struct flowi_common"
This reverts commit 612c22e928 which is
commit 1726483b79a72e0150734d5367e4a0238bf8fcff upstream.

It only moves things around a structure, AND it saves lots of memory,
but in doing so breaks the stable Android ABI, so it must be reverted
(Android devices have plenty of kernel memory...)  If this is to come
back in the future, it can do so in an abi-safe way.

Bug: 161946584
Change-Id: I5a5a40c6f6982122d766f3fe5cfde3f3514bc9ae
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2023-11-29 14:34:12 +00:00
Greg Kroah-Hartman
937b554499 Revert "mfd: core: Un-constify mfd_cell.of_reg"
This reverts commit f1ed6c4e59 which is
commit 3c70342f1f0045dc827bb2f02d814ce31e0e0d05 upstream.

It breaks the Android ABI and if it is really needed can come back in
the future in an ABI-safe way.

Bug: 161946584
Change-Id: I31531da478d4a3e87c532ab9c85980415e07b945
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2023-11-29 14:31:43 +00:00
Greg Kroah-Hartman
c42877e34f Revert "arm64/arm: xen: enlighten: Fix KPTI checks"
This reverts commit 2836c72e8d which is
commit 20f3b8eafe0ba5d3c69d5011a9b07739e9645132 upstream.

It breaks the Android ABI and we do not care about Xen on Android, so it
is safe to revert.

Bug: 161946584
Change-Id: I4bf8a87650256a5f4b2faee626557604631ee286
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2023-11-29 14:27:05 +00:00
Greg Kroah-Hartman
55d4929d66 Revert "virtio/vsock: replace virtio_vsock_pkt with sk_buff"
This reverts commit baddcc2c71 which is
commit 71dc9ec9ac upstream.

It needs to be reverted, as the function virtio_transport_free_pkt() is
in the stable Android ABI, and this function is removed in the 6.1.63
kernel as part of a series of fixes and optimizations of the virtio
networking connection.  To preserve the ABI (and thereby keeping the
slower interface), revert the commit for now.

If this needs to come back in the future, if performance for this
interface needs to be resolved, it can be done so in an ABI-safe way.

Bug: 161946584
Change-Id: Id589087dead45cb846fd9a735a0daece04b8e252
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2023-11-29 13:06:15 +00:00
Greg Kroah-Hartman
5418948a0a Revert "vsock/virtio: remove socket from connected/bound list on shutdown"
This reverts commit 1fecefb092 which is
commit 3a5cc90a4d1756072619fe511d07621bdef7f120 upstream.

It needs to be reverted, as the function virtio_transport_free_pkt() is
in the stable Android ABI, and this function is removed in the 6.1.63
kernel as part of a series of fixes and optimizations of the virtio
networking connection.  To preserve the ABI (and thereby keeping the
slower interface), revert the commit for now.

If this needs to come back in the future, if performance for this
interface needs to be resolved, it can be done so in an ABI-safe way.

Bug: 161946584
Change-Id: If85ca36d955d97171fe83a56888e716cc5d52ccc
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2023-11-29 13:05:57 +00:00
Greg Kroah-Hartman
98f663d79a Revert "virtio/vsock: don't use skbuff state to account credit"
This reverts commit 5852a2b573 which is
commit 0777061657 upstream.

It needs to be reverted, as the function virtio_transport_free_pkt() is
in the stable Android ABI, and this function is removed in the 6.1.63
kernel as part of a series of fixes and optimizations of the virtio
networking connection.  To preserve the ABI (and thereby keeping the
slower interface), revert the commit for now.

If this needs to come back in the future, if performance for this
interface needs to be resolved, it can be done so in an ABI-safe way.

Bug: 161946584
Change-Id: I6607855de7742319460554c4b81edbce0aab0c37
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2023-11-29 13:05:39 +00:00
Greg Kroah-Hartman
497503c6ec Revert "virtio/vsock: remove redundant 'skb_pull()' call"
This reverts commit 883a3db221 which is
commit 6825e6b4f8 upstream.

It needs to be reverted, as the function virtio_transport_free_pkt() is
in the stable Android ABI, and this function is removed in the 6.1.63
kernel as part of a series of fixes and optimizations of the virtio
networking connection.  To preserve the ABI (and thereby keeping the
slower interface), revert the commit for now.

If this needs to come back in the future, if performance for this
interface needs to be resolved, it can be done so in an ABI-safe way.

Bug: 161946584
Change-Id: I377797e7be1981ec41108b89c40d484197fd1082
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2023-11-29 13:05:22 +00:00
Greg Kroah-Hartman
5b9223a56f Revert "virtio/vsock: don't drop skbuff on copy failure"
This reverts commit 1e5f00e9db which is
commit 8daaf39f7f upstream.

It needs to be reverted, as the function virtio_transport_free_pkt() is
in the stable Android ABI, and this function is removed in the 6.1.63
kernel as part of a series of fixes and optimizations of the virtio
networking connection.  To preserve the ABI (and thereby keeping the
slower interface), revert the commit for now.

If this needs to come back in the future, if performance for this
interface needs to be resolved, it can be done so in an ABI-safe way.

Bug: 161946584
Change-Id: Ie929bb2fbb4e3dc3cadc1e0d3b63ed8e83257a4a
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2023-11-29 13:05:02 +00:00
Greg Kroah-Hartman
ec573670da Revert "virtio/vsock: fix leaks due to missing skb owner"
This reverts commit a6650e78c4 which is
commit f9d2b1e146 upstream.

It needs to be reverted, as the function virtio_transport_free_pkt() is
in the stable Android ABI, and this function is removed in the 6.1.63
kernel as part of a series of fixes and optimizations of the virtio
networking connection.  To preserve the ABI (and thereby keeping the
slower interface), revert the commit for now.

If this needs to come back in the future, if performance for this
interface needs to be resolved, it can be done so in an ABI-safe way.

Bug: 161946584
Change-Id: Ia3ece70e6ced0b779c911cb47aa133c2d378aa82
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2023-11-29 13:04:35 +00:00