1325241 Commits

Author SHA1 Message Date
Ingo Molnar
40c78513bc Merge branch into tip/master: 'perf/core'
# New commits in perf/core:
    b709eb872e19 ("perf: map pages in advance")
    6d642735cdb6 ("perf/x86/intel/uncore: Support more units on Granite Rapids")
    3f710be02ea6 ("perf/x86/intel/uncore: Clean up func_id")
    0e45818ec189 ("perf/x86/intel: Support RDPMC metrics clear mode")
    02c56362a7d3 ("uprobes: Guard against kmemdup() failing in dup_return_instance()")
    d29e744c7167 ("perf/x86: Relax privilege filter restriction on AMD IBS")
    6057b90ecc84 ("perf/core: Export perf_exclude_event()")
    8622e45b5da1 ("uprobes: Reuse return_instances between multiple uretprobes within task")
    0cf981de7687 ("uprobes: Ensure return_instance is detached from the list before freeing")
    636666a1c733 ("uprobes: Decouple return_instance list traversal and freeing")
    2ff913ab3f47 ("uprobes: Simplify session consumer tracking")
    e0925f2dc4de ("uprobes: add speculative lockless VMA-to-inode-to-uprobe resolution")
    83e3dc9a5d4d ("uprobes: simplify find_active_uprobe_rcu() VMA checks")
    03a001b156d2 ("mm: introduce mmap_lock_speculate_{try_begin|retry}")
    eb449bd96954 ("mm: convert mm_lock_seq to a proper seqcount")
    7528585290a1 ("mm/gup: Use raw_seqcount_try_begin()")
    96450ead1652 ("seqlock: add raw_seqcount_try_begin")
    b4943b8bfc41 ("perf/x86/rapl: Add core energy counter support for AMD CPUs")
    54d2759778c1 ("perf/x86/rapl: Move the cntr_mask to rapl_pmus struct")
    bdc57ec70548 ("perf/x86/rapl: Remove the global variable rapl_msrs")
    abf03d9bd20c ("perf/x86/rapl: Modify the generic variable names to *_pkg*")
    eeca4c6b2529 ("perf/x86/rapl: Add arguments to the init and cleanup functions")
    cd29d83a6d81 ("perf/x86/rapl: Make rapl_model struct global")
    8bf1c86e5ac8 ("perf/x86/rapl: Rename rapl_pmu variables")
    1d5e2f637a94 ("perf/x86/rapl: Remove the cpu_to_rapl_pmu() function")
    e4b444347795 ("x86/topology: Introduce topology_logical_core_id()")
    2f2db347071a ("perf/x86/rapl: Remove the unused get_rapl_pmu_cpumask() function")
    ae55e308bde2 ("perf/x86/intel/ds: Simplify the PEBS records processing for adaptive PEBS")
    3c00ed344cef ("perf/x86/intel/ds: Factor out functions for PEBS records processing")
    7087bfb0adc9 ("perf/x86/intel/ds: Clarify adaptive PEBS processing")
    faac6f105ef1 ("perf/core: Check sample_type in perf_sample_save_brstack")
    f226805bc5f6 ("perf/core: Check sample_type in perf_sample_save_callchain")
    b9c44b91476b ("perf/core: Save raw sample data conditionally based on sample type")

Signed-off-by: Ingo Molnar <mingo@kernel.org>
2025-01-11 17:05:01 +01:00
Ingo Molnar
8d020ac092 Merge branch into tip/master: 'objtool/core'
# New commits in objtool/core:
    41a1e976623e ("x86/mm: Convert unreachable() to BUG()")
    c3cb6c158c64 ("objtool: Allow arch code to discover jump table size")
    e7e0eb53c2f0 ("objtool: Warn about unknown annotation types")
    87116ae6da03 ("objtool: Fix ANNOTATE_REACHABLE to be a normal annotation")
    e7a174fb43d2 ("objtool: Convert {.UN}REACHABLE to ANNOTATE")
    06e24745985c ("objtool: Remove annotate_{,un}reachable()")
    624bde3465f6 ("loongarch: Use ASM_REACHABLE")
    2190966fbc14 ("x86: Convert unreachable() to BUG()")
    c837de381098 ("unreachable: Unify")
    bb8170067470 ("objtool: Collect more annotations in objtool.h")
    a8a330dd9900 ("objtool: Collapse annotate sequences")
    112765ca1cb9 ("objtool: Convert ANNOTATE_INTRA_FUNCTION_CALL to ANNOTATE")
    f0cd57c35a75 ("objtool: Convert ANNOTATE_IGNORE_ALTERNATIVE to ANNOTATE")
    18aa6118a168 ("objtool: Convert VALIDATE_UNRET_BEGIN to ANNOTATE")
    317f2a64618c ("objtool: Convert instrumentation_{begin,end}() to ANNOTATE")
    bf5febebd99f ("objtool: Convert ANNOTATE_RETPOLINE_SAFE to ANNOTATE")
    22c3d5807968 ("objtool: Convert ANNOTATE_NOENDBR to ANNOTATE")
    2116b349e29a ("objtool: Generic annotation infrastructure")

Signed-off-by: Ingo Molnar <mingo@kernel.org>
2025-01-11 17:05:00 +01:00
Ingo Molnar
bffa1e504f Merge branch into tip/master: 'locking/core'
# New commits in locking/core:
    cb4ccc70344c ("MAINTAINERS: Add static_call_inline.c to STATIC BRANCH/CALL")
    a937f384c9da ("cleanup, tags: Create tags for the cleanup primitives")
    abfdccd6af2b ("sched/wake_q: Add helper to call wake_up_q after unlock with preemption disabled")
    fbd7a5a0359b ("rust: sync: Add lock::Backend::assert_is_held()")
    eb5ccb038284 ("rust: sync: Add SpinLockGuard type alias")
    37624dde4768 ("rust: sync: Add MutexGuard type alias")
    daa03fe50ec3 ("rust: sync: Make Guard::new() public")
    15abc88057ee ("rust: sync: Add Lock::from_raw() for Lock<(), B>")
    9793c9bb91f1 ("locking: MAINTAINERS: Start watching Rust locking primitives")
    343060092585 ("lockdep: Move lockdep_assert_locked() under #ifdef CONFIG_PROVE_LOCKING")
    8148fa2e022b ("lockdep: Mark chain_hlock_class_idx() with __maybe_unused")
    bd7b5ae26618 ("lockdep: Document MAX_LOCKDEP_CHAIN_HLOCKS calculation")
    88a79e88a97c ("lockdep: Clarify size for LOCKDEP_*_BITS configs")
    e638072e6172 ("lockdep: Fix upper limit for LOCKDEP_*_BITS configs")
    0d3547df6934 ("locking/ww_mutex/test: Use swap() macro")
    63a48181fbcd ("smp/scf: Evaluate local cond_func() before IPI side-effects")
    d387ceb17149 ("locking/lockdep: Enforce PROVE_RAW_LOCK_NESTING only if ARCH_SUPPORTS_RT")

Signed-off-by: Ingo Molnar <mingo@kernel.org>
2025-01-11 17:05:00 +01:00
Ingo Molnar
2d7c58ef93 Merge branch into tip/master: 'irq/core'
# New commits in irq/core:
    b4706d814921 ("genirq/kexec: Prevent redundant IRQ masking by checking state before shutdown")
    bad6722e478f ("kexec: Consolidate machine_kexec_mask_interrupts() implementation")
    429f49ad361c ("genirq: Reuse irq_thread_fn() for forced thread case")
    6f8b79683dfb ("genirq: Move irq_thread_fn() further up in the code")

Signed-off-by: Ingo Molnar <mingo@kernel.org>
2025-01-11 17:05:00 +01:00
Ingo Molnar
d2652c8fa1 Merge branch into tip/master: 'ras/merge'
# New commits in ras/merge:
    79821b907f8d ("x86/amd_node: Use defines for SMN register offsets")
    77466b798d59 ("x86/amd_node: Remove dependency on AMD_NB")
    35df797665cb ("x86/amd_node: Update __amd_smn_rw() error paths")
    d6caeafaa324 ("x86/amd_nb: Move SMN access code to a new amd_node driver")
    7dd57db495d4 ("x86/amd_nb, hwmon: (k10temp): Simplify amd_pci_dev_to_node_id()")
    49b96fc0dddc ("x86/amd_nb: Simplify function 3 search")
    bc7b2e629e0c ("x86/amd_nb: Use topology info to get AMD node count")
    40a5f6ffdfc8 ("x86/amd_nb: Simplify root device search")
    962f1970a324 ("x86/amd_nb: Simplify function 4 search")
    e6e6e5e85116 ("x86: Start moving AMD node functionality out of AMD_NB")
    e13f51b51814 ("x86/amd_nb: Clean up early_is_amd_nb()")
    bee9e840609c ("x86/amd_nb: Restrict init function to AMD-based systems")
    d35fb3121a36 ("x86/mce/amd: Remove shared threshold bank plumbing")
    053d18057e62 ("x86/mce: Remove the redundant mce_hygon_feature_init()")
    359d7a98e3e3 ("x86/mce: Convert family/model mixed checks to VFM-based checks")
    51a12c28bb9a ("x86/mce: Break up __mcheck_cpu_apply_quirks()")
    c46945c9cac8 ("x86/mce: Make four functions return bool")
    64a668fbea1b ("x86/mce/threshold: Remove the redundant this_cpu_dec_return()")
    c845cb8dbd2e ("x86/mce: Make several functions return bool")
    6a5abeea9c72 ("x86/mtrr: Rename mtrr_overwrite_state() to guest_force_mtrr_state()")

Signed-off-by: Ingo Molnar <mingo@kernel.org>
2025-01-11 17:04:59 +01:00
Ingo Molnar
54312797a3 Merge branch into tip/master: 'x86/merge'
# New commits in x86/merge:
    0563ee35ae2c ("x86/sev: Add the Secure TSC feature for SNP guests")
    73bbf3b0fbba ("x86/tsc: Init the TSC for Secure TSC guests")
    0a2a98f691f2 ("x86/sev: Mark the TSC in a secure TSC guest as reliable")
    eef679a4b52e ("x86/sev: Prevent RDTSC/RDTSCP interception for Secure TSC enabled guests")
    38cc6495cdec ("x86/sev: Prevent GUEST_TSC_FREQ MSR interception for Secure TSC enabled guests")
    0f0502b8865c ("x86/sev: Change TSC MSR behavior for Secure TSC enabled guests")
    85b60ca9ad2c ("x86/sev: Add Secure TSC support for SNP guests")
    893930143440 ("x86/sev: Don't hang but terminate on failure to remap SVSM CA")
    1e0b23b5d2d1 ("x86/sev: Relocate SNP guest messaging routines to common code")
    c5529418d050 ("x86/sev: Carve out and export SNP guest messaging init routines")
    864884a0c29c ("virt: sev-guest: Replace GFP_KERNEL_ACCOUNT with GFP_KERNEL")
    8234177d2027 ("virt: sev-guest: Remove is_vmpck_empty() helper")
    99b863d2e872 ("x86/sev: Disable UBSAN on SEV code that may execute very early")
    288bba2f4c8b ("x86/cpufeatures: Remove "AMD" from the comments to the AMD-specific leaf")
    1146f7429f61 ("Documentation/kernel-parameters: Fix a typo in kvm.enable_virt_at_load text")
    21fc6178e920 ("x86/sev/docs: Document the SNP Reverse Map Table (RMP)")
    8ae3291f773b ("x86/sev: Add full support for a segmented RMP table")
    0f14af0d1d7d ("x86/sev: Treat the contiguous RMP table as a single RMP segment")
    ac517965a5a1 ("x86/sev: Map only the RMP table entries instead of the full RMP range")
    e2f3d40df82e ("x86/sev: Move the SNP probe routine out of the way")
    4972808d6f4a ("x86/sev: Require the RMPREAD instruction after Zen4")
    0cbc02584158 ("x86/sev: Add support for the RMPREAD instruction")
    3e43c60eb3e3 ("x86/sev: Prepare for using the RMPREAD instruction to access the RMP")
    3560a023a9b9 ("x86/cpu: Fix typo in x86_match_cpu()'s doc")
    13148e22c151 ("x86/apic: Remove "disablelapic" cmdline option")
    ab0e7f20768a ("Documentation: Merge x86-specific boot options doc into kernel-parameters.txt")
    35aafa1d41ce ("x86/boot/64: Fix spurious undefined reference when CONFIG_X86_5LEVEL=n, on GCC-12")
    525077ae7145 ("x86/ioremap: Remove unused size parameter in remapping functions")
    095ac6fa1950 ("x86/ioremap: Simplify setup_data mapping variants")
    a3eaa2be7004 ("x86/sysfs: Constify 'struct bin_attribute'")
    5a82223e0743 ("x86/kexec: Mark relocate_kernel page as ROX instead of RWX")
    93e489ad7a46 ("x86/kexec: Clean up register usage in relocate_kernel()")
    b7155dfd4999 ("x86/kexec: Eliminate writes through kernel mapping of relocate_kernel page")
    b3adabae8a96 ("x86/kexec: Drop page_list argument from relocate_kernel()")
    8dbec5c77bc3 ("x86/kexec: Add data section to relocate_kernel")
    cb33ff9e063c ("x86/kexec: Move relocate_kernel to kernel .data section")
    eeebbde57113 ("x86/kexec: Invoke copy of relocate_kernel() instead of the original")
    6a750b4c0099 ("x86/kexec: Copy control page into place in machine_kexec_prepare()")
    4b5bc2ec9a23 ("x86/kexec: Allocate PGD for x86_64 transition page tables separately")
    9e5683e2d0b5 ("x86/kexec: Only swap pages for ::preserve_context mode")
    46d4e205e22c ("x86/kexec: Use named labels in swap_pages in relocate_kernel_64.S")
    207bdf7f72ae ("x86/kexec: Clean up and document register use in relocate_kernel_64.S")
    faf0ed487415 ("x86/boot: Reject absolute references in .head.text")
    a6a4ae9c3f3a ("x86/boot: Move .head.text into its own output section")
    35350eb689e6 ("x86/kernel: Move ENTRY_TEXT to the start of the image")
    3b6f99a94b04 ("x86/boot: Disable UBSAN in early boot code")
    0d9b9a328cb6 ("x86/boot/64: Avoid intentional absolute symbol references in .head.text")
    093562198e1a ("x86/boot/64: Determine VA/PA offset before entering C code")
    09d35045cd0f ("x86/sev: Avoid WARN()s and panic()s in early boot code")
    5daececd4ff5 ("x86/boot/compressed: Remove unused header includes from kaslr.c")

Signed-off-by: Ingo Molnar <mingo@kernel.org>
2025-01-11 17:04:59 +01:00
Ingo Molnar
18dd4d09c0 Merge branch into tip/master: 'x86/urgent'
# New commits in x86/urgent:
    a9d9c33132d4 ("x86/fpu: Ensure shadow stack is active before "getting" registers")
    5cc2db37124b ("x86/static-call: Remove early_boot_irqs_disabled check to fix Xen PVH dom0")

Signed-off-by: Ingo Molnar <mingo@kernel.org>
2025-01-11 17:04:58 +01:00
Ingo Molnar
9353d01a09 Merge branch into tip/master: 'sched/urgent'
# New commits in sched/urgent:
    6d71a9c61604 ("sched/fair: Fix EEVDF entity placement bug causing scheduling lag")

Signed-off-by: Ingo Molnar <mingo@kernel.org>
2025-01-11 17:04:58 +01:00
Ingo Molnar
4b2c7b7c9a Merge branch into tip/master: 'perf/urgent'
# New commits in perf/urgent:
    b583ef82b671 ("uprobes: Fix race in uprobe_free_utask")

Signed-off-by: Ingo Molnar <mingo@kernel.org>
2025-01-11 17:04:58 +01:00
Michael Ellerman
77a903cd8e MAINTAINERS: powerpc: Update my status
Maddy is taking over the day-to-day maintenance of powerpc. I will still
be around to help, and as a backup.

Re-order the main POWERPC list to put Maddy first to reflect that.

KVM/powerpc patches will be handled by Maddy via the powerpc tree with
review from Nick, so replace myself with Maddy there.

Remove myself from BPF, leaving Hari & Christophe as maintainers.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2025-01-10 17:19:33 -08:00
Linus Torvalds
2e3f3090bd sched_ext: Fixes for v6.13-rc6
- Fix corner case bug where ops.dispatch() couldn't extend the execution of
   the current task if SCX_OPS_ENQ_LAST is set.
 
 - Fix ops.cpu_release() not being called when a SCX task is preempted by a
   higher priority sched class task.
 
 - Fix buitin idle mask being incorrectly left as busy after an idle CPU is
   picked and kicked.
 
 - scx_ops_bypass() was unnecessarily using rq_lock() which comes with rq
   pinning related sanity checks which could trigger spuriously. Switch to
   raw_spin_rq_lock().
 -----BEGIN PGP SIGNATURE-----
 
 iIQEABYKACwWIQTfIjM1kS57o3GsC/uxYfJx3gVYGQUCZ4Gmpw4cdGpAa2VybmVs
 Lm9yZwAKCRCxYfJx3gVYGVntAP0b4i4PEIkupj9+i8ZzlwqvYX3gFJ7E4v3wmjDp
 1VYdrAD/ZetrhrM+9RyyKpMIDFnN+xE6YbslBSlAzGzgfdsbXA0=
 =zGXi
 -----END PGP SIGNATURE-----

Merge tag 'sched_ext-for-6.13-rc6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/sched_ext

Pull sched_ext fixes from Tejun Heo:

 - Fix corner case bug where ops.dispatch() couldn't extend the
   execution of the current task if SCX_OPS_ENQ_LAST is set.

 - Fix ops.cpu_release() not being called when a SCX task is preempted
   by a higher priority sched class task.

 - Fix buitin idle mask being incorrectly left as busy after an idle CPU
   is picked and kicked.

 - scx_ops_bypass() was unnecessarily using rq_lock() which comes with
   rq pinning related sanity checks which could trigger spuriously.
   Switch to raw_spin_rq_lock().

* tag 'sched_ext-for-6.13-rc6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/sched_ext:
  sched_ext: idle: Refresh idle masks during idle-to-idle transitions
  sched_ext: switch class when preempted by higher priority scheduler
  sched_ext: Replace rq_lock() to raw_spin_rq_lock() in scx_ops_bypass()
  sched_ext: keep running prev when prev->scx.slice != 0
2025-01-10 15:11:58 -08:00
Linus Torvalds
58624e4bc8 cgroup: Fixes for v6.13-rc6
All are cpuset changes:
 
 - Fix isolated CPUs leaking into sched domains.
 
 - Remove now unnecessary kernfs active break which can trigger a warning.
 
 - Comment updates.
 -----BEGIN PGP SIGNATURE-----
 
 iIQEABYKACwWIQTfIjM1kS57o3GsC/uxYfJx3gVYGQUCZ4Gkug4cdGpAa2VybmVs
 Lm9yZwAKCRCxYfJx3gVYGXRGAQCf9aL+UWZZiVqcvRjBt8z3gxW9HQOCXYXNGlLF
 EKFFuAD+KLox+flPLbgNv9IwZnswv9+SdOTCE1TlT0GQFBPZcQU=
 =suPy
 -----END PGP SIGNATURE-----

Merge tag 'cgroup-for-6.13-rc6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup

Pull cgroup fixes from Tejun Heo:
 "Cpuset fixes:

   - Fix isolated CPUs leaking into sched domains

   - Remove now unnecessary kernfs active break which can trigger a
     warning

   - Comment updates"

* tag 'cgroup-for-6.13-rc6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup:
  cgroup/cpuset: remove kernfs active break
  cgroup/cpuset: Prevent leakage of isolated CPUs into sched domains
  cgroup/cpuset: Remove stale text
2025-01-10 15:03:02 -08:00
Linus Torvalds
257a8be4e9 workqueue: Fixes for v6.13-rc6
- Add a WARN_ON_ONCE() on queue_delayed_work_on() on an offline CPU as such
   work items won't get executed till the CPU comes back online.
 -----BEGIN PGP SIGNATURE-----
 
 iIQEABYKACwWIQTfIjM1kS57o3GsC/uxYfJx3gVYGQUCZ4Gjlw4cdGpAa2VybmVs
 Lm9yZwAKCRCxYfJx3gVYGTNSAQDX7+9ODdDXHEUnViU4QCK6EAsKmp+PHlZLo/0K
 PVm4SQD/QtPj3jwyEhhdRlaL0+IbTyfG3rURxv53XUGl+TJ1qA8=
 =SYtY
 -----END PGP SIGNATURE-----

Merge tag 'wq-for-6.13-rc6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq

Pull workqueue fix from Tejun Heo:

 - Add a WARN_ON_ONCE() on queue_delayed_work_on() on an offline CPU as
   such work items won't get executed till the CPU comes back online

* tag 'wq-for-6.13-rc6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq:
  workqueue: warn if delayed_work is queued to an offlined cpu.
2025-01-10 14:52:30 -08:00
Linus Torvalds
da13af8392 Thermal control fix for 6.13-rc7
Fix an OF node leak in the code parsing thermal zone DT
 properties (Joe Hattori).
 -----BEGIN PGP SIGNATURE-----
 
 iQJGBAABCAAwFiEE4fcc61cGeeHD/fCwgsRv/nhiVHEFAmeBifoSHHJqd0Byand5
 c29ja2kubmV0AAoJEILEb/54YlRxI8sQAJ+dwbkMHlSs4oLPeQ1ZJEYIATczouyj
 t8WOtt4MyhX+ckbpMZ0TQu0EKoWBqfbVGVgTzu8++80VfiVX1wzMrcFPeJtkLK5o
 UbMy8nN5fMh76okrS8P6s3Y4bd7fDyO+efYhUNdF5Zrw5T6FS7ARIOFyontS9/q3
 ZxQcvLjCy2g7FThOSq8y4p8ndx960BT8kCUYlQH+VXvzRXNRkiJqdUJpeR7526vs
 VlpOM0Cghu3/1c7OcyEe4TUId1+0grqM5bi3K0E0OpI/Nb76aa0wSJTVVl4zkL6z
 ov3Bp6qCS4Elqw+k9Q/nUKFLy5kSalFRi6P7QD83pav0b8pUurIedrT9cBBvzstw
 Wzr/DEnt/iVEFwlllMgm4rbmTsUqGZVt0QAsVotVz814lQ1A40iHePNdqdnsykUh
 xkdOzCcZN7Ii4mwZ606yzH8Q9VS+Zj6HZk2Gj7RvLBfbvuriXkYl1EvdFvv82TFz
 0PqpcFxU69IWo2loLO7Scfeu0DISPkKMEEUpT+ZyG4ghQ6G/rJG2mIqj+Q6SXxhX
 Hf4H3h8FdoIBJDpb+Fuu16pv1XPIQJ1bGrTm9Lamab1hRgL5lyUIF2cSVdwLH/Dr
 gN4u5H+c31rz41/Rss4opseeirKnXffNWxMI4pqWvrb7heiYNT+cDDJMZFjYIPMm
 OaVcRAmm2Gr+
 =Gctf
 -----END PGP SIGNATURE-----

Merge tag 'thermal-6.13-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull thermal control fix from Rafael Wysocki:
 "Fix an OF node leak in the code parsing thermal zone DT properties
  (Joe Hattori)"

* tag 'thermal-6.13-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  thermal: of: fix OF node leak in of_thermal_zone_find()
2025-01-10 14:46:49 -08:00
Linus Torvalds
475c9f5854 ACPI fixes for 6.13-rc7
Add two more ACPI IRQ override quirks and update the code using
 them to avoid unnecessary overhead (Hans de Goede).
 -----BEGIN PGP SIGNATURE-----
 
 iQJGBAABCAAwFiEE4fcc61cGeeHD/fCwgsRv/nhiVHEFAmeBinQSHHJqd0Byand5
 c29ja2kubmV0AAoJEILEb/54YlRxBpoP/jFtsnMANvwSQ7SydBqPYjNnc9BK3sn9
 aeFgxiQqjyWskNce3kP+Xs1o94qHxdkh4LIiShWlceUnJbV75nBEQg0rTUTQejQX
 yGe7wVHBCXSjkr3gfdoI/BO8m1kRcgpoVWvn8B9N+tbityvvZLcLdWzW9H23fW+G
 uTT9DgN/SwDICGlt06ISqPC/t9xruIymjgUuv+VjLXbyMBUZNedoWAt/OC8+2TpP
 CrxWcanmQ1NysYx8e+K7pzLZvfDWdKf4LP6wlyh1A4bJ/wV7jYJXpWyTJup3RCO7
 70GsQaPO5roKo88TqsH3tI9TzD/RSLQDF4VEK1y0cmc/acFum92HUutKNGcqPzu4
 tIcXhf6Q04UbNCDdPQHVTZ3aNbMmAl0uQMSB8PzfLZw10rq125EHwQjQo/qeCaq2
 R9KD4awaPZ4p2vPr/5TGqeBP8FaflNvgH55Vdkn018sd0yj6V1GFwL6A2XncREKI
 hShhR52UGlZTx5KRrOvkElxPv1EMEuFRCPxe2mAozopBi6p7H/jjLYal1zVknBc5
 HuHwHI1RnGOK/M29coKdKCechfZpf1d2bmEXJhk4V0MWCS1d+1CyyJj3GgEDxnl1
 OCAbK3XAMoXpAA5SkvE9JTYxvV897Yzw0IuPZbkbGRXlkT2SoANQpIfHsxJsYv6z
 rCcz4vFH0BKn
 =sXNb
 -----END PGP SIGNATURE-----

Merge tag 'acpi-6.13-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull ACPI fixes from Rafael Wysocki:
 "Add two more ACPI IRQ override quirks and update the code using them
  to avoid unnecessary overhead (Hans de Goede)"

* tag 'acpi-6.13-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  ACPI: resource: acpi_dev_irq_override(): Check DMI match last
  ACPI: resource: Add TongFang GM5HG0A to irq1_edge_low_force_override[]
  ACPI: resource: Add Asus Vivobook X1504VAP to irq1_level_low_skip_override[]
2025-01-10 14:41:46 -08:00
Andrea Righi
a2a3374c47 sched_ext: idle: Refresh idle masks during idle-to-idle transitions
With the consolidation of put_prev_task/set_next_task(), see
commit 436f3eed5c69 ("sched: Combine the last put_prev_task() and the
first set_next_task()"), we are now skipping the transition between
these two functions when the previous and the next tasks are the same.

As a result, the scx idle state of a CPU is updated only when
transitioning to or from the idle thread. While this is generally
correct, it can lead to uneven and inefficient core utilization in
certain scenarios [1].

A typical scenario involves proactive wake-ups: scx_bpf_pick_idle_cpu()
selects and marks an idle CPU as busy, followed by a wake-up via
scx_bpf_kick_cpu(), without dispatching any tasks. In this case, the CPU
continues running the idle thread, returns to idle, but remains marked
as busy, preventing it from being selected again as an idle CPU (until a
task eventually runs on it and releases the CPU).

For example, running a workload that uses 20% of each CPU, combined with
an scx scheduler using proactive wake-ups, results in the following core
utilization:

 CPU 0: 25.7%
 CPU 1: 29.3%
 CPU 2: 26.5%
 CPU 3: 25.5%
 CPU 4:  0.0%
 CPU 5: 25.5%
 CPU 6:  0.0%
 CPU 7: 10.5%

To address this, refresh the idle state also in pick_task_idle(), during
idle-to-idle transitions, but only trigger ops.update_idle() on actual
state changes to prevent unnecessary updates to the scx scheduler and
maintain balanced state transitions.

With this change in place, the core utilization in the previous example
becomes the following:

 CPU 0: 18.8%
 CPU 1: 19.4%
 CPU 2: 18.0%
 CPU 3: 18.7%
 CPU 4: 19.3%
 CPU 5: 18.9%
 CPU 6: 18.7%
 CPU 7: 19.3%

[1] https://github.com/sched-ext/scx/pull/1139

Fixes: 7c65ae81ea86 ("sched_ext: Don't call put_prev_task_scx() before picking the next task")
Signed-off-by: Andrea Righi <arighi@nvidia.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
2025-01-10 12:40:42 -10:00
Linus Torvalds
e0daef7de1 drm fixes for 6.13-rc7
i915:
 - Revert "drm/i915/hdcp: Don't enable HDCP1.4 directly from check_link"
 
 amdgpu:
 - Display interrupt fixes
 - Fix display max surface mismatches
 - Fix divide error in DM plane scale calcs
 - Display divide by 0 checks in dml helpers
 - SMU 13 AD/DC interrrupt handling fix
 - Fix locking around buddy trim handling
 
 amdkfd:
 - Fix page fault with shader debugger enabled
 - Fix eviction fence wq handling
 
 xe:
 - Avoid a NULL ptr deref when wedging
 - Fix power gate sequence on DG1
 
 mediatek:
 - Revert "drm/mediatek: dsi: Correct calculation formula of PHY Timing"
 - Set private->all_drm_private[i]->drm to NULL if mtk_drm_bind returns err
 - Move mtk_crtc_finish_page_flip() to ddp_cmdq_cb()
 - Only touch DISP_REG_OVL_PITCH_MSB if AFBC is supported
 - Add support for 180-degree rotation in the display driver
 - Stop selecting foreign drivers
 - Revert "drm/mediatek: Switch to for_each_child_of_node_scoped()"
 - Fix YCbCr422 color format issue for DP
 - Fix mode valid issue for dp
 - dp: Reference common DAI properties
 - dsi: Add registers to pdata to fix MT8186/MT8188
 - Remove unneeded semicolon
 - Add return value check when reading DPCD
 - Initialize pointer in mtk_drm_of_ddp_path_build_one()
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEEKbZHaGwW9KfbeusDHTzWXnEhr4FAmeBgCcACgkQDHTzWXnE
 hr4nyBAAoCqMYKiSQjvsLyPrbU7ZzrGd+k8ltpCJcTXsIH7RdaxD8xU2ExpxxOnT
 EBOIyj7xfHaDVadLfn7Mm0ENyZYtu9DEyBLQk6hiVSY4TR4gan+MyD7XAv8kza3r
 q6uQ2Tx2ukJ35yka4OMOlXguSm/sKx+o37eI4w4BEtgZUxB4FmwOSEj6tHPDplsN
 ECNrsAnfOxWpalKPiREnar1FR1Dwon6Yi8NacgW9XY6VpOafwPP+n1eESJuhAnOO
 bYQRFEvFAzeS5zUvBhC7VtM70yYHK67rMZeixIqhv/YIrUNRkhcyJk6nLuVu063E
 qIRPacEdt7i20YfjGZqMY0O5d+tsAatZNW1z/rRtOSys9COAq/vion/n+6i3+cvm
 3lRSutqFfI+uAtfIAkf4S5xspeTpSCHqXpkndKm1NbFb0G7o4ea5q/liUO2Pf+J4
 wdMuqUX2pFFEAjw53spVJE3YwZx3uzBwik6w+/pxfVKFJcAsUfqpYhZIrGSXnDpo
 tEcaSbdCid2EhUE72se9/AxS6WcEGHWLHVTlZIXNK56jWvtQqvrar5u1q4hkIR0Z
 oc0zovhRN3+XwHvZZQpBxqoQJwCVc5B0/sdjDtoUyDMVSdye235TpG88xAE7TPmR
 XV3s6ML2MtiaGlvCEemD63vmn97AxYAgJTM3xHvDW/e61g0+Eqk=
 =AgUd
 -----END PGP SIGNATURE-----

Merge tag 'drm-fixes-2025-01-11' of https://gitlab.freedesktop.org/drm/kernel

Pull drm fixes from Dave Airlie:
 "Regular weekly fixes, this has the usual amdgpu/xe/i915 bits.

  There is a bigger bunch of mediatek patches that I considered not
  including at this stage, but all the changes (except for one were
  obvious small fixes, and the rotation one is a few lines, and I
  suppose will help someone have their screen up the right way), I
  decided to include it since I expect it got slowed down by holidays
  etc, and it's not that mainstream a hw platform.

  i915:
   - Revert "drm/i915/hdcp: Don't enable HDCP1.4 directly from
     check_link"

  amdgpu:
   - Display interrupt fixes
   - Fix display max surface mismatches
   - Fix divide error in DM plane scale calcs
   - Display divide by 0 checks in dml helpers
   - SMU 13 AD/DC interrrupt handling fix
   - Fix locking around buddy trim handling

  amdkfd:
   - Fix page fault with shader debugger enabled
   - Fix eviction fence wq handling

  xe:
   - Avoid a NULL ptr deref when wedging
   - Fix power gate sequence on DG1

  mediatek:
   - Revert "drm/mediatek: dsi: Correct calculation formula of PHY
     Timing"
   - Set private->all_drm_private[i]->drm to NULL if mtk_drm_bind
     returns err
   - Move mtk_crtc_finish_page_flip() to ddp_cmdq_cb()
   - Only touch DISP_REG_OVL_PITCH_MSB if AFBC is supported
   - Add support for 180-degree rotation in the display driver
   - Stop selecting foreign drivers
   - Revert "drm/mediatek: Switch to for_each_child_of_node_scoped()"
   - Fix YCbCr422 color format issue for DP
   - Fix mode valid issue for dp
   - dp: Reference common DAI properties
   - dsi: Add registers to pdata to fix MT8186/MT8188
   - Remove unneeded semicolon
   - Add return value check when reading DPCD
   - Initialize pointer in mtk_drm_of_ddp_path_build_one()"

* tag 'drm-fixes-2025-01-11' of https://gitlab.freedesktop.org/drm/kernel: (26 commits)
  drm/xe/dg1: Fix power gate sequence.
  drm/xe: Fix tlb invalidation when wedging
  Revert "drm/i915/hdcp: Don't enable HDCP1.4 directly from check_link"
  drm/amdgpu: Add a lock when accessing the buddy trim function
  drm/amd/pm:  fix BUG: scheduling while atomic
  drm/amdkfd: wq_release signals dma_fence only when available
  drm/amd/display: Add check for granularity in dml ceil/floor helpers
  drm/amdkfd: fixed page fault when enable MES shader debugger
  drm/amd/display: fix divide error in DM plane scale calcs
  drm/amd/display: increase MAX_SURFACES to the value supported by hw
  drm/amd/display: fix page fault due to max surface definition mismatch
  drm/amd/display: Remove unnecessary amdgpu_irq_get/put
  drm/mediatek: Initialize pointer in mtk_drm_of_ddp_path_build_one()
  drm/mediatek: Add return value check when reading DPCD
  drm/mediatek: Remove unneeded semicolon
  drm/mediatek: mtk_dsi: Add registers to pdata to fix MT8186/MT8188
  dt-bindings: display: mediatek: dp: Reference common DAI properties
  drm/mediatek: Fix mode valid issue for dp
  drm/mediatek: Fix YCbCr422 color format issue for DP
  Revert "drm/mediatek: Switch to for_each_child_of_node_scoped()"
  ...
2025-01-10 12:35:46 -08:00
Linus Torvalds
f8c6263347 RISC-V Fixes for 6.13-rc7
* A handful of selftest fixes.
 * A fix for a memory leak in relocation processing during module
   loading.
 * A fix to avoid sleeping in die().
 * A fix for kprobe intsruction slot address calculations.
 * A fix for a DT node reference leak in SBI idle probing.
 * A fix for to avoid initializing out of bounds pages on sparse vmemmap
   systems with a gap at the start of their physical memory map.
 * A fix for backtracing through exceptions.
 * _Q_PENDING_LOOPS is now defined whenever QUEUED_SPINLOCKS=y.
 * Local labels in entry.S are now marked with ".L", which prevents them
   from trashing backtraces.
 * A handful of fixes for SBI-based performance counters.
 -----BEGIN PGP SIGNATURE-----
 
 iQJHBAABCAAxFiEEKzw3R0RoQ7JKlDp6LhMZ81+7GIkFAmeBUxcTHHBhbG1lckBk
 YWJiZWx0LmNvbQAKCRAuExnzX7sYibx3D/0cT2Vc8CWq2oWmIQ4FBEJlQGNfKbI8
 JojRh2q76Qq3IWsLLigRgP/9QmkS2z1LWSu8o85UtFsS+kK1cfI7twvoVsmAJHst
 jNV6729usSAxEukHGQMU/Kn5+yWR2PQi7CChbglMS2vaTlnQVzvThePcxM4A+l2y
 z5mcI3JVNO9mfLDSIp45IXsxpO4fIWDguB2dtN6sljEzweB0yRMBNSemsF0iuujb
 sSuZYSWqVfrQ0a1JZ3/MHZ2xnToMpvYwTqH+P5kXX+49vQfGb4pE4Tq7MQgF65w1
 TnFesLIQE0c1D0M+1uretIcsNNk4B7eVTCH4DuPgmKVOTQNxsX4szLgLYv+orReW
 MpKW3P1AR0LDm4bhDTItzrRRxVSrM2gCsSgEHFnw+E1Oe3shCfs5yYzXObiduMwt
 I6eN2iW47nBqTbY9MHIQxZKAHrH/6h9f70NMbps9MJYKC4SqVNmK/DL/uJCr9o1A
 FB0Uvnea1ZaenKQy1UM6u4XI5Gfqqn3otJr07Ph5b+YFgBwmjEWmxCP0tQXZ07kW
 GX7a5pNoHEtsf4V95hqFZ6GNjlqwj12/3FbD2fuT9eVGRbQAiT6dNsohmR2cbfPI
 Vo7HfeVHLFCIEtNNTiALDZAqFWfyE/zdUlqpiuizE71LBa2IJudDgbaoOEG7OnHN
 6jrDh3vuKLv4PA==
 =6ZPP
 -----END PGP SIGNATURE-----

Merge tag 'riscv-for-linus-6.13-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux

Pull RISC-V fixes from Palmer Dabbelt:

 - a handful of selftest fixes

 - fix a memory leak in relocation processing during module loading

 - avoid sleeping in die()

 - fix kprobe instruction slot address calculations

 - fix DT node reference leak in SBI idle probing

 - avoid initializing out of bounds pages on sparse vmemmap systems with
   a gap at the start of their physical memory map

 - fix backtracing through exceptions

 - _Q_PENDING_LOOPS is now defined whenever QUEUED_SPINLOCKS=y

 - local labels in entry.S are now marked with ".L", which prevents them
   from trashing backtraces

 - a handful of fixes for SBI-based performance counters

* tag 'riscv-for-linus-6.13-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
  drivers/perf: riscv: Do not allow invalid raw event config
  drivers/perf: riscv: Return error for default case
  drivers/perf: riscv: Fix Platform firmware event data
  tools: selftests: riscv: Add test count for vstate_prctl
  tools: selftests: riscv: Add pass message for v_initval_nolibc
  riscv: use local label names instead of global ones in assembly
  riscv: qspinlock: Fixup _Q_PENDING_LOOPS definition
  riscv: stacktrace: fix backtracing through exceptions
  riscv: mm: Fix the out of bound issue of vmemmap address
  cpuidle: riscv-sbi: fix device node release in early exit of for_each_possible_cpu
  riscv: kprobes: Fix incorrect address calculation
  riscv: Fix sleeping in invalid context in die()
  riscv: module: remove relocation_head rel_entry member allocation
  riscv: selftests: Fix warnings pointer masking test
2025-01-10 10:50:30 -08:00
Imran Khan
da30ba227c workqueue: warn if delayed_work is queued to an offlined cpu.
delayed_work submitted to an offlined cpu, will not get executed,
after the specified delay if the cpu remains offline. If the cpu
never comes online the work will never get executed.
checking for online cpu in __queue_delayed_work, does not sound
like a good idea because to do this reliably we need hotplug lock
and since work may be submitted from atomic contexts, we would
have to use cpus_read_trylock. But if trylock fails we would queue
the work on any cpu and this may not be optimal because our intended
cpu might still be online.

Putting a WARN_ON_ONCE for an already offlined cpu, will indicate users
of queue_delayed_work_on, if they are (wrongly) trying to queue
delayed_work on offlined cpu. Also indicate the problem of using
offlined cpu with queue_delayed_work_on, in its description.

Signed-off-by: Imran Khan <imran.f.khan@oracle.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
2025-01-10 08:33:39 -10:00
Lorenzo Stoakes
b709eb872e perf: map pages in advance
We are adjusting struct page to make it smaller, removing unneeded fields
which correctly belong to struct folio.

Two of those fields are page->index and page->mapping. Perf is currently
making use of both of these. This is unnecessary. This patch eliminates
this.

Perf establishes its own internally controlled memory-mapped pages using
vm_ops hooks. The first page in the mapping is the read/write user control
page, and the rest of the mapping consists of read-only pages.

The VMA is backed by kernel memory either from the buddy allocator or
vmalloc depending on configuration. It is intended to be mapped read/write,
but because it has a page_mkwrite() hook, vma_wants_writenotify() indicates
that it should be mapped read-only.

When a write fault occurs, the provided page_mkwrite() hook,
perf_mmap_fault() (doing double duty handing faults as well) uses the
vmf->pgoff field to determine if this is the first page, allowing for the
desired read/write first page, read-only rest mapping.

For this to work the implementation has to carefully work around faulting
logic. When a page is write-faulted, the fault() hook is called first, then
its page_mkwrite() hook is called (to allow for dirty tracking in file
systems).

On fault we set the folio's mapping in perf_mmap_fault(), this is because
when do_page_mkwrite() is subsequently invoked, it treats a missing mapping
as an indicator that the fault should be retried.

We also set the folio's index so, given the folio is being treated as faux
user memory, it correctly references its offset within the VMA.

This explains why the mapping and index fields are used - but it's not
necessary.

We preallocate pages when perf_mmap() is called for the first time via
rb_alloc(), and further allocate auxiliary pages via rb_aux_alloc() as
needed if the mapping requires it.

This allocation is done in the f_ops->mmap() hook provided in perf_mmap(),
and so we can instead simply map all the memory right away here - there's
no point in handling (read) page faults when we don't demand page nor need
to be notified about them (perf does not).

This patch therefore changes this logic to map everything when the mmap()
hook is called, establishing a PFN map. It implements vm_ops->pfn_mkwrite()
to provide the required read/write vs. read-only behaviour, which does not
require the previously implemented workarounds.

While it is not ideal to use a VM_PFNMAP here, doing anything else will
result in the page_mkwrite() hook need to be provided, which requires the
same page->mapping hack this patch seeks to undo.

It will also result in the pages being treated as folios and placed on the
rmap, which really does not make sense for these mappings.

Semantically it makes sense to establish this as some kind of special
mapping, as the pages are managed by perf and are not strictly user pages,
but currently the only means by which we can do so functionally while
maintaining the required R/W and R/O behaviour is a PFN map.

There should be no change to actual functionality as a result of this
change.

Signed-off-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20250103153151.124163-1-lorenzo.stoakes@oracle.com
2025-01-10 18:16:50 +01:00
Kan Liang
6d642735cd perf/x86/intel/uncore: Support more units on Granite Rapids
The same CXL PMONs support is also avaiable on GNR. Apply
spr_uncore_cxlcm and spr_uncore_cxldp to GNR as well.

The other units were broken on early HW samples, so they were ignored in
the early enabling patch. The issue has been fixed and verified on the
later production HW. Add UPI, B2UPI, B2HOT, PCIEX16 and PCIEX8 for GNR.

Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Tested-by: Eric Hu <eric.hu@intel.com>
Link: https://lkml.kernel.org/r/20250108143017.1793781-2-kan.liang@linux.intel.com
2025-01-10 18:16:50 +01:00
Kan Liang
3f710be02e perf/x86/intel/uncore: Clean up func_id
The below warning may be triggered on GNR when the PCIE uncore units are
exposed.

WARNING: CPU: 4 PID: 1 at arch/x86/events/intel/uncore.c:1169 uncore_pci_pmu_register+0x158/0x190

The current uncore driver assumes that all the devices in the same PMU
have the exact same devfn. It's true for the previous platforms. But it
doesn't work for the new PCIE uncore units on GNR.

The assumption doesn't make sense. There is no reason to limit the
devices from the same PMU to the same devfn. Also, the current code just
throws the warning, but still registers the device. The WARN_ON_ONCE()
should be removed.

The func_id is used by the later event_init() to check if a event->pmu
has valid devices. For cpu and mmio uncore PMUs, they are always valid.
For pci uncore PMUs, it's set when the PMU is registered. It can be
replaced by the pmu->registered. Clean up the func_id.

Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Tested-by: Eric Hu <eric.hu@intel.com>
Link: https://lkml.kernel.org/r/20250108143017.1793781-1-kan.liang@linux.intel.com
2025-01-10 18:16:50 +01:00
Jiri Slaby (SUSE)
cb4ccc7034 MAINTAINERS: Add static_call_inline.c to STATIC BRANCH/CALL
Commit 8fd4ddda2f49 ("static_call: Don't make __static_call_return0
static") split static_call.c and created static_call_inline.c. This was
not reflected in MAINTAINERS.

Fix it by changing the MAINTAINERS line to be a glob: static_call*.c.

Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20250109114703.426577-1-jirislaby@kernel.org
2025-01-10 18:16:48 +01:00
Peter Zijlstra
a937f384c9 cleanup, tags: Create tags for the cleanup primitives
Oleg reported that it is hard to find the definition of things like:
__free(argv) without having to do 'git grep "DEFINE_FREE(argv,"'.

Add tag generation for the various macros in cleanup.h.

Notably 'DEFINE_FREE(argv, ...)' will now generate a 'cleanup_argv'
tag, while all the others, eg. 'DEFINE_GUARD(mutex, ...)' will
generate 'class_mutex' like tags.

Reported-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20250106102647.GB20870@noisy.programming.kicks-ass.net
2025-01-10 18:16:48 +01:00
Linus Torvalds
7110f24f9e vfs-6.13-rc7.fixes.2
-----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQRAhzRXHqcMeLMyaSiRxhvAZXjcogUCZ4EhtAAKCRCRxhvAZXjc
 orToAQCIKKS7fk9j8CUSAdRG5mMy7Q++8OEVA+gyyMWuXnBPYwD/ehy+1xBVjCcI
 FBzLadaJSuygjZVCzhVXsE0oRf4A2wg=
 =waDA
 -----END PGP SIGNATURE-----

Merge tag 'vfs-6.13-rc7.fixes.2' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs

Pull vfs fixes from Christian Brauner:
 "afs:

   - Fix the maximum cell name length

   - Fix merge preference rule failure condition

  fuse:

   - Fix fuse_get_user_pages() so it doesn't risk misleading the caller
     to think pages have been allocated when they actually haven't

   - Fix direct-io folio offset and length calculation

  netfs:

   - Fix async direct-io handling

   - Fix read-retry for filesystems that don't provide a
     ->prepare_read() method

  vfs:

   - Prevent truncating 64-bit offsets to 32-bits in iomap

   - Fix memory barrier interactions when polling

   - Remove MNT_ONRB to fix concurrent modification of @mnt->mnt_flags
     leading to MNT_ONRB to not be raised and invalid access to a list
     member"

* tag 'vfs-6.13-rc7.fixes.2' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs:
  poll: kill poll_does_not_wait()
  sock_poll_wait: kill the no longer necessary barrier after poll_wait()
  io_uring_poll: kill the no longer necessary barrier after poll_wait()
  poll_wait: kill the obsolete wait_address check
  poll_wait: add mb() to fix theoretical race between waitqueue_active() and .poll()
  afs: Fix merge preference rule failure condition
  netfs: Fix read-retry for fs with no ->prepare_read()
  netfs: Fix kernel async DIO
  fs: kill MNT_ONRB
  iomap: avoid avoid truncating 64-bit offset to 32 bits
  afs: Fix the maximum cell name length
  fuse: Set *nbytesp=0 in fuse_get_user_pages on allocation failure
  fuse: fix direct io folio offset and length calculation
2025-01-10 09:11:11 -08:00
Linus Torvalds
36eb21945a Bug fixes for 6.13-rc7
* Fix a missing lock while detaching a dquot buffer
 * Fix failure on xfs_update_last_rtgroup_size for !XFS_RT
 
 Signed-off-by: Carlos Maiolino <cem@kernel.org>
 -----BEGIN PGP SIGNATURE-----
 
 iJUEABMJAB0WIQQMHYkcUKcy4GgPe2RGdaER5QtfpgUCZ4Dp7gAKCRBGdaER5Qtf
 pkSUAYDmiFXfA1gHQ+Z5sczWVUQuN5+AFK3ovDXU6YWxHjL2ODwa051Kb41g2b0u
 7iBgp8MBgOyESlP4JRyNAQsFLnUw3cQARuy+FsVAVKLGmw6BzUYnHUsC0uor1lrI
 J/swIZlXiw==
 =vpXm
 -----END PGP SIGNATURE-----

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

Pull xfs fixes from Carlos Maiolino:

 - Fix a missing lock while detaching a dquot buffer

 - Fix failure on xfs_update_last_rtgroup_size for !XFS_RT

* tag 'xfs-fixes-6.13-rc7' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
  xfs: lock dquot buffer before detaching dquot from b_li_list
  xfs: don't return an error from xfs_update_last_rtgroup_size for !XFS_RT
2025-01-10 09:04:27 -08:00
Linus Torvalds
8c8d54116f platform-drivers-x86 for v6.13-5
Fixes and new HW support:
 
  - amd/pmc: Match IRQ1 wakeup disable with the enable on i8042 side
 
  - intel: power-domains: Clearwater Forest support
 
  - intel/pmc: Skip SSRAM setup when no additional devices are present
 
  - ISST: Clearwater Forest support
 
 The following is an automated shortlog grouped by driver:
 
 amd/pmc:
  -  Only disable IRQ1 wakeup where i8042 actually enabled it
 
 intel/pmc:
  -  Fix ioremap() of bad address
 
 intel: power-domains:
  -  Add Clearwater Forest support
 
 ISST:
  -  Add Clearwater Forest to support list
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQSCSUwRdwTNL2MhaBlZrE9hU+XOMQUCZ4EthAAKCRBZrE9hU+XO
 MY3zAPsEwcPckYuK5vuh3Q3S52VpZnJnErzvEPCgoL6gh0mMrgEArnzvAjfoFxYf
 xk1Bp9HpoiZNesNO9vWUO7AEm3gTiww=
 =txVF
 -----END PGP SIGNATURE-----

Merge tag 'platform-drivers-x86-v6.13-5' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86

Pull x86 platform driver fixes from Ilpo Järvinen:
 "Fixes and new HW support:

   - amd/pmc: Match IRQ1 wakeup disable with the enable on i8042 side

   - intel: power-domains: Clearwater Forest support

   - intel/pmc: Skip SSRAM setup when no additional devices are present

   - ISST: Clearwater Forest support"

* tag 'platform-drivers-x86-v6.13-5' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86:
  platform/x86: intel/pmc: Fix ioremap() of bad address
  platform/x86: ISST: Add Clearwater Forest to support list
  platform/x86/intel: power-domains: Add Clearwater Forest support
  platform/x86/amd/pmc: Only disable IRQ1 wakeup where i8042 actually enabled it
2025-01-10 08:14:22 -08:00
Linus Torvalds
b999e7f92e regulator: Fixes for v6.13
A couple of fixes for !REGULATOR and !OF configurations, adding missing
 stubs.
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmeBIlEACgkQJNaLcl1U
 h9C1+Af+IvpAPawwRsgekhmf52h+JGENn03h+xEbAWBvktqdqAHjgotUSJpe407o
 kOgkC2NhyQxdYL2CgXz5JF27BxwvylFjjkq+cog9S0+2Ijzr3WQTamE6JAaG/9Vb
 Fb5YiIqLW++OS/DlMbxOTSXZEY+DVW8g4JuHb/A0wGGDVM7G+d0SW1UavFbvQYCg
 e5aKI/7XrnLBRREBJYDg2P3Tm/439klgSlMo1hAzOLn5epCmoPgUy4eMBWPgTgY/
 mqAsh64BnrPOa0T2Rb0IivLcN3wKOtdNl/phlE/t+svk3etifR3cvy8710iW4y3M
 kOcinhj1SRcbDCPTupssj5tyCoGMMw==
 =fShQ
 -----END PGP SIGNATURE-----

Merge tag 'regulator-fix-v6.13-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator

Pull regulator fixes from Mark Brown:
 "A couple of fixes for !REGULATOR and !OF configurations, adding
  missing stubs"

* tag 'regulator-fix-v6.13-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
  regulator: Move OF_ API declarations/definitions outside CONFIG_REGULATOR
  regulator: Guard of_regulator_bulk_get_all() with CONFIG_OF
2025-01-10 08:05:32 -08:00
Linus Torvalds
9d64558493 gpio fixes for v6.13-rc7
- fix resource leaks in error path in gpio-virtuser (and one consistent
   memory leak triggered on every device removal))
 - fix the use-case of having multiple con_ids in a lookup table in
   gpio-virtuser which has never worked (despite being advertised)
 - don't allow rmdir() on configfs directories when they are in use in
   gpio-sim and gpio-virtuser
 - fix register offsets in gpio-loongson-64
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEFp3rbAvDxGAT0sefEacuoBRx13IFAmeA4KEACgkQEacuoBRx
 13LYrBAAwKM2OSgWdVjLoLDXQFfKXrjLzDjhZi4KBaDTZX2niphuyoKRKh5NBEMo
 7w36v6Kp4YU6xrC4q1msInNXAYKuGrMfjghjQovPXbt1x1/adfSM916B0SyvgopM
 ObpgbiY2//LKgE7lPdMTdrliEJRTJluBKKnYA30DzdtWXyyFEaypH4xT+BgqQa09
 biDJOVJEirHuMVgQxMJKz1hg/OMjyPTSknsUULF2rQIU2vt5XYCVu5QO7xAZ9LZe
 RPsJrRTZWkqYOopY5MPwV/g3yxFCuSC3ogfGP01ADPJGJOfJI5PyWi2OcWNTRctx
 q8ZvVgdfftP1hsBbjfQ90FAQzmmydk29FVNfvu+NJQkAbEi27YpYBG6g6atFE54e
 tJBAXZXgMdFEstaFp5PzD54w7EC302weAiKa9YW6cfdcABE0LrZQmmlkoGiwuwhU
 /HJyfkF+5BDl6zzMYpzfybqCZYlhJstzt4sSrO9Z5wfrfkpxaiD+rz1yZa7HSpnP
 lY7/TDundzarjMtUQfiussfT9EEYEpqsw8qx6LkiGW4JXqv7lujhUa1LaqNkDtkE
 R7bzAAWkijfHtEwPJM1ndKaJLhj5MjLDkLIORCdpar8crelh1chQsHBPDk/vCHXE
 qjNHG3dgZUQUmwD6AOFgbrtRlzxVa+AN2GxnFywAyBcGp7CmSE4=
 =aqRv
 -----END PGP SIGNATURE-----

Merge tag 'gpio-fixes-for-v6.13-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux

Pull gpio fixes from Bartosz Golaszewski:
 "There's one small fix for real HW - gpio-loongson.

  The rest concern two virtual testing drivers in which some issues were
  recently found and addressed:

   - fix resource leaks in error path in gpio-virtuser (and one
     consistent memory leak triggered on every device removal))

   - fix the use-case of having multiple con_ids in a lookup table in
     gpio-virtuser which has never worked (despite being advertised)

   - don't allow rmdir() on configfs directories when they are in use in
     gpio-sim and gpio-virtuser

   - fix register offsets in gpio-loongson-64"

* tag 'gpio-fixes-for-v6.13-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux:
  gpio: loongson: Fix Loongson-2K2000 ACPI GPIO register offset
  gpio: sim: lock up configfs that an instantiated device depends on
  gpio: virtuser: lock up configfs that an instantiated device depends on
  gpio: virtuser: fix handling of multiple conn_ids in lookup table
  gpio: virtuser: fix missing lookup table cleanups
2025-01-10 07:59:47 -08:00
Christian Brauner
1623bc27a8
Merge branch 'vfs-6.14.poll' into vfs.fixes
Bring in the fixes for __pollwait() and waitqueue_active() interactions.

Signed-off-by: Christian Brauner <brauner@kernel.org>
2025-01-10 12:01:21 +01:00
Christian Brauner
67cd2e23c0
Merge patch series "poll_wait: add mb() to fix theoretical race between waitqueue_active() and .poll()"
Oleg Nesterov <oleg@redhat.com> says:

The waitqueue_active() helper can only be used if both waker and waiter
have memory barriers that pair with each other. But __pollwait() is
broken in this respect. Fix it.

* patches from https://lore.kernel.org/r/20250107162649.GA18886@redhat.com:
  poll: kill poll_does_not_wait()
  sock_poll_wait: kill the no longer necessary barrier after poll_wait()
  io_uring_poll: kill the no longer necessary barrier after poll_wait()
  poll_wait: kill the obsolete wait_address check
  poll_wait: add mb() to fix theoretical race between waitqueue_active() and .poll()

Link: https://lore.kernel.org/r/20250107162649.GA18886@redhat.com
Signed-off-by: Christian Brauner <brauner@kernel.org>
2025-01-10 11:59:45 +01:00
Oleg Nesterov
f005bf18a5
poll: kill poll_does_not_wait()
It no longer has users.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Link: https://lore.kernel.org/r/20250107162743.GA18947@redhat.com
Signed-off-by: Christian Brauner <brauner@kernel.org>
2025-01-10 11:59:00 +01:00
Oleg Nesterov
b2849867b3
sock_poll_wait: kill the no longer necessary barrier after poll_wait()
Now that poll_wait() provides a full barrier we can remove smp_mb() from
sock_poll_wait().

Also, the poll_does_not_wait() check before poll_wait() just adds the
unnecessary confusion, kill it. poll_wait() does the same "p && p->_qproc"
check.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Link: https://lore.kernel.org/r/20250107162736.GA18944@redhat.com
Signed-off-by: Christian Brauner <brauner@kernel.org>
2025-01-10 11:59:00 +01:00
Oleg Nesterov
4e15fa8305
io_uring_poll: kill the no longer necessary barrier after poll_wait()
Now that poll_wait() provides a full barrier we can remove smp_rmb() from
io_uring_poll().

In fact I don't think smp_rmb() was correct, it can't serialize LOADs and
STOREs.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Link: https://lore.kernel.org/r/20250107162730.GA18940@redhat.com
Signed-off-by: Christian Brauner <brauner@kernel.org>
2025-01-10 11:58:59 +01:00
Oleg Nesterov
10b02a2cfe
poll_wait: kill the obsolete wait_address check
This check is historical and no longer needed, wait_address is never NULL.
These days we rely on the poll_table->_qproc check. NULL if select/poll
is not going to sleep, or it already has a data to report, or all waiters
have already been registered after the 1st iteration.

However, poll_table *p can be NULL, see p9_fd_poll() for example, so we
can't remove the "p != NULL" check.

Link: https://lore.kernel.org/all/20250106180325.GF7233@redhat.com/
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Link: https://lore.kernel.org/r/20250107162724.GA18926@redhat.com
Signed-off-by: Christian Brauner <brauner@kernel.org>
2025-01-10 11:58:59 +01:00
Oleg Nesterov
cacd9ae4bf
poll_wait: add mb() to fix theoretical race between waitqueue_active() and .poll()
As the comment above waitqueue_active() explains, it can only be used
if both waker and waiter have mb()'s that pair with each other. However
__pollwait() is broken in this respect.

This is not pipe-specific, but let's look at pipe_poll() for example:

	poll_wait(...); // -> __pollwait() -> add_wait_queue()

	LOAD(pipe->head);
	LOAD(pipe->head);

In theory these LOAD()'s can leak into the critical section inside
add_wait_queue() and can happen before list_add(entry, wq_head), in this
case pipe_poll() can race with wakeup_pipe_readers/writers which do

	smp_mb();
	if (waitqueue_active(wq_head))
		wake_up_interruptible(wq_head);

There are more __pollwait()-like functions (grep init_poll_funcptr), and
it seems that at least ep_ptable_queue_proc() has the same problem, so the
patch adds smp_mb() into poll_wait().

Link: https://lore.kernel.org/all/20250102163320.GA17691@redhat.com/
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Link: https://lore.kernel.org/r/20250107162717.GA18922@redhat.com
Signed-off-by: Christian Brauner <brauner@kernel.org>
2025-01-10 11:58:59 +01:00
Darrick J. Wong
111d36d627 xfs: lock dquot buffer before detaching dquot from b_li_list
We have to lock the buffer before we can delete the dquot log item from
the buffer's log item list.

Cc: stable@vger.kernel.org # v6.13-rc3
Fixes: acc8f8628c3737 ("xfs: attach dquot buffer to dquot log item buffer")
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
2025-01-10 10:12:48 +01:00
Jiri Olsa
b583ef82b6 uprobes: Fix race in uprobe_free_utask
Max Makarov reported kernel panic [1] in perf user callchain code.

The reason for that is the race between uprobe_free_utask and bpf
profiler code doing the perf user stack unwind and is triggered
within uprobe_free_utask function:
  - after current->utask is freed and
  - before current->utask is set to NULL

 general protection fault, probably for non-canonical address 0x9e759c37ee555c76: 0000 [#1] SMP PTI
 RIP: 0010:is_uprobe_at_func_entry+0x28/0x80
 ...
  ? die_addr+0x36/0x90
  ? exc_general_protection+0x217/0x420
  ? asm_exc_general_protection+0x26/0x30
  ? is_uprobe_at_func_entry+0x28/0x80
  perf_callchain_user+0x20a/0x360
  get_perf_callchain+0x147/0x1d0
  bpf_get_stackid+0x60/0x90
  bpf_prog_9aac297fb833e2f5_do_perf_event+0x434/0x53b
  ? __smp_call_single_queue+0xad/0x120
  bpf_overflow_handler+0x75/0x110
  ...
  asm_sysvec_apic_timer_interrupt+0x1a/0x20
 RIP: 0010:__kmem_cache_free+0x1cb/0x350
 ...
  ? uprobe_free_utask+0x62/0x80
  ? acct_collect+0x4c/0x220
  uprobe_free_utask+0x62/0x80
  mm_release+0x12/0xb0
  do_exit+0x26b/0xaa0
  __x64_sys_exit+0x1b/0x20
  do_syscall_64+0x5a/0x80

It can be easily reproduced by running following commands in
separate terminals:

  # while :; do bpftrace -e 'uprobe:/bin/ls:_start  { printf("hit\n"); }' -c ls; done
  # bpftrace -e 'profile:hz:100000 { @[ustack()] = count(); }'

Fixing this by making sure current->utask pointer is set to NULL
before we start to release the utask object.

[1] https://github.com/grafana/pyroscope/issues/3673

Fixes: cfa7f3d2c526 ("perf,x86: avoid missing caller address in stack traces captured in uprobe")
Reported-by: Max Makarov <maxpain@linux.com>
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/r/20250109141440.2692173-1-jolsa@kernel.org
2025-01-10 09:28:01 +01:00
Dave Airlie
fddb4fd91a Mediatek DRM Fixes - 20250104
1. Revert "drm/mediatek: dsi: Correct calculation formula of PHY Timing"
 2. Set private->all_drm_private[i]->drm to NULL if mtk_drm_bind returns err
 3. Move mtk_crtc_finish_page_flip() to ddp_cmdq_cb()
 4. Only touch DISP_REG_OVL_PITCH_MSB if AFBC is supported
 5. Add support for 180-degree rotation in the display driver
 6. Stop selecting foreign drivers
 7. Revert "drm/mediatek: Switch to for_each_child_of_node_scoped()"
 8. Fix YCbCr422 color format issue for DP
 9. Fix mode valid issue for dp
 10. dp: Reference common DAI properties
 11. dsi: Add registers to pdata to fix MT8186/MT8188
 12. Remove unneeded semicolon
 13. Add return value check when reading DPCD
 14. Initialize pointer in mtk_drm_of_ddp_path_build_one()
 -----BEGIN PGP SIGNATURE-----
 
 iQJMBAABCgA2FiEEACwLKSDmq+9RDv5P4cpzo8lZTiQFAmd5KnMYHGNodW5rdWFu
 Zy5odUBrZXJuZWwub3JnAAoJEOHKc6PJWU4knsAP/3/WLT3sNSvlrT2t4AwMwrgt
 jSFV1jtiDpEaPF8+tlg0BdE1CTqkCQOCOZMBKYvsUEifAT7MDBdfIAWBMZbpRRh/
 ptvHw1vBEBQpAkmo2hPJfK+J1BDncpqh65A+C1TFiBG5XKv9Zp5QXShBfZsdmqYO
 zfWKJ4pfUnvUgwM0RQhdRws5S45mbDqGtENiL/8MZXyouOyawqzt6hDSqSglJ+h9
 NaWD+607dmAzkMYaGe35gvTsFpxV/8euNWxskbciH/vm33mBm95hsymQOKP7spuq
 XmKq+mbRa+mZgBGznT+MdyGwHBN0h/yrv1mHUDoi5O5MFQJ4kDuRB/c5bVG1FAoN
 4AQLEv6TXhAMZWlf3LOGGVgwEO8mG+7mNF7dXMckMgNCQAZVKfaPIyoFgHn29+6g
 Dnom/LIOQzP65x0ta5ihCaH//6e7QCsVOWvQnqfn3JUlwtYv2NTjYu6l8+RO+kFS
 2/WP4hOpJlqjESiEMoRSpbriYN3dCI64OY4mNB7pr0ea8YtPehE09uzvHSmfDbGe
 GT+9lWsYblTFTkZXJdthUC39v0grJh4QTKBWNldAaqGsS3hItsuDHOrGlLFJwtSx
 9tXlQR27XOJVt0hfRKJMiONW2xXW2sNUnlt3kA7qPmH+zjdeo3vKxlCBYzISKepI
 kg4CeI6clR9ocZkTPa/0
 =bc7g
 -----END PGP SIGNATURE-----

Merge tag 'mediatek-drm-fixes-20250104' of https://git.kernel.org/pub/scm/linux/kernel/git/chunkuang.hu/linux into drm-fixes

Mediatek DRM Fixes - 20250104

1. Revert "drm/mediatek: dsi: Correct calculation formula of PHY Timing"
2. Set private->all_drm_private[i]->drm to NULL if mtk_drm_bind returns err
3. Move mtk_crtc_finish_page_flip() to ddp_cmdq_cb()
4. Only touch DISP_REG_OVL_PITCH_MSB if AFBC is supported
5. Add support for 180-degree rotation in the display driver
6. Stop selecting foreign drivers
7. Revert "drm/mediatek: Switch to for_each_child_of_node_scoped()"
8. Fix YCbCr422 color format issue for DP
9. Fix mode valid issue for dp
10. dp: Reference common DAI properties
11. dsi: Add registers to pdata to fix MT8186/MT8188
12. Remove unneeded semicolon
13. Add return value check when reading DPCD
14. Initialize pointer in mtk_drm_of_ddp_path_build_one()

Signed-off-by: Dave Airlie <airlied@redhat.com>

From: Chun-Kuang Hu <chunkuang.hu@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20250104124227.45505-1-chunkuang.hu@kernel.org
2025-01-10 16:57:59 +10:00
Dave Airlie
85bf89f268 Driver Changes:
- Avoid a NULL ptr deref when wedging (Lucas)
 - Fix power gate sequence on DG1 (Rodrigo)
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQRskUM7w1oG5rx2IZO4FpNVCsYGvwUCZ4AcLAAKCRC4FpNVCsYG
 v4nxAP9Ew4IQ2cXGQmw/e0tVsjFUqUviWOz4Jk67hsWXaAfDkAD+K8AfR6zQ5smL
 cBOE2qljeAinqp/GJHuuNW/1Z6yDlw8=
 =7rOK
 -----END PGP SIGNATURE-----

Merge tag 'drm-xe-fixes-2025-01-09' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-fixes

Driver Changes:
- Avoid a NULL ptr deref when wedging (Lucas)
- Fix power gate sequence on DG1 (Rodrigo)

Signed-off-by: Dave Airlie <airlied@redhat.com>

From: Thomas Hellstrom <thomas.hellstrom@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/Z4AcqP3Io_r0pEsR@fedora
2025-01-10 16:43:32 +10:00
Dave Airlie
66d4709abc amd-drm-fixes-6.13-2025-01-09:
amdgpu:
 - Display interrupt fixes
 - Fix display max surface mismatches
 - Fix divide error in DM plane scale calcs
 - Display divide by 0 checks in dml helpers
 - SMU 13 AD/DC interrrupt handling fix
 - Fix locking around buddy trim handling
 
 amdkfd:
 - Fix page fault with shader debugger enabled
 - Fix eviction fence wq handling
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQQgO5Idg2tXNTSZAr293/aFa7yZ2AUCZ3/7hAAKCRC93/aFa7yZ
 2B9TAP9dR33yUXRVLCfpk9SsuS9Vv33j6u21dfqI2nJm13yc+QEAt4yCdYcJc4PX
 SOVFKcetIHB3H/q+mGnD1Y6QNlIbeQE=
 =HjFg
 -----END PGP SIGNATURE-----

Merge tag 'amd-drm-fixes-6.13-2025-01-09' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes

amd-drm-fixes-6.13-2025-01-09:

amdgpu:
- Display interrupt fixes
- Fix display max surface mismatches
- Fix divide error in DM plane scale calcs
- Display divide by 0 checks in dml helpers
- SMU 13 AD/DC interrrupt handling fix
- Fix locking around buddy trim handling

amdkfd:
- Fix page fault with shader debugger enabled
- Fix eviction fence wq handling

Signed-off-by: Dave Airlie <airlied@redhat.com>

From: Alex Deucher <alexander.deucher@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250109164236.477295-1-alexander.deucher@amd.com
2025-01-10 16:12:28 +10:00
Dave Airlie
7ac9f3366f Merge tag 'drm-intel-fixes-2025-01-08' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-fixes
- Revert "drm/i915/hdcp: Don't enable HDCP1.4 directly from check_link" [hdcp] (Suraj Kandpal)

Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Tvrtko Ursulin <tursulin@igalia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/Z37BPchEzY0ovIqF@linux
2025-01-10 14:50:21 +10:00
Linus Torvalds
2144da2558 four ksmbd server fixes, most also for stable
-----BEGIN PGP SIGNATURE-----
 
 iQGzBAABCgAdFiEE6fsu8pdIjtWE/DpLiiy9cAdyT1EFAmeAJWIACgkQiiy9cAdy
 T1FPvQv/WJUcN5+1Kt/JyrijXYBNannwFsOZuQDielvTZduPdXYQqe+zMDcIaF3I
 wHD6/3+yRk6pXRD8ETtmdsV0GYQ8n1iTCN7pwKRTSeu5qv1ZFna8ImfzofEvrAsU
 Hywod8nXPF8IWCRB15qhAUIphI07mfBcFOQk84OsnM3UO2Lwc89A7siwaIwjQiWz
 +7CN1fuSfH9VqR5P5BtOGr8ZgMYSTQ9Tx4WyRH8XKWuznUeQdcrQfxO/NGyvdX+2
 dfkKKWhMGJNR0Xrwg+5ocTCm/e+oVCTyRi07y9b3M+4n2DKzcMaqS5XKNZDqOsb9
 L7GIBOM5tcyB6zBjH9NO+2fTwhoKQWt3wBHJV7ZWpcthCONZhPGHShNFJfdSmoAS
 3WbDE4a3KOGsksTPG0JzHlUxGSW+bx4Bo5Thofk+bxxYsaY6JAQHnmZG36TQ8YTm
 1FaI2aRiN9WYs7P6/7Di2BgznixcrNdjZLewtQbjxg/eybVbikB/I+dKeoo7C+ch
 ida0+Fh6
 =cKlJ
 -----END PGP SIGNATURE-----

Merge tag '6.13-rc6-ksmbd-server-fixes' of git://git.samba.org/ksmbd

Pull smb server fixes from Steve French:
 "Four ksmbd server fixes, most also for stable:

   - fix for reporting special file type more accurately when POSIX
     extensions negotiated

   - minor cleanup

   - fix possible incorrect creation path when dirname is not present.
     In some cases, Windows apps create files without checking if they
     exist.

   - fix potential NULL pointer dereference sending interim response"

* tag '6.13-rc6-ksmbd-server-fixes' of git://git.samba.org/ksmbd:
  ksmbd: Implement new SMB3 POSIX type
  ksmbd: fix unexpectedly changed path in ksmbd_vfs_kern_path_locked
  ksmbd: Remove unneeded if check in ksmbd_rdma_capable_netdev()
  ksmbd: fix a missing return value check bug
2025-01-09 18:19:59 -08:00
Linus Torvalds
c77cd47cee Including fixes from netfilter, Bluetooth and WPAN.
No outstanding fixes / investigations at this time.
 
 Current release - new code bugs:
 
  - eth: fbnic: revert HWMON support, it doesn't work at all
    and revert is similar size as the fixes
 
 Previous releases - regressions:
 
  - tcp: allow a connection when sk_max_ack_backlog is zero
 
  - tls: fix tls_sw_sendmsg error handling
 
 Previous releases - always broken:
 
  - netdev netlink family:
    - prevent accessing NAPI instances from another namespace
    - don't dump Tx and uninitialized NAPIs
 
  - net: sysctl: avoid using current->nsproxy, fix null-deref if task
    is exiting and stick to opener's netns
 
  - sched: sch_cake: add bounds checks to host bulk flow fairness counts
 
 Misc:
 
  - annual cleanup of inactive maintainers
 
 Signed-off-by: Jakub Kicinski <kuba@kernel.org>
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE6jPA+I1ugmIBA4hXMUZtbf5SIrsFAmeAErUACgkQMUZtbf5S
 IrugZBAAs19Ez9VcP9LvqpOxcgHv7xJB4PMsQW8Hu3EWSjwwzrFpiJ4EaLCqamE4
 gAAtkwTcHgDZDhUHL5IxxpsmkB9BVPLh8JPIro4s7orBSbV6y4DDDUU4RLWnCB7v
 z6x1t2WqRbGc4L12P5tVcyxfBnYatlNmOOLcc7PpXBacJrRiMYJ2pvYhYcuCRLLc
 IHmS5viMTZF4v2qVhU3p4/3ZzUH+9H4v7RnZU0j4Jd8sKSIcZQFU3aH9bT9ZYDxd
 DUWcIeUNMcQ6K2iFJGK4Cj9PQximE5fju8YT9JYyZ2hu+cJ8tK8bjoJx/7Y7VUUT
 5iuwIH5SVjMgU1lXfKfp279Q4DZkxrqxasQkHlk8Ga/WI3GNbp0DJmkW8Ck2v6hJ
 ADRB0/Mq1V6RU2YBL7VRPzEiSpAnulXiiFTaVoRmIvZTVNU/QScFzROIvj65WZAQ
 D3UK8dxMNltdQ9nKdgVHs3KoGvbUV1Om4jkhBFl1VPAJxvpGAZk4BI6D63LmeCws
 oxvW84f2OoAexdIwOlRyllQ21Xvj9RATLBOX4MN3WTOxSQ62UrSbtoOm2CTbpfOW
 uUmV645l0nAB3rEyYVi2Tr8ArBRwi09Phjkcss/PJ9RVCJfm6aL/LBrmsn0HngJW
 +KjRANUyMiD21+uc95SGduKE6L6vUtl/qncNmnMOt+M4Z9gcTZ4=
 =ABI6
 -----END PGP SIGNATURE-----

Merge tag 'net-6.13-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net

Pull networking fixes from Jakub Kicinski:
 "Including fixes from netfilter, Bluetooth and WPAN.

  No outstanding fixes / investigations at this time.

  Current release - new code bugs:

   - eth: fbnic: revert HWMON support, it doesn't work at all and revert
     is similar size as the fixes

  Previous releases - regressions:

   - tcp: allow a connection when sk_max_ack_backlog is zero

   - tls: fix tls_sw_sendmsg error handling

  Previous releases - always broken:

   - netdev netlink family:
       - prevent accessing NAPI instances from another namespace
       - don't dump Tx and uninitialized NAPIs

   - net: sysctl: avoid using current->nsproxy, fix null-deref if task
     is exiting and stick to opener's netns

   - sched: sch_cake: add bounds checks to host bulk flow fairness
     counts

  Misc:

   - annual cleanup of inactive maintainers"

* tag 'net-6.13-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (57 commits)
  rds: sysctl: rds_tcp_{rcv,snd}buf: avoid using current->nsproxy
  sctp: sysctl: plpmtud_probe_interval: avoid using current->nsproxy
  sctp: sysctl: udp_port: avoid using current->nsproxy
  sctp: sysctl: auth_enable: avoid using current->nsproxy
  sctp: sysctl: rto_min/max: avoid using current->nsproxy
  sctp: sysctl: cookie_hmac_alg: avoid using current->nsproxy
  mptcp: sysctl: blackhole timeout: avoid using current->nsproxy
  mptcp: sysctl: sched: avoid using current->nsproxy
  mptcp: sysctl: avail sched: remove write access
  MAINTAINERS: remove Lars Povlsen from Microchip Sparx5 SoC
  MAINTAINERS: remove Noam Dagan from AMAZON ETHERNET
  MAINTAINERS: remove Ying Xue from TIPC
  MAINTAINERS: remove Mark Lee from MediaTek Ethernet
  MAINTAINERS: mark stmmac ethernet as an Orphan
  MAINTAINERS: remove Andy Gospodarek from bonding
  MAINTAINERS: update maintainers for Microchip LAN78xx
  MAINTAINERS: mark Synopsys DW XPCS as Orphan
  net/mlx5: Fix variable not being completed when function returns
  rtase: Fix a check for error in rtase_alloc_msix()
  net: stmmac: dwmac-tegra: Read iommu stream id from device tree
  ...
2025-01-09 12:40:58 -08:00
Linus Torvalds
643e2e259c for-6.13-rc6-tag
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEE8rQSAMVO+zA4DBdWxWXV+ddtWDsFAmd/7dYACgkQxWXV+ddt
 WDuX7Q//UkrNtVh7UEiyNyujLjjvczfMXhpD1fAdVU0zMon6ux3RQ3JSs3xvAGrb
 jFFa9c9+Db8/kWzdWp5n1u9Q/+sy4XBaeKGuzPRLPPGT1yXfKEa4mrm1sCrWRJoS
 c8b07Kfuepldcim80x8WSa2qhr5gmDmSZBgvjKt63ppp5/jaNKCZg+d3BhwqhHbI
 XA9JjIk9j0ZsAYauYflQTwgUpkyvXV1a9YyeKv4U6mYA1r+rXl2aolcndNkS1U/D
 dDGuiDpOjKtIUecRi4YbOkt2zvwREDdQCbRV/QLsZajHxqeHV5QH0TBI/URikx2z
 1shwYMzLfLtQIW0+PhHCGKiftMIb4NliyMUxxviPdN78nCFmocrR/ZkPx+a5M9Io
 d7oqwS/8U3pFGeB4bAey8WvMzQI5BtCCYJY+3HreNTDkiubqcRtTCtJ9dNDTAMFH
 FMZ6DA8wTsqSA2e9Q8OwKNjvMCLAKevXn/4wiJi5b75Fiu5ZB/imTfJ+geEMUZCR
 3uq9oybFCKti7lestM0z06K19AKtmPWLoq5YJ1Hg69DsafS2aR3CBeYOi7uQ+56D
 7uwAFjVrGPrxOgGkCohYpPLCUikJ0y3Nl/k5fnybsnLPWr0cenLroUeP7Rao4fFU
 8hLzMSv3ImL+Io0RjH0XBAM8YLN+xO3CLYCv6D8d42AlQTgAIVw=
 =QYC1
 -----END PGP SIGNATURE-----

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

Pull btrfs fixes from David Sterba:
 "A few more fixes.

  Besides the one-liners in Btrfs there's fix to the io_uring and
  encoded read integration (added in this development cycle). The update
  to io_uring provides more space for the ongoing command that is then
  used in Btrfs to handle some cases.

   - io_uring and encoded read:
       - provide stable storage for io_uring command data
       - make a copy of encoded read ioctl call, reuse that in case the
         call would block and will be called again

   - properly initialize zlib context for hardware compression on s390

   - fix max extent size calculation on filesystems with non-zoned
     devices

   - fix crash in scrub on crafted image due to invalid extent tree"

* tag 'for-6.13-rc6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
  btrfs: zlib: fix avail_in bytes for s390 zlib HW compression path
  btrfs: zoned: calculate max_extent_size properly on non-zoned setup
  btrfs: avoid NULL pointer dereference if no valid extent tree
  btrfs: don't read from userspace twice in btrfs_uring_encoded_read()
  io_uring: add io_uring_cmd_get_async_data helper
  io_uring/cmd: add per-op data to struct io_uring_cmd_data
  io_uring/cmd: rename struct uring_cache to io_uring_cmd_data
2025-01-09 10:16:45 -08:00
Palmer Dabbelt
6f6ecce59d
Merge patch series "SBI PMU event related fixes"
Atish Patra <atishp@rivosinc.com> says:

Here are two minor improvement/fixes in the PMU event path. The first patch
was part of the series[1]. The 2nd patch was suggested during the series
review.

While the series can only be merged once SBI v3.0 is frozen, these two
patches can be independent of SBI v3.0 and can be merged sooner. Hence, these
two patches are sent as a separate series.

* b4-shazam-merge:
  drivers/perf: riscv: Do not allow invalid raw event config
  drivers/perf: riscv: Return error for default case
  drivers/perf: riscv: Fix Platform firmware event data

Link: https://lore.kernel.org/r/20241212-pmu_event_fixes_v2-v2-0-813e8a4f5962@rivosinc.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
2025-01-09 09:37:12 -08:00
Atish Patra
3aff4cdbe5
drivers/perf: riscv: Do not allow invalid raw event config
The SBI specification allows only lower 48bits of hpmeventX to be
configured via SBI PMU. Currently, the driver masks of the higher
bits but doesn't return an error. This will lead to an additional
SBI call for config matching which should return for an invalid
event error in most of the cases.

However, if a platform(i.e Rocket and sifive cores) implements a
bitmap of all bits in the event encoding this will lead to an
incorrect event being programmed leading to user confusion.

Report the error to the user if higher bits are set during the
event mapping itself to avoid the confusion and save an additional
SBI call.

Suggested-by: Samuel Holland <samuel.holland@sifive.com>
Signed-off-by: Atish Patra <atishp@rivosinc.com>
Link: https://lore.kernel.org/r/20241212-pmu_event_fixes_v2-v2-3-813e8a4f5962@rivosinc.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
2025-01-09 09:37:09 -08:00
Atish Patra
2c206cdede
drivers/perf: riscv: Return error for default case
If the upper two bits has an invalid valid (0x1), the event mapping
is not reliable as it returns an uninitialized variable.

Return appropriate value for the default case.

Fixes: f0c9363db2dd ("perf/riscv-sbi: Add platform specific firmware event handling")

Signed-off-by: Atish Patra <atishp@rivosinc.com>
Link: https://lore.kernel.org/r/20241212-pmu_event_fixes_v2-v2-2-813e8a4f5962@rivosinc.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
2025-01-09 09:37:09 -08:00
Atish Patra
fc58db9aeb
drivers/perf: riscv: Fix Platform firmware event data
Platform firmware event data field is allowed to be 62 bits for
Linux as uppper most two bits are reserved to indicate SBI fw or
platform specific firmware events.
However, the event data field is masked as per the hardware raw
event mask which is not correct.

Fix the platform firmware event data field with proper mask.

Fixes: f0c9363db2dd ("perf/riscv-sbi: Add platform specific firmware event handling")

Signed-off-by: Atish Patra <atishp@rivosinc.com>
Link: https://lore.kernel.org/r/20241212-pmu_event_fixes_v2-v2-1-813e8a4f5962@rivosinc.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
2025-01-09 09:37:08 -08:00
Palmer Dabbelt
89726fb01a
Merge patch series "selftest: fix riscv/vector tests"
This contains a pair of fixes for the vector self tests, which avoids
some warnings and provides proper status messages.

* b4-shazam-merge:
  tools: selftests: riscv: Add test count for vstate_prctl
  tools: selftests: riscv: Add pass message for v_initval_nolibc

Link: https://lore.kernel.org/r/20241220091730.28006-1-yongxuan.wang@sifive.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
2025-01-09 09:35:42 -08:00