Commit Graph

73 Commits

Author SHA1 Message Date
Greg Kroah-Hartman
69f799168c Merge 6.12.31 into android16-6.12-lts
GKI (arm64) relevant 137 out of 624 changes, affecting 192 files +1647/-1035
  a4f865ecdb nvmem: core: fix bit offsets of more than one byte [1 file, +17/-7]
  4327479e55 nvmem: core: verify cell's raw_len [1 file, +12/-0]
  410f8b72e0 nvmem: core: update raw_len if the bit reading is required [1 file, +3/-1]
  7aea1517fb scsi: ufs: Introduce quirk to extend PA_HIBERN8TIME for UFS devices [2 files, +35/-0]
  b730cb1096 virtio_ring: Fix data race by tagging event_triggered as racy for KCSAN [1 file, +1/-1]
  2998813177 dma/mapping.c: dev_dbg support for dma_addressing_limited [1 file, +10/-1]
  3eec42a17a dma-mapping: avoid potential unused data compilation warning [1 file, +8/-4]
  97edaa0ec6 cgroup: Fix compilation issue due to cgroup_mutex not being exported [1 file, +1/-1]
  f93675793b vhost_task: fix vhost_task_create() documentation [1 file, +1/-1]
  e22034cbee dma-mapping: Fix warning reported for missing prototype [1 file, +8/-8]
  4f5553a08f fs/buffer: split locking for pagecache lookups [1 file, +25/-16]
  e138fc2316 fs/buffer: introduce sleeping flavors for pagecache lookups [2 files, +17/-0]
  a49a4a87ce fs/buffer: use sleeping version of __find_get_block() [1 file, +9/-2]
  f1c5aa614b fs/jbd2: use sleeping version of __find_get_block() [1 file, +9/-6]
  9ece099e95 fs/ext4: use sleeping version of sb_find_get_block() [1 file, +2/-1]
  64f505b08e block: fix race between set_blocksize and read paths [4 files, +43/-1]
  218c838d03 io_uring: don't duplicate flushing in io_req_post_cqe [1 file, +8/-3]
  8014d3e56e bpf: fix possible endless loop in BPF map iteration [1 file, +1/-1]
  d40ca27602 fuse: Return EPERM rather than ENOSYS from link() [1 file, +2/-0]
  bab0bd1389 exfat: call bh_read in get_block only when necessary [1 file, +77/-82]
  01677e7ee1 io_uring/msg: initialise msg request opcode [1 file, +1/-0]
  e506751b7d arm64: Add support for HIP09 Spectre-BHB mitigation [2 files, +3/-0]
  4f427ca9ed tracing: Mark binary printing functions with __printf() attribute [4 files, +18/-21]
  15787ab82a mailbox: use error ret code of of_parse_phandle_with_args() [1 file, +4/-3]
  f48ee562c0 Bluetooth: Disable SCO support if READ_VOICE_SETTING is unsupported/broken [1 file, +3/-0]
  44b79041c4 dql: Fix dql->limit value when reset. [1 file, +1/-1]
  ac30595154 lockdep: Fix wait context check on softirq for PREEMPT_RT [1 file, +18/-0]
  e63b634806 PCI: dwc: ep: Ensure proper iteration over outbound map windows [1 file, +1/-1]
  37ac2434aa ext4: on a remount, only log the ro or r/w state when it has changed [1 file, +4/-3]
  1d1e1efad1 libnvdimm/labels: Fix divide error in nd_label_data_init() [1 file, +2/-1]
  123bcd8f42 pidfs: improve multi-threaded exec and premature thread-group leader exit polling [3 files, +9/-9]
  8f82cf305e cgroup/rstat: avoid disabling irqs for O(num_cpu) [1 file, +5/-7]
  a5a507fa5f blk-cgroup: improve policy registration error handling [1 file, +12/-10]
  94c3cbc69a ext4: reorder capability check last [1 file, +2/-2]
  e658f2d94a bpf: Return prog btf_id without capable check [1 file, +2/-2]
  e2520cc19b PCI: dwc: Use resource start as ioremap() input in dw_pcie_pme_turn_off() [1 file, +1/-1]
  50452704ec jbd2: do not try to recover wiped journal [1 file, +6/-5]
  dab35f4921 tcp: reorganize tcp_in_ack_event() and tcp_count_delivered() [1 file, +32/-24]
  555c0b713c bpf: Allow pre-ordering for bpf cgroup progs [5 files, +30/-9]
  572ed3fb99 kconfig: do not clear SYMBOL_VALID when reading include/config/auto.conf [1 file, +12/-7]
  174dedce64 dm: restrict dm device size to 2^63-512 bytes [1 file, +4/-0]
  2f5f326214 ext4: reject the 'data_err=abort' option in nojournal mode [1 file, +12/-0]
  d0dc233fe2 posix-timers: Add cond_resched() to posix_timer_add() search loop [1 file, +1/-0]
  ae22452d15 posix-timers: Ensure that timer initialization is fully visible [1 file, +14/-7]
  3fb9ee05ec timer_list: Don't use %pK through printk() [1 file, +2/-2]
  21153e0974 netfilter: conntrack: Bound nf_conntrack sysctl writes [1 file, +9/-3]
  236a87e9d2 PNP: Expand length of fixup id string [1 file, +1/-1]
  6215143ad3 arm64/mm: Check pmd_table() in pmd_trans_huge() [1 file, +12/-12]
  8ad58a7eba arm64/mm: Check PUD_TYPE_TABLE in pud_bad() [1 file, +2/-1]
  28306c58da mmc: sdhci: Disable SD card clock before changing parameters [1 file, +7/-2]
  3a75fe58a1 usb: xhci: Don't change the status of stalled TDs on failed Stop EP [1 file, +11/-1]
  101a3b9920 printk: Check CON_SUSPEND when unblanking a console [1 file, +12/-2]
  faba68a86a wifi: cfg80211: allow IR in 20 MHz configurations [5 files, +46/-25]
  c1502fc84d ipv6: save dontfrag in cork [2 files, +6/-4]
  75ae2a3553 badblocks: Fix a nonsense WARN_ON() which checks whether a u64 variable < 0 [1 file, +3/-2]
  7caad075ac crypto: lzo - Fix compression buffer overrun [6 files, +106/-28]
  73d01bcbf2 tcp: bring back NUMA dispersion in inet_ehash_locks_alloc() [1 file, +26/-11]
  1c17190880 usb: xhci: set page size to the xHCI-supported size [2 files, +22/-20]
  93f581d763 drm/gem: Test for imported GEM buffers with helper [2 files, +16/-2]
  c4525b513d net: phylink: use pl->link_interface in phylink_expects_phy() [1 file, +1/-1]
  f29c876d72 perf/core: Clean up perf_try_init_event() [1 file, +38/-27]
  af73c8fd73 ublk: enforce ublks_max only for unprivileged devices [1 file, +27/-15]
  592ba27580 perf/hw_breakpoint: Return EOPNOTSUPP for unsupported breakpoint type [1 file, +3/-2]
  3de322a98b scsi: logging: Fix scsi_logging_level bounds [1 file, +3/-1]
  f33b310eac ipv4: fib: Move fib_valid_key_len() to rtm_to_fib_config(). [2 files, +16/-24]
  564f03a797 block: mark bounce buffering as incompatible with integrity [2 files, +5/-2]
  82209faa87 ublk: complete command synchronously on error [1 file, +6/-5]
  b98aad5e5e media: uvcvideo: Add sanity check to uvc_ioctl_xu_ctrl_map [1 file, +6/-0]
  2d6231d5ce media: uvcvideo: Handle uvc menu translation inside uvc_get_le_value [1 file, +32/-45]
  e359d62886 perf: arm_pmuv3: Call kvm_vcpu_pmu_resync_el0() before enabling counters [1 file, +2/-2]
  673dde8d3c bpf: Search and add kfuncs in struct_ops prologue and epilogue [1 file, +24/-1]
  083383aba0 cpuidle: menu: Avoid discarding useful information [1 file, +12/-1]
  20a53c3689 loop: check in LO_FLAGS_DIRECT_IO in loop_default_blocksize [1 file, +1/-1]
  b55a97d1bd dm: fix unconditional IO throttle caused by REQ_PREFLUSH [1 file, +6/-2]
  9f27b38771 crypto: ahash - Set default reqsize from ahash_alg [2 files, +7/-0]
  897c98fb32 crypto: skcipher - Zap type in crypto_alloc_sync_skcipher [1 file, +1/-0]
  4d9fa2ebc0 net: ipv6: Init tunnel link-netns before registering dev [4 files, +9/-7]
  53f42776e4 genirq/msi: Store the IOMMU IOVA directly in msi_desc instead of iommu_cookie [2 files, +25/-36]
  2b129e89b8 bpf: don't do clean_live_states when state->loop_entry->branches > 0 [1 file, +4/-0]
  46ba5757a7 bpf: copy_verifier_state() should copy 'loop_entry' field [1 file, +3/-0]
  82b54455b6 PCI: Fix old_size lower bound in calculate_iosize() too [1 file, +2/-4]
  dc5f5c9d2b hrtimers: Replace hrtimer_clock_to_base_table with switch-case [1 file, +12/-17]
  000dd6e344 ASoC: ops: Enforce platform maximum on initial value [1 file, +28/-1]
  c4260bf83b ASoC: soc-dai: check return value at snd_soc_dai_set_tdm_slot() [1 file, +5/-3]
  5b1b4cb46d pinctrl: devicetree: do not goto err when probing hogs in pinctrl_dt_to_map [1 file, +8/-2]
  69689d1138 media: v4l: Memset argument to 0 before calling get_mbus_config pad op [2 files, +5/-1]
  e6e31b0182 sched: Reduce the default slice to avoid tasks getting an extra tick [1 file, +3/-3]
  ef31dc41cf phy: core: don't require set_mode() callback for phy_get_mode() to work [1 file, +4/-3]
  06daedb443 xfrm: prevent high SEQ input in non-ESN mode [1 file, +12/-0]
  9f2911868a ip: fib_rules: Fetch net from fib_rule in fib[46]_rule_configure(). [2 files, +4/-4]
  7fea5a9140 r8152: add vendor/device ID pair for Dell Alienware AW1022z [2 files, +2/-0]
  16ddd67bb5 pstore: Change kmsg_bytes storage size to u32 [3 files, +9/-8]
  73733c2fdb ext4: don't write back data before punch hole in nojournal mode [1 file, +5/-13]
  1d15319323 f2fs: introduce f2fs_base_attr for global sysfs entries [1 file, +52/-22]
  ded26f9e4c ipv4: ip_gre: Fix set but not used warning in ipgre_err() if IPv4-only [1 file, +10/-6]
  76e56dbe50 net: flush_backlog() small changes [1 file, +8/-4]
  58cdd1ee65 bridge: mdb: Allow replace of a host-joined group [2 files, +2/-2]
  fcabb69674 rcu: handle unstable rdp in rcu_read_unlock_strict() [2 files, +11/-2]
  d402437cde rcu: fix header guard for rcu_all_qs() [1 file, +1/-1]
  887e39ac47 perf: Avoid the read if the count is already updated [3 files, +24/-18]
  c80b2d159c bpf: Use kallsyms to find the function name of a struct_ops's stub function [1 file, +44/-54]
  46f1c2b508 firmware: arm_scmi: Relax duplicate name constraint across protocol ids [1 file, +6/-13]
  1351052877 drm/atomic: clarify the rules around drm_atomic_state->allow_modeset [1 file, +21/-2]
  9fddd1f154 drm: Add valid clones check [1 file, +28/-0]
  ff214b079d nvme-pci: add quirks for device 126f:1001 [1 file, +3/-0]
  6d196cae4b nvme-pci: add quirks for WDC Blue SN550 15b7:5009 [1 file, +3/-0]
  6a09b6bad0 ALSA: usb-audio: Fix duplicated name in MIDI substream names [1 file, +12/-4]
  ad3e83a6c8 io_uring/fdinfo: annotate racy sq/cq head/tail reads [1 file, +2/-2]
  7f7c8c03fe btrfs: correct the order of prelim_ref arguments in btrfs__prelim_ref [1 file, +1/-1]
  8cafd7266f __legitimize_mnt(): check for MNT_SYNC_UMOUNT should be under mount_lock [1 file, +1/-5]
  28756f22de espintcp: fix skb leaks [3 files, +9/-3]
  9cbca30102 espintcp: remove encap socket caching to avoid reference leak [4 files, +8/-94]
  b1a687eb15 xfrm: Fix UDP GRO handling for some corner cases [2 files, +20/-16]
  447c8f0c06 kernel/fork: only call untrack_pfn_clear() on VMAs duplicated for fork() [1 file, +5/-4]
  252f78a931 xfrm: Sanitize marks before insert [2 files, +6/-0]
  7207effe47 driver core: Split devres APIs to device/devres.h [2 files, +125/-118]
  1e8b7e96f7 Bluetooth: L2CAP: Fix not checking l2cap_chan security level [1 file, +8/-7]
  cd7f022296 loop: don't require ->write_iter for writable files in loop_configure [1 file, +0/-3]
  873ebaf3c1 io_uring: fix overflow resched cqe reordering [1 file, +1/-0]
  689a205cd9 net/tipc: fix slab-use-after-free Read in tipc_aead_encrypt_done [1 file, +5/-0]
  adb05149a9 can: slcan: allow reception of short error messages [1 file, +20/-6]
  cc55dd28c2 can: bcm: add locking for bcm_op runtime updates [1 file, +45/-21]
  63567ecd99 can: bcm: add missing rcu read protection for procfs content [1 file, +9/-4]
  bf85e49aaf ALSA: pcm: Fix race of buffer access at PCM OSS layer [3 files, +14/-2]
  e78908caf1 pmdomain: core: Fix error checking in genpd_dev_pm_attach_by_id() [1 file, +1/-1]
  dc9bdfb9b0 drm/edid: fixed the bug that hdr metadata was not reset [1 file, +1/-0]
  cb9a1019a6 Input: xpad - add more controllers [1 file, +3/-0]
  9b8263cae6 highmem: add folio_test_partial_kmap() [2 files, +12/-5]
  314bf771cb memcg: always call cond_resched() after fn() [1 file, +2/-4]
  9da33ce114 mm/page_alloc.c: avoid infinite retries caused by cpuset race [1 file, +8/-0]
  9f9517f156 mm: mmap: map MAP_STACK to VM_NOHUGEPAGE only if THP is enabled [1 file, +2/-0]
  94efb0d656 mm: vmalloc: actually use the in-place vrealloc region [1 file, +1/-0]
  483ac74183 mm: vmalloc: only zero-init on vrealloc shrink [1 file, +7/-5]
  1d45e0170c spi: use container_of_cont() for to_spi_device() [1 file, +1/-4]
  d28b0305f7 err.h: move IOMEM_ERR_PTR() to err.h [2 files, +3/-2]
  80eb73778d bpf: abort verification if env->cur_state->loop_entry != NULL [1 file, +4/-2]
  85fb1edd05 drm/gem: Internally test import_attach for imported objects [1 file, +1/-2]

Changes in 6.12.31
	drm/amd/display: Configure DTBCLK_P with OPTC only for dcn401
	drm/amd/display: Do not enable replay when vtotal update is pending.
	drm/amd/display: Correct timing_adjust_pending flag setting.
	drm/amd/display: Defer BW-optimization-blocked DRR adjustments
	i2c: designware: Use temporary variable for struct device
	i2c: designware: Fix an error handling path in i2c_dw_pci_probe()
	phy: renesas: rcar-gen3-usb2: Move IRQ request in probe
	phy: renesas: rcar-gen3-usb2: Lock around hardware registers and driver data
	phy: renesas: rcar-gen3-usb2: Assert PLL reset on PHY power off
	cpufreq: Add SM8650 to cpufreq-dt-platdev blocklist
	nvmem: rockchip-otp: Move read-offset into variant-data
	nvmem: rockchip-otp: add rk3576 variant data
	nvmem: core: fix bit offsets of more than one byte
	nvmem: core: verify cell's raw_len
	nvmem: core: update raw_len if the bit reading is required
	nvmem: qfprom: switch to 4-byte aligned reads
	scsi: target: iscsi: Fix timeout on deleted connection
	scsi: ufs: Introduce quirk to extend PA_HIBERN8TIME for UFS devices
	virtio_ring: Fix data race by tagging event_triggered as racy for KCSAN
	dma/mapping.c: dev_dbg support for dma_addressing_limited
	intel_th: avoid using deprecated page->mapping, index fields
	mei: vsc: Use struct vsc_tp_packet as vsc-tp tx_buf and rx_buf type
	dma-mapping: avoid potential unused data compilation warning
	cgroup: Fix compilation issue due to cgroup_mutex not being exported
	vhost_task: fix vhost_task_create() documentation
	vhost-scsi: protect vq->log_used with vq->mutex
	scsi: mpi3mr: Add level check to control event logging
	net: enetc: refactor bulk flipping of RX buffers to separate function
	dma-mapping: Fix warning reported for missing prototype
	ima: process_measurement() needlessly takes inode_lock() on MAY_READ
	fs/buffer: split locking for pagecache lookups
	fs/buffer: introduce sleeping flavors for pagecache lookups
	fs/buffer: use sleeping version of __find_get_block()
	fs/ocfs2: use sleeping version of __find_get_block()
	fs/jbd2: use sleeping version of __find_get_block()
	fs/ext4: use sleeping version of sb_find_get_block()
	drm/amd/display: Enable urgent latency adjustment on DCN35
	drm/amdgpu: Allow P2P access through XGMI
	selftests/bpf: Mitigate sockmap_ktls disconnect_after_delete failure
	block: fix race between set_blocksize and read paths
	io_uring: don't duplicate flushing in io_req_post_cqe
	bpf: fix possible endless loop in BPF map iteration
	samples/bpf: Fix compilation failure for samples/bpf on LoongArch Fedora
	kconfig: merge_config: use an empty file as initfile
	x86/fred: Fix system hang during S4 resume with FRED enabled
	s390/vfio-ap: Fix no AP queue sharing allowed message written to kernel log
	cifs: Add fallback for SMB2 CREATE without FILE_READ_ATTRIBUTES
	cifs: Fix querying and creating MF symlinks over SMB1
	cifs: Fix negotiate retry functionality
	smb: client: Store original IO parameters and prevent zero IO sizes
	fuse: Return EPERM rather than ENOSYS from link()
	exfat: call bh_read in get_block only when necessary
	io_uring/msg: initialise msg request opcode
	NFSv4: Check for delegation validity in nfs_start_delegation_return_locked()
	NFS: Don't allow waiting for exiting tasks
	SUNRPC: Don't allow waiting for exiting tasks
	arm64: Add support for HIP09 Spectre-BHB mitigation
	iommufd: Extend IOMMU_GET_HW_INFO to report PASID capability
	tracing: Mark binary printing functions with __printf() attribute
	ACPI: PNP: Add Intel OC Watchdog IDs to non-PNP device list
	tpm: Convert warn to dbg in tpm2_start_auth_session()
	mailbox: pcc: Use acpi_os_ioremap() instead of ioremap()
	mailbox: use error ret code of of_parse_phandle_with_args()
	riscv: Allow NOMMU kernels to access all of RAM
	fbdev: fsl-diu-fb: add missing device_remove_file()
	fbcon: Use correct erase colour for clearing in fbcon
	fbdev: core: tileblit: Implement missing margin clearing for tileblit
	cifs: Set default Netbios RFC1001 server name to hostname in UNC
	cifs: add validation check for the fields in smb_aces
	cifs: Fix establishing NetBIOS session for SMB2+ connection
	NFSv4: Treat ENETUNREACH errors as fatal for state recovery
	SUNRPC: rpc_clnt_set_transport() must not change the autobind setting
	SUNRPC: rpcbind should never reset the port to the value '0'
	spi-rockchip: Fix register out of bounds access
	ASoC: codecs: wsa884x: Correct VI sense channel mask
	ASoC: codecs: wsa883x: Correct VI sense channel mask
	mctp: Fix incorrect tx flow invalidation condition in mctp-i2c
	net: tn40xx: add pci-id of the aqr105-based Tehuti TN4010 cards
	net: tn40xx: create swnode for mdio and aqr105 phy and add to mdiobus
	thermal/drivers/mediatek/lvts: Start sensor interrupts disabled
	thermal/drivers/qoriq: Power down TMU on system suspend
	Bluetooth: btmtksdio: Prevent enabling interrupts after IRQ handler removal
	Bluetooth: Disable SCO support if READ_VOICE_SETTING is unsupported/broken
	dql: Fix dql->limit value when reset.
	lockdep: Fix wait context check on softirq for PREEMPT_RT
	objtool: Properly disable uaccess validation
	PCI: dwc: ep: Ensure proper iteration over outbound map windows
	r8169: disable RTL8126 ZRX-DC timeout
	tools/build: Don't pass test log files to linker
	pNFS/flexfiles: Report ENETDOWN as a connection error
	drm/amdgpu/discovery: check ip_discovery fw file available
	drm/amdkfd: set precise mem ops caps to disabled for gfx 11 and 12
	PCI: vmd: Disable MSI remapping bypass under Xen
	xen/pci: Do not register devices with segments >= 0x10000
	ext4: on a remount, only log the ro or r/w state when it has changed
	libnvdimm/labels: Fix divide error in nd_label_data_init()
	pidfs: improve multi-threaded exec and premature thread-group leader exit polling
	staging: vchiq_arm: Create keep-alive thread during probe
	mmc: host: Wait for Vdd to settle on card power off
	drm/amdgpu: Skip pcie_replay_count sysfs creation for VF
	cgroup/rstat: avoid disabling irqs for O(num_cpu)
	wifi: mt76: only mark tx-status-failed frames as ACKed on mt76x0/2
	wifi: mt76: mt7996: fix SER reset trigger on WED reset
	wifi: mt76: mt7996: revise TXS size
	wifi: mt76: mt7925: load the appropriate CLC data based on hardware type
	wifi: mt76: mt7925: fix fails to enter low power mode in suspend state
	x86/headers: Replace __ASSEMBLY__ with __ASSEMBLER__ in UAPI headers
	x86/stackprotector/64: Only export __ref_stack_chk_guard on CONFIG_SMP
	x86/smpboot: Fix INIT delay assignment for extended Intel Families
	x86/microcode: Update the Intel processor flag scan check
	x86/mm: Check return value from memblock_phys_alloc_range()
	i2c: qup: Vote for interconnect bandwidth to DRAM
	i2c: pxa: fix call balance of i2c->clk handling routines
	btrfs: make btrfs_discard_workfn() block_group ref explicit
	btrfs: avoid linker error in btrfs_find_create_tree_block()
	btrfs: run btrfs_error_commit_super() early
	btrfs: fix non-empty delayed iputs list on unmount due to async workers
	btrfs: get zone unusable bytes while holding lock at btrfs_reclaim_bgs_work()
	btrfs: send: return -ENAMETOOLONG when attempting a path that is too long
	blk-cgroup: improve policy registration error handling
	drm/amdgpu: release xcp_mgr on exit
	drm/amd/display: Guard against setting dispclk low for dcn31x
	drm/amdgpu: adjust drm_firmware_drivers_only() handling
	i3c: master: svc: Fix missing STOP for master request
	s390/tlb: Use mm_has_pgste() instead of mm_alloc_pgste()
	dlm: make tcp still work in multi-link env
	clocksource/drivers/timer-riscv: Stop stimecmp when cpu hotplug
	um: Store full CSGSFS and SS register from mcontext
	um: Update min_low_pfn to match changes in uml_reserved
	wifi: mwifiex: Fix HT40 bandwidth issue.
	bnxt_en: Query FW parameters when the CAPS_CHANGE bit is set
	riscv: Call secondary mmu notifier when flushing the tlb
	ext4: reorder capability check last
	hypfs_create_cpu_files(): add missing check for hypfs_mkdir() failure
	scsi: st: Tighten the page format heuristics with MODE SELECT
	scsi: st: ERASE does not change tape location
	vfio/pci: Handle INTx IRQ_NOTCONNECTED
	bpf: Return prog btf_id without capable check
	PCI: dwc: Use resource start as ioremap() input in dw_pcie_pme_turn_off()
	jbd2: do not try to recover wiped journal
	tcp: reorganize tcp_in_ack_event() and tcp_count_delivered()
	rtc: rv3032: fix EERD location
	objtool: Fix error handling inconsistencies in check()
	thunderbolt: Do not add non-active NVM if NVM upgrade is disabled for retimer
	erofs: initialize decompression early
	spi: spi-mux: Fix coverity issue, unchecked return value
	ASoC: pcm6240: Drop bogus code handling IRQ as GPIO
	ASoC: mediatek: mt6359: Add stub for mt6359_accdet_enable_jack_detect
	bpf: Allow pre-ordering for bpf cgroup progs
	kbuild: fix argument parsing in scripts/config
	kconfig: do not clear SYMBOL_VALID when reading include/config/auto.conf
	crypto: octeontx2 - suppress auth failure screaming due to negative tests
	dm: restrict dm device size to 2^63-512 bytes
	net/smc: use the correct ndev to find pnetid by pnetid table
	xen: Add support for XenServer 6.1 platform device
	pinctrl-tegra: Restore SFSEL bit when freeing pins
	mfd: tps65219: Remove TPS65219_REG_TI_DEV_ID check
	drm/amdgpu/gfx12: don't read registers in mqd init
	drm/amdgpu/gfx11: don't read registers in mqd init
	drm/amdgpu: Update SRIOV video codec caps
	ASoC: sun4i-codec: support hp-det-gpios property
	clk: qcom: lpassaudiocc-sc7280: Add support for LPASS resets for QCM6490
	ext4: reject the 'data_err=abort' option in nojournal mode
	ext4: do not convert the unwritten extents if data writeback fails
	RDMA/uverbs: Propagate errors from rdma_lookup_get_uobject()
	posix-timers: Add cond_resched() to posix_timer_add() search loop
	posix-timers: Ensure that timer initialization is fully visible
	net: stmmac: dwmac-rk: Validate GRF and peripheral GRF during probe
	net: hsr: Fix PRP duplicate detection
	timer_list: Don't use %pK through printk()
	wifi: rtw89: set force HE TB mode when connecting to 11ax AP
	netfilter: conntrack: Bound nf_conntrack sysctl writes
	PNP: Expand length of fixup id string
	phy: rockchip: usbdp: Only verify link rates/lanes/voltage when the corresponding set flags are set
	arm64/mm: Check pmd_table() in pmd_trans_huge()
	arm64/mm: Check PUD_TYPE_TABLE in pud_bad()
	mmc: dw_mmc: add exynos7870 DW MMC support
	mmc: sdhci: Disable SD card clock before changing parameters
	usb: xhci: Don't change the status of stalled TDs on failed Stop EP
	wifi: iwlwifi: mvm: fix setting the TK when associated
	hwmon: (dell-smm) Increment the number of fans
	iommu: Keep dev->iommu state consistent
	printk: Check CON_SUSPEND when unblanking a console
	wifi: iwlwifi: don't warn when if there is a FW error
	wifi: iwlwifi: w/a FW SMPS mode selection
	wifi: iwlwifi: fix debug actions order
	wifi: iwlwifi: mark Br device not integrated
	wifi: iwlwifi: fix the ECKV UEFI variable name
	wifi: mac80211: fix warning on disconnect during failed ML reconf
	wifi: mac80211_hwsim: Fix MLD address translation
	wifi: cfg80211: allow IR in 20 MHz configurations
	ipv6: save dontfrag in cork
	drm/amd/display: remove minimum Dispclk and apply oem panel timing.
	drm/amd/display: calculate the remain segments for all pipes
	drm/amd/display: not abort link train when bw is low
	drm/amd/display: Fix incorrect DPCD configs while Replay/PSR switch
	gfs2: Check for empty queue in run_queue
	auxdisplay: charlcd: Partially revert "Move hwidth and bwidth to struct hd44780_common"
	ASoC: qcom: sm8250: explicitly set format in sm8250_be_hw_params_fixup()
	badblocks: Fix a nonsense WARN_ON() which checks whether a u64 variable < 0
	coresight-etb10: change etb_drvdata spinlock's type to raw_spinlock_t
	iommu/amd/pgtbl_v2: Improve error handling
	cpufreq: tegra186: Share policy per cluster
	watchdog: aspeed: Update bootstatus handling
	PCI: endpoint: pci-epf-test: Fix double free that causes kernel to oops
	misc: pci_endpoint_test: Give disabled BARs a distinct error code
	crypto: lzo - Fix compression buffer overrun
	crypto: mxs-dcp - Only set OTP_KEY bit for OTP key
	drm/amdkfd: Set per-process flags only once for gfx9/10/11/12
	drm/amdkfd: Set per-process flags only once cik/vi
	drm/amdgpu: Fix missing drain retry fault the last entry
	arm64: tegra: p2597: Fix gpio for vdd-1v8-dis regulator
	arm64: tegra: Resize aperture for the IGX PCIe C5 slot
	powerpc/prom_init: Fixup missing #size-cells on PowerBook6,7
	ALSA: seq: Improve data consistency at polling
	tcp: bring back NUMA dispersion in inet_ehash_locks_alloc()
	rtc: ds1307: stop disabling alarms on probe
	ieee802154: ca8210: Use proper setters and getters for bitwise types
	drm/xe: Nuke VM's mapping upon close
	drm/xe: Retry BO allocation
	soc: samsung: include linux/array_size.h where needed
	ARM: tegra: Switch DSI-B clock parent to PLLD on Tegra114
	media: c8sectpfe: Call of_node_put(i2c_bus) only once in c8sectpfe_probe()
	usb: xhci: set page size to the xHCI-supported size
	dm cache: prevent BUG_ON by blocking retries on failed device resumes
	soc: mediatek: mtk-mutex: Add DPI1 SOF/EOF to MT8188 mutex tables
	orangefs: Do not truncate file size
	drm/gem: Test for imported GEM buffers with helper
	net: phylink: use pl->link_interface in phylink_expects_phy()
	blk-throttle: don't take carryover for prioritized processing of metadata
	remoteproc: qcom_wcnss: Handle platforms with only single power domain
	drm/amdgpu: Do not program AGP BAR regs under SRIOV in gfxhub_v1_0.c
	drm/amd/display: Ensure DMCUB idle before reset on DCN31/DCN35
	drm/amd/display: Skip checking FRL_MODE bit for PCON BW determination
	drm/amd/display: Fix DMUB reset sequence for DCN401
	drm/amd/display: Fix p-state type when p-state is unsupported
	drm/amd/display: Request HW cursor on DCN3.2 with SubVP
	perf/core: Clean up perf_try_init_event()
	media: cx231xx: set device_caps for 417
	pinctrl: bcm281xx: Use "unsigned int" instead of bare "unsigned"
	rcu: Fix get_state_synchronize_rcu_full() GP-start detection
	net: ethernet: ti: cpsw_new: populate netdev of_node
	net: phy: nxp-c45-tja11xx: add match_phy_device to TJA1103/TJA1104
	dpll: Add an assertion to check freq_supported_num
	ublk: enforce ublks_max only for unprivileged devices
	iommufd: Disallow allocating nested parent domain with fault ID
	media: imx335: Set vblank immediately
	net: pktgen: fix mpls maximum labels list parsing
	perf/hw_breakpoint: Return EOPNOTSUPP for unsupported breakpoint type
	ALSA: hda/realtek: Enable PC beep passthrough for HP EliteBook 855 G7
	scsi: logging: Fix scsi_logging_level bounds
	ipv4: fib: Move fib_valid_key_len() to rtm_to_fib_config().
	drm/rockchip: vop2: Add uv swap for cluster window
	block: mark bounce buffering as incompatible with integrity
	ublk: complete command synchronously on error
	media: uvcvideo: Add sanity check to uvc_ioctl_xu_ctrl_map
	media: uvcvideo: Handle uvc menu translation inside uvc_get_le_value
	clk: imx8mp: inform CCF of maximum frequency of clocks
	x86/bugs: Make spectre user default depend on MITIGATION_SPECTRE_V2
	hwmon: (gpio-fan) Add missing mutex locks
	ARM: at91: pm: fix at91_suspend_finish for ZQ calibration
	drm/mediatek: mtk_dpi: Add checks for reg_h_fre_con existence
	fpga: altera-cvp: Increase credit timeout
	perf: arm_pmuv3: Call kvm_vcpu_pmu_resync_el0() before enabling counters
	soc: apple: rtkit: Use high prio work queue
	soc: apple: rtkit: Implement OSLog buffers properly
	wifi: ath12k: Report proper tx completion status to mac80211
	PCI: brcmstb: Expand inbound window size up to 64GB
	PCI: brcmstb: Add a softdep to MIP MSI-X driver
	firmware: arm_ffa: Set dma_mask for ffa devices
	drm/xe/vf: Retry sending MMIO request to GUC on timeout error
	drm/xe/pf: Create a link between PF and VF devices
	net/mlx5: Avoid report two health errors on same syndrome
	selftests/net: have `gro.sh -t` return a correct exit code
	pinctrl: sophgo: avoid to modify untouched bit when setting cv1800 pinconf
	drm/amdkfd: KFD release_work possible circular locking
	drm/xe: xe_gen_wa_oob: replace program_invocation_short_name
	leds: pwm-multicolor: Add check for fwnode_property_read_u32
	net: ethernet: mtk_ppe_offload: Allow QinQ, double ETH_P_8021Q only
	net: xgene-v2: remove incorrect ACPI_PTR annotation
	bonding: report duplicate MAC address in all situations
	wifi: ath12k: Improve BSS discovery with hidden SSID in 6 GHz band
	soc: ti: k3-socinfo: Do not use syscon helper to build regmap
	bpf: Search and add kfuncs in struct_ops prologue and epilogue
	Octeontx2-af: RPM: Register driver with PCI subsys IDs
	x86/build: Fix broken copy command in genimage.sh when making isoimage
	drm/amd/display: handle max_downscale_src_width fail check
	drm/amd/display: fix dcn4x init failed
	drm/amd/display: Fix mismatch type comparison
	ASoC: mediatek: mt8188: Treat DMIC_GAINx_CUR as non-volatile
	ASoC: mediatek: mt8188: Add reference for dmic clocks
	x86/nmi: Add an emergency handler in nmi_desc & use it in nmi_shootdown_cpus()
	vhost-scsi: Return queue full for page alloc failures during copy
	vdpa/mlx5: Fix mlx5_vdpa_get_config() endianness on big-endian machines
	cpuidle: menu: Avoid discarding useful information
	media: adv7180: Disable test-pattern control on adv7180
	media: tc358746: improve calculation of the D-PHY timing registers
	net/mlx5e: Add correct match to check IPSec syndromes for switchdev mode
	scsi: mpi3mr: Update timestamp only for supervisor IOCs
	loop: check in LO_FLAGS_DIRECT_IO in loop_default_blocksize
	libbpf: Fix out-of-bound read
	dm: fix unconditional IO throttle caused by REQ_PREFLUSH
	scsi: scsi_debug: First fixes for tapes
	net/mlx5: Change POOL_NEXT_SIZE define value and make it global
	x86/kaslr: Reduce KASLR entropy on most x86 systems
	crypto: ahash - Set default reqsize from ahash_alg
	crypto: skcipher - Zap type in crypto_alloc_sync_skcipher
	net: ipv6: Init tunnel link-netns before registering dev
	drm/xe/oa: Ensure that polled read returns latest data
	MIPS: Use arch specific syscall name match function
	drm/amdgpu: remove all KFD fences from the BO on release
	x86/locking: Use ALT_OUTPUT_SP() for percpu_{,try_}cmpxchg{64,128}_op()
	genirq/msi: Store the IOMMU IOVA directly in msi_desc instead of iommu_cookie
	MIPS: pm-cps: Use per-CPU variables as per-CPU, not per-core
	clocksource: mips-gic-timer: Enable counter when CPUs start
	PCI: epf-mhi: Update device ID for SA8775P
	scsi: mpt3sas: Send a diag reset if target reset fails
	wifi: rtw88: Fix rtw_init_vht_cap() for RTL8814AU
	wifi: rtw88: Fix rtw_init_ht_cap() for RTL8814AU
	wifi: rtw88: Fix rtw_desc_to_mcsrate() to handle MCS16-31
	wifi: rtw89: fw: propagate error code from rtw89_h2c_tx()
	wifi: rtw89: fw: get sb_sel_ver via get_unaligned_le32()
	wifi: rtw89: fw: add blacklist to avoid obsolete secure firmware
	wifi: rtw89: 8922a: fix incorrect STA-ID in EHT MU PPDU
	net: pktgen: fix access outside of user given buffer in pktgen_thread_write()
	power: supply: axp20x_battery: Update temp sensor for AXP717 from device tree
	EDAC/ie31200: work around false positive build warning
	i3c: master: svc: Flush FIFO before sending Dynamic Address Assignment(DAA)
	mfd: axp20x: AXP717: Add AXP717_TS_PIN_CFG to writeable regs
	eeprom: ee1004: Check chip before probing
	irqchip/riscv-imsic: Separate next and previous pointers in IMSIC vector
	drm/amd/pm: Fetch current power limit from PMFW
	drm/amd/display: Add support for disconnected eDP streams
	drm/amd/display: Guard against setting dispclk low when active
	drm/amd/display: Fix BT2020 YCbCr limited/full range input
	drm/amd/display: Read LTTPR ALPM caps during link cap retrieval
	Revert "drm/amd/display: Request HW cursor on DCN3.2 with SubVP"
	drm/amd/display: Don't treat wb connector as physical in create_validate_stream_for_sink
	serial: mctrl_gpio: split disable_ms into sync and no_sync APIs
	RDMA/core: Fix best page size finding when it can cross SG entries
	pmdomain: imx: gpcv2: use proper helper for property detection
	can: c_can: Use of_property_present() to test existence of DT property
	bpf: don't do clean_live_states when state->loop_entry->branches > 0
	bpf: copy_verifier_state() should copy 'loop_entry' field
	eth: mlx4: don't try to complete XDP frames in netpoll
	PCI: Fix old_size lower bound in calculate_iosize() too
	ACPI: HED: Always initialize before evged
	vxlan: Join / leave MC group after remote changes
	hrtimers: Replace hrtimer_clock_to_base_table with switch-case
	irqchip/riscv-imsic: Set irq_set_affinity() for IMSIC base
	media: test-drivers: vivid: don't call schedule in loop
	net/mlx5: Modify LSB bitmask in temperature event to include only the first bit
	net/mlx5: Apply rate-limiting to high temperature warning
	firmware: arm_ffa: Reject higher major version as incompatible
	firmware: arm_ffa: Handle the presence of host partition in the partition info
	firmware: xilinx: Dont send linux address to get fpga config get status
	ASoC: ops: Enforce platform maximum on initial value
	ASoC: tas2764: Add reg defaults for TAS2764_INT_CLK_CFG
	ASoC: tas2764: Mark SW_RESET as volatile
	ASoC: tas2764: Power up/down amp on mute ops
	ASoC: soc-dai: check return value at snd_soc_dai_set_tdm_slot()
	pinctrl: devicetree: do not goto err when probing hogs in pinctrl_dt_to_map
	smack: recognize ipv4 CIPSO w/o categories
	smack: Revert "smackfs: Added check catlen"
	kunit: tool: Use qboot on QEMU x86_64
	media: i2c: imx219: Correct the minimum vblanking value
	media: v4l: Memset argument to 0 before calling get_mbus_config pad op
	net/mlx4_core: Avoid impossible mlx4_db_alloc() order value
	drm/xe: Stop ignoring errors from xe_ttm_stolen_mgr_init()
	drm/xe: Fix xe_tile_init_noalloc() error propagation
	clk: qcom: ipq5018: allow it to be bulid on arm32
	clk: qcom: clk-alpha-pll: Do not use random stack value for recalc rate
	drm/xe/debugfs: fixed the return value of wedged_mode_set
	drm/xe/debugfs: Add missing xe_pm_runtime_put in wedge_mode_set
	x86/ibt: Handle FineIBT in handle_cfi_failure()
	x86/traps: Cleanup and robustify decode_bug()
	sched: Reduce the default slice to avoid tasks getting an extra tick
	serial: sh-sci: Update the suspend/resume support
	pinctrl: renesas: rzg2l: Add suspend/resume support for pull up/down
	phy: phy-rockchip-samsung-hdptx: Swap the definitions of LCPLL_REF and ROPLL_REF
	phy: core: don't require set_mode() callback for phy_get_mode() to work
	phy: exynos5-usbdrd: fix EDS distribution tuning (gs101)
	soundwire: amd: change the soundwire wake enable/disable sequence
	soundwire: cadence_master: set frame shape and divider based on actual clk freq
	net: stmmac: dwmac-loongson: Set correct {tx,rx}_fifo_size
	drm/amdgpu/mes11: fix set_hw_resources_1 calculation
	drm/amdkfd: fix missing L2 cache info in topology
	drm/amdgpu: Set snoop bit for SDMA for MI series
	drm/amd/display: pass calculated dram_speed_mts to dml2
	drm/amd/display: Don't try AUX transactions on disconnected link
	drm/amdgpu: reset psp->cmd to NULL after releasing the buffer
	drm/amd/pm: Skip P2S load for SMU v13.0.12
	drm/amd/display: Support multiple options during psr entry.
	Revert "drm/amd/display: Exit idle optimizations before attempt to access PHY"
	drm/amd/display: Update CR AUX RD interval interpretation
	drm/amd/display: Initial psr_version with correct setting
	drm/amd/display: Increase block_sequence array size
	drm/amd/display: Use Nominal vBlank If Provided Instead Of Capping It
	drm/amd/display: Populate register address for dentist for dcn401
	drm/amdgpu: Use active umc info from discovery
	drm/amdgpu: enlarge the VBIOS binary size limit
	drm/amd/display/dm: drop hw_support check in amdgpu_dm_i2c_xfer()
	scsi: target: spc: Fix loop traversal in spc_rsoc_get_descr()
	net/mlx5: XDP, Enable TX side XDP multi-buffer support
	net/mlx5: Extend Ethtool loopback selftest to support non-linear SKB
	net/mlx5e: set the tx_queue_len for pfifo_fast
	net/mlx5e: reduce rep rxq depth to 256 for ECPF
	net/mlx5e: reduce the max log mpwrq sz for ECPF and reps
	drm/v3d: Add clock handling
	xfrm: prevent high SEQ input in non-ESN mode
	wifi: ath12k: fix the ampdu id fetch in the HAL_RX_MPDU_START TLV
	mptcp: pm: userspace: flags: clearer msg if no remote addr
	wifi: iwlwifi: use correct IMR dump variable
	wifi: iwlwifi: don't warn during reprobe
	wifi: mac80211: don't unconditionally call drv_mgd_complete_tx()
	wifi: mac80211: remove misplaced drv_mgd_complete_tx() call
	wifi: mac80211: set ieee80211_prep_tx_info::link_id upon Auth Rx
	net: fec: Refactor MAC reset to function
	powerpc/pseries/iommu: memory notifier incorrectly adds TCEs for pmemory
	powerpc/pseries/iommu: create DDW for devices with DMA mask less than 64-bits
	arch/powerpc/perf: Check the instruction type before creating sample with perf_mem_data_src
	ip: fib_rules: Fetch net from fib_rule in fib[46]_rule_configure().
	r8152: add vendor/device ID pair for Dell Alienware AW1022z
	iio: adc: ad7944: don't use storagebits for sizing
	pstore: Change kmsg_bytes storage size to u32
	leds: trigger: netdev: Configure LED blink interval for HW offload
	ext4: don't write back data before punch hole in nojournal mode
	ext4: remove writable userspace mappings before truncating page cache
	wifi: rtw88: Fix download_firmware_validate() for RTL8814AU
	wifi: rtw88: Fix __rtw_download_firmware() for RTL8814AU
	wifi: rtw89: coex: Assign value over than 0 to avoid firmware timer hang
	wifi: rtw89: fw: validate multi-firmware header before getting its size
	wifi: rtw89: fw: validate multi-firmware header before accessing
	wifi: rtw89: call power_on ahead before selecting firmware
	clk: qcom: camcc-sm8250: Use clk_rcg2_shared_ops for some RCGs
	net: page_pool: avoid false positive warning if NAPI was never added
	tools/power turbostat: Clustered Uncore MHz counters should honor show/hide options
	hwmon: (xgene-hwmon) use appropriate type for the latency value
	f2fs: introduce f2fs_base_attr for global sysfs entries
	media: qcom: camss: csid: Only add TPG v4l2 ctrl if TPG hardware is available
	media: qcom: camss: Add default case in vfe_src_pad_code
	drm/rockchip: vop2: Improve display modes handling on RK3588 HDMI0
	eth: fbnic: set IFF_UNICAST_FLT to avoid enabling promiscuous mode when adding unicast addrs
	tools: ynl-gen: don't output external constants
	net/mlx5e: Avoid WARN_ON when configuring MQPRIO with HTB offload enabled
	cpufreq: amd-pstate: Remove unnecessary driver_lock in set_boost
	vxlan: Annotate FDB data races
	ipv4: ip_gre: Fix set but not used warning in ipgre_err() if IPv4-only
	r8169: don't scan PHY addresses > 0
	net: flush_backlog() small changes
	bridge: mdb: Allow replace of a host-joined group
	ice: init flow director before RDMA
	ice: treat dyn_allowed only as suggestion
	rcu: handle quiescent states for PREEMPT_RCU=n, PREEMPT_COUNT=y
	rcu: handle unstable rdp in rcu_read_unlock_strict()
	rcu: fix header guard for rcu_all_qs()
	perf: Avoid the read if the count is already updated
	ice: count combined queues using Rx/Tx count
	drm/xe/relay: Don't use GFP_KERNEL for new transactions
	net/mana: fix warning in the writer of client oob
	scsi: lpfc: Handle duplicate D_IDs in ndlp search-by D_ID routine
	scsi: lpfc: Ignore ndlp rport mismatch in dev_loss_tmo callbk
	scsi: lpfc: Free phba irq in lpfc_sli4_enable_msi() when pci_irq_vector() fails
	scsi: st: Restore some drive settings after reset
	wifi: ath12k: Avoid napi_sync() before napi_enable()
	HID: usbkbd: Fix the bit shift number for LED_KANA
	arm64: zynqmp: add clock-output-names property in clock nodes
	ASoC: codecs: pcm3168a: Allow for 24-bit in provider mode
	ASoC: rt722-sdca: Add some missing readable registers
	irqchip/riscv-aplic: Add support for hart indexes
	dm vdo indexer: prevent unterminated string warning
	dm vdo: use a short static string for thread name prefix
	drm/ast: Find VBIOS mode from regular display size
	bpf: Use kallsyms to find the function name of a struct_ops's stub function
	bpftool: Fix readlink usage in get_fd_type
	firmware: arm_scmi: Relax duplicate name constraint across protocol ids
	perf/amd/ibs: Fix perf_ibs_op.cnt_mask for CurCnt
	perf/amd/ibs: Fix ->config to sample period calculation for OP PMU
	clk: renesas: rzg2l-cpg: Refactor Runtime PM clock validation
	wifi: rtl8xxxu: retry firmware download on error
	wifi: rtw88: Don't use static local variable in rtw8822b_set_tx_power_index_by_rate
	wifi: rtw89: add wiphy_lock() to work that isn't held wiphy_lock() yet
	spi: zynqmp-gqspi: Always acknowledge interrupts
	regulator: ad5398: Add device tree support
	wifi: ath12k: fix ath12k_hal_tx_cmd_ext_desc_setup() info1 override
	accel/qaic: Mask out SR-IOV PCI resources
	drm/xe/pf: Reset GuC VF config when unprovisioning critical resource
	wifi: ath9k: return by of_get_mac_address
	wifi: ath12k: Fetch regdb.bin file from board-2.bin
	wifi: ath12k: Fix end offset bit definition in monitor ring descriptor
	drm: bridge: adv7511: fill stream capabilities
	drm/nouveau: fix the broken marco GSP_MSG_MAX_SIZE
	wifi: ath11k: Use dma_alloc_noncoherent for rx_tid buffer allocation
	drm/xe: Move suballocator init to after display init
	drm/xe: Do not attempt to bootstrap VF in execlists mode
	wifi: rtw89: coex: Separated Wi-Fi connecting event from Wi-Fi scan event
	drm/xe/sa: Always call drm_suballoc_manager_fini()
	drm/xe: Reject BO eviction if BO is bound to current VM
	drm/atomic: clarify the rules around drm_atomic_state->allow_modeset
	drm/buddy: fix issue that force_merge cannot free all roots
	drm/panel-edp: Add Starry 116KHD024006
	drm: Add valid clones check
	ASoC: imx-card: Adjust over allocation of memory in imx_card_parse_of()
	book3s64/radix: Fix compile errors when CONFIG_ARCH_WANT_OPTIMIZE_DAX_VMEMMAP=n
	pinctrl: meson: define the pull up/down resistor value as 60 kOhm
	smb: server: smb2pdu: check return value of xa_store()
	platform/x86/intel: hid: Add Pantherlake support
	platform/x86: asus-wmi: Disable OOBE state after resume from hibernation
	platform/x86: ideapad-laptop: add support for some new buttons
	ASoC: cs42l43: Disable headphone clamps during type detection
	ASoC: Intel: bytcr_rt5640: Add DMI quirk for Acer Aspire SW3-013
	ALSA: hda/realtek: Add quirk for HP Spectre x360 15-df1xxx
	nvme-pci: add quirks for device 126f:1001
	nvme-pci: add quirks for WDC Blue SN550 15b7:5009
	ALSA: usb-audio: Fix duplicated name in MIDI substream names
	nvmet-tcp: don't restore null sk_state_change
	io_uring/fdinfo: annotate racy sq/cq head/tail reads
	cifs: Fix and improve cifs_query_path_info() and cifs_query_file_info()
	cifs: Fix changing times and read-only attr over SMB1 smb_set_file_info() function
	ASoC: intel/sdw_utils: Add volume limit to cs42l43 speakers
	btrfs: compression: adjust cb->compressed_folios allocation type
	btrfs: correct the order of prelim_ref arguments in btrfs__prelim_ref
	btrfs: handle empty eb->folios in num_extent_folios()
	btrfs: avoid NULL pointer dereference if no valid csum tree
	tools: ynl-gen: validate 0 len strings from kernel
	block: only update request sector if needed
	wifi: iwlwifi: add support for Killer on MTL
	x86/Kconfig: make CFI_AUTO_DEFAULT depend on !RUST or Rust >= 1.88
	xenbus: Allow PVH dom0 a non-local xenstore
	drm/amd/display: Call FP Protect Before Mode Programming/Mode Support
	__legitimize_mnt(): check for MNT_SYNC_UMOUNT should be under mount_lock
	soundwire: bus: Fix race on the creation of the IRQ domain
	espintcp: fix skb leaks
	espintcp: remove encap socket caching to avoid reference leak
	xfrm: Fix UDP GRO handling for some corner cases
	dmaengine: idxd: Fix allowing write() from different address spaces
	x86/sev: Fix operator precedence in GHCB_MSR_VMPL_REQ_LEVEL macro
	kernel/fork: only call untrack_pfn_clear() on VMAs duplicated for fork()
	remoteproc: qcom_wcnss: Fix on platforms without fallback regulators
	clk: sunxi-ng: d1: Add missing divider for MMC mod clocks
	xfrm: Sanitize marks before insert
	dmaengine: idxd: Fix ->poll() return value
	dmaengine: fsl-edma: Fix return code for unhandled interrupts
	driver core: Split devres APIs to device/devres.h
	devres: Introduce devm_kmemdup_array()
	ASoC: SOF: Intel: hda: Fix UAF when reloading module
	irqchip/riscv-imsic: Start local sync timer on correct CPU
	perf/x86/intel: Fix segfault with PEBS-via-PT with sample_freq
	Bluetooth: L2CAP: Fix not checking l2cap_chan security level
	Bluetooth: btusb: use skb_pull to avoid unsafe access in QCA dump handling
	ptp: ocp: Limit signal/freq counts in summary output functions
	bridge: netfilter: Fix forwarding of fragmented packets
	ice: fix vf->num_mac count with port representors
	ice: Fix LACP bonds without SRIOV environment
	idpf: fix null-ptr-deref in idpf_features_check
	loop: don't require ->write_iter for writable files in loop_configure
	pinctrl: qcom: switch to devm_register_sys_off_handler()
	net: dwmac-sun8i: Use parsed internal PHY address instead of 1
	net: lan743x: Restore SGMII CTRL register on resume
	io_uring: fix overflow resched cqe reordering
	idpf: fix idpf_vport_splitq_napi_poll()
	sch_hfsc: Fix qlen accounting bug when using peek in hfsc_enqueue()
	octeontx2-pf: Add AF_XDP non-zero copy support
	net/tipc: fix slab-use-after-free Read in tipc_aead_encrypt_done
	octeontx2-af: Set LMT_ENA bit for APR table entries
	octeontx2-af: Fix APR entry mapping based on APR_LMT_CFG
	clk: s2mps11: initialise clk_hw_onecell_data::num before accessing ::hws[] in probe()
	crypto: algif_hash - fix double free in hash_accept
	padata: do not leak refcount in reorder_work
	can: slcan: allow reception of short error messages
	can: bcm: add locking for bcm_op runtime updates
	can: bcm: add missing rcu read protection for procfs content
	ASoC: SOF: ipc4-control: Use SOF_CTRL_CMD_BINARY as numid for bytes_ext
	ASoC: SOF: Intel: hda-bus: Use PIO mode on ACE2+ platforms
	ASoc: SOF: topology: connect DAI to a single DAI link
	ASoC: SOF: ipc4-pcm: Delay reporting is only supported for playback direction
	ALSA: pcm: Fix race of buffer access at PCM OSS layer
	ALSA: hda/realtek: Add quirk for Lenovo Yoga Pro 7 14ASP10
	llc: fix data loss when reading from a socket in llc_ui_recvmsg()
	can: kvaser_pciefd: Continue parsing DMA buf after dropped RX
	can: kvaser_pciefd: Fix echo_skb race
	net: dsa: microchip: linearize skb for tail-tagging switches
	vmxnet3: update MTU after device quiesce
	pmdomain: renesas: rcar: Remove obsolete nullify checks
	pmdomain: core: Fix error checking in genpd_dev_pm_attach_by_id()
	platform/x86: dell-wmi-sysman: Avoid buffer overflow in current_password_store()
	thermal: intel: x86_pkg_temp_thermal: Fix bogus trip temperature
	drm/edid: fixed the bug that hdr metadata was not reset
	smb: client: Fix use-after-free in cifs_fill_dirent
	arm64: dts: marvell: uDPU: define pinctrl state for alarm LEDs
	smb: client: Reset all search buffer pointers when releasing buffer
	Revert "drm/amd: Keep display off while going into S4"
	Input: xpad - add more controllers
	highmem: add folio_test_partial_kmap()
	memcg: always call cond_resched() after fn()
	mm/page_alloc.c: avoid infinite retries caused by cpuset race
	mm: mmap: map MAP_STACK to VM_NOHUGEPAGE only if THP is enabled
	mm: vmalloc: actually use the in-place vrealloc region
	mm: vmalloc: only zero-init on vrealloc shrink
	nilfs2: fix deadlock warnings caused by lock dependency in init_nilfs()
	Bluetooth: btmtksdio: Check function enabled before doing close
	Bluetooth: btmtksdio: Do close if SDIO card removed without close
	Revert "arm64: dts: allwinner: h6: Use RSB for AXP805 PMIC connection"
	ksmbd: fix stream write failure
	platform/x86: think-lmi: Fix attribute name usage for non-compliant items
	spi: use container_of_cont() for to_spi_device()
	spi: spi-fsl-dspi: restrict register range for regmap access
	spi: spi-fsl-dspi: Halt the module after a new message transfer
	spi: spi-fsl-dspi: Reset SR flags before sending a new message
	err.h: move IOMEM_ERR_PTR() to err.h
	gcc-15: make 'unterminated string initialization' just a warning
	gcc-15: disable '-Wunterminated-string-initialization' entirely for now
	Fix mis-uses of 'cc-option' for warning disablement
	kbuild: Properly disable -Wunterminated-string-initialization for clang
	drm/amd/display: Exit idle optimizations before accessing PHY
	bpf: abort verification if env->cur_state->loop_entry != NULL
	serial: sh-sci: Save and restore more registers
	drm/amdkfd: Correct F8_MODE for gfx950
	watchdog: aspeed: fix 64-bit division
	pinctrl: tegra: Fix off by one in tegra_pinctrl_get_group()
	i3c: master: svc: Fix implicit fallthrough in svc_i3c_master_ibi_work()
	x86/mm/init: Handle the special case of device private pages in add_pages(), to not increase max_pfn and trigger dma_addressing_limited() bounce buffers bounce buffers
	drm/gem: Internally test import_attach for imported objects
	Linux 6.12.31

Change-Id: I017795966fb764f9320a6a0df1571d19e5e631fe
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2025-07-03 07:19:01 +00:00
Greg Kroah-Hartman
dba4f359fc Merge 6.12.30 into android16-6.12-lts
GKI (arm64) relevant 18 out of 143 changes, affecting 32 files +213/-83
  10d1496f85 fs/xattr.c: fix simple_xattr_list to always include security.* xattrs [1 file, +24/-0]
  bc4c54cbb4 binfmt_elf: Move brk for static PIE even if ASLR disabled [1 file, +47/-24]
  f0d70d8dca cgroup/cpuset: Extend kthread_is_per_cpu() check to all PF_NO_SETAFFINITY tasks [1 file, +4/-2]
  517c11fe4f tracing: probes: Fix a possible race in trace_probe_log APIs [5 files, +27/-3]
  94e7272b63 HID: uclogic: Add NULL check in uclogic_input_configured() [1 file, +4/-3]
  28826a89fd Bluetooth: MGMT: Fix MGMT_OP_ADD_DEVICE invalid device flags [1 file, +6/-3]
  d1365ca80b net_sched: Flush gso_skb list too during ->change() [7 files, +21/-6]
  ddfa034da3 nvme-pci: make nvme_pci_npages_prp() __always_inline [1 file, +1/-1]
  a3c147040b nvme-pci: acquire cq_poll_lock in nvme_poll_irqdisable [1 file, +2/-0]
  c88f4ff535 ALSA: usb-audio: Add sample rate quirk for Audioengine D1 [1 file, +2/-0]
  93152dac0b ALSA: usb-audio: Add sample rate quirk for Microdia JP001 USB Camera [1 file, +2/-0]
  fe1bebd0ed dma-buf: insert memory barrier before updating num_fences [1 file, +3/-2]
  7d353da580 ftrace: Fix preemption accounting for stacktrace trigger command [1 file, +1/-1]
  bffc3038a2 scsi: sd_zbc: block: Respect bio vector limits for REPORT ZONES buffer [3 files, +7/-2]
  20d6e621be ring-buffer: Fix persistent buffer when commit page is the reader page [1 file, +5/-3]
  fe0756daad mm: userfaultfd: correct dirty flags set for both present and swap pte [1 file, +10/-2]
  74953f93f4 mm/page_alloc: fix race condition in unaccepted memory handling [1 file, +0/-23]
  5924b32446 usb: typec: ucsi: displayport: Fix deadlock [3 files, +47/-8]

Changes in 6.12.30
	arm64: dts: rockchip: Assign RT5616 MCLK rate on rk3588-friendlyelec-cm3588
	fs/xattr.c: fix simple_xattr_list to always include security.* xattrs
	drivers/platform/x86/amd: pmf: Check for invalid sideloaded Smart PC Policies
	drivers/platform/x86/amd: pmf: Check for invalid Smart PC Policies
	riscv: dts: sophgo: fix DMA data-width configuration for CV18xx
	binfmt_elf: Move brk for static PIE even if ASLR disabled
	platform/x86/amd/pmc: Declare quirk_spurious_8042 for MECHREVO Wujie 14XA (GX4HRXL)
	platform/x86: asus-wmi: Fix wlan_ctrl_by_user detection
	arm64: dts: imx8mp-var-som: Fix LDO5 shutdown causing SD card timeout
	cgroup/cpuset: Extend kthread_is_per_cpu() check to all PF_NO_SETAFFINITY tasks
	tracing: probes: Fix a possible race in trace_probe_log APIs
	tpm: tis: Double the timeout B to 4s
	uio_hv_generic: Fix sysfs creation path for ring buffer
	KVM: Add member to struct kvm_gfn_range to indicate private/shared
	KVM: x86/mmu: Prevent installing hugepages when mem attributes are changing
	iio: adc: ad7266: Fix potential timestamp alignment issue.
	iio: chemical: pms7003: use aligned_s64 for timestamp
	iio: pressure: mprls0025pa: use aligned_s64 for timestamp
	drm/amd: Add Suspend/Hibernate notification callback support
	Revert "drm/amd: Stop evicting resources on APUs in suspend"
	xhci: dbc: Improve performance by removing delay in transfer event polling.
	xhci: dbc: Avoid event polling busyloop if pending rx transfers are inactive.
	iio: adc: ad7768-1: Fix insufficient alignment of timestamp.
	iio: chemical: sps30: use aligned_s64 for timestamp
	virtio_ring: add a func argument 'recycle_done' to virtqueue_reset()
	virtio_net: ensure netdev_tx_reset_queue is called on bind xsk for tx
	RDMA/rxe: Fix slab-use-after-free Read in rxe_queue_cleanup bug
	HID: thrustmaster: fix memory leak in thrustmaster_interrupts()
	HID: uclogic: Add NULL check in uclogic_input_configured()
	nfs: handle failure of nfs_get_lock_context in unlock path
	spi: loopback-test: Do not split 1024-byte hexdumps
	RDMA/core: Fix "KASAN: slab-use-after-free Read in ib_register_device" problem
	Bluetooth: MGMT: Fix MGMT_OP_ADD_DEVICE invalid device flags
	net_sched: Flush gso_skb list too during ->change()
	tools/net/ynl: ethtool: fix crash when Hardware Clock info is missing
	mctp: no longer rely on net->dev_index_head[]
	net: mctp: Don't access ifa_index when missing
	selftests: ncdevmem: Redirect all non-payload output to stderr
	selftests: ncdevmem: Separate out dmabuf provider
	selftests: ncdevmem: Unify error handling
	selftests: ncdevmem: Make client_ip optional
	selftests: ncdevmem: Switch to AF_INET6
	tests/ncdevmem: Fix double-free of queue array
	net: mctp: Ensure keys maintain only one ref to corresponding dev
	ALSA: seq: Fix delivery of UMP events to group ports
	ALSA: ump: Fix a typo of snd_ump_stream_msg_device_info
	net: cadence: macb: Fix a possible deadlock in macb_halt_tx.
	net: dsa: sja1105: discard incoming frames in BR_STATE_LISTENING
	nvme-pci: make nvme_pci_npages_prp() __always_inline
	nvme-pci: acquire cq_poll_lock in nvme_poll_irqdisable
	ALSA: sh: SND_AICA should depend on SH_DMA_API
	net: dsa: b53: prevent standalone from trying to forward to other ports
	vsock/test: Fix occasional failure in SIOCOUTQ tests
	net/mlx5e: Disable MACsec offload for uplink representor profile
	qlcnic: fix memory leak in qlcnic_sriov_channel_cfg_cmd()
	regulator: max20086: fix invalid memory access
	drm/xe: Save CTX_TIMESTAMP mmio value instead of LRC value
	netlink: specs: tc: fix a couple of attribute names
	netlink: specs: tc: all actions are indexed arrays
	octeontx2-pf: macsec: Fix incorrect max transmit size in TX secy
	net: ethernet: mtk_eth_soc: fix typo for declaration MT7988 ESW capability
	octeontx2-af: Fix CGX Receive counters
	octeontx2-pf: Do not reallocate all ntuple filters
	wifi: mac80211: Set n_channels after allocating struct cfg80211_scan_request
	mlxsw: spectrum_router: Fix use-after-free when deleting GRE net devices
	net/tls: fix kernel panic when alloc_page failed
	tsnep: fix timestamping with a stacked DSA driver
	NFSv4/pnfs: Reset the layout state after a layoutreturn
	dmaengine: Revert "dmaengine: dmatest: Fix dmatest waiting less when interrupted"
	sched_ext: bpf_iter_scx_dsq_new() should always initialize iterator
	udf: Make sure i_lenExtents is uptodate on inode eviction
	HID: bpf: abort dispatch if device destroyed
	LoongArch: Prevent cond_resched() occurring within kernel-fpu
	LoongArch: Move __arch_cpu_idle() to .cpuidle.text section
	LoongArch: Save and restore CSR.CNTC for hibernation
	LoongArch: Fix MAX_REG_OFFSET calculation
	LoongArch: uprobes: Remove user_{en,dis}able_single_step()
	LoongArch: uprobes: Remove redundant code about resume_era
	btrfs: fix discard worker infinite loop after disabling discard
	btrfs: fix folio leak in submit_one_async_extent()
	btrfs: add back warning for mount option commit values exceeding 300
	Revert "drm/amd/display: Hardware cursor changes color when switched to software cursor"
	drm/amdgpu: fix incorrect MALL size for GFX1151
	drm/amdgpu: csa unmap use uninterruptible lock
	drm/amd/display: Correct the reply value when AUX write incomplete
	drm/amd/display: Avoid flooding unnecessary info messages
	MAINTAINERS: Update Alexey Makhalov's email address
	gpio: pca953x: fix IRQ storm on system wake up
	ACPI: PPTT: Fix processor subtable walk
	ALSA: es1968: Add error handling for snd_pcm_hw_constraint_pow2()
	ALSA: usb-audio: Add sample rate quirk for Audioengine D1
	ALSA: usb-audio: Add sample rate quirk for Microdia JP001 USB Camera
	dma-buf: insert memory barrier before updating num_fences
	hv_netvsc: Use vmbus_sendpacket_mpb_desc() to send VMBus messages
	hv_netvsc: Preserve contiguous PFN grouping in the page buffer array
	hv_netvsc: Remove rmsg_pgcnt
	arm64: dts: amlogic: dreambox: fix missing clkc_audio node
	arm64: dts: rockchip: Remove overdrive-mode OPPs from RK3588J SoC dtsi
	Drivers: hv: Allow vmbus_sendpacket_mpb_desc() to create multiple ranges
	Drivers: hv: vmbus: Remove vmbus_sendpacket_pagebuffer()
	kbuild: Disable -Wdefault-const-init-unsafe
	ftrace: Fix preemption accounting for stacktrace trigger command
	ftrace: Fix preemption accounting for stacktrace filter command
	tracing: samples: Initialize trace_array_printk() with the correct function
	phy: tegra: xusb: Use a bitmask for UTMI pad power state tracking
	phy: Fix error handling in tegra_xusb_port_init
	phy: renesas: rcar-gen3-usb2: Fix role detection on unbind/bind
	phy: renesas: rcar-gen3-usb2: Set timing registers only once
	scsi: sd_zbc: block: Respect bio vector limits for REPORT ZONES buffer
	smb: client: fix memory leak during error handling for POSIX mkdir
	spi: tegra114: Use value to check for invalid delays
	tpm: Mask TPM RC in tpm2_start_auth_session()
	wifi: mt76: disable napi on driver removal
	ring-buffer: Fix persistent buffer when commit page is the reader page
	net: qede: Initialize qede_ll_ops with designated initializer
	mm: userfaultfd: correct dirty flags set for both present and swap pte
	dmaengine: ti: k3-udma: Add missing locking
	dmaengine: ti: k3-udma: Use cap_mask directly from dma_device structure instead of a local copy
	dmaengine: idxd: fix memory leak in error handling path of idxd_setup_wqs
	dmaengine: idxd: fix memory leak in error handling path of idxd_setup_engines
	dmaengine: idxd: fix memory leak in error handling path of idxd_setup_groups
	dmaengine: idxd: Add missing cleanup for early error out in idxd_setup_internals
	dmaengine: idxd: Add missing cleanups in cleanup internals
	dmaengine: idxd: Add missing idxd cleanup to fix memory leak in remove call
	dmaengine: idxd: fix memory leak in error handling path of idxd_alloc
	dmaengine: idxd: fix memory leak in error handling path of idxd_pci_probe
	dmaengine: idxd: Refactor remove call with idxd_cleanup() helper
	CIFS: New mount option for cifs.upcall namespace resolution
	drm/xe/gsc: do not flush the GSC worker from the reset path
	mm/page_alloc: fix race condition in unaccepted memory handling
	accel/ivpu: Rename ivpu_log_level to fw_log_level
	accel/ivpu: Reset fw log on cold boot
	accel/ivpu: Refactor functions in ivpu_fw_log.c
	accel/ivpu: Fix fw log printing
	iio: light: opt3001: fix deadlock due to concurrent flag access
	Bluetooth: btnxpuart: Fix kernel panic during FW release
	drm/fbdev-dma: Support struct drm_driver.fbdev_probe
	drm/panel-mipi-dbi: Run DRM default client setup
	drm/tiny: panel-mipi-dbi: Use drm_client_setup_with_fourcc()
	usb: typec: ucsi: displayport: Fix deadlock
	phy: tegra: xusb: remove a stray unlock
	drm/amdgpu: fix pm notifier handling
	Linux 6.12.30

Change-Id: I4fefed85c02f1ed826b7ee014700b80c10300bb5
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2025-06-05 11:53:12 +00:00
Nathan Chancellor
dd8a734155 kbuild: Properly disable -Wunterminated-string-initialization for clang
commit 4f79eaa2ceac86a0e0f304b0bab556cca5bf4f30 upstream.

Clang and GCC have different behaviors around disabling warnings
included in -Wall and -Wextra and the order in which flags are
specified, which is exposed by clang's new support for
-Wunterminated-string-initialization.

  $ cat test.c
  const char foo[3] = "FOO";
  const char bar[3] __attribute__((__nonstring__)) = "BAR";

  $ clang -fsyntax-only -Wextra test.c
  test.c:1:21: warning: initializer-string for character array is too long, array size is 3 but initializer has size 4 (including the null terminating character); did you mean to use the 'nonstring' attribute? [-Wunterminated-string-initialization]
      1 | const char foo[3] = "FOO";
        |                     ^~~~~
  $ clang -fsyntax-only -Wextra -Wno-unterminated-string-initialization test.c
  $ clang -fsyntax-only -Wno-unterminated-string-initialization -Wextra test.c
  test.c:1:21: warning: initializer-string for character array is too long, array size is 3 but initializer has size 4 (including the null terminating character); did you mean to use the 'nonstring' attribute? [-Wunterminated-string-initialization]
      1 | const char foo[3] = "FOO";
        |                     ^~~~~

  $ gcc -fsyntax-only -Wextra test.c
  test.c:1:21: warning: initializer-string for array of ‘char’ truncates NUL terminator but destination lacks ‘nonstring’ attribute (4 chars into 3 available) [-Wunterminated-string-initialization]
      1 | const char foo[3] = "FOO";
        |                     ^~~~~
  $ gcc -fsyntax-only -Wextra -Wno-unterminated-string-initialization test.c
  $ gcc -fsyntax-only -Wno-unterminated-string-initialization -Wextra test.c

Move -Wextra up right below -Wall in Makefile.extrawarn to ensure these
flags are at the beginning of the warning options list. Move the couple
of warning options that have been added to the main Makefile since
commit e88ca24319 ("kbuild: consolidate warning flags in
scripts/Makefile.extrawarn") to scripts/Makefile.extrawarn after -Wall /
-Wextra to ensure they get properly disabled for all compilers.

Fixes: 9d7a0577c9db ("gcc-15: disable '-Wunterminated-string-initialization' entirely for now")
Link: https://github.com/llvm/llvm-project/issues/10359
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-05-29 11:03:25 +02:00
Linus Torvalds
3f856d5d84 Fix mis-uses of 'cc-option' for warning disablement
commit a79be02bba5c31f967885c7f3bf3a756d77d11d9 upstream.

This was triggered by one of my mis-uses causing odd build warnings on
sparc in linux-next, but while figuring out why the "obviously correct"
use of cc-option caused such odd breakage, I found eight other cases of
the same thing in the tree.

The root cause is that 'cc-option' doesn't work for checking negative
warning options (ie things like '-Wno-stringop-overflow') because gcc
will silently accept options it doesn't recognize, and so 'cc-option'
ends up thinking they are perfectly fine.

And it all works, until you have a situation where _another_ warning is
emitted.  At that point the compiler will go "Hmm, maybe the user
intended to disable this warning but used that wrong option that I
didn't recognize", and generate a warning for the unrecognized negative
option.

Which explains why we have several cases of this in the tree: the
'cc-option' test really doesn't work for this situation, but most of the
time it simply doesn't matter that ity doesn't work.

The reason my recently added case caused problems on sparc was pointed
out by Thomas Weißschuh: the sparc build had a previous explicit warning
that then triggered the new one.

I think the best fix for this would be to make 'cc-option' a bit smarter
about this sitation, possibly by adding an intentional warning to the
test case that then triggers the unrecognized option warning reliably.

But the short-term fix is to replace 'cc-option' with an existing helper
designed for this exact case: 'cc-disable-warning', which picks the
negative warning but uses the positive form for testing the compiler
support.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Link: https://lore.kernel.org/all/20250422204718.0b4e3f81@canb.auug.org.au/
Explained-by: Thomas Weißschuh <linux@weissschuh.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-05-29 11:03:25 +02:00
Nathan Chancellor
511ceee899 kbuild: Disable -Wdefault-const-init-unsafe
commit d0afcfeb9e3810ec89d1ffde1a0e36621bb75dca upstream.

A new on by default warning in clang [1] aims to flags instances where
const variables without static or thread local storage or const members
in aggregate types are not initialized because it can lead to an
indeterminate value. This is quite noisy for the kernel due to
instances originating from header files such as:

  drivers/gpu/drm/i915/gt/intel_ring.h:62:2: error: default initialization of an object of type 'typeof (ring->size)' (aka 'const unsigned int') leaves the object uninitialized [-Werror,-Wdefault-const-init-var-unsafe]
     62 |         typecheck(typeof(ring->size), next);
        |         ^
  include/linux/typecheck.h:10:9: note: expanded from macro 'typecheck'
     10 | ({      type __dummy; \
        |              ^

  include/net/ip.h:478:14: error: default initialization of an object of type 'typeof (rt->dst.expires)' (aka 'const unsigned long') leaves the object uninitialized [-Werror,-Wdefault-const-init-var-unsafe]
    478 |                 if (mtu && time_before(jiffies, rt->dst.expires))
        |                            ^
  include/linux/jiffies.h:138:26: note: expanded from macro 'time_before'
    138 | #define time_before(a,b)        time_after(b,a)
        |                                 ^
  include/linux/jiffies.h:128:3: note: expanded from macro 'time_after'
    128 |         (typecheck(unsigned long, a) && \
        |          ^
  include/linux/typecheck.h:11:12: note: expanded from macro 'typecheck'
     11 |         typeof(x) __dummy2; \
        |                   ^

  include/linux/list.h:409:27: warning: default initialization of an object of type 'union (unnamed union at include/linux/list.h:409:27)' with const member leaves the object uninitialized [-Wdefault-const-init-field-unsafe]
    409 |         struct list_head *next = smp_load_acquire(&head->next);
        |                                  ^
  include/asm-generic/barrier.h:176:29: note: expanded from macro 'smp_load_acquire'
    176 | #define smp_load_acquire(p) __smp_load_acquire(p)
        |                             ^
  arch/arm64/include/asm/barrier.h:164:59: note: expanded from macro '__smp_load_acquire'
    164 |         union { __unqual_scalar_typeof(*p) __val; char __c[1]; } __u;   \
        |                                                                  ^
  include/linux/list.h:409:27: note: member '__val' declared 'const' here

  crypto/scatterwalk.c:66:22: error: default initialization of an object of type 'struct scatter_walk' with const member leaves the object uninitialized [-Werror,-Wdefault-const-init-field-unsafe]
     66 |         struct scatter_walk walk;
        |                             ^
  include/crypto/algapi.h:112:15: note: member 'addr' declared 'const' here
    112 |                 void *const addr;
        |                             ^

  fs/hugetlbfs/inode.c:733:24: error: default initialization of an object of type 'struct vm_area_struct' with const member leaves the object uninitialized [-Werror,-Wdefault-const-init-field-unsafe]
    733 |         struct vm_area_struct pseudo_vma;
        |                               ^
  include/linux/mm_types.h:803:20: note: member 'vm_flags' declared 'const' here
    803 |                 const vm_flags_t vm_flags;
        |                                  ^

Silencing the instances from typecheck.h is difficult because '= {}' is
not available in older but supported compilers and '= {0}' would cause
warnings about a literal 0 being treated as NULL. While it might be
possible to come up with a local hack to silence the warning for
clang-21+, it may not be worth it since -Wuninitialized will still
trigger if an uninitialized const variable is actually used.

In all audited cases of the "field" variant of the warning, the members
are either not used in the particular call path, modified through other
means such as memset() / memcpy() because the containing object is not
const, or are within a union with other non-const members.

Since this warning does not appear to have a high signal to noise ratio,
just disable it.

Cc: stable@vger.kernel.org
Link: 576161cb60 [1]
Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>
Closes: https://lore.kernel.org/CA+G9fYuNjKcxFKS_MKPRuga32XbndkLGcY-PVuoSwzv6VWbY=w@mail.gmail.com/
Reported-by: Marcus Seyfarth <m.seyfarth@gmail.com>
Closes: https://github.com/ClangBuiltLinux/linux/issues/2088
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-05-22 14:29:48 +02:00
Greg Kroah-Hartman
f3bf53034d Merge 6.12.16 into android16-6.12
GKI (arm64) relevant 76 out of 226 changes, affecting 86 files +761/-318
  aa879ef6d3 HID: multitouch: Add NULL check in mt_input_configured [1 file, +4/-1]
  ba6ab3f04d pinctrl: pinconf-generic: Print unsigned value if a format is registered [1 file, +4/-4]
  36fd8f1c73 HID: hid-steam: Don't use cancel_delayed_work_sync in IRQ context [1 file, +1/-1]
  889e6b42a4 net: fib_rules: annotate data-races around rule->[io]ifindex [1 file, +13/-11]
  18e77fccfc ndisc: ndisc_send_redirect() must use dev_get_by_index_rcu() [1 file, +1/-1]
  022cac1c69 vrf: use RCU protection in l3mdev_l3_out() [1 file, +2/-0]
  e7c16028a4 workqueue: Put the pwq after detaching the rescuer from the pool [1 file, +6/-6]
  715eb1af64 arm64: cacheinfo: Avoid out-of-bounds write to cacheinfo array [1 file, +7/-5]
  c3e39d6acb cgroup: Remove steal time from usage_usec [1 file, +0/-1]
  9d32212b99 io_uring/waitid: don't abuse io_tw_state [1 file, +2/-2]
  98d6ee3e30 io_uring/uring_cmd: remove dead req_has_async_data() check [1 file, +0/-3]
  9e6d70a910 block: cleanup and fix batch completion adding conditions [1 file, +14/-4]
  a7052afa9e gpiolib: Fix crash on error in gpiochip_get_ngpios() [1 file, +3/-3]
  1b259a5df5 media: uvcvideo: Implement dual stream quirk to fix loss of usb packets [2 files, +27/-1]
  7706d1edb9 media: uvcvideo: Add new quirk definition for the Sonix Technology Co. 292a camera [1 file, +9/-0]
  24407a7584 media: uvcvideo: Add Kurokesu C1 PRO camera [1 file, +9/-0]
  2290d3bd96 PCI/DPC: Quirk PIO log size for Intel Raptor Lake-P [1 file, +1/-0]
  551df35e4f PCI: switchtec: Add Microchip PCI100X device IDs [2 files, +37/-0]
  88a01e9c9a scsi: ufs: bsg: Set bsg_queue to NULL after removal [1 file, +1/-0]
  c58e0d2d04 serial: 8250_pci: Resolve WCH vendor ID ambiguity [1 file, +41/-41]
  14a2a8ec50 kunit: platform: Resolve 'struct completion' warning [1 file, +1/-0]
  abb99f28b4 ring-buffer: Unlock resize on mmap error [1 file, +1/-0]
  e8dff5f739 tracing: Do not allow mmap() of persistent ring buffer [1 file, +4/-0]
  3ec743d558 ring-buffer: Validate the persistent meta data subbuf array [1 file, +20/-2]
  9f837ea922 ring-buffer: Update pages_touched to reflect persistent buffer content [1 file, +5/-0]
  a5852836e5 usb: gadget: f_midi: Fixing wMaxPacketSize exceeded issue during MIDI bind retries [1 file, +9/-0]
  5fead36e09 usb: dwc3: Fix timeout issue during controller enter/exit from halt state [1 file, +34/-0]
  69f27580e8 usb: roles: set switch registered flag early on [1 file, +3/-2]
  f3b755022f usb: xhci: Restore xhci_pci support for Renesas HCs [1 file, +4/-3]
  9c91296e2d USB: pci-quirks: Fix HCCPARAMS register error for LS7A EHCI [1 file, +9/-0]
  847fff8e20 usb: core: fix pipe creation for get_bMaxPacketSize0 [1 file, +1/-2]
  6c4fce1b16 USB: quirks: add USB_QUIRK_NO_LPM quirk for Teclast dist [1 file, +3/-0]
  f4e1cebbfa USB: Add USB_QUIRK_NO_LPM quirk for sony xperia xz1 smartphone [1 file, +3/-0]
  6b16761a92 usb: gadget: f_midi: fix MIDI Streaming descriptor lengths [1 file, +4/-4]
  62d8f4c545 USB: hub: Ignore non-compliant devices with too many configs or interfaces [1 file, +11/-0]
  165fac6ceb USB: cdc-acm: Fill in Renesas R-Car D3 USB Download mode quirk [1 file, +6/-3]
  f64079bef6 usb: cdc-acm: Check control transfer buffer size before access [1 file, +14/-3]
  a5b205ceef usb: cdc-acm: Fix handling of oversized fragments [1 file, +1/-1]
  f894448f39 usb: gadget: core: flush gadget workqueue after device removal [1 file, +1/-1]
  ce526e1b29 PCI: Avoid FLR for Mediatek MT7922 WiFi [1 file, +2/-1]
  3ed642e80c efi: Avoid cold plugged memory for placing the kernel [4 files, +11/-2]
  edd4084445 cgroup: fix race between fork and cgroup.kill [3 files, +16/-11]
  29c04864fb serial: port: Assign ->iotype correctly when ->iobase is set [1 file, +2/-1]
  010eb5fe22 serial: port: Always update ->iotype in __uart_read_properties() [1 file, +1/-1]
  eeb64f9637 regmap-irq: Add missing kfree() [1 file, +2/-0]
  9a1c65ff5e include: net: add static inline dst_dev_overhead() to dst.h [1 file, +9/-0]
  ebf0ac02e2 clocksource: Use pr_info() for "Checking clocksource synchronization" message [1 file, +2/-1]
  cc3d79e7c8 clocksource: Use migrate_disable() to avoid calling get_random_u32() in atomic context [1 file, +4/-2]
  f7015dcac2 scsi: ufs: core: Introduce ufshcd_has_pending_tasks() [1 file, +9/-4]
  9ece41a0d7 scsi: ufs: core: Prepare to introduce a new clock_gating lock [1 file, +7/-4]
  f453c45152 scsi: ufs: core: Introduce a new clock_gating lock [2 files, +59/-59]
  7d46869aa7 scsi: ufs: Fix toggling of clk_gating.state when clock gating is not allowed [1 file, +1/-1]
  cb4d7fbc93 ipv4: add RCU protection to ip4_dst_hoplimit() [1 file, +7/-2]
  dfe542e745 ipv4: use RCU protection in ip_dst_mtu_maybe_forward() [1 file, +10/-3]
  ec9af76451 net: add dev_net_rcu() helper [2 files, +7/-1]
  f4ba5e65c9 ipv4: use RCU protection in ipv4_default_advmss() [1 file, +8/-3]
  77096420be ipv4: use RCU protection in rt_is_expired() [1 file, +7/-1]
  ad66c7c4d8 ipv4: use RCU protection in inet_select_addr() [1 file, +2/-1]
  7f5005457b net: ipv4: Cache pmtu for all packet paths if multipath enabled [2 files, +108/-17]
  4583748b65 ipv4: use RCU protection in __ip_rt_update_pmtu() [1 file, +6/-5]
  3c925321a5 ipv4: icmp: convert to dev_net_rcu() [1 file, +17/-14]
  a575827791 flow_dissector: use RCU protection to fetch dev_net() [1 file, +11/-10]
  713a40c892 ipv6: use RCU protection in ip6_default_advmss() [1 file, +6/-1]
  653bb5225c ipv6: icmp: convert to dev_net_rcu() [1 file, +23/-19]
  2152b417be HID: hid-steam: Make sure rumble work is canceled on removal [1 file, +1/-0]
  3e38cbbfa0 HID: hid-steam: Move hidraw input (un)registering to work [1 file, +31/-7]
  bbec88e410 ndisc: use RCU protection in ndisc_alloc_skb() [1 file, +4/-6]
  cdd5c2a12d neighbour: use RCU protection in __neigh_notify() [1 file, +6/-2]
  01d1b5c9ab arp: use RCU protection in arp_xmit() [1 file, +3/-1]
  789230e5a8 ndisc: extend RCU protection in ndisc_send_skb() [1 file, +8/-4]
  0bf8e2f376 ipv6: mcast: extend RCU protection in igmp6_send() [1 file, +15/-16]
  25195f9d5f ipv6: mcast: add RCU protection to mld_newpack() [1 file, +10/-4]
  13129b1fbf scsi: ufs: core: Ensure clk_gating.lock is used only after initialization [1 file, +6/-2]
  7d0dc28dae io_uring/kbuf: reallocate buf lists on upgrade [1 file, +11/-4]
  645ce25aa0 vsock: Keep the binding until socket destruction [1 file, +6/-2]
  3a866f8376 vsock: Orphan socket after transport release [1 file, +7/-1]

Changes in 6.12.16
	nfsd: clear acl_access/acl_default after releasing them
	NFSD: fix hang in nfsd4_shutdown_callback
	nfsd: validate the nfsd_serv pointer before calling svc_wake_up
	x86/cpu/kvm: SRSO: Fix possible missing IBPB on VM-Exit
	pinctrl: cy8c95x0: Avoid accessing reserved registers
	pinctrl: cy8c95x0: Enable regmap locking for debug
	pinctrl: cy8c95x0: Rename PWMSEL to SELPWM
	pinctrl: cy8c95x0: Respect IRQ trigger settings from firmware
	HID: winwing: Add NULL check in winwing_init_led()
	HID: multitouch: Add NULL check in mt_input_configured
	scripts/Makefile.extrawarn: Do not show clang's non-kprintf warnings at W=1
	pinctrl: pinconf-generic: Print unsigned value if a format is registered
	HID: hid-thrustmaster: fix stack-out-of-bounds read in usb_check_int_endpoints()
	HID: hid-steam: Don't use cancel_delayed_work_sync in IRQ context
	spi: sn-f-ospi: Fix division by zero
	ax25: Fix refcount leak caused by setting SO_BINDTODEVICE sockopt
	net: fib_rules: annotate data-races around rule->[io]ifindex
	Documentation/networking: fix basic node example document ISO 15765-2
	ndisc: ndisc_send_redirect() must use dev_get_by_index_rcu()
	vrf: use RCU protection in l3mdev_l3_out()
	idpf: fix handling rsc packet with a single segment
	idpf: record rx queue in skb for RSC packets
	idpf: call set_real_num_queues in idpf_open
	igc: Fix HW RX timestamp when passed by ZC XDP
	vxlan: check vxlan_vnigroup_init() return value
	LoongArch: Fix idle VS timer enqueue
	LoongArch: csum: Fix OoB access in IP checksum code for negative lengths
	LoongArch: KVM: Fix typo issue about GCFG feature detection
	net: ethernet: ti: am65-cpsw: fix memleak in certain XDP cases
	net: ethernet: ti: am65_cpsw: fix tx_cleanup for XDP case
	Bluetooth: btintel_pcie: Fix a potential race condition
	team: better TEAM_OPTION_TYPE_STRING validation
	workqueue: Put the pwq after detaching the rescuer from the pool
	sched_ext: Fix lock imbalance in dispatch_to_local_dsq()
	drm/tests: hdmi: Fix WW_MUTEX_SLOWPATH failures
	arm64: cacheinfo: Avoid out-of-bounds write to cacheinfo array
	gpu: host1x: Fix a use of uninitialized mutex
	cgroup: Remove steal time from usage_usec
	perf/x86/intel: Clean up PEBS-via-PT on hybrid
	drm/xe/client: bo->client does not need bos_lock
	drm/i915/selftests: avoid using uninitialized context
	gpio: bcm-kona: Fix GPIO lock/unlock for banks above bank 0
	gpio: bcm-kona: Make sure GPIO bits are unlocked when requesting IRQ
	gpio: bcm-kona: Add missing newline to dev_err format string
	io_uring/waitid: don't abuse io_tw_state
	io_uring/uring_cmd: remove dead req_has_async_data() check
	amdkfd: properly free gang_ctx_bo when failed to init user queue
	drm/amdgpu: bail out when failed to load fw in psp_init_cap_microcode()
	drm: Fix DSC BPP increment decoding
	xen/swiotlb: relax alignment requirements
	x86/xen: allow larger contiguous memory regions in PV guests
	block: cleanup and fix batch completion adding conditions
	sched_ext: Fix the incorrect bpf_list kfunc API in common.bpf.h.
	sched_ext: Use SCX_CALL_OP_TASK in task_tick_scx
	gpiolib: Fix crash on error in gpiochip_get_ngpios()
	iommu/amd: Expicitly enable CNTRL.EPHEn bit in resume path
	tools: fix annoying "mkdir -p ..." logs when building tools in parallel
	RDMA/efa: Reset device on probe failure
	firmware: qcom: scm: smc: Handle missing SCM device
	fbdev: omap: use threaded IRQ for LCD DMA
	soc/tegra: fuse: Update Tegra234 nvmem keepout list
	i3c: mipi-i3c-hci: Add Intel specific quirk to ring resuming
	i3c: mipi-i3c-hci: Add support for MIPI I3C HCI on PCI bus
	media: cxd2841er: fix 64-bit division on gcc-9
	media: i2c: ds90ub913: Add error handling to ub913_hw_init()
	media: i2c: ds90ub953: Add error handling for i2c reads/writes
	media: bcm2835-unicam: Disable trigger mode operation
	media: uvcvideo: Implement dual stream quirk to fix loss of usb packets
	media: uvcvideo: Add new quirk definition for the Sonix Technology Co. 292a camera
	media: uvcvideo: Add Kurokesu C1 PRO camera
	media: vidtv: Fix a null-ptr-deref in vidtv_mux_stop_thread
	PCI/DPC: Quirk PIO log size for Intel Raptor Lake-P
	PCI: switchtec: Add Microchip PCI100X device IDs
	scsi: ufs: bsg: Set bsg_queue to NULL after removal
	rtla/timerlat_hist: Abort event processing on second signal
	rtla/timerlat_top: Abort event processing on second signal
	serial: 8250_pci: Resolve WCH vendor ID ambiguity
	serial: 8250_pci: Share WCH IDs with parport_serial driver
	8250: microchip: pci1xxxx: Add workaround for RTS bit toggle
	kunit: platform: Resolve 'struct completion' warning
	vfio/pci: Enable iowrite64 and ioread64 for vfio pci
	NFS: Fix potential buffer overflowin nfs_sysfs_link_rpc_client()
	vfio/nvgrace-gpu: Read dvsec register to determine need for uncached resmem
	vfio/nvgrace-gpu: Expose the blackwell device PF BAR1 to the VM
	fs/ntfs3: Unify inode corruption marking with _ntfs_bad_inode()
	Grab mm lock before grabbing pt lock
	selftests: gpio: gpio-sim: Fix missing chip disablements
	ACPI: x86: Add skip i2c clients quirk for Vexia EDU ATLA 10 tablet 5V
	x86/mm/tlb: Only trim the mm_cpumask once a second
	orangefs: fix a oob in orangefs_debug_write
	kbuild: suppress stdout from merge_config for silent builds
	ASoC: Intel: bytcr_rt5640: Add DMI quirk for Vexia Edu Atla 10 tablet 5V
	kbuild: Use -fzero-init-padding-bits=all
	batman-adv: fix panic during interface removal
	batman-adv: Ignore neighbor throughput metrics in error case
	batman-adv: Drop unmanaged ELP metric worker
	drm/amdgpu: avoid buffer overflow attach in smu_sys_set_pp_table()
	KVM: x86: Reject Hyper-V's SEND_IPI hypercalls if local APIC isn't in-kernel
	KVM: x86: Load DR6 with guest value only before entering .vcpu_run() loop
	KVM: nSVM: Enter guest mode before initializing nested NPT MMU
	perf/x86/intel: Fix ARCH_PERFMON_NUM_COUNTER_LEAF
	perf/x86/intel: Ensure LBRs are disabled when a CPU is starting
	ring-buffer: Unlock resize on mmap error
	tracing: Do not allow mmap() of persistent ring buffer
	ring-buffer: Validate the persistent meta data subbuf array
	ring-buffer: Update pages_touched to reflect persistent buffer content
	usb: gadget: f_midi: Fixing wMaxPacketSize exceeded issue during MIDI bind retries
	usb: dwc3: Fix timeout issue during controller enter/exit from halt state
	usb: roles: set switch registered flag early on
	usb: gadget: udc: renesas_usb3: Fix compiler warning
	usb: dwc2: gadget: remove of_node reference upon udc_stop
	usb: xhci: Restore xhci_pci support for Renesas HCs
	USB: pci-quirks: Fix HCCPARAMS register error for LS7A EHCI
	usb: core: fix pipe creation for get_bMaxPacketSize0
	USB: quirks: add USB_QUIRK_NO_LPM quirk for Teclast dist
	USB: Add USB_QUIRK_NO_LPM quirk for sony xperia xz1 smartphone
	usb: gadget: f_midi: fix MIDI Streaming descriptor lengths
	USB: hub: Ignore non-compliant devices with too many configs or interfaces
	USB: cdc-acm: Fill in Renesas R-Car D3 USB Download mode quirk
	usb: cdc-acm: Check control transfer buffer size before access
	usb: cdc-acm: Fix handling of oversized fragments
	usb: gadget: core: flush gadget workqueue after device removal
	USB: serial: option: add MeiG Smart SLM828
	USB: serial: option: add Telit Cinterion FN990B compositions
	USB: serial: option: fix Telit Cinterion FN990A name
	USB: serial: option: drop MeiG Smart defines
	can: ctucanfd: handle skb allocation failure
	can: c_can: fix unbalanced runtime PM disable in error path
	can: j1939: j1939_sk_send_loop(): fix unable to send messages with data length zero
	can: rockchip: rkcanfd_handle_rx_fifo_overflow_int(): bail out if skb cannot be allocated
	can: etas_es58x: fix potential NULL pointer dereference on udev->serial
	alpha: make stack 16-byte aligned (most cases)
	wifi: ath12k: fix handling of 6 GHz rules
	PCI: Avoid FLR for Mediatek MT7922 WiFi
	kbuild: userprogs: fix bitsize and target detection on clang
	efi: Avoid cold plugged memory for placing the kernel
	arm64: rust: clean Rust 1.85.0 warning using softfloat target
	objtool/rust: add one more `noreturn` Rust function
	rust: rbtree: fix overindented list item
	cgroup: fix race between fork and cgroup.kill
	serial: port: Assign ->iotype correctly when ->iobase is set
	serial: port: Always update ->iotype in __uart_read_properties()
	serial: 8250: Fix fifo underflow on flush
	alpha: replace hardcoded stack offsets with autogenerated ones
	alpha: align stack for page fault and user unaligned trap handlers
	s390/pci: Pull search for parent PF out of zpci_iov_setup_virtfn()
	s390/pci: Fix handling of isolated VFs
	gpiolib: acpi: Add a quirk for Acer Nitro ANV14
	gpio: stmpe: Check return value of stmpe_reg_read in stmpe_gpio_irq_sync_unlock
	partitions: mac: fix handling of bogus partition table
	sched_ext: Fix incorrect autogroup migration detection
	regulator: qcom_smd: Add l2, l5 sub-node to mp5496 regulator
	iommu: Fix potential memory leak in iopf_queue_remove_device()
	regmap-irq: Add missing kfree()
	arm64: Handle .ARM.attributes section in linker scripts
	mmc: mtk-sd: Fix register settings for hs400(es) mode
	igc: Set buffer type for empty frames in igc_init_empty_frame
	cifs: pick channels for individual subrequests
	mlxsw: Add return value check for mlxsw_sp_port_get_stats_raw()
	btrfs: fix hole expansion when writing at an offset beyond EOF
	include: net: add static inline dst_dev_overhead() to dst.h
	net: ipv6: ioam6_iptunnel: mitigate 2-realloc issue
	net: ipv6: seg6_iptunnel: mitigate 2-realloc issue
	net: ipv6: rpl_iptunnel: mitigate 2-realloc issue
	net: ipv6: fix dst ref loops in rpl, seg6 and ioam6 lwtunnels
	clocksource: Use pr_info() for "Checking clocksource synchronization" message
	clocksource: Use migrate_disable() to avoid calling get_random_u32() in atomic context
	scsi: ufs: core: Introduce ufshcd_has_pending_tasks()
	scsi: ufs: core: Prepare to introduce a new clock_gating lock
	scsi: ufs: core: Introduce a new clock_gating lock
	scsi: ufs: Fix toggling of clk_gating.state when clock gating is not allowed
	rust: kbuild: add -fzero-init-padding-bits to bindgen_skip_cflags
	cpufreq/amd-pstate: Call cppc_set_epp_perf in the reenable function
	cpufreq/amd-pstate: Align offline flow of shared memory and MSR based systems
	cpufreq/amd-pstate: Refactor amd_pstate_epp_reenable() and amd_pstate_epp_offline()
	cpufreq/amd-pstate: Remove the cppc_state check in offline/online functions
	cpufreq/amd-pstate: Merge amd_pstate_epp_cpu_offline() and amd_pstate_epp_offline()
	cpufreq/amd-pstate: convert mutex use to guard()
	cpufreq/amd-pstate: Fix cpufreq_policy ref counting
	ipv4: add RCU protection to ip4_dst_hoplimit()
	ipv4: use RCU protection in ip_dst_mtu_maybe_forward()
	net: add dev_net_rcu() helper
	ipv4: use RCU protection in ipv4_default_advmss()
	ipv4: use RCU protection in rt_is_expired()
	ipv4: use RCU protection in inet_select_addr()
	net: ipv4: Cache pmtu for all packet paths if multipath enabled
	ipv4: use RCU protection in __ip_rt_update_pmtu()
	ipv4: icmp: convert to dev_net_rcu()
	flow_dissector: use RCU protection to fetch dev_net()
	ipv6: use RCU protection in ip6_default_advmss()
	ipv6: icmp: convert to dev_net_rcu()
	HID: hid-steam: Make sure rumble work is canceled on removal
	HID: hid-steam: Move hidraw input (un)registering to work
	ndisc: use RCU protection in ndisc_alloc_skb()
	neighbour: use RCU protection in __neigh_notify()
	arp: use RCU protection in arp_xmit()
	openvswitch: use RCU protection in ovs_vport_cmd_fill_info()
	ndisc: extend RCU protection in ndisc_send_skb()
	ipv6: mcast: extend RCU protection in igmp6_send()
	btrfs: rename __get_extent_map() and pass btrfs_inode
	btrfs: fix stale page cache after race between readahead and direct IO write
	ipv6: mcast: add RCU protection to mld_newpack()
	drm/tidss: Fix issue in irq handling causing irq-flood issue
	drm/tidss: Fix race condition while handling interrupt registers
	drm/tidss: Clear the interrupt status for interrupts being disabled
	drm/msm/gem: prevent integer overflow in msm_ioctl_gem_submit()
	drm/rcar-du: dsi: Fix PHY lock bit check
	drm/msm/dpu: fix x1e80100 intf_6 underrun/vsync interrupt
	drm/msm/dpu1: don't choke on disabling the writeback connector
	drm/v3d: Stop active perfmon if it is being destroyed
	drm/xe/tracing: Fix a potential TP_printk UAF
	drm: renesas: rz-du: Increase supported resolutions
	netdevsim: print human readable IP address
	selftests: rtnetlink: update netdevsim ipsec output format
	x86/static-call: Remove early_boot_irqs_disabled check to fix Xen PVH dom0
	bpf: handle implicit declaration of function gettid in bpf_iter.c
	selftests/bpf: Fix uprobe consumer test
	wifi: rtw89: pci: disable PCIE wake bit when PCIE deinit
	cpufreq/amd-pstate: Remove the goto label in amd_pstate_update_limits
	net: ipv6: fix dst refleaks in rpl, seg6 and ioam6 lwtunnels
	scsi: ufs: core: Ensure clk_gating.lock is used only after initialization
	io_uring/kbuf: reallocate buf lists on upgrade
	vsock: Keep the binding until socket destruction
	vsock: Orphan socket after transport release
	Revert "vfio/platform: check the bounds of read/write syscalls"
	Linux 6.12.16

Change-Id: I84e354ffa6aeb0323a95046630310c3d2185a069
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2025-02-26 08:21:26 -08:00
Kees Cook
f71cb6da13 kbuild: Use -fzero-init-padding-bits=all
[ Upstream commit dce4aab8441d285b9a78b33753e0bf583c1320ee ]

GCC 15 introduces a regression in "= { 0 }" style initialization of
unions that Linux has depended on for eliminating uninitialized variable
contents. GCC does not seem likely to fix it[1], instead suggesting[2]
that affected projects start using -fzero-init-padding-bits=unions.

To avoid future surprises beyond just the current situation with unions,
enable -fzero-init-padding-bits=all when available (GCC 15+). This will
correctly zero padding bits in unions and structs that might have been
left uninitialized, and will make sure there is no immediate regression
in union initializations. As seen in the stackinit KUnit selftest union
cases, which were passing before, were failing under GCC 15:

    not ok 18 test_small_start_old_zero
    ok 29 test_small_start_dynamic_partial # SKIP XFAIL uninit bytes: 63
    ok 32 test_small_start_assigned_dynamic_partial # SKIP XFAIL uninit bytes: 63
    ok 67 test_small_start_static_partial # SKIP XFAIL uninit bytes: 63
    ok 70 test_small_start_static_all # SKIP XFAIL uninit bytes: 56
    ok 73 test_small_start_dynamic_all # SKIP XFAIL uninit bytes: 56
    ok 82 test_small_start_assigned_static_partial # SKIP XFAIL uninit bytes: 63
    ok 85 test_small_start_assigned_static_all # SKIP XFAIL uninit bytes: 56
    ok 88 test_small_start_assigned_dynamic_all # SKIP XFAIL uninit bytes: 56

The above all now pass again with -fzero-init-padding-bits=all added.

This also fixes the following cases for struct initialization that had
been XFAIL until now because there was no compiler support beyond the
larger "-ftrivial-auto-var-init=zero" option:

    ok 38 test_small_hole_static_all # SKIP XFAIL uninit bytes: 3
    ok 39 test_big_hole_static_all # SKIP XFAIL uninit bytes: 124
    ok 40 test_trailing_hole_static_all # SKIP XFAIL uninit bytes: 7
    ok 42 test_small_hole_dynamic_all # SKIP XFAIL uninit bytes: 3
    ok 43 test_big_hole_dynamic_all # SKIP XFAIL uninit bytes: 124
    ok 44 test_trailing_hole_dynamic_all # SKIP XFAIL uninit bytes: 7
    ok 58 test_small_hole_assigned_static_all # SKIP XFAIL uninit bytes: 3
    ok 59 test_big_hole_assigned_static_all # SKIP XFAIL uninit bytes: 124
    ok 60 test_trailing_hole_assigned_static_all # SKIP XFAIL uninit bytes: 7
    ok 62 test_small_hole_assigned_dynamic_all # SKIP XFAIL uninit bytes: 3
    ok 63 test_big_hole_assigned_dynamic_all # SKIP XFAIL uninit bytes: 124
    ok 64 test_trailing_hole_assigned_dynamic_all # SKIP XFAIL uninit bytes: 7

All of the above now pass when built under GCC 15. Tests can be seen
with:

    ./tools/testing/kunit/kunit.py run stackinit --arch=x86_64 \
        --make_option CC=gcc-15

Clang continues to fully initialize these kinds of variables[3] without
additional flags.

Suggested-by: Jakub Jelinek <jakub@redhat.com>
Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118403 [1]
Link: https://lore.kernel.org/linux-toolchains/Z0hRrrNU3Q+ro2T7@tucnak/ [2]
Link: 7a086e1b2d [3]
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Acked-by: Masahiro Yamada <masahiroy@kernel.org>
Link: https://lore.kernel.org/r/20250127191031.245214-3-kees@kernel.org
Signed-off-by: Kees Cook <kees@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-02-21 14:01:27 +01:00
Nathan Chancellor
1f5b7a566e scripts/Makefile.extrawarn: Do not show clang's non-kprintf warnings at W=1
[ Upstream commit 738fc998b639407346a9e026514f0562301462cd ]

Clang's -Wformat-overflow and -Wformat-truncation have chosen to check
'%p' unlike GCC but it does not know about the kernel's pointer
extensions in lib/vsprintf.c, so the developers split that part of the
warning out for the kernel to disable because there will always be false
positives.

Commit 908dd50827 ("kbuild: enable -Wformat-truncation on clang") did
disabled these warnings but only in a block that would be called when
W=1 was not passed, so they would appear with W=1. Move the disabling of
the non-kprintf warnings to a block that always runs so that they are
never seen, regardless of warning level.

Fixes: 908dd50827 ("kbuild: enable -Wformat-truncation on clang")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202501291646.VtwF98qd-lkp@intel.com/
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-02-21 14:01:15 +01:00
Nathan Chancellor
cbcd8b83d2 kbuild: Move -Wenum-enum-conversion to W=2
commit 8f6629c004b193d23612641c3607e785819e97ab upstream.

-Wenum-enum-conversion was strengthened in clang-19 to warn for C, which
caused the kernel to move it to W=1 in commit 75b5ab134b ("kbuild:
Move -Wenum-{compare-conditional,enum-conversion} into W=1") because
there were numerous instances that would break builds with -Werror.
Unfortunately, this is not a full solution, as more and more developers,
subsystems, and distributors are building with W=1 as well, so they
continue to see the numerous instances of this warning.

Since the move to W=1, there have not been many new instances that have
appeared through various build reports and the ones that have appeared
seem to be following similar existing patterns, suggesting that most
instances of this warning will not be real issues. The only alternatives
for silencing this warning are adding casts (which is generally seen as
an ugly practice) or refactoring the enums to macro defines or a unified
enum (which may be undesirable because of type safety in other parts of
the code).

Move the warning to W=2, where warnings that occur frequently but may be
relevant should reside.

Cc: stable@vger.kernel.org
Fixes: 75b5ab134b ("kbuild: Move -Wenum-{compare-conditional,enum-conversion} into W=1")
Link: https://lore.kernel.org/ZwRA9SOcOjjLJcpi@google.com/
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-02-17 10:05:23 +01:00
Nathan Chancellor
4b54a87ee6 FROMLIST: kbuild: Move -Wenum-enum-conversion to W=2
-Wenum-enum-conversion was strengthened in clang-19 to warn for C, which
caused the kernel to move it to W=1 in commit 75b5ab134b ("kbuild:
Move -Wenum-{compare-conditional,enum-conversion} into W=1") because
there were numerous instances that would break builds with -Werror.
Unfortunately, this is not a full solution, as more and more developers,
subsystems, and distributors are building with W=1 as well, so they
continue to see the numerous instances of this warning.

Since the move to W=1, there have not been many new instances that have
appeared through various build reports and the ones that have appeared
seem to be following similar existing patterns, suggesting that most
instances of this warning will not be real issues. The only alternatives
for silencing this warning are adding casts (which is generally seen as
an ugly practice) or refactoring the enums to macro defines or a unified
enum (which may be undesirable because of type safety in other parts of
the code).

Move the warning to W=2, where warnings that occur frequently but may be
relevant should reside.

Cc: stable@vger.kernel.org
Fixes: 75b5ab134b ("kbuild: Move -Wenum-{compare-conditional,enum-conversion} into W=1")
Link: https://lore.kernel.org/ZwRA9SOcOjjLJcpi@google.com/
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>

Link: https://lore.kernel.org/20241017-disable-two-clang-enum-warnings-v2-1-163ac04346ae@kernel.org/
Bug: 354745907
Change-Id: I576133869a9dba7dc1475fa1e825d83c7fe025c6
Signed-off-by: Aleksei Vetrov <vvvvvv@google.com>
2024-10-23 14:56:28 +00:00
Will McVicker
4cf63363a7 Merge tag 'v6.10-rc1' into android-mainline
Linux 6.10-rc1

Change-Id: Idb352b80ec4035982950ab2aec3bf3fbf4323ec3
Signed-off-by: Matthias Maennich <maennich@google.com>
Signed-off-by: Will McVicker <willmcvicker@google.com>
2024-08-05 09:42:59 -07:00
Lee Jones
3e60d75f6d Merge 39cd87c4eb ("Linux 6.9-rc2") into android-mainline
Steps on the way to v6.9

Signed-off-by: Lee Jones <joneslee@google.com>
Change-Id: If8f7216c78421d5274859c7184aa7e0f77483886
2024-05-21 14:52:53 +01:00
Lee Jones
d31eda960d Merge 4cece76496 ("Linux 6.9-rc1") into android-mainline
Steps on the way to v6.9-rc1

Signed-off-by: Lee Jones <joneslee@google.com>
Change-Id: I5c5bd3feea887994728e4e74ba7c6e2fc41d98e0
2024-05-20 16:49:41 +01:00
Arnd Bergmann
bd2a70e97a kbuild: enable -Wcast-function-type-strict unconditionally
All known function cast warnings are now addressed, so the warning can be
enabled globally to catch new ones more quickly.

Link: https://lkml.kernel.org/r/20240415122037.1983124-6-arnd@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Kees Cook <keescook@chromium.org>
Cc: Masahiro Yamada <masahiroy@kernel.org>
Cc: Nathan Chancellor <nathan@kernel.org>
Cc: Nicolas Schier <nicolas@fjasle.eu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2024-05-19 14:36:16 -07:00
Arnd Bergmann
908dd50827 kbuild: enable -Wformat-truncation on clang
This warning option still produces output on gcc but is now clean when
building with clang, so enable it conditionally on the compiler for now.

As far as I can tell, the remaining warnings with gcc are the result of
analysing the code more deeply across inlining, while clang only does this
within a function.

Link: https://lore.kernel.org/lkml/20240326230511.GA2796782@dev-arch.thelio-3990X/
Link: https://lore.kernel.org/linux-patches/20231002-disable-wformat-truncation-overflow-non-kprintf-v1-1-35179205c8d9@kernel.org/
Link: https://lkml.kernel.org/r/20240415122037.1983124-5-arnd@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Kees Cook <keescook@chromium.org>
Cc: Masahiro Yamada <masahiroy@kernel.org>
Cc: Nathan Chancellor <nathan@kernel.org>
Cc: Nicolas Schier <nicolas@fjasle.eu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2024-05-19 14:36:16 -07:00
Arnd Bergmann
06bb7fc0fe kbuild: turn on -Wrestrict by default
All known -Wrestrict warnings are addressed now, so don't disable the
warning any more.

Link: https://lkml.kernel.org/r/20240415122037.1983124-4-arnd@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Kees Cook <keescook@chromium.org>
Cc: Masahiro Yamada <masahiroy@kernel.org>
Cc: Nathan Chancellor <nathan@kernel.org>
Cc: Nicolas Schier <nicolas@fjasle.eu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2024-05-19 14:36:16 -07:00
Arnd Bergmann
2c1460d3b4 kbuild: remove redundant extra warning flags
There is no point in turning individual options off and then on again, or
vice versa, as the last one always wins.  Now that -Wextra always gets
passed first, remove all the redundant lines about warnings that are
implied by either -Wall or -Wextra, and keep only the last one that
disables it in some configurations.

This should not have any effect but keep the Makefile more readable and
the command line shorter.

Link: https://lkml.kernel.org/r/20240415122037.1983124-3-arnd@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Kees Cook <keescook@chromium.org>
Cc: Masahiro Yamada <masahiroy@kernel.org>
Cc: Nathan Chancellor <nathan@kernel.org>
Cc: Nicolas Schier <nicolas@fjasle.eu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2024-05-19 14:36:16 -07:00
Arnd Bergmann
f5982cceb3 kbuild: turn on -Wextra by default
Patch series "kbuild: enable more warnings by default", v3.

All the warning fixes I sent for these warnings have been merged into
mainline or linux-next, so let's turn them on by default.


This patch (of 6):

The -Wextra option controls a number of different warnings that differ
slightly by compiler version.  Some are useful in general, others are
better left at W=1 or higher.  Based on earlier work, the ones that should
be disabled by default are left for the higher warning levels already, and
a lot of the useful ones have no remaining output when enabled.

Move the -Wextra option up into the set of default-enabled warnings and
just rely on the individual ones getting disabled as needed.

The -Wunused warning was always grouped with this, so turn it on by
default as well, except for the -Wunused-parameter warning that really has
no value at all for the kernel since many interfaces have intentionally
unused arguments.

Link: https://lkml.kernel.org/r/20240415122037.1983124-1-arnd@kernel.org
Link: https://lkml.kernel.org/r/20240415122037.1983124-2-arnd@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Nathan Chancellor <nathan@kernel.org>
Cc: Kees Cook <keescook@chromium.org>
Cc: Masahiro Yamada <masahiroy@kernel.org>
Cc: Nicolas Schier <nicolas@fjasle.eu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2024-05-19 14:36:15 -07:00
Arnd Bergmann
c40845e319 kbuild: make -Woverride-init warnings more consistent
The -Woverride-init warn about code that may be intentional or not,
but the inintentional ones tend to be real bugs, so there is a bit of
disagreement on whether this warning option should be enabled by default
and we have multiple settings in scripts/Makefile.extrawarn as well as
individual subsystems.

Older versions of clang only supported -Wno-initializer-overrides with
the same meaning as gcc's -Woverride-init, though all supported versions
now work with both. Because of this difference, an earlier cleanup of
mine accidentally turned the clang warning off for W=1 builds and only
left it on for W=2, while it's still enabled for gcc with W=1.

There is also one driver that only turns the warning off for newer
versions of gcc but not other compilers, and some but not all the
Makefiles still use a cc-disable-warning conditional that is no
longer needed with supported compilers here.

Address all of the above by removing the special cases for clang
and always turning the warning off unconditionally where it got
in the way, using the syntax that is supported by both compilers.

Fixes: 2cd3271b7a ("kbuild: avoid duplicate warning options")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Hamza Mahfooz <hamza.mahfooz@amd.com>
Acked-by: Jani Nikula <jani.nikula@intel.com>
Acked-by: Andrew Jeffery <andrew@codeconstruct.com.au>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2024-03-31 11:32:26 +09:00
Lee Jones
6fe236d7fa Merge 3cb9871f81 ("Merge tag 'urgent-rcu.2024.01.24a' of https://github.com/neeraju/linux") into android-mainline
Steps on the way to v6.8-rc1

Signed-off-by: Lee Jones <joneslee@google.com>
Change-Id: I2b95d8ef56b0a11e730c1cb3bff593c689b32d10
2024-03-28 10:37:42 +00:00
Lee Jones
635125d40a Revert "Makefile.extrawarn: turn on missing-prototypes globally"
This reverts commit 0fcb70851f.

Too many warnings (actually errors because -Werror is enabled) are being
raised because of this.  After an effort to fix many of them, it became
apparent that there are also issues in some external modules used in
pre-submit which need repairing separately.  The aim is to reapply this
once all of the issues have been quashed.

Signed-off-by: Lee Jones <joneslee@google.com>
Change-Id: I4400f42ffa9a176beef328f3a109f97a45643b15
2024-03-20 14:53:16 +00:00
Masahiro Yamada
44929bface kbuild: remove GCC's default -Wpacked-bitfield-compat flag
Commit 4a5838ad9d ("kbuild: Add extra gcc checks") added the
-Wpacked-bitfield-compat flag, but there is no need to add it
explicitly.

GCC manual says:
  "This warning is enabled by default. Use -Wno-packed-bitfield-compat
   to disable this warning."

The test code in the manual:

  struct foo
  {
    char a:4;
    char b:8;
  } __attribute__ ((packed));

... emits "note: offset of packed bit-field ‘b’ has changed in GCC 4.4"
without W=3.

Let's remove it, as it is a default with GCC.

Clang does not support this flag, so its removal will not affect Clang
builds.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
2024-03-11 17:31:41 +09:00
Nathan Chancellor
75b5ab134b kbuild: Move -Wenum-{compare-conditional,enum-conversion} into W=1
Clang enables -Wenum-enum-conversion and -Wenum-compare-conditional
under -Wenum-conversion. A recent change in Clang strengthened these
warnings and they appear frequently in common builds, primarily due to
several instances in common headers but there are quite a few drivers
that have individual instances as well.

  include/linux/vmstat.h:508:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
    508 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
        |                            ~~~~~~~~~~~~~~~~~~~~~ ^
    509 |                            item];
        |                            ~~~~

  drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c:955:24: warning: conditional expression between different enumeration types ('enum iwl_mac_beacon_flags' and 'enum iwl_mac_beacon_flags_v1') [-Wenum-compare-conditional]
    955 |                 flags |= is_new_rate ? IWL_MAC_BEACON_CCK
        |                                      ^ ~~~~~~~~~~~~~~~~~~
    956 |                           : IWL_MAC_BEACON_CCK_V1;
        |                             ~~~~~~~~~~~~~~~~~~~~~
  drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c:1120:21: warning: conditional expression between different enumeration types ('enum iwl_mac_beacon_flags' and 'enum iwl_mac_beacon_flags_v1') [-Wenum-compare-conditional]
   1120 |                                                0) > 10 ?
        |                                                        ^
   1121 |                         IWL_MAC_BEACON_FILS :
        |                         ~~~~~~~~~~~~~~~~~~~
   1122 |                         IWL_MAC_BEACON_FILS_V1;
        |                         ~~~~~~~~~~~~~~~~~~~~~~

Doing arithmetic between or returning two different types of enums could
be a bug, so each of the instance of the warning needs to be evaluated.
Unfortunately, as mentioned above, there are many instances of this
warning in many different configurations, which can break the build when
CONFIG_WERROR is enabled.

To avoid introducing new instances of the warnings while cleaning up the
disruption for the majority of users, disable these warnings for the
default build while leaving them on for W=1 builds.

Cc: stable@vger.kernel.org
Closes: https://github.com/ClangBuiltLinux/linux/issues/2002
Link: 8c2ae42b3e
Acked-by: Yonghong Song <yonghong.song@linux.dev>
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2024-03-10 17:27:17 +09:00
Gustavo A. R. Silva
113a61863e Makefile: Enable -Wstringop-overflow globally
It seems that we have finished addressing all the remaining
issues regarding -Wstringop-overflow. So, we are now in good
shape to enable this compiler option globally.

Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
2024-01-21 17:45:31 -06:00
Linus Torvalds
b5f66ba2d0 Merge tag 'kbuild-v6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
Pull Kbuild updates from Masahiro Yamada:

 - Make Kconfig parse the input .config more precisely

 - Support W=c and W=e options for Kconfig

 - Set Kconfig int/hex symbols to zero if the 'default' property is
   missing

 - Add .editorconfig

 - Add scripts/git.orderFile

 - Add a script to detect backward-incompatible changes in UAPI headers

 - Resolve the symlink passed to O= option properly

 - Use the user-supplied mtime for all files in the builtin initramfs,
   which provides better reproducible builds

 - Fix the direct execution of debian/rules for Debian package builds

 - Use build ID instead of the .gnu_debuglink section for the Debian dbg
   package

* tag 'kbuild-v6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (53 commits)
  kbuild: deb-pkg: use debian/<package> for tmpdir
  kbuild: deb-pkg: move 'make headers' to build-arch
  kbuild: deb-pkg: do not search for 'scripts' directory under arch/
  kbuild: deb-pkg: use build ID instead of debug link for dbg package
  kbuild: deb-pkg: use more debhelper commands in builddeb
  kbuild: deb-pkg: remove unneeded '-f $srctree/Makefile' in debian/rules
  kbuild: deb-pkg: allow to run debian/rules from output directory
  kbuild: deb-pkg: set DEB_* variables if debian/rules is directly executed
  kbuild: deb-pkg: squash scripts/package/deb-build-option to debian/rules
  kbuild: deb-pkg: factor out common Make options in debian/rules
  kbuild: deb-pkg: hard-code Build-Depends
  kbuild: deb-pkg: split debian/copyright from the mkdebian script
  gen_init_cpio: Apply mtime supplied by user to all file types
  kbuild: resolve symlinks for O= properly
  docs: dev-tools: Add UAPI checker documentation
  check-uapi: Introduce check-uapi.sh
  scripts: Introduce a default git.orderFile
  kconfig: WERROR unmet symbol dependency
  Add .editorconfig file for basic formatting
  kconfig: Use KCONFIG_CONFIG instead of .config
  ...
2024-01-18 17:57:07 -08:00
Arnd Bergmann
0fcb70851f Makefile.extrawarn: turn on missing-prototypes globally
Over the years we went from > 1000 of warnings to under 100 earlier this
year, and I sent patches to address all the ones that I saw with compile
testing randcom configs on arm64, arm and x86 kernels.  This is a really
useful warning, as it catches real bugs when there are mismatched
prototypes.  In particular with kernel control flow integrity enabled,
those are no longer allowed.

I have done extensive testing to ensure that there are no new build errors
or warnings on any configuration of x86, arm and arm64 builds.  I also
made sure that at least both the normal defconfig and an allmodconfig
build is clean for arc, csky, loongarch, m68k, microblaze, openrisc,
parisc, powerpc, riscv, s390, and xtensa, with the respective maintainers
doing most of the patches.

At this point, there are five architectures with a number of known
regressions: alpha, nios2, mips, sh and sparc.  In the previous version of
this patch, I had turned off the missing prototype warnings for the 15
architectures that still had issues, but since there are only five left, I
think we can leave the rest to the maintainers (Cc'd here) as well.

Link: https://lkml.kernel.org/r/20231123110506.707903-7-arnd@kernel.org
Link: https://lore.kernel.org/lkml/20230810141947.1236730-1-arnd@kernel.org/
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Kees Cook <keescook@chromium.org>
Acked-by: Palmer Dabbelt <palmer@rivosinc.com> # RISC-V
Cc: Richard Henderson <richard.henderson@linaro.org>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Matt Turner <mattst88@gmail.com>
Cc: Dinh Nguyen <dinguyen@kernel.org>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: Rich Felker <dalias@libc.org>
Cc: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Masahiro Yamada <masahiroy@kernel.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Nathan Chancellor <nathan@kernel.org>
Cc: Nicolas Schier <nicolas@fjasle.eu>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Richard Weinberger <richard@nod.at>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Tudor Ambarus <tudor.ambarus@linaro.org>
Cc: Zhihao Cheng <chengzhihao1@huawei.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2023-12-20 15:02:57 -08:00
Masahiro Yamada
92ef432f02 kbuild: support W=c and W=e shorthands for Kconfig
KCONFIG_WARN_UNKNOWN_SYMBOLS=1 and KCONFIG_WERROR=1 are descriptive
and suitable in scripting, but typing them from the command line can
be tedious.

Associate them with KBUILD_EXTRA_WARN (and the W= shorthand).

Support a new letter 'c' to enable extra checks in Kconfig. You can
still manage compiler warnings (W=1) and Kconfig warnings (W=c)
independently.

Reuse the letter 'e' to turn Kconfig warnings into errors.

As usual, you can combine multiple letters in KCONFIG_EXTRA_WARN.

  $ KCONFIG_WARN_UNKNOWN_SYMBOLS=1 KCONFIG_WERROR=1 make defconfig

can be shortened to:

  $ KBUILD_EXTRA_WARN=ce make defconfig

or, even shorter:

  $ make W=ce defconfig

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
2023-12-03 18:50:48 +09:00
Arnd Bergmann
26030cb984 extrawarn: move -Wrestrict into W=1 warnings
There are few of these, so enable them whenever W=1 is enabled.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2023-08-20 14:16:59 +09:00
Arnd Bergmann
6d4ab2e97d extrawarn: enable format and stringop overflow warnings in W=1
The stringop and format warnings got disabled globally when they were
newly introduced in commit bd664f6b3e ("disable new gcc-7.1.1 warnings
for now"), 217c3e0196 ("disable stringop truncation warnings for now")
and 5a76021c2e ("gcc-10: disable 'stringop-overflow' warning for now").

In all cases, the sentiment at the time was that the warnings are
useful, and we actually addressed a number of real bugs based on
them, but we never managed to eliminate them all because even the
build bots using W=1 builds only see the -Wstringop-truncation
warnings that are enabled at that level.

Move these into the W=1 section to give them a larger build coverage
and actually eliminate them over time.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2023-08-20 14:16:59 +09:00
Arnd Bergmann
2cd3271b7a kbuild: avoid duplicate warning options
Some warning options are disabled at one place and then conditionally
re-enabled later in scripts/Makefile.extrawarn.

For consistency, rework this file so each of those warnings only
gets etiher enabled or disabled based on the W= flags but not both.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2023-08-20 14:16:57 +09:00
Arnd Bergmann
e88ca24319 kbuild: consolidate warning flags in scripts/Makefile.extrawarn
Warning options are enabled and disabled in inconsistent ways and
inconsistent locations. Start rearranging those by moving all options
into Makefile.extrawarn.

This should not change any behavior, but makes sure we can group them
in a way that ensures that each warning that got temporarily disabled
is turned back on at an appropriate W=1 level later on.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2023-08-20 14:16:54 +09:00
Masahiro Yamada
80b6093b55 kbuild: add -Wundef to KBUILD_CPPFLAGS for W=1 builds
The use of an undefined macro in an #if directive is warned, but only
in *.c files. No warning from other files such as *.S, *.lds.S.

Since -Wundef is a preprocessor-related warning, it should be added to
KBUILD_CPPFLAGS instead of KBUILD_CFLAGS.

My previous attempt [1] uncovered several issues. I could not finish
fixing them all.

This commit adds -Wundef to KBUILD_CPPFLAGS for W=1 builds in order to
block new breakages. (The kbuild test robot tests with W=1)

We can fix the warnings one by one. After fixing all of them, we can
make it default in the top Makefile, and remove -Wundef from
KBUILD_CFLAGS.

[1]: https://lore.kernel.org/all/20221012180118.331005-2-masahiroy@kernel.org/

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
2022-12-11 17:28:32 +09:00
Linus Torvalds
8afc66e8d4 Merge tag 'kbuild-v6.1' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
Pull Kbuild updates from Masahiro Yamada:

 - Remove potentially incomplete targets when Kbuid is interrupted by
   SIGINT etc in case GNU Make may miss to do that when stderr is piped
   to another program.

 - Rewrite the single target build so it works more correctly.

 - Fix rpm-pkg builds with V=1.

 - List top-level subdirectories in ./Kbuild.

 - Ignore auto-generated __kstrtab_* and __kstrtabns_* symbols in
   kallsyms.

 - Avoid two different modules in lib/zstd/ having shared code, which
   potentially causes building the common code as build-in and modular
   back-and-forth.

 - Unify two modpost invocations to optimize the build process.

 - Remove head-y syntax in favor of linker scripts for placing
   particular sections in the head of vmlinux.

 - Bump the minimal GNU Make version to 3.82.

 - Clean up misc Makefiles and scripts.

* tag 'kbuild-v6.1' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (41 commits)
  docs: bump minimal GNU Make version to 3.82
  ia64: simplify esi object addition in Makefile
  Revert "kbuild: Check if linker supports the -X option"
  kbuild: rebuild .vmlinux.export.o when its prerequisite is updated
  kbuild: move modules.builtin(.modinfo) rules to Makefile.vmlinux_o
  zstd: Fixing mixed module-builtin objects
  kallsyms: ignore __kstrtab_* and __kstrtabns_* symbols
  kallsyms: take the input file instead of reading stdin
  kallsyms: drop duplicated ignore patterns from kallsyms.c
  kbuild: reuse mksysmap output for kallsyms
  mksysmap: update comment about __crc_*
  kbuild: remove head-y syntax
  kbuild: use obj-y instead extra-y for objects placed at the head
  kbuild: hide error checker logs for V=1 builds
  kbuild: re-run modpost when it is updated
  kbuild: unify two modpost invocations
  kbuild: move vmlinux.o rule to the top Makefile
  kbuild: move .vmlinux.objs rule to Makefile.modpost
  kbuild: list sub-directories in ./Kbuild
  Makefile.compiler: replace cc-ifversion with compiler-specific macros
  ...
2022-10-10 12:00:45 -07:00
Linus Torvalds
d0989d01c6 Merge tag 'hardening-v6.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux
Pull kernel hardening updates from Kees Cook:
 "Most of the collected changes here are fixes across the tree for
  various hardening features (details noted below).

  The most notable new feature here is the addition of the memcpy()
  overflow warning (under CONFIG_FORTIFY_SOURCE), which is the next step
  on the path to killing the common class of "trivially detectable"
  buffer overflow conditions (i.e. on arrays with sizes known at compile
  time) that have resulted in many exploitable vulnerabilities over the
  years (e.g. BleedingTooth).

  This feature is expected to still have some undiscovered false
  positives. It's been in -next for a full development cycle and all the
  reported false positives have been fixed in their respective trees.
  All the known-bad code patterns we could find with Coccinelle are also
  either fixed in their respective trees or in flight.

  The commit message in commit 54d9469bc5 ("fortify: Add run-time WARN
  for cross-field memcpy()") for the feature has extensive details, but
  I'll repeat here that this is a warning _only_, and is not intended to
  actually block overflows (yet). The many patches fixing array sizes
  and struct members have been landing for several years now, and we're
  finally able to turn this on to find any remaining stragglers.

  Summary:

  Various fixes across several hardening areas:

   - loadpin: Fix verity target enforcement (Matthias Kaehlcke).

   - zero-call-used-regs: Add missing clobbers in paravirt (Bill
     Wendling).

   - CFI: clean up sparc function pointer type mismatches (Bart Van
     Assche).

   - Clang: Adjust compiler flag detection for various Clang changes
     (Sami Tolvanen, Kees Cook).

   - fortify: Fix warnings in arch-specific code in sh, ARM, and xen.

  Improvements to existing features:

   - testing: improve overflow KUnit test, introduce fortify KUnit test,
     add more coverage to LKDTM tests (Bart Van Assche, Kees Cook).

   - overflow: Relax overflow type checking for wider utility.

  New features:

   - string: Introduce strtomem() and strtomem_pad() to fill a gap in
     strncpy() replacement needs.

   - um: Enable FORTIFY_SOURCE support.

   - fortify: Enable run-time struct member memcpy() overflow warning"

* tag 'hardening-v6.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: (27 commits)
  Makefile.extrawarn: Move -Wcast-function-type-strict to W=1
  hardening: Remove Clang's enable flag for -ftrivial-auto-var-init=zero
  sparc: Unbreak the build
  x86/paravirt: add extra clobbers with ZERO_CALL_USED_REGS enabled
  x86/paravirt: clean up typos and grammaros
  fortify: Convert to struct vs member helpers
  fortify: Explicitly check bounds are compile-time constants
  x86/entry: Work around Clang __bdos() bug
  ARM: decompressor: Include .data.rel.ro.local
  fortify: Adjust KUnit test for modular build
  sh: machvec: Use char[] for section boundaries
  kunit/memcpy: Avoid pathological compile-time string size
  lib: Improve the is_signed_type() kunit test
  LoadPin: Require file with verity root digests to have a header
  dm: verity-loadpin: Only trust verity targets with enforcement
  LoadPin: Fix Kconfig doc about format of file with verity digests
  um: Enable FORTIFY_SOURCE
  lkdtm: Update tests for memcpy() run-time warnings
  fortify: Add run-time WARN for cross-field memcpy()
  fortify: Use SIZE_MAX instead of (size_t)-1
  ...
2022-10-03 17:24:22 -07:00
Sami Tolvanen
2120635108 Makefile.extrawarn: Move -Wcast-function-type-strict to W=1
We enable -Wcast-function-type globally in the kernel to warn about
mismatching types in function pointer casts. Compilers currently
warn only about ABI incompability with this flag, but Clang 16 will
enable a stricter version of the check by default that checks for an
exact type match. This will be very noisy in the kernel, so disable
-Wcast-function-type-strict without W=1 until the new warnings have
been addressed.

Cc: stable@vger.kernel.org
Link: https://reviews.llvm.org/D134831
Link: https://github.com/ClangBuiltLinux/linux/issues/1724
Suggested-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20220930203310.4010564-1-samitolvanen@google.com
2022-10-01 07:46:05 -07:00
Nick Desaulniers
88b61e3bff Makefile.compiler: replace cc-ifversion with compiler-specific macros
cc-ifversion is GCC specific. Replace it with compiler specific
variants. Update the users of cc-ifversion to use these new macros.

Link: https://github.com/ClangBuiltLinux/linux/issues/350
Link: https://lore.kernel.org/llvm/CAGG=3QWSAUakO42kubrCap8fp-gm1ERJJAYXTnP1iHk_wrH=BQ@mail.gmail.com/
Suggested-by: Bill Wendling <morbo@google.com>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2022-09-29 04:40:16 +09:00
Nick Desaulniers
b0839b281c Makefile.extrawarn: re-enable -Wformat for clang; take 2
-Wformat was recently re-enabled for builds with clang, then quickly
re-disabled, due to concerns stemming from the frequency of default
argument promotion related warning instances.

commit 258fafcd06 ("Makefile.extrawarn: re-enable -Wformat for clang")
commit 21f9c8a13b ("Revert "Makefile.extrawarn: re-enable -Wformat for clang"")

ISO WG14 has ratified N2562 to address default argument promotion
explicitly for printf, as part of the upcoming ISO C2X standard.

The behavior of clang was changed in clang-16 to not warn for the cited
cases in all language modes.

Add a version check, so that users of clang-16 now get the full effect
of -Wformat. For older clang versions, re-enable flags under the
-Wformat group that way users still get some useful checks related to
format strings, without noisy default argument promotion warnings. I
intentionally omitted -Wformat-y2k and -Wformat-security from being
re-enabled, which are also part of -Wformat in clang-16.

Link: https://github.com/ClangBuiltLinux/linux/issues/378
Link: https://github.com/llvm/llvm-project/issues/57102
Link: https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2562.pdf
Suggested-by: Justin Stitt <jstitt007@gmail.com>
Suggested-by: Nathan Chancellor <nathan@kernel.org>
Suggested-by: Youngmin Nam <youngmin.nam@samsung.com>
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Reviewed-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2022-09-04 11:15:50 -07:00
Nathan Chancellor
370655bc18 scripts/Makefile.extrawarn: Do not disable clang's -Wformat-zero-length
There are no instances of this warning in the tree across several
difference architectures and configurations. This was added by
commit 26ea6bb1fe ("kbuild, LLVMLinux: Supress warnings unless W=1-3")
back in 2014, where it might have been necessary, but there are no
instances of it now so stop disabling it to increase warning coverage
for clang.

Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2022-08-21 02:47:48 +09:00
Linus Torvalds
21f9c8a13b Revert "Makefile.extrawarn: re-enable -Wformat for clang"
This reverts commit 258fafcd06.

The clang -Wformat warning is terminally broken, and the clang people
can't seem to get their act together.

This test program causes a warning with clang:

	#include <stdio.h>

	int main(int argc, char **argv)
	{
		printf("%hhu\n", 'a');
	}

resulting in

  t.c:5:19: warning: format specifies type 'unsigned char' but the argument has type 'int' [-Wformat]
          printf("%hhu\n", 'a');
                  ~~~~     ^~~
                  %d

and apparently clang people consider that a feature, because they don't
want to face the reality of how either C character constants, C
arithmetic, and C varargs functions work.

The rest of the world just shakes their head at that kind of
incompetence, and turns off -Wformat for clang again.

And no, the "you should use a pointless cast to shut this up" is not a
valid answer.  That warning should not exist in the first place, or at
least be optinal with some "-Wformat-me-harder" kind of option.

[ Admittedly, there's also very little reason to *ever* use '%hh[ud]' in
  C, but what little reason there is is entirely about 'I want to see
  only the low 8 bits of the argument'. So I would suggest nobody ever
  use that format in the first place, but if they do, the clang
  behavious is simply always wrong. Because '%hhu' takes an 'int'. It's
  that simple. ]

Reported-by: Sudip Mukherjee (Codethink) <sudipm.mukherjee@gmail.com>
Cc: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2022-08-11 08:40:01 -07:00
Justin Stitt
258fafcd06 Makefile.extrawarn: re-enable -Wformat for clang
There's been an ongoing mission to re-enable the -Wformat warning for
Clang. A previous attempt at enabling the warning showed that there were
many instances of this warning throughout the codebase. The sheer amount
of these warnings really polluted builds and thus -Wno-format was added
to _temporarily_ toggle them off.

After many patches the warning has largely been eradicated for x86,
x86_64, arm, and arm64 on a variety of configs. The time to enable the
warning has never been better as it seems for the first time we are
ahead of them and can now solve them as they appear rather than tackling
from a backlog.

As to the root cause of this large backlog of warnings, Clang seems to
pickup on some more nuanced cases of format warnings caused by implicit
integer conversion as well as default argument promotions from
printf-like functions.

Link: https://github.com/ClangBuiltLinux/linux/issues/378
Suggested-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Justin Stitt <justinstitt@google.com>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2022-08-03 19:37:59 +09:00
Yann Droneaud
c77d06e70d kbuild: support W=e to make build abort in case of warning
When developing new code/feature, CONFIG_WERROR is most
often turned off, especially for people using make W=12 to
get more warnings.

In such case, turning on -Werror temporarily would require
switching on CONFIG_WERROR in the configuration, building,
then switching off CONFIG_WERROR.

For this use case, this patch introduces a new 'e' modifier
to W= as a short hand for KCFLAGS+=-Werror" so that -Werror
got added to the kernel (built-in) and modules' CFLAGS.

Signed-off-by: Yann Droneaud <ydroneaud@opteya.com>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2022-05-08 03:16:59 +09:00
Arnd Bergmann
1344794a59 Kbuild: add -Wno-shift-negative-value where -Wextra is used
As a preparation for moving to -std=gnu11, turn off the
-Wshift-negative-value option. This warning is enabled by gcc when
building with -Wextra for c99 or higher, but not for c89. Since
the kernel already relies on well-defined overflow behavior,
the warning is not helpful and can simply be disabled in
all locations that use -Wextra.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com> # LLVM/Clang v13.0.0 (x86-64)
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2022-03-13 17:30:31 +09:00
Nathan Chancellor
1cf5f151d2 Makefile.extrawarn: Move -Wunaligned-access to W=1
-Wunaligned-access is a new warning in clang that is default enabled for
arm and arm64 under certain circumstances within the clang frontend (see
LLVM commit below). On v5.17-rc2, an ARCH=arm allmodconfig build shows
1284 total/70 unique instances of this warning (most of the instances
are in header files), which is quite noisy.

To keep a normal build green through CONFIG_WERROR, only show this
warning with W=1, which will allow automated build systems to catch new
instances of the warning so that the total number can be driven down to
zero eventually since catching unaligned accesses at compile time would
be generally useful.

Cc: stable@vger.kernel.org
Link: 35737df4dc
Link: https://github.com/ClangBuiltLinux/linux/issues/1569
Link: https://github.com/ClangBuiltLinux/linux/issues/1576
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2022-02-08 13:20:11 +09:00
Arnd Bergmann
c93e4aeed1 Makefile.extrawarn: remove -Wnested-externs warning
The -Wnested-externs warning has become useless with gcc, since
this warns every time that BUILD_BUG_ON() or similar macros
are used.

With clang, the warning option does nothing to start with, so
just remove it entirely.

Suggested-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2020-12-08 23:30:05 +09:00
Arnd Bergmann
095fbca0a9 Makefile.extrawarn: move -Wcast-align to W=3
This warning behaves differently depending on the architecture
and compiler. Using x86 gcc, we get no output at all because
gcc knows the architecture can handle unaligned accesses.

Using x86 clang, or gcc on an architecture that needs to
manually deal with unaligned accesses, the build log is
completely flooded with these warnings, as they are commonly
invoked by inline functions of networking headers, e.g.

include/linux/skbuff.h:1426:26: warning: cast increases required alignment of target type [-Wcast-align]

The compiler is correct to point this out, as we are dealing
with undefined behavior that does cause problems in practice,
but there is also no good way to rewrite the code in commonly
included headers to a safer method.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2020-11-25 03:36:10 +09:00
Joe Perches
a97ea93ed5 Makefile.extrawarn: Move sign-compare from W=2 to W=3
This -Wsign-compare compiler warning can be very noisy
and most of the suggested conversions are unnecessary.

Make the warning W=3 so it's described under the
"can most likely be ignored" block.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2020-08-18 01:52:08 +09:00
Rikard Falkeborn
355a3587d4 kbuild: Move -Wtype-limits to W=2
-Wtype-limits is included in -Wextra which is added at W=1. It warns
(among other things) that 'comparison of an unsigned variable `< 0` is
always false. This causes noisy warnings, especially when used in
macros, hence it is more suitable for W=2.

Link: https://lore.kernel.org/lkml/CAHk-=wiKCXEWKJ9dWUimGbrVRo_N2RosESUw8E7m9AEtyZcu=w@mail.gmail.com/
Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Suggested-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2020-07-09 18:00:56 -07:00
Nathan Chancellor
afe956c577 kbuild: Enable -Wtautological-compare
Currently, we disable -Wtautological-compare, which in turn disables a
bunch of more specific tautological comparison warnings that are useful
for the kernel such as -Wtautological-bitwise-compare. See clang's
documentation below for the other warnings that are suppressed by
-Wtautological-compare. Now that all of the major/noisy warnings have
been fixed, enable -Wtautological-compare so that more issues can be
caught at build time by various continuous integration setups.

-Wtautological-constant-out-of-range-compare is kept disabled under a
normal build but visible at W=1 because there are places in the kernel
where a constant or variable size can change based on the kernel
configuration. These are not fixed in a clean/concise way and the ones
I have audited so far appear to be harmless. It is not a subgroup but
rather just one warning so we do not lose out on much coverage by
default.

Link: https://github.com/ClangBuiltLinux/linux/issues/488
Link: http://releases.llvm.org/10.0.0/tools/clang/docs/DiagnosticsReference.html#wtautological-compare
Link: https://bugs.llvm.org/show_bug.cgi?id=42666
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2020-04-09 00:13:45 +09:00
Nathan Chancellor
82f2bc2fcc kbuild: Disable -Wpointer-to-enum-cast
Clang's -Wpointer-to-int-cast deviates from GCC in that it warns when
casting to enums. The kernel does this in certain places, such as device
tree matches to set the version of the device being used, which allows
the kernel to avoid using a gigantic union.

https://elixir.bootlin.com/linux/v5.5.8/source/drivers/ata/ahci_brcm.c#L428
https://elixir.bootlin.com/linux/v5.5.8/source/drivers/ata/ahci_brcm.c#L402
https://elixir.bootlin.com/linux/v5.5.8/source/include/linux/mod_devicetable.h#L264

To avoid a ton of false positive warnings, disable this particular part
of the warning, which has been split off into a separate diagnostic so
that the entire warning does not need to be turned off for clang. It
will be visible under W=1 in case people want to go about fixing these
easily and enabling the warning treewide.

Cc: stable@vger.kernel.org
Link: https://github.com/ClangBuiltLinux/linux/issues/887
Link: 2a41b31fcd
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2020-03-14 10:31:08 +09:00
Masahiro Yamada
6863f5643d kbuild: allow Clang to find unused static inline functions for W=1 build
GCC and Clang have different policy for -Wunused-function; GCC does not
warn unused static inline functions at all whereas Clang does if they
are defined in source files instead of included headers although it has
been suppressed since commit abb2ea7dfd ("compiler, clang: suppress
warning for unused static inline functions").

We often miss to delete unused functions where 'static inline' is used
in *.c files since there is no tool to detect them. Unused code remains
until somebody notices. For example, commit 075ddd7568 ("regulator:
core: remove unused rdev_get_supply()").

Let's remove __maybe_unused from the inline macro to allow Clang to
start finding unused static inline functions. For now, we do this only
for W=1 build since it is not a good idea to sprinkle warnings for the
normal build (e.g. 35 warnings for arch/x86/configs/x86_64_defconfig).

My initial attempt was to add -Wno-unused-function for no W= build
(https://lore.kernel.org/patchwork/patch/1120594/)

Nathan Chancellor pointed out that would weaken Clang's checks since
we would no longer get -Wunused-function without W=1. It is true GCC
would catch unused static non-inline functions, but it would weaken
Clang as a standalone compiler, at least.

Hence, here is a counter implementation. The current problem is, W=...
only controls compiler flags, which are globally effective. There is
no way to address only 'static inline' functions.

This commit defines KBUILD_EXTRA_WARN[123] corresponding to W=[123].
When KBUILD_EXTRA_WARN1 is defined, __maybe_unused is omitted from
the 'inline' macro.

The new macro __inline_maybe_unused makes the code a bit uglier, so I
hope we can remove it entirely after fixing most of the warnings.

If you contribute to code clean-up, please run "make CC=clang W=1"
and check -Wunused-function warnings. You will find lots of unused
functions.

Some of them are false-positives because the call-sites are disabled
by #ifdef. I do not like to abuse the inline keyword for suppressing
unused-function warnings because it is intended to be a hint for the
compiler optimization. I prefer #ifdef around the definition, or
__maybe_unused if #ifdef would make the code too ugly.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Nathan Chancellor <natechancellor@gmail.com>
Tested-by: Nathan Chancellor <natechancellor@gmail.com>
2019-09-09 23:55:43 +09:00