Linux/linux fce2dfafs/smb/client smb2ops.c smb2misc.c

Merge tag 'v7.2-rc3-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6

Pull smb client fixes from Steve French:

 - fallocate fixes

 - unit test fixes

 - fix allocation size after duplicate extents

 - fix check for overlapping data areas

* tag 'v7.2-rc3-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6:
  smb/client: flush dirty data before punching a hole
  smb/client: Use EXPORT_SYMBOL_IF_KUNIT() to export symbols in SMB2
  smb/client: Use EXPORT_SYMBOL_IF_KUNIT() to export symbols
  smb: client: reject overlapping data areas in SMB2 responses
  smb/client: refresh allocation after EOF-extending fallocate
  smb/client: emulate small EOF-extending mode 0 fallocate ranges

    [4 lines not shown]
DeltaFile
+161-22fs/smb/client/smb2ops.c
+25-9fs/smb/client/smb2misc.c
+12-12fs/smb/client/smb1maperror.c
+19-0fs/smb/client/smb2pdu.c
+6-6fs/smb/client/smb2maperror.c
+7-3fs/smb/client/cifsfs.c
+230-525 files not shown
+240-5611 files

Linux/linux 481ed5dsecurity/landlock task.c net.c, tools/testing/selftests/landlock net_test.c scoped_signal_test.c

Merge tag 'landlock-7.2-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/mic/linux

Pull landlock fix from Mickaël Salaün:
 "This fixes TCP Fast Open support, specific test environments, and doc
  warnings"

* tag 'landlock-7.2-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/mic/linux:
  selftests/landlock: Skip scoped_signal subtest with MSG_OOB if not available
  selftests/landlock: Fix screwed up pointers in the scoped_signal_test
  landlock: Update formatting
  landlock: Fix kernel-doc for the nested quiet layer flag
  selftests/landlock: Add test for TCP fast open
  landlock: Fix TCP Fast Open connection bypass
DeltaFile
+97-0tools/testing/selftests/landlock/net_test.c
+44-23tools/testing/selftests/landlock/scoped_signal_test.c
+3-6security/landlock/task.c
+8-0security/landlock/net.c
+2-2security/landlock/ruleset.h
+154-315 files

Linux/linux e22254efs/xfs xfs_bmap_util.c xfs_trace.h, fs/xfs/scrub cow_repair.c trace.h

Merge tag 'xfs-fixes-7.2-rc4' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux

Pull xfs fixes from Carlos Maiolino:
 "This contains mostly a series of bug fixes found by different LLM
  models"

* tag 'xfs-fixes-7.2-rc4' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: (21 commits)
  xfs: don't zap bmbt forks if they are MAXLEVELS tall
  xfs: clamp timestamp nanoseconds correctly
  xfs: fully check the parent handle when it points to the rootdir
  xfs: handle non-inode owners for rtrmap record checking
  xfs: fix off-by-one error when calling xchk_xref_has_rt_owner
  xfs: set xfarray killable sort correctly
  xfs: grab rtrmap btree when checking rgsuper
  xfs: write the rg superblock when fixing it
  xfs: use the rt version of the cow staging checker
  xfs: use rtrefcount btree cursor in xchk_xref_is_rt_cow_staging
  xfs: don't wrap around quota ids in dqiterate
  xfs: move cow_replace_mapping to xfs_bmap_util.c

    [9 lines not shown]
DeltaFile
+86-93fs/xfs/scrub/cow_repair.c
+89-0fs/xfs/xfs_bmap_util.c
+41-0fs/xfs/xfs_trace.h
+36-0fs/xfs/xfs_reflink.c
+0-35fs/xfs/scrub/trace.h
+17-11fs/xfs/xfs_sysfs.c
+269-13915 files not shown
+340-16921 files

Linux/linux 133fc7afs/erofs super.c ishare.c

Merge tag 'erofs-for-7.2-rc4-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs

Pull erofs fixes from Gao Xiang:

 - Fix sanity checks for ztailpacking tail pclusters to avoid
   false corruption reports

 - Use more informative s_id for file-backed mounts

 - Hide the meaningless "cache_strategy=" mount option on plain
   (uncompressed) filesystems

 - Remove the unneeded erofs_is_ishare_inode() helper

* tag 'erofs-for-7.2-rc4-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs:
  erofs: hide "cache_strategy=" for plain filesystems
  erofs: get rid of erofs_is_ishare_inode() helper
  erofs: relax sanity check for tail pclusters due to ztailpacking
  erofs: use more informative s_id for file-backed mounts
DeltaFile
+5-14fs/erofs/super.c
+1-7fs/erofs/ishare.c
+2-1fs/erofs/zmap.c
+8-223 files

Linux/linux 6f5156ddrivers/cpufreq intel_pstate.c cpufreq.c

Merge tag 'pm-7.2-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull power management fixes from Rafael Wysocki:
 "These fix two cpufreq issues, one in the intel_pstate driver and one
  in the core:

   - Make cpufreq_update_pressure() use cpuinfo.max_freq as the default
     reference frequency when arch_scale_freq_ref() returns 0 to allow
     the scheduler to still take CPU frequency caps into account in
     those cases (Rafael Wysocki)

   - Use the HWP guaranteed performance level as the full capacity
     performance in intel_pstate on hybrid systems when turbo
     frequencies are not allowed to be used to make scale-invariance
     work as expected in those cases (Rafael Wysocki)"

* tag 'pm-7.2-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  cpufreq: Make cpufreq_update_pressure() fall back to cpuinfo.max_freq
  cpufreq: intel_pstate: Set non-turbo capacity to HWP_GUARANTEED_PERF()
DeltaFile
+4-2drivers/cpufreq/intel_pstate.c
+3-0drivers/cpufreq/cpufreq.c
+7-22 files

Linux/linux 4302c35drivers/pmdomain/imx imx93-blk-ctrl.c imx8m-blk-ctrl.c, drivers/pmdomain/mediatek mtk-pm-domains.c

Merge tag 'pmdomain-v7.2-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/linux-pm

Pull pmdomain fixes from Ulf Hansson:
 "imx:
   - Assign child domains for imx93 to prevent power off when in use
   - Fix i.MX8MP power up sequences

  mediatek:
   - Fix possible nullptr in HWV cleanup/on-check"

* tag 'pmdomain-v7.2-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/linux-pm:
  pmdomain: mediatek: Fix possible nullptr KP in HWV cleanup/on-check
  pmdomain: imx: Fix i.MX8MP VC8000E power up sequence
  pmdomain: imx: Fix i.MX8MP power notifier
  pmdomain: imx93-blk-ctrl: Extract PHY as shared domain for DSI/CSI
  dt-bindings: power: imx93: Add MIPI PHY power domain
DeltaFile
+58-2drivers/pmdomain/imx/imx93-blk-ctrl.c
+44-2drivers/pmdomain/imx/imx8m-blk-ctrl.c
+33-7drivers/pmdomain/mediatek/mtk-pm-domains.c
+1-0include/dt-bindings/power/fsl,imx93-power.h
+136-114 files

Linux/linux c270a42arch/arm64/kvm nested.c emulate-nested.c, arch/arm64/kvm/hyp/nvhe ffa.c

Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm

Pull kvm fixes from Paolo Bonzini:
 "arm64:

   - Fix an accounting buglet when reclaiming pages from a protected
     guest

   - Fix a bunch of architectural compliance issues when injecting a
     synthesised exception, most of which were missing the PSTATE.IL bit
     indicating a 32bit-wide instruction

   - Another set of fixes addressing issues with translation of
     VNCR_EL2, including corner cases where the guest point that
     register at a RO page...

   - Don't warn when trapping accesses to ZCR_EL2 from an L2 guest, as
     that's not unexpected at all


    [76 lines not shown]
DeltaFile
+255-0tools/testing/selftests/kvm/arm64/mmio_sign_ext.c
+83-81arch/arm64/kvm/nested.c
+39-50arch/x86/kvm/vmx/nested.c
+47-0tools/testing/selftests/kvm/x86/sev_migrate_tests.c
+30-14arch/arm64/kvm/hyp/nvhe/ffa.c
+29-12arch/arm64/kvm/emulate-nested.c
+483-15727 files not shown
+621-23533 files

Linux/linux 25f744farch/x86/kvm/svm svm.c

KVM: SVM: Bump asid_generation on CPU online to avoid ASID collision after hotplug

If a vCPU stays scheduled out (or blocked) while the last pCPU it ran
on goes through a hotplug cycle (online->offline->online), and the vCPU
then resumes execution on the same pCPU, then it is possible for it to
run with an ASID that has now been assigned to a different vCPU,
resulting in stale TLB translations being used.

svm_enable_virtualization_cpu() resets asid_generation to 1 and sets
next_asid to max_asid + 1 on every CPU online event, including hotplug
cycles.  Because next_asid starts beyond the pool boundary, the first
call to new_asid() after an online event always wraps the pool,
incrementing asid_generation to 2 and assigning ASIDs starting from
min_asid.

Consider two vCPUs from different VMs, vCPU-A pinned to CPU-X holding
asid_generation=2 and ASID=N from before the hotplug event:

  1. CPU-X goes offline and back online: asid_generation resets to 1,

    [39 lines not shown]
DeltaFile
+6-1arch/x86/kvm/svm/svm.c
+6-11 files

Linux/linux 37e2f87lib bug.c

Merge tag 'linux_kselftest-kunit-fixes-7.2-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest

Pull kunit fix from Shuah Khan:
 "Fix warning suppressions with kunit built as module:

  CONFIG_KUNIT is a tristate symbol but the warning suppression code in
  lib/bug.c is only built if it's built-in due to it using a plain
  #ifdef, rendering warning suppressions broken for kunit build as
  loadable module.

  kunit_is_suppressed_warning() already has a stub for when kunit is
  disabled so drop that guard entirely"

* tag 'linux_kselftest-kunit-fixes-7.2-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest:
  bug: fix warning suppressions with kunit built as module
DeltaFile
+0-2lib/bug.c
+0-21 files

Linux/linux e144887tools/testing/selftests/ftrace/test.d/dynevent add_remove_fprobe_module.tc, tools/testing/selftests/ftrace/test.d/trigger trigger-hist-poll.tc

Merge tag 'linux_kselftest-fixes-7.2-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest

Pull kselftest fixes from Shuah Khan:

 - Fix ftrace reading enabled_func test in add_remove_fprobe_module test

 - Fix tracing trigger-hist-poll.tc to use sched_process_exit

* tag 'linux_kselftest-fixes-7.2-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest:
  selftests/tracing: Have trigger-hist-poll.tc use sched_process_exit
  selftests/ftrace: Fix reading enabled_functions in add_remove_fprobe_module test
DeltaFile
+18-9tools/testing/selftests/ftrace/test.d/dynevent/add_remove_fprobe_module.tc
+2-2tools/testing/selftests/ftrace/test.d/trigger/trigger-hist-poll.tc
+20-112 files

Linux/linux 2f2312carch/x86/kvm/vmx nested.c

KVM: nVMX: Put vmcs12 pages if nested VM-Enter fails due to invalid guest state

Put all vmcs12 pages if KVM synthesizes a nested VM-Exit due to invalid
guest while emulating VMLAUNCH or VMRESUME.  The invalid guest state path
doesn't use nested_vmx_vmexit() as that API is intended to be used if and
only if L2 is active, and the open coded equivalent neglects to put the
vmcs12 pages.  Failure to put the vmcs12 pages leaks any pinned pages
(and/or mappings) if L1 retries VMLAUNCH/VMRESUME.

Note, the !from_vmenter scenario doesn't suffer the same problem, as
vmx_get_nested_state_pages() only gets/pins/maps the vmcs12 pages if L2 is
active, i.e. if a "full" VM-Exit is guaranteed before KVM will retry
getting vmcs12 pages.

Fixes: 96c66e87deee ("KVM/nVMX: Use kvm_vcpu_map when mapping the virtual APIC page")
Fixes: 3278e0492554 ("KVM/nVMX: Use kvm_vcpu_map when mapping the posted interrupt descriptor table")
Fixes: fe1911aa443e ("KVM: nVMX: Use kvm_vcpu_map() to get/pin vmcs12's APIC-access page")
Reported-by: Minh Nguyen <minhnguyen.080505 at gmail.com>
Cc: stable at vger.kernel.org

    [2 lines not shown]
DeltaFile
+2-0arch/x86/kvm/vmx/nested.c
+2-01 files

Linux/linux 5246d32arch/s390/kvm pci.c gmap.c

Merge tag 'kvm-s390-master-7.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into HEAD

KVM: s390: Fixes for 7.2

- more gmap KVM memory management fixes
- PCI passthru fixes
DeltaFile
+9-3arch/s390/kvm/pci.c
+6-1arch/s390/kvm/gmap.c
+4-2arch/s390/kvm/kvm-s390.c
+2-0arch/s390/kvm/dat.c
+21-64 files

Linux/linux 37694e5arch/x86/kvm lapic.c, arch/x86/kvm/svm sev.c

Merge tag 'kvm-x86-fixes-7.2-rc4' of https://github.com/kvm-x86/linux into HEAD

KVM x86 fixes for 7.2-rcN

 - Fix a bug where KVM will trigger a UAF if updating IOMMU IRTEs fails when
   registering an IRQ-bypass producer.

 - Ignore pending PV EOI instead of BUG()ing the host if the feature was
   disabled by the guest.

 - Fix nVMX bugs where KVM would run L1 with an L1-controlled CR3 after a
   failed "late" consistency check when KVM is NOT using EPT.

 - Disallow intra-host migration/mirroring of SNP VMs as KVM doesn't yet
   support moving/mirroring SNP state.

 - Fix a TOCTOU bug in KVM's handling of the "trusted" CPUID for TDX guests.

 - Fix a NULL pointer deref in trace_kvm_inj_exception() where a change to the
   core infrastructure missed KVM's unique (ab)use of __print_symbolic().
DeltaFile
+37-50arch/x86/kvm/vmx/nested.c
+47-0tools/testing/selftests/kvm/x86/sev_migrate_tests.c
+6-2arch/x86/kvm/lapic.c
+7-0arch/x86/kvm/vmx/vmx.h
+5-1arch/x86/kvm/vmx/tdx.c
+4-2arch/x86/kvm/svm/sev.c
+106-552 files not shown
+110-578 files

Linux/linux 15f8ba7arch/arm64/kvm/hyp pgtable.c, arch/arm64/kvm/hyp/nvhe ffa.c

Merge tag 'kvmarm-fixes-7.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD

KVM/arm64 fixes for 7.2, take #2

- Move locking for kvm_io_bus_get_dev() into the caller, ensuring
  race-free checks that the returned object is of the correct type

- Fix initialisation of the page-table walk level when relaxing
  permissions

- Correctly update the XN attribute when relaxing permissions

- Fix the sign extension of loads from emulated MMIO regions

- Assorted collection of fixes for pKVM's FFA proxy, together with a
  couple of FFA driver adjustments
DeltaFile
+255-0tools/testing/selftests/kvm/arm64/mmio_sign_ext.c
+30-14arch/arm64/kvm/hyp/nvhe/ffa.c
+17-8drivers/firmware/arm_ffa/driver.c
+5-11virt/kvm/kvm_main.c
+9-6arch/arm64/kvm/hyp/pgtable.c
+8-1include/linux/arm_ffa.h
+324-403 files not shown
+331-439 files

Linux/linux 5b0d046arch/arm64/kvm nested.c emulate-nested.c, arch/arm64/kvm/hyp/include/hyp switch.h

Merge tag 'kvmarm-fixes-7.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD

KVM/arm64 fixes for 7.2, take #1

- Fix an accounting buglet when reclaiming pages from a protected
  guest

- Fix a bunch of architectural compliance issues when injecting a
  synthesised exception, most of which were missing the PSTATE.IL bit
  indicating a 32bit-wide instruction

- Another set of fixes addressing issues with translation of VNCR_EL2,
  including corner cases where the guest point that register at a RO
  page...

- Don't warn when trapping accesses to ZCR_EL2 from an L2 guest, as
  that's not unexpected at all

- Address a bunch of races with LPI migration vs LPIs being disabled

    [6 lines not shown]
DeltaFile
+83-81arch/arm64/kvm/nested.c
+29-12arch/arm64/kvm/emulate-nested.c
+14-6arch/arm64/kvm/vgic/vgic.c
+5-13arch/arm64/kvm/inject_fault.c
+6-5arch/arm64/kvm/hyp/include/hyp/switch.h
+0-8arch/arm64/kvm/at.c
+137-1255 files not shown
+151-12811 files

Linux/linux d7d2adcfs/smb/client smb2ops.c

smb/client: flush dirty data before punching a hole

Punching a hole after a large buffered write may leave the range
reported as data. Reproduce it with:

  xfs_io -f \
    -c "pwrite -b 3m -S 0x61 0 3m" \
    -c "fpunch 1m 1m" \
    -c "seek -h 0" \
    -c "seek -d 1m" \
    /mnt/test/repro

Punching 1 MiB at offset 1 MiB should produce:

  0          1 MiB       2 MiB       3 MiB
  |  DATA    |   HOLE    |   DATA    | EOF

Instead, the entire file is reported as data. SEEK_HOLE(0) returns EOF,
and SEEK_DATA(1M) returns 1M.

    [12 lines not shown]
DeltaFile
+9-0fs/smb/client/smb2ops.c
+9-01 files

Linux/linux e2e08effs/smb/client smb2maperror.c smb2maperror_test.c

smb/client: Use EXPORT_SYMBOL_IF_KUNIT() to export symbols in SMB2

Replace EXPORT_SYMBOL_FOR_MODULES() with EXPORT_SYMBOL_IF_KUNIT()
to mark the symbols as visible only if CONFIG_KUNIT is enabled.

Kunit test should import the namespace EXPORTED_FOR_KUNIT_TESTING to
use these marked symbols. This is the standard way for all KUnit
tests.

Signed-off-by: Andy Shevchenko <andriy.shevchenko at linux.intel.com>
Reviewed-by: ChenXiaoSong <chenxiaosong at kylinos.cn>
Signed-off-by: Steve French <stfrench at microsoft.com>
DeltaFile
+6-6fs/smb/client/smb2maperror.c
+1-0fs/smb/client/smb2maperror_test.c
+7-62 files

Linux/linux b8de511fs/smb/client smb1maperror.c smb1maperror_test.c

smb/client: Use EXPORT_SYMBOL_IF_KUNIT() to export symbols

Replace EXPORT_SYMBOL_FOR_MODULES() with EXPORT_SYMBOL_IF_KUNIT()
to mark the symbols as visible only if CONFIG_KUNIT is enabled.

Kunit test should import the namespace EXPORTED_FOR_KUNIT_TESTING to
use these marked symbols. This is the standard way for all KUnit
tests.

Signed-off-by: Andy Shevchenko <andriy.shevchenko at linux.intel.com>
Reviewed-by: ChenXiaoSong <chenxiaosong at kylinos.cn>
Signed-off-by: Steve French <stfrench at microsoft.com>
DeltaFile
+12-12fs/smb/client/smb1maperror.c
+1-0fs/smb/client/smb1maperror_test.c
+13-122 files

Linux/linux 58717b2sound/hda/codecs/realtek alc269.c, sound/hda/codecs/side-codecs cs35l56_hda.c

Merge tag 'sound-7.2-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "A collection of small fixes. All are device-specific fixes (including
  regression fixes) or quirks accumulated since the last update. Some
  highlights:

  USB-audio:
   - Fix per-channel volume imbalance regression for sticky mixers
   - Validate input packet length in caiaq driver
   - Quirks for iBasso DC-Elite, Musical Fidelity M6s DAC, and Redragon
     H510-PRO Wireless headset

  HD-audio:
   - Fix a long-standing bug of cached processing coefficient verbs
   - Make cs35l56 driver failing with missing firmware
   - Fix cirrus codec Kconfig dependency, update MAINTAINERS
   - Remove unneeded mic bias threshold override on Conexant
   - Realtek codec quirks for ASUS ROG Ally X (headphone & mic), Dell

    [40 lines not shown]
DeltaFile
+47-2sound/hda/codecs/realtek/alc269.c
+46-1sound/soc/amd/acp/amd-acp70-acpi-match.c
+31-2sound/soc/amd/ps/pci-ps.c
+9-21sound/hda/codecs/side-codecs/cs35l56_hda.c
+14-3sound/usb/caiaq/device.c
+11-0sound/soc/codecs/rt712-sdca.c
+158-2929 files not shown
+203-5835 files

Linux/linux 7059bdffs/btrfs file-item.c ioctl.c

Merge tag 'for-7.2-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux

Pull btrfs fixes from David Sterba:

 - fix root structure leak after relocation error

 - fix optimization when checksums are read from commit root, fall back
   to checksum root during relocation

 - in tree-checker, validate length of inode reference in items

 - validate properties before setting them

 - validate free space cache entries on load

 - transaction abort fixes

 - fix printing of internal trees as signed numbers


    [12 lines not shown]
DeltaFile
+25-1fs/btrfs/file-item.c
+12-6fs/btrfs/ioctl.c
+13-3fs/btrfs/props.c
+7-8fs/btrfs/relocation.c
+12-3fs/btrfs/lzo.c
+4-4fs/btrfs/print-tree.c
+73-252 files not shown
+82-258 files

Linux/linux a1caeeafs/xfs/scrub cow_repair.c trace.h

xfs: don't replace the wrong part of the cow fork

LOLLM points out that xfs_iext_lookup_extent can return a @got where
got->br_startoff < startoff.  In this case, xrep_cow_replace_range
replaces the entire mapping instead of just the part that had been
marked bad in the bitmap, but advances the bitmap cursor in
xrep_cow_replace by the amount replaced.  As a result, we fail to
replace the end of the bad range, and replace part of the good range.

Fix this by rewriting the replace method to handle replacing the middle
of a cow fork mapping.  This we do by returning both the current mapping
as @got, and the subset of the mapping that we want to replace as @rep,
using @rep to store the results of the new allocation, and comparing
@rep to @got to figure out the exact transformations needed.

Cc: stable at vger.kernel.org # v6.8
Fixes: dbbdbd0086320a ("xfs: repair problems in CoW forks")
Signed-off-by: "Darrick J. Wong" <djwong at kernel.org>
Assisted-by: LOLLM # finding obvious bugs

    [2 lines not shown]
DeltaFile
+131-72fs/xfs/scrub/cow_repair.c
+17-11fs/xfs/scrub/trace.h
+148-832 files

Linux/linux 5d72a68fs/xfs/scrub rtbitmap.c

xfs: fix off-by-one error when calling xchk_xref_has_rt_owner

LOLLM noticed an off-by-one error when computing the length of the
rtrmap to cross-check.

Cc: stable at vger.kernel.org # v6.14
Fixes: 037a44d8277adf ("xfs: cross-reference the realtime rmapbt")
Signed-off-by: "Darrick J. Wong" <djwong at kernel.org>
Assisted-by: LOLLM # finding obvious bugs
Reviewed-by: Christoph Hellwig <hch at lst.de>
Signed-off-by: Carlos Maiolino <cem at kernel.org>
DeltaFile
+1-1fs/xfs/scrub/rtbitmap.c
+1-11 files

Linux/linux ee24815fs/xfs/scrub rtrefcount.c

xfs: use rtrefcount btree cursor in xchk_xref_is_rt_cow_staging

LOLLM points out that we pass the wrong btree cursor here.  We want the
rtrefcount btree cursor, not the non-rt one.  This is fairly benign
since it only affects tracing data.

Cc: stable at vger.kernel.org # v6.14
Fixes: 91683bb3f264c0 ("xfs: cross-reference checks with the rt refcount btree")
Signed-off-by: "Darrick J. Wong" <djwong at kernel.org>
Assisted-by: LOLLM # finding obvious bugs
Reviewed-by: Christoph Hellwig <hch at lst.de>
Signed-off-by: Carlos Maiolino <cem at kernel.org>
DeltaFile
+1-1fs/xfs/scrub/rtrefcount.c
+1-11 files

Linux/linux ea6e2d9fs/xfs/scrub rgsuper.c

xfs: grab rtrmap btree when checking rgsuper

LOLLM noticed that we aren't grabbing the rtrmap btree when we check the
realtime group superblock.  As a result, none of the cross-referencing
checks have ever run.  Fix this.

Cc: stable at vger.kernel.org # v6.14
Fixes: 428e4884656db9 ("xfs: allow queued realtime intents to drain before scrubbing")
Signed-off-by: "Darrick J. Wong" <djwong at kernel.org>
Assisted-by: LOLLM # finding obvious bugs
Reviewed-by: Christoph Hellwig <hch at lst.de>
Signed-off-by: Carlos Maiolino <cem at kernel.org>
DeltaFile
+9-1fs/xfs/scrub/rgsuper.c
+9-11 files

Linux/linux 59c462bfs/xfs/scrub inode_repair.c

xfs: don't zap bmbt forks if they are MAXLEVELS tall

LOLLM noticed a discrepancy between the bmbt level checks in the libxfs
bmbt code vs. the inode repair code.  We do actually allow a bmbt root
that proclaims to have a height of XFS_BM_MAXLEVELS.

Cc: stable at vger.kernel.org # v6.8
Fixes: e744cef2060559 ("xfs: zap broken inode forks")
Signed-off-by: "Darrick J. Wong" <djwong at kernel.org>
Assisted-by: LOLLM # finding obvious bugs
Reviewed-by: Christoph Hellwig <hch at lst.de>
Signed-off-by: Carlos Maiolino <cem at kernel.org>
DeltaFile
+1-1fs/xfs/scrub/inode_repair.c
+1-11 files

Linux/linux 353a590fs/xfs/scrub rtrmap.c

xfs: handle non-inode owners for rtrmap record checking

LOLLM noticed that two helper functions in the rtrmapbt scrub code don't
actually handle non-inode owners correctly -- CoW staging extents and
rgsuperblock extents are not shareable, but they are mergeable.  Fix
these two helpers.

Cc: stable at vger.kernel.org # v6.14
Fixes: 2d9a3e98053e8c ("xfs: allow overlapping rtrmapbt records for shared data extents")
Signed-off-by: "Darrick J. Wong" <djwong at kernel.org>
Assisted-by: LOLLM # finding obvious bugs
Reviewed-by: Christoph Hellwig <hch at lst.de>
Signed-off-by: Carlos Maiolino <cem at kernel.org>
DeltaFile
+6-0fs/xfs/scrub/rtrmap.c
+6-01 files

Linux/linux 540ddc6fs/xfs/scrub scrub.h xfarray.c

xfs: set xfarray killable sort correctly

LOLLM noticed that we *disable* interruptible sorts when the KILLABLE
flag is set.  This is backwards.  Fix the incorrect logic, and rename
the variable to make the connection more obvious.

Cc: stable at vger.kernel.org # v6.10
Fixes: 271557de7cbfde ("xfs: reduce the rate of cond_resched calls inside scrub")
Signed-off-by: "Darrick J. Wong" <djwong at kernel.org>
Assisted-by: LOLLM # finding obvious bugs
Reviewed-by: Christoph Hellwig <hch at lst.de>
Signed-off-by: Carlos Maiolino <cem at kernel.org>
DeltaFile
+3-3fs/xfs/scrub/scrub.h
+1-2fs/xfs/scrub/xfarray.c
+4-52 files

Linux/linux d766e4efs/xfs/scrub dqiterate.c

xfs: don't wrap around quota ids in dqiterate

LOLLM noticed that q_id is an unsigned 32-bit variable.  If it happens
to be set to XFS_DQ_ID_MAX due to a filesystem that actually has a dquot
for ID_MAX, then this addition will truncate to zero and the iteration
starts over.  Fix this by casting to u64.

Cc: stable at vger.kernel.org # v6.8
Fixes: 21d7500929c8a0 ("xfs: improve dquot iteration for scrub")
Signed-off-by: "Darrick J. Wong" <djwong at kernel.org>
Assisted-by: LOLLM # finding obvious bugs
Reviewed-by: Christoph Hellwig <hch at lst.de>
Signed-off-by: Carlos Maiolino <cem at kernel.org>
DeltaFile
+1-1fs/xfs/scrub/dqiterate.c
+1-11 files

Linux/linux 60a1ddefs/xfs xfs_bmap_util.c xfs_trace.h, fs/xfs/scrub cow_repair.c trace.h

xfs: move cow_replace_mapping to xfs_bmap_util.c

Move the actual details of (partially) replacing a COW fork mapping to
xfs_bmap_util.c so that all the code doing hairy operations on subsets
of bmbt_irecs are kept together.

Signed-off-by: "Darrick J. Wong" <djwong at kernel.org>
Reviewed-by: Christoph Hellwig <hch at lst.de>
Signed-off-by: Carlos Maiolino <cem at kernel.org>
DeltaFile
+2-93fs/xfs/scrub/cow_repair.c
+89-0fs/xfs/xfs_bmap_util.c
+41-0fs/xfs/xfs_trace.h
+0-41fs/xfs/scrub/trace.h
+4-0fs/xfs/xfs_bmap_util.h
+136-1345 files

Linux/linux 15e38a9fs/xfs/scrub inode_repair.c

xfs: clamp timestamp nanoseconds correctly

LOLLM noticed an off-by-one error in the nsec clamping; fix that so that
we never have tv_nsec == 1e9.

Cc: stable at vger.kernel.org # v6.8
Fixes: 2d295fe65776d1 ("xfs: repair inode records")
Signed-off-by: "Darrick J. Wong" <djwong at kernel.org>
Assisted-by: LOLLM # finding obvious bugs
Reviewed-by: Christoph Hellwig <hch at lst.de>
Signed-off-by: Carlos Maiolino <cem at kernel.org>
DeltaFile
+1-1fs/xfs/scrub/inode_repair.c
+1-11 files