Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v6.9-rc3-scx1 #21

Merged
merged 991 commits into from
Apr 12, 2024
Merged

v6.9-rc3-scx1 #21

merged 991 commits into from
Apr 12, 2024
This pull request is big! We’re only showing the most recent 250 commits.

Commits on Apr 2, 2024

  1. ASoC: codecs: ES8326: Solve a headphone detection issue after suspend…

    … and resume
    
    We got a headphone detection issue after suspend and resume.
    And we fixed it by modifying the configuration at es8326_suspend
    and invoke es8326_irq at es8326_resume.
    
    Signed-off-by: Zhang Yi <[email protected]>
    Link: https://msgid.link/r/[email protected]
    Signed-off-by: Mark Brown <[email protected]>
    Michael-zy2000 authored and broonie committed Apr 2, 2024
    Configuration menu
    Copy the full SHA
    6e5f5bf View commit details
    Browse the repository at this point in the history
  2. ASoC: codecs: ES8326: Removing the control of ADC_SCALE

    We removed the configuration of ES8326_ADC_SCALE
    in es8326_jack_detect_handler because user changed
    the configuration by snd_controls
    
    Signed-off-by: Zhang Yi <[email protected]>
    Link: https://msgid.link/r/[email protected]
    Signed-off-by: Mark Brown <[email protected]>
    Michael-zy2000 authored and broonie committed Apr 2, 2024
    Configuration menu
    Copy the full SHA
    fec9c7f View commit details
    Browse the repository at this point in the history
  3. ASoC: Intel: avs: boards: Add modules description

    Modpost warns about missing module description, add it.
    
    Reviewed-by: Cezary Rojewski <[email protected]>
    Signed-off-by: Amadeusz Sławiński <[email protected]>
    Link: https://msgid.link/r/[email protected]
    Signed-off-by: Mark Brown <[email protected]>
    Amadeusz Sławiński authored and broonie committed Apr 2, 2024
    Configuration menu
    Copy the full SHA
    d619b0b View commit details
    Browse the repository at this point in the history
  4. nvme-multipath: don't inherit LBA-related fields for the multipath node

    Linux 6.9 made the nvme multipath nodes not properly pick up changes when
    the LBA size goes smaller after an nvme format.  This is because we now
    try to inherit the queue settings for the multipath node entirely from
    the individual paths.  That is the right thing to do for I/O size
    limitations, which make up most of the queue limits, but it is wrong for
    changes to the namespace configuration, where we do want to pick up the
    new format, which will eventually show up on all paths once they are
    re-queried.
    
    Fix this by not inheriting the block size and related fields and always
    for updating them.
    
    Fixes: 8f03cfa ("nvme: don't use nvme_update_disk_info for the multipath disk")
    Reported-by: Nilay Shroff <[email protected]>
    Tested-by: Nilay Shroff <[email protected]>
    Signed-off-by: Christoph Hellwig <[email protected]>
    Signed-off-by: Keith Busch <[email protected]>
    Christoph Hellwig authored and keithbusch committed Apr 2, 2024
    Configuration menu
    Copy the full SHA
    ac229a2 View commit details
    Browse the repository at this point in the history
  5. smb: client: guarantee refcounted children from parent session

    Avoid potential use-after-free bugs when walking DFS referrals,
    mounting and performing DFS failover by ensuring that all children
    from parent @tcon->ses are also refcounted.  They're all needed across
    the entire DFS mount.  Get rid of @tcon->dfs_ses_list while we're at
    it, too.
    
    Cc: [email protected] # 6.4+
    Reported-by: kernel test robot <[email protected]>
    Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
    Signed-off-by: Paulo Alcantara (Red Hat) <[email protected]>
    Signed-off-by: Steve French <[email protected]>
    pcacjr authored and Steve French committed Apr 2, 2024
    Configuration menu
    Copy the full SHA
    062a7f0 View commit details
    Browse the repository at this point in the history
  6. smb: client: refresh referral without acquiring refpath_lock

    Avoid refreshing DFS referral with refpath_lock acquired as the I/O
    could block for a while due to a potentially disconnected or slow DFS
    root server and then making other threads - that use same @server and
    don't require a DFS root server - unable to make any progress.
    
    Cc: [email protected] # 6.4+
    Signed-off-by: Paulo Alcantara (Red Hat) <[email protected]>
    Signed-off-by: Steve French <[email protected]>
    pcacjr authored and Steve French committed Apr 2, 2024
    Configuration menu
    Copy the full SHA
    0a05ad2 View commit details
    Browse the repository at this point in the history
  7. smb: client: handle DFS tcons in cifs_construct_tcon()

    The tcons created by cifs_construct_tcon() on multiuser mounts must
    also be able to failover and refresh DFS referrals, so set the
    appropriate fields in order to get a full DFS tcon.  They could be
    shared among different superblocks later, too.
    
    Cc: [email protected] # 6.4+
    Reported-by: kernel test robot <[email protected]>
    Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
    Signed-off-by: Paulo Alcantara (Red Hat) <[email protected]>
    Signed-off-by: Steve French <[email protected]>
    pcacjr authored and Steve French committed Apr 2, 2024
    Configuration menu
    Copy the full SHA
    4a5ba0e View commit details
    Browse the repository at this point in the history
  8. smb: client: serialise cifs_construct_tcon() with cifs_mount_mutex

    Serialise cifs_construct_tcon() with cifs_mount_mutex to handle
    parallel mounts that may end up reusing the session and tcon created
    by it.
    
    Cc: [email protected] # 6.4+
    Signed-off-by: Paulo Alcantara (Red Hat) <[email protected]>
    Signed-off-by: Steve French <[email protected]>
    pcacjr authored and Steve French committed Apr 2, 2024
    Configuration menu
    Copy the full SHA
    93cee45 View commit details
    Browse the repository at this point in the history
  9. nvme: split nvme_update_zone_info

    nvme_update_zone_info does (admin queue) I/O to the device and can fail.
    We fail to abort the queue limits update if that happen, but really
    should avoid with the frozen I/O queue as much as possible anyway.
    
    Split the logic into a helper to query the information that can be
    called on an unfrozen queue and one to apply it to the queue limits.
    
    Fixes: 9b130d681443 ("nvme: use the atomic queue limits update API")
    Reported-by: Kanchan Joshi <[email protected]>
    Signed-off-by: Christoph Hellwig <[email protected]>
    Reviewed-by: Kanchan Joshi <[email protected]>
    Signed-off-by: Keith Busch <[email protected]>
    Christoph Hellwig authored and keithbusch committed Apr 2, 2024
    Configuration menu
    Copy the full SHA
    c85c9ab View commit details
    Browse the repository at this point in the history
  10. Merge tag 'kvmarm-fixes-6.9-1' of git://git.kernel.org/pub/scm/linux/…

    …kernel/git/kvmarm/kvmarm into HEAD
    
    KVM/arm64 fixes for 6.9, part #1
    
     - Ensure perf events programmed to count during guest execution
       are actually enabled before entering the guest in the nVHE
       configuration.
    
     - Restore out-of-range handler for stage-2 translation faults.
    
     - Several fixes to stage-2 TLB invalidations to avoid stale
       translations, possibly including partial walk caches.
    
     - Fix early handling of architectural VHE-only systems to ensure E2H is
       appropriately set.
    
     - Correct a format specifier warning in the arch_timer selftest.
    
     - Make the KVM banner message correctly handle all of the possible
       configurations.
    bonzini committed Apr 2, 2024
    Configuration menu
    Copy the full SHA
    52b761b View commit details
    Browse the repository at this point in the history
  11. Merge tag 'kvm-riscv-fixes-6.9-1' of https://github.com/kvm-riscv/linux

    … into HEAD
    
    KVM/riscv fixes for 6.9, take #1
    
    - Fix spelling mistake in arch_timer selftest
    - Remove redundant semicolon in num_isa_ext_regs()
    - Fix APLIC setipnum_le/be write emulation
    - Fix APLIC in_clrip[x] read emulation
    bonzini committed Apr 2, 2024
    Configuration menu
    Copy the full SHA
    9bc60f7 View commit details
    Browse the repository at this point in the history
  12. mean_and_variance: Drop always failing tests

    mean_and_variance_test_2 and mean_and_variance_test_4 always fail.
    The input parameters to those tests are identical to the input parameters
    to tests 1 and 3, yet the expected result for tests 2 and 4 is different
    for the mean and stddev tests. That will always fail.
    
         Expected mean_and_variance_get_mean(mv) == mean[i], but
            mean_and_variance_get_mean(mv) == 22 (0x16)
            mean[i] == 10 (0xa)
    
    Drop the bad tests.
    
    Fixes: 65bc410 ("mean and variance: More tests")
    Closes: https://lore.kernel.org/lkml/[email protected]/
    Cc: Kent Overstreet <[email protected]>
    Signed-off-by: Guenter Roeck <[email protected]>
    Signed-off-by: Kent Overstreet <[email protected]>
    groeck authored and Kent Overstreet committed Apr 2, 2024
    Configuration menu
    Copy the full SHA
    97ca7c1 View commit details
    Browse the repository at this point in the history
  13. Merge tag 'bcachefs-2024-04-01' of https://evilpiepirate.org/git/bcac…

    …hefs
    
    Pull bcachefs fixes from Kent Overstreet:
     "Lots of fixes for situations with extreme filesystem damage.
    
      One fix ("Fix journal pins in btree write buffer") applicable to
      normal usage; also a dio performance fix.
    
      New repair/construction code is in the final stages, should be ready
      in about a week. Anyone that lost btree interior nodes (or a variety
      of other damage) as a result of the splitbrain bug will be able to
      repair then"
    
    * tag 'bcachefs-2024-04-01' of https://evilpiepirate.org/git/bcachefs: (32 commits)
      bcachefs: On emergency shutdown, print out current journal sequence number
      bcachefs: Fix overlapping extent repair
      bcachefs: Fix remove_dirent()
      bcachefs: Logged op errors should be ignored
      bcachefs: Improve -o norecovery; opts.recovery_pass_limit
      bcachefs: bch2_run_explicit_recovery_pass_persistent()
      bcachefs: Ensure bch_sb_field_ext always exists
      bcachefs: Flush journal immediately after replay if we did early repair
      bcachefs: Resume logged ops after fsck
      bcachefs: Add error messages to logged ops fns
      bcachefs: Split out recovery_passes.c
      bcachefs: fix backpointer for missing alloc key msg
      bcachefs: Fix bch2_btree_increase_depth()
      bcachefs: Kill bch2_bkey_ptr_data_type()
      bcachefs: Fix use after free in check_root_trans()
      bcachefs: Fix repair path for missing indirect extents
      bcachefs: Fix use after free in bch2_check_fix_ptrs()
      bcachefs: Fix btree node keys accounting in topology repair path
      bcachefs: Check btree ptr min_key in .invalid
      bcachefs: add REQ_SYNC and REQ_IDLE in write dio
      ...
    torvalds committed Apr 2, 2024
    Configuration menu
    Copy the full SHA
    67199a4 View commit details
    Browse the repository at this point in the history
  14. scx: Reorder scx_ops_flags enums to restore backward compatibility

    SCX_OPS_SWITCH_PARTIAL was added recently but assigned the first bit
    shifting all the other values. This breaks backward compatibility as flag
    values are hard coded into e.g. sched_ext_ops definitions. Let's reorder the
    enums so that the existing values aren't shifted around.
    htejun committed Apr 2, 2024
    Configuration menu
    Copy the full SHA
    4414973 View commit details
    Browse the repository at this point in the history
  15. scx/compat.h: __COMPAT_read_enum() should use btf__find_by_name()

    instead of btf__find_by_name_kind() w/ BTF_KIND_ENUM as it also needs to
    read BTF_KIND_ENUM64's.
    htejun committed Apr 2, 2024
    Configuration menu
    Copy the full SHA
    5dc9530 View commit details
    Browse the repository at this point in the history
  16. ACPI: thermal: Register thermal zones without valid trip points

    Some laptops where the thermal control is handled by the EC may
    provide trip points that fail the kernels new validation, but still have
    working temperature sensors. An example of this is the Framework 13 AMD.
    
    This patch allows the thermal zone to still be registered without trip
    points if the trip points fail validation, allowing the temperature
    sensor to be viewed and used by the user.
    
    Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218586
    Fixes: 9c86472 ("ACPI: thermal: Use library functions to obtain trip point temperature values")
    Signed-off-by: Stephen Horvath <[email protected]>
    [ rjw: Subject edits, remove redundant braces ]
    Signed-off-by: Rafael J. Wysocki <[email protected]>
    Steve-Tech authored and rafaeljw committed Apr 2, 2024
    Configuration menu
    Copy the full SHA
    8a4ff54 View commit details
    Browse the repository at this point in the history
  17. Merge tag 'docs-6.9-fixes' of git://git.lwn.net/linux

    Pull documentation fixes from Jonathan Corbet:
     "Four small documentation fixes"
    
    * tag 'docs-6.9-fixes' of git://git.lwn.net/linux:
      docs: zswap: fix shell command format
      tracing: Fix documentation on tp_printk cmdline option
      docs: Fix bitfield handling in kernel-doc
      Documentation: dev-tools: Add link to RV docs
    torvalds committed Apr 2, 2024
    Configuration menu
    Copy the full SHA
    b1e6ec0 View commit details
    Browse the repository at this point in the history
  18. ASoC: codecs: ES8326: solve some hp issues and

    Merge series from Zhang Yi <[email protected]>:
    
    We solved some issues related to headphone detection.And for using
    the same configuration in different power conditions,we modified the
    clock table
    broonie committed Apr 2, 2024
    Configuration menu
    Copy the full SHA
    2837582 View commit details
    Browse the repository at this point in the history
  19. Merge pull request #171 from sched-ext/api-update-fallouts

    sched_ext: API update fallouts
    Byte-Lab authored Apr 2, 2024
    Configuration menu
    Copy the full SHA
    d36c66c View commit details
    Browse the repository at this point in the history
  20. bcachefs: Improve bch2_btree_update_to_text()

    Print out the mode as a string, and also print out the btree and
    watermark.
    
    Signed-off-by: Kent Overstreet <[email protected]>
    Kent Overstreet committed Apr 2, 2024
    Configuration menu
    Copy the full SHA
    e0319af View commit details
    Browse the repository at this point in the history

Commits on Apr 3, 2024

  1. bcachefs: Check for bad needs_discard before doing discard

    In the discard worker, we were failing to validate the bucket state -
    meaning a corrupt needs_discard btree could cause us to discard a bucket
    that we shouldn't.
    
    If check_alloc_info hasn't run yet we just want to bail out, otherwise
    it's a filesystem inconsistent error.
    
    Signed-off-by: Kent Overstreet <[email protected]>
    Kent Overstreet committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    7ee8873 View commit details
    Browse the repository at this point in the history
  2. bcachefs: ratelimit informational fsck errors

    Signed-off-by: Kent Overstreet <[email protected]>
    Kent Overstreet committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    fa14b50 View commit details
    Browse the repository at this point in the history
  3. ax25: fix use-after-free bugs caused by ax25_ds_del_timer

    When the ax25 device is detaching, the ax25_dev_device_down()
    calls ax25_ds_del_timer() to cleanup the slave_timer. When
    the timer handler is running, the ax25_ds_del_timer() that
    calls del_timer() in it will return directly. As a result,
    the use-after-free bugs could happen, one of the scenarios
    is shown below:
    
          (Thread 1)          |      (Thread 2)
                              | ax25_ds_timeout()
    ax25_dev_device_down()    |
      ax25_ds_del_timer()     |
        del_timer()           |
      ax25_dev_put() //FREE   |
                              |  ax25_dev-> //USE
    
    In order to mitigate bugs, when the device is detaching, use
    timer_shutdown_sync() to stop the timer.
    
    Fixes: 1da177e ("Linux-2.6.12-rc2")
    Signed-off-by: Duoming Zhou <[email protected]>
    Reviewed-by: Simon Horman <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    stonezdm authored and kuba-moo committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    fd819ad View commit details
    Browse the repository at this point in the history
  4. vsock/virtio: fix packet delivery to tap device

    Commit 82dfb54 ("VSOCK: Add virtio vsock vsockmon hooks") added
    virtio_transport_deliver_tap_pkt() for handing packets to the
    vsockmon device. However, in virtio_transport_send_pkt_work(),
    the function is called before actually sending the packet (i.e.
    before placing it in the virtqueue with virtqueue_add_sgs() and checking
    whether it returned successfully).
    Queuing the packet in the virtqueue can fail even multiple times.
    However, in virtio_transport_deliver_tap_pkt() we deliver the packet
    to the monitoring tap interface only the first time we call it.
    This certainly avoids seeing the same packet replicated multiple times
    in the monitoring interface, but it can show the packet sent with the
    wrong timestamp or even before we succeed to queue it in the virtqueue.
    
    Move virtio_transport_deliver_tap_pkt() after calling virtqueue_add_sgs()
    and making sure it returned successfully.
    
    Fixes: 82dfb54 ("VSOCK: Add virtio vsock vsockmon hooks")
    Cc: [email protected]
    Signed-off-by: Marco Pinna <[email protected]>
    Reviewed-by: Stefano Garzarella <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    MPinna authored and kuba-moo committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    b32a09e View commit details
    Browse the repository at this point in the history
  5. io_uring/kbuf: get rid of lower BGID lists

    Just rely on the xarray for any kind of bgid. This simplifies things, and
    it really doesn't bring us much, if anything.
    
    Cc: [email protected] # v6.4+
    Signed-off-by: Jens Axboe <[email protected]>
    axboe committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    09ab7ef View commit details
    Browse the repository at this point in the history
  6. io_uring/kbuf: get rid of bl->is_ready

    Now that xarray is being exclusively used for the buffer_list lookup,
    this check is no longer needed. Get rid of it and the is_ready member.
    
    Cc: [email protected] # v6.4+
    Signed-off-by: Jens Axboe <[email protected]>
    axboe committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    3b80cff View commit details
    Browse the repository at this point in the history
  7. io_uring/kbuf: protect io_buffer_list teardown with a reference

    No functional changes in this patch, just in preparation for being able
    to keep the buffer list alive outside of the ctx->uring_lock.
    
    Cc: [email protected] # v6.4+
    Signed-off-by: Jens Axboe <[email protected]>
    axboe committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    6b69c4a View commit details
    Browse the repository at this point in the history
  8. io_uring/kbuf: hold io_buffer_list reference over mmap

    If we look up the kbuf, ensure that it doesn't get unregistered until
    after we're done with it. Since we're inside mmap, we cannot safely use
    the io_uring lock. Rely on the fact that we can lookup the buffer list
    under RCU now and grab a reference to it, preventing it from being
    unregistered until we're done with it. The lookup returns the
    io_buffer_list directly with it referenced.
    
    Cc: [email protected] # v6.4+
    Fixes: 5cf4f52 ("io_uring: free io_buffer_list entries via RCU")
    Signed-off-by: Jens Axboe <[email protected]>
    axboe committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    561e4f9 View commit details
    Browse the repository at this point in the history
  9. r8169: fix issue caused by buggy BIOS on certain boards with RTL8168d

    On some boards with this chip version the BIOS is buggy and misses
    to reset the PHY page selector. This results in the PHY ID read
    accessing registers on a different page, returning a more or
    less random value. Fix this by resetting the page selector first.
    
    Fixes: f1e911d ("r8169: add basic phylib support")
    Cc: [email protected]
    Signed-off-by: Heiner Kallweit <[email protected]>
    Reviewed-by: Simon Horman <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    hkallweit authored and kuba-moo committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    5d872c9 View commit details
    Browse the repository at this point in the history
  10. ipv6: Fix infinite recursion in fib6_dump_done().

    syzkaller reported infinite recursive calls of fib6_dump_done() during
    netlink socket destruction.  [1]
    
    From the log, syzkaller sent an AF_UNSPEC RTM_GETROUTE message, and then
    the response was generated.  The following recvmmsg() resumed the dump
    for IPv6, but the first call of inet6_dump_fib() failed at kzalloc() due
    to the fault injection.  [0]
    
      12:01:34 executing program 3:
      r0 = socket$nl_route(0x10, 0x3, 0x0)
      sendmsg$nl_route(r0, ... snip ...)
      recvmmsg(r0, ... snip ...) (fail_nth: 8)
    
    Here, fib6_dump_done() was set to nlk_sk(sk)->cb.done, and the next call
    of inet6_dump_fib() set it to nlk_sk(sk)->cb.args[3].  syzkaller stopped
    receiving the response halfway through, and finally netlink_sock_destruct()
    called nlk_sk(sk)->cb.done().
    
    fib6_dump_done() calls fib6_dump_end() and nlk_sk(sk)->cb.done() if it
    is still not NULL.  fib6_dump_end() rewrites nlk_sk(sk)->cb.done() by
    nlk_sk(sk)->cb.args[3], but it has the same function, not NULL, calling
    itself recursively and hitting the stack guard page.
    
    To avoid the issue, let's set the destructor after kzalloc().
    
    [0]:
    FAULT_INJECTION: forcing a failure.
    name failslab, interval 1, probability 0, space 0, times 0
    CPU: 1 PID: 432110 Comm: syz-executor.3 Not tainted 6.8.0-12821-g537c2e91d354-dirty #11
    Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014
    Call Trace:
     <TASK>
     dump_stack_lvl (lib/dump_stack.c:117)
     should_fail_ex (lib/fault-inject.c:52 lib/fault-inject.c:153)
     should_failslab (mm/slub.c:3733)
     kmalloc_trace (mm/slub.c:3748 mm/slub.c:3827 mm/slub.c:3992)
     inet6_dump_fib (./include/linux/slab.h:628 ./include/linux/slab.h:749 net/ipv6/ip6_fib.c:662)
     rtnl_dump_all (net/core/rtnetlink.c:4029)
     netlink_dump (net/netlink/af_netlink.c:2269)
     netlink_recvmsg (net/netlink/af_netlink.c:1988)
     ____sys_recvmsg (net/socket.c:1046 net/socket.c:2801)
     ___sys_recvmsg (net/socket.c:2846)
     do_recvmmsg (net/socket.c:2943)
     __x64_sys_recvmmsg (net/socket.c:3041 net/socket.c:3034 net/socket.c:3034)
    
    [1]:
    BUG: TASK stack guard page was hit at 00000000f2fa9af1 (stack is 00000000b7912430..000000009a436beb)
    stack guard page: 0000 [#1] PREEMPT SMP KASAN
    CPU: 1 PID: 223719 Comm: kworker/1:3 Not tainted 6.8.0-12821-g537c2e91d354-dirty #11
    Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014
    Workqueue: events netlink_sock_destruct_work
    RIP: 0010:fib6_dump_done (net/ipv6/ip6_fib.c:570)
    Code: 3c 24 e8 f3 e9 51 fd e9 28 fd ff ff 66 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 f3 0f 1e fa 41 57 41 56 41 55 41 54 55 48 89 fd <53> 48 8d 5d 60 e8 b6 4d 07 fd 48 89 da 48 b8 00 00 00 00 00 fc ff
    RSP: 0018:ffffc9000d980000 EFLAGS: 00010293
    RAX: 0000000000000000 RBX: ffffffff84405990 RCX: ffffffff844059d3
    RDX: ffff8881028e0000 RSI: ffffffff84405ac2 RDI: ffff88810c02f358
    RBP: ffff88810c02f358 R08: 0000000000000007 R09: 0000000000000000
    R10: 0000000000000000 R11: 0000000000000224 R12: 0000000000000000
    R13: ffff888007c82c78 R14: ffff888007c82c68 R15: ffff888007c82c68
    FS:  0000000000000000(0000) GS:ffff88811b100000(0000) knlGS:0000000000000000
    CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    CR2: ffffc9000d97fff8 CR3: 0000000102309002 CR4: 0000000000770ef0
    PKRU: 55555554
    Call Trace:
     <#DF>
     </#DF>
     <TASK>
     fib6_dump_done (net/ipv6/ip6_fib.c:572 (discriminator 1))
     fib6_dump_done (net/ipv6/ip6_fib.c:572 (discriminator 1))
     ...
     fib6_dump_done (net/ipv6/ip6_fib.c:572 (discriminator 1))
     fib6_dump_done (net/ipv6/ip6_fib.c:572 (discriminator 1))
     netlink_sock_destruct (net/netlink/af_netlink.c:401)
     __sk_destruct (net/core/sock.c:2177 (discriminator 2))
     sk_destruct (net/core/sock.c:2224)
     __sk_free (net/core/sock.c:2235)
     sk_free (net/core/sock.c:2246)
     process_one_work (kernel/workqueue.c:3259)
     worker_thread (kernel/workqueue.c:3329 kernel/workqueue.c:3416)
     kthread (kernel/kthread.c:388)
     ret_from_fork (arch/x86/kernel/process.c:153)
     ret_from_fork_asm (arch/x86/entry/entry_64.S:256)
    Modules linked in:
    
    Fixes: 1da177e ("Linux-2.6.12-rc2")
    Reported-by: syzkaller <[email protected]>
    Signed-off-by: Kuniyuki Iwashima <[email protected]>
    Reviewed-by: Eric Dumazet <[email protected]>
    Reviewed-by: David Ahern <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    q2ven authored and kuba-moo committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    d21d406 View commit details
    Browse the repository at this point in the history
  11. MAINTAINERS: mlx5: Add Tariq Toukan

    Add myself as mlx5 core and EN maintainer.
    
    Signed-off-by: Tariq Toukan <[email protected]>
    Reviewed-by: Gal Pressman <[email protected]>
    Acked-by: Saeed Mahameed <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Tariq Toukan authored and kuba-moo committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    c53fe72 View commit details
    Browse the repository at this point in the history
  12. Merge tag 'selinux-pr-20240402' of git://git.kernel.org/pub/scm/linux…

    …/kernel/git/pcmoore/selinux
    
    Pull selinux fix from Paul Moore:
     "A single patch for SELinux to fix a problem where we could potentially
      dereference an error pointer if we failed to successfully mount
      selinuxfs"
    
    * tag 'selinux-pr-20240402' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux:
      selinux: avoid dereference of garbage after mount failure
    torvalds committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    3e92c1e View commit details
    Browse the repository at this point in the history
  13. x86/resctrl: Fix uninitialized memory read when last CPU of domain go…

    …es offline
    
    Tony encountered this OOPS when the last CPU of a domain goes
    offline while running a kernel built with CONFIG_NO_HZ_FULL:
    
        BUG: kernel NULL pointer dereference, address: 0000000000000000
        #PF: supervisor read access in kernel mode
        #PF: error_code(0x0000) - not-present page
        PGD 0
        Oops: 0000 [#1] PREEMPT SMP NOPTI
        ...
        RIP: 0010:__find_nth_andnot_bit+0x66/0x110
        ...
        Call Trace:
         <TASK>
         ? __die()
         ? page_fault_oops()
         ? exc_page_fault()
         ? asm_exc_page_fault()
         cpumask_any_housekeeping()
         mbm_setup_overflow_handler()
         resctrl_offline_cpu()
         resctrl_arch_offline_cpu()
         cpuhp_invoke_callback()
         cpuhp_thread_fun()
         smpboot_thread_fn()
         kthread()
         ret_from_fork()
         ret_from_fork_asm()
         </TASK>
    
    The NULL pointer dereference is encountered while searching for another
    online CPU in the domain (of which there are none) that can be used to
    run the MBM overflow handler.
    
    Because the kernel is configured with CONFIG_NO_HZ_FULL the search for
    another CPU (in its effort to prefer those CPUs that aren't marked
    nohz_full) consults the mask representing the nohz_full CPUs,
    tick_nohz_full_mask. On a kernel with CONFIG_CPUMASK_OFFSTACK=y
    tick_nohz_full_mask is not allocated unless the kernel is booted with
    the "nohz_full=" parameter and because of that any access to
    tick_nohz_full_mask needs to be guarded with tick_nohz_full_enabled().
    
    Replace the IS_ENABLED(CONFIG_NO_HZ_FULL) with tick_nohz_full_enabled().
    The latter ensures tick_nohz_full_mask can be accessed safely and can be
    used whether kernel is built with CONFIG_NO_HZ_FULL enabled or not.
    
    [ Use Ingo's suggestion that combines the two NO_HZ checks into one. ]
    
    Fixes: a4846aa ("x86/resctrl: Add cpumask_any_housekeeping() for limbo/overflow")
    Reported-by: Tony Luck <[email protected]>
    Signed-off-by: Reinette Chatre <[email protected]>
    Signed-off-by: Ingo Molnar <[email protected]>
    Reviewed-by: Babu Moger <[email protected]>
    Link: https://lore.kernel.org/r/ff8dfc8d3dcb04b236d523d1e0de13d2ef585223.1711993956.git.reinette.chatre@intel.com
    Closes: https://lore.kernel.org/lkml/ZgIFT5gZgIQ9A9G7@agluck-desk3/
    rchatre authored and Ingo Molnar committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    c3eeb1f View commit details
    Browse the repository at this point in the history
  14. perf/x86/intel/ds: Don't clear ->pebs_data_cfg for the last PEBS event

    The MSR_PEBS_DATA_CFG MSR register is used to configure which data groups
    should be generated into a PEBS record, and it's shared among all counters.
    
    If there are different configurations among counters, perf combines all the
    configurations.
    
    The first perf command as below requires a complete PEBS record
    (including memory info, GPRs, XMMs, and LBRs). The second perf command
    only requires a basic group. However, after the second perf command is
    running, the MSR_PEBS_DATA_CFG register is cleared. Only a basic group is
    generated in a PEBS record, which is wrong. The required information
    for the first perf command is missed.
    
     $ perf record --intr-regs=AX,SP,XMM0 -a -C 8 -b -W -d -c 100000003 -o /dev/null -e cpu/event=0xd0,umask=0x81/upp &
     $ sleep 5
     $ perf record  --per-thread  -c 1  -e cycles:pp --no-timestamp --no-tid taskset -c 8 ./noploop 1000
    
    The first PEBS event is a system-wide PEBS event. The second PEBS event
    is a per-thread event. When the thread is scheduled out, the
    intel_pmu_pebs_del() function is invoked to update the PEBS state.
    Since the system-wide event is still available, the cpuc->n_pebs is 1.
    The cpuc->pebs_data_cfg is cleared. The data configuration for the
    system-wide PEBS event is lost.
    
    The (cpuc->n_pebs == 1) check was introduced in commit:
    
      b6a32f0 ("perf/x86: Fix PEBS threshold initialization")
    
    At that time, it indeed didn't hurt whether the state was updated
    during the removal, because only the threshold is updated.
    
    The calculation of the threshold takes the last PEBS event into
    account.
    
    However, since commit:
    
      b752ea0 ("perf/x86/intel/ds: Flush PEBS DS when changing PEBS_DATA_CFG")
    
    we delay the threshold update, and clear the PEBS data config, which triggers
    the bug.
    
    The PEBS data config update scope should not be shrunk during removal.
    
    [ mingo: Improved the changelog & comments. ]
    
    Fixes: b752ea0 ("perf/x86/intel/ds: Flush PEBS DS when changing PEBS_DATA_CFG")
    Reported-by: Stephane Eranian <[email protected]>
    Signed-off-by: Kan Liang <[email protected]>
    Signed-off-by: Ingo Molnar <[email protected]>
    Cc: [email protected]
    Link: https://lore.kernel.org/r/[email protected]
    Kan Liang authored and Ingo Molnar committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    312be9f View commit details
    Browse the repository at this point in the history
  15. octeontx2-af: Add array index check

    In rvu_map_cgx_lmac_pf() the 'iter', which is used as an array index, can reach
    value (up to 14) that exceed the size (MAX_LMAC_COUNT = 8) of the array.
    Fix this bug by adding 'iter' value check.
    
    Found by Linux Verification Center (linuxtesting.org) with SVACE.
    
    Fixes: 91c6945 ("octeontx2-af: cn10k: Add RPM MAC support")
    Signed-off-by: Aleksandr Mishin <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Aleksandr Mishin authored and davem330 committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    ef15dde View commit details
    Browse the repository at this point in the history
  16. spi: spi-fsl-lpspi: remove redundant spi_controller_put call

    devm_spi_alloc_controller will allocate an SPI controller and
    automatically release a reference on it when dev is unbound from
    its driver. It doesn't need to call spi_controller_put explicitly
    to put the reference when lpspi driver failed initialization.
    
    Fixes: 2ae0ab0 ("spi: lpspi: Avoid potential use-after-free in probe()")
    Signed-off-by: Carlos Song <[email protected]>
    Reviewed-by: Alexander Sverdlin <[email protected]>
    Link: https://msgid.link/r/[email protected]
    Signed-off-by: Mark Brown <[email protected]>
    Carlos Song authored and broonie committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    bff892a View commit details
    Browse the repository at this point in the history
  17. spi: mchp-pci1xxx: Fix a possible null pointer dereference in pci1xxx…

    …_spi_probe
    
    In function pci1xxxx_spi_probe, there is a potential null pointer that
    may be caused by a failed memory allocation by the function devm_kzalloc.
    Hence, a null pointer check needs to be added to prevent null pointer
    dereferencing later in the code.
    
    To fix this issue, spi_bus->spi_int[iter] should be checked. The memory
    allocated by devm_kzalloc will be automatically released, so just directly
    return -ENOMEM without worrying about memory leaks.
    
    Fixes: 1cc0cbe ("spi: microchip: pci1xxxx: Add driver for SPI controller of PCI1XXXX PCIe switch")
    Signed-off-by: Huai-Yuan Liu <[email protected]>
    Link: https://msgid.link/r/[email protected]
    Signed-off-by: Mark Brown <[email protected]>
    Huai-Yuan Liu authored and broonie committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    1f886a7 View commit details
    Browse the repository at this point in the history
  18. net: bcmgenet: Reset RBUF on first open

    If the RBUF logic is not reset when the kernel starts then there
    may be some data left over from any network boot loader. If the
    64-byte packet headers are enabled then this can be fatal.
    
    Extend bcmgenet_dma_disable to do perform the reset, but not when
    called from bcmgenet_resume in order to preserve a wake packet.
    
    N.B. This different handling of resume is just based on a hunch -
    why else wouldn't one reset the RBUF as well as the TBUF? If this
    isn't the case then it's easy to change the patch to make the RBUF
    reset unconditional.
    
    See: raspberrypi/linux#3850
    See: raspberrypi/firmware#1882
    
    Signed-off-by: Phil Elwell <[email protected]>
    Signed-off-by: Maarten Vanraes <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    pelwell authored and davem330 committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    0a6380c View commit details
    Browse the repository at this point in the history
  19. gpiolib: Fix triggering "kobject: 'gpiochipX' is not initialized, yet…

    …" kobject_get() errors
    
    When a gpiochip gets added by loading a module, then another driver may
    be waiting for that gpiochip to load on the deferred-probe list.
    
    If the deferred-probe for the consumer of gpiochip then triggers between
    the gpiodev_add_to_list_unlocked() calls which makes gpio_device_find()
    see the chip and the gpiochip_setup_dev() later then gpio_device_find()
    does a kobject_get() on an uninitialized kobject since the kobject is
    initialized by gpiochip_setup_dev() calling device_initialize():
    
     arizona spi-10WM5102:00: cannot find GPIO chip arizona, deferring
     arizona spi-10WM5102:00: cannot find GPIO chip arizona, deferring
     ------------[ cut here ]------------
     kobject: 'gpiochip5' (00000000241466f2): is not initialized, yet kobject_get() is being called.
     WARNING: CPU: 3 PID: 42 at lib/kobject.c:640 kobject_get+0x43/0x70
     Call Trace:
      kobject_get
      gpio_device_find
      gpiod_find_and_request
      gpiod_get
      snd_byt_wm5102_mc_probe
    
    Not only is the device not initialized yet, but when the gpio-device is
    added to the list things like the irqchip also have not been initialized
    yet.
    
    So gpio_device_find() should really ignore the gpio-device until
    gpiochip_add_data_with_key() is fully done. Add a device_is_registered()
    check to gpio_device_find() to ignore gpio-devices on the list which are
    not yet fully initialized.
    
    Fixes: aab5c6f ("gpio: set device type for GPIO chips")
    Suggested-by: Bartosz Golaszewski <[email protected]>
    Signed-off-by: Hans de Goede <[email protected]>
    Reviewed-by: Andy Shevchenko <[email protected]>
    [Bartosz: fix a typo in commit message]
    Signed-off-by: Bartosz Golaszewski <[email protected]>
    jwrdegoede authored and Bartosz Golaszewski committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    e8acd2d View commit details
    Browse the repository at this point in the history
  20. s390/mm: fix NULL pointer dereference

    The recently added check to figure out if a fault happened on gmap ASCE
    dereferences the gmap pointer in lowcore without checking that it is not
    NULL. For all non-KVM processes the pointer is NULL, so that some value
    from lowcore will be read. With the current layouts of struct gmap and
    struct lowcore the read value (aka ASCE) is zero, so that this doesn't lead
    to any observable bug; at least currently.
    
    Fix this by adding the missing NULL pointer check.
    
    Fixes: 64c3431 ("s390/entry: compare gmap asce to determine guest/host fault")
    Acked-by: Sven Schnelle <[email protected]>
    Reviewed-by: Claudio Imbrenda <[email protected]>
    Signed-off-by: Heiko Carstens <[email protected]>
    Signed-off-by: Vasily Gorbik <[email protected]>
    hcahca authored and Vasily Gorbik committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    e6ec07d View commit details
    Browse the repository at this point in the history
  21. s390/atomic: mark all functions __always_inline

    Atomic functions are quite ubiquitous and may be called by noinstr
    ones, introducing unwanted instrumentation. They are very small, so
    there are no significant downsides to force-inlining them.
    
    Signed-off-by: Ilya Leoshkevich <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Heiko Carstens <[email protected]>
    Signed-off-by: Vasily Gorbik <[email protected]>
    iii-i authored and Vasily Gorbik committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    01cac82 View commit details
    Browse the repository at this point in the history
  22. s390/preempt: mark all functions __always_inline

    preempt_count-related functions are quite ubiquitous and may be called
    by noinstr ones, introducing unwanted instrumentation. Here is one
    example call chain:
    
      irqentry_nmi_enter()  # noinstr
        lockdep_hardirqs_enabled()
          this_cpu_read()
            __pcpu_size_call_return()
              this_cpu_read_*()
                this_cpu_generic_read()
                  __this_cpu_generic_read_nopreempt()
                    preempt_disable_notrace()
                      __preempt_count_inc()
                        __preempt_count_add()
    
    They are very small, so there are no significant downsides to
    force-inlining them.
    
    Signed-off-by: Ilya Leoshkevich <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Heiko Carstens <[email protected]>
    Signed-off-by: Vasily Gorbik <[email protected]>
    iii-i authored and Vasily Gorbik committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    c9c2606 View commit details
    Browse the repository at this point in the history
  23. s390/pai: fix sampling event removal for PMU device driver

    In case of a sampling event, the PAI PMU device drivers need a
    reference to this event.  Currently to PMU device driver reference
    is removed when a sampling event is destroyed. This may lead to
    situations where the reference of the PMU device driver is removed
    while being used by a different sampling event.
    Reset the event reference pointer of the PMU device driver when
    a sampling event is deleted and before the next one might be added.
    
    Fixes: 39d6233 ("s390/pai: add support for cryptography counters")
    Signed-off-by: Thomas Richter <[email protected]>
    Acked-by: Sumanth Korikkar <[email protected]>
    Signed-off-by: Vasily Gorbik <[email protected]>
    Thomas Richter authored and Vasily Gorbik committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    e9f3af0 View commit details
    Browse the repository at this point in the history
  24. s390/entry: align system call table on 8 bytes

    Align system call table on 8 bytes. With sys_call_table entry size
    of 8 bytes that eliminates the possibility of a system call pointer
    crossing cache line boundary.
    
    Cc: [email protected]
    Suggested-by: Ulrich Weigand <[email protected]>
    Reviewed-by: Alexander Gordeev <[email protected]>
    Signed-off-by: Sumanth Korikkar <[email protected]>
    Signed-off-by: Vasily Gorbik <[email protected]>
    sumanthkorikkar authored and Vasily Gorbik committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    378ca2d View commit details
    Browse the repository at this point in the history
  25. dt-bindings: clock: keystone: remove unstable remark

    Keystone clock controller bindings were marked as work-in-progress /
    unstable in 2013 in commit b9e0d40 ("clk: keystone: add Keystone
    PLL clock driver") and commit 7affe56 ("clk: keystone: Add gate
    control clock driver") Almost eleven years is enough, so drop the
    "unstable" remark and expect usual ABI rules.
    
    Signed-off-by: Krzysztof Kozlowski <[email protected]>
    Acked-by: Stephen Boyd <[email protected]>
    Acked-by: Rob Herring <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Rob Herring <[email protected]>
    krzk authored and robherring committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    438d3fc View commit details
    Browse the repository at this point in the history
  26. dt-bindings: clock: ti: remove unstable remark

    Several TI SoC clock bindings were marked as work-in-progress / unstable
    between 2013-2016, for example in commit f60b1ea ("CLK: TI: add
    support for gate clock").  It was enough of time to consider them stable
    and expect usual ABI rules.
    
    Signed-off-by: Krzysztof Kozlowski <[email protected]>
    Acked-by: Stephen Boyd <[email protected]>
    Acked-by: Rob Herring <[email protected]>
    Acked-by: Tony Lindgren <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Rob Herring <[email protected]>
    krzk authored and robherring committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    63fd4d7 View commit details
    Browse the repository at this point in the history
  27. dt-bindings: remoteproc: ti,davinci: remove unstable remark

    TI Davinci remoteproc bindings were marked as work-in-progress /
    unstable in 2017 in commit ae67b80 ("dt-bindings: remoteproc: Add
    bindings for Davinci DSP processors"). Almost seven years is enough, so
    drop the "unstable" remark and expect usual ABI rules.
    
    Signed-off-by: Krzysztof Kozlowski <[email protected]>
    Reviewed-by: Mathieu Poirier <[email protected]>
    Acked-by: Rob Herring <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Rob Herring <[email protected]>
    krzk authored and robherring committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    9117a64 View commit details
    Browse the repository at this point in the history
  28. dt-bindings: soc: fsl: narrow regex for unit address to hex numbers

    Regular expression used to match the unit address part should not allow
    non-hex numbers.
    
    Acked-by: Rob Herring <[email protected]>
    Signed-off-by: Krzysztof Kozlowski <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Rob Herring <[email protected]>
    krzk authored and robherring committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    6fad9df View commit details
    Browse the repository at this point in the history
  29. dt-bindings: timer: narrow regex for unit address to hex numbers

    Regular expression used to match the unit address part should not allow
    non-hex numbers.  Expect at least one hex digit as well.
    
    Acked-by: Rob Herring <[email protected]>
    Signed-off-by: Krzysztof Kozlowski <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Rob Herring <[email protected]>
    krzk authored and robherring committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    500b420 View commit details
    Browse the repository at this point in the history
  30. vboxsf: remove redundant variable out_len

    The variable out_len is being used to accumulate the number of
    bytes but it is not being used for any other purpose. The variable
    is redundant and can be removed.
    
    Cleans up clang scan build warning:
    fs/vboxsf/utils.c:443:9: warning: variable 'out_len' set but not
    used [-Wunused-but-set-variable]
    
    Signed-off-by: Colin Ian King <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Reviewed-by: Hans de Goede <[email protected]>
    Signed-off-by: Hans de Goede <[email protected]>
    ColinIanKing authored and jwrdegoede committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    0200cee View commit details
    Browse the repository at this point in the history
  31. arm64/ptrace: Use saved floating point state type to determine SVE la…

    …yout
    
    The SVE register sets have two different formats, one of which is a wrapped
    version of the standard FPSIMD register set and another with actual SVE
    register data. At present we check TIF_SVE to see if full SVE register
    state should be provided when reading the SVE regset but if we were in a
    syscall we may have saved only floating point registers even though that is
    set.
    
    Fix this and simplify the logic by checking and using the format which we
    recorded when deciding if we should use FPSIMD or SVE format.
    
    Fixes: 8c845e2 ("arm64/sve: Leave SVE enabled on syscall if we don't context switch")
    Cc: <[email protected]> # 6.2.x
    Signed-off-by: Mark Brown <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Catalin Marinas <[email protected]>
    broonie authored and ctmarinas committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    b017a0c View commit details
    Browse the repository at this point in the history
  32. vboxsf: Avoid an spurious warning if load_nls_xxx() fails

    If an load_nls_xxx() function fails a few lines above, the 'sbi->bdi_id' is
    still 0.
    So, in the error handling path, we will call ida_simple_remove(..., 0)
    which is not allocated yet.
    
    In order to prevent a spurious "ida_free called for id=0 which is not
    allocated." message, tweak the error handling path and add a new label.
    
    Fixes: 0fd1695 ("fs: Add VirtualBox guest shared folder (vboxsf) support")
    Signed-off-by: Christophe JAILLET <[email protected]>
    Link: https://lore.kernel.org/r/d09eaaa4e2e08206c58a1a27ca9b3e81dc168773.1698835730.git.christophe.jaillet@wanadoo.fr
    Reviewed-by: Hans de Goede <[email protected]>
    Signed-off-by: Hans de Goede <[email protected]>
    tititiou36 authored and jwrdegoede committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    de3f64b View commit details
    Browse the repository at this point in the history
  33. vboxsf: Remove usage of the deprecated ida_simple_xx() API

    ida_alloc() and ida_free() should be preferred to the deprecated
    ida_simple_get() and ida_simple_remove().
    
    This is less verbose.
    
    Signed-off-by: Christophe JAILLET <[email protected]>
    Link: https://lore.kernel.org/r/b3c057c86b73f0309a6362031d21f4d7ebb60587.1698835730.git.christophe.jaillet@wanadoo.fr
    Reviewed-by: Hans de Goede <[email protected]>
    Signed-off-by: Hans de Goede <[email protected]>
    tititiou36 authored and jwrdegoede committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    0141d68 View commit details
    Browse the repository at this point in the history
  34. vboxsf: explicitly deny setlease attempts

    vboxsf does not break leases on its own, so it can't properly handle the
    case where the hypervisor changes the data. Don't allow file leases on
    vboxsf.
    
    Signed-off-by: Jeff Layton <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Reviewed-by: Hans de Goede <[email protected]>
    Signed-off-by: Hans de Goede <[email protected]>
    jtlayton authored and jwrdegoede committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    1ece2c4 View commit details
    Browse the repository at this point in the history
  35. thermal: gov_power_allocator: Allow binding without cooling devices

    IPA was recently refactored to split out memory allocation into a
    separate funciton. That funciton was made to return -EINVAL if there is
    zero power_actors and thus no memory to allocate. This causes IPA to
    fail probing when the thermal zone has no attached cooling devices.
    
    Since cooling devices can attach after the thermal zone is created and
    the governer is attached to it, failing probe due to the lack of cooling
    devices is incorrect.
    
    Change the allocate_actors_buffer() to return success when there is no
    cooling devices present.
    
    Fixes: 912e97c ("thermal: gov_power_allocator: Move memory allocation out of throttle()")
    Signed-off-by: Nikita Travkin <[email protected]>
    Reviewed-by: Lukasz Luba <[email protected]>
    Signed-off-by: Rafael J. Wysocki <[email protected]>
    TravMurav authored and rafaeljw committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    1057c4c View commit details
    Browse the repository at this point in the history
  36. thermal: gov_power_allocator: Allow binding without trip points

    IPA probe function was recently refactored to perform extra error checks
    and make sure the thermal zone has trip points necessary for the IPA
    operation. With this change, if a thermal zone is probed such that it
    has no trip points that IPA can use, IPA will fail and the TZ won't be
    created. This is the case if a platform defines a TZ without cooling
    devices and only with "hot"/"critical" trip points, often found on some
    Qualcomm devices [1].
    
    Documentation across IPA code (notably get_governor_trips() kerneldoc)
    suggests that IPA is supposed to handle such TZ even if it won't
    actually do anything.
    
    This commit partially reverts the previous change to allow IPA to bind
    to such "empty" thermal zones.
    
    Fixes: e83747c ("thermal: gov_power_allocator: Set up trip points earlier")
    Link: arch/arm64/boot/dts/qcom/sc7180.dtsi#n4776 # [1]
    Signed-off-by: Nikita Travkin <[email protected]>
    Reviewed-by: Lukasz Luba <[email protected]>
    Signed-off-by: Rafael J. Wysocki <[email protected]>
    TravMurav authored and rafaeljw committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    da78193 View commit details
    Browse the repository at this point in the history
  37. ASoC: Merge up left over v6.8 fix

    This v6.8 change didn't make it into the release, send it as a fix for
    v6.9.
    broonie committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    09bbc4f View commit details
    Browse the repository at this point in the history
  38. ice: Fix freeing uninitialized pointers

    Automatically cleaned up pointers need to be initialized before exiting
    their scope.  In this case, they need to be initialized to NULL before
    any return statement.
    
    Fixes: 90f821d ("ice: avoid unnecessary devm_ usage")
    Signed-off-by: Dan Carpenter <[email protected]>
    Reviewed-by: Jiri Pirko <[email protected]>
    Reviewed-by: Simon Horman <[email protected]>
    Signed-off-by: Tony Nguyen <[email protected]>
    Dan Carpenter authored and anguy11 committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    90ca695 View commit details
    Browse the repository at this point in the history
  39. ice: fix enabling RX VLAN filtering

    ice_port_vlan_on/off() was introduced in commit 2946204 ("ice:
    implement bridge port vlan"). But ice_port_vlan_on() incorrectly assigns
    ena_rx_filtering to inner_vlan_ops in DVM mode.
    This causes an error when rx_filtering cannot be enabled in legacy mode.
    
    Reproducer:
     echo 1 > /sys/class/net/$PF/device/sriov_numvfs
     ip link set $PF vf 0 spoofchk off trust on vlan 3
    dmesg:
     ice 0000:41:00.0: failed to enable Rx VLAN filtering for VF 0 VSI 9 during VF rebuild, error -95
    
    Fixes: 2946204 ("ice: implement bridge port vlan")
    Signed-off-by: Petr Oros <[email protected]>
    Reviewed-by: Michal Swiatkowski <[email protected]>
    Tested-by: Rafal Romanowski <[email protected]>
    Signed-off-by: Tony Nguyen <[email protected]>
    orosp authored and anguy11 committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    8edfc7a View commit details
    Browse the repository at this point in the history
  40. x86/retpoline: Do the necessary fixup to the Zen3/4 srso return thunk…

    … for !SRSO
    
    The srso_alias_untrain_ret() dummy thunk in the !CONFIG_MITIGATION_SRSO
    case is there only for the altenative in CALL_UNTRAIN_RET to have
    a symbol to resolve.
    
    However, testing with kernels which don't have CONFIG_MITIGATION_SRSO
    enabled, leads to the warning in patch_return() to fire:
    
      missing return thunk: srso_alias_untrain_ret+0x0/0x10-0x0: eb 0e 66 66 2e
      WARNING: CPU: 0 PID: 0 at arch/x86/kernel/alternative.c:826 apply_returns (arch/x86/kernel/alternative.c:826
    
    Put in a plain "ret" there so that gcc doesn't put a return thunk in
    in its place which special and gets checked.
    
    In addition:
    
      ERROR: modpost: "srso_alias_untrain_ret" [arch/x86/kvm/kvm-amd.ko] undefined!
      make[2]: *** [scripts/Makefile.modpost:145: Module.symvers] Chyba 1
      make[1]: *** [/usr/src/linux-6.8.3/Makefile:1873: modpost] Chyba 2
      make: *** [Makefile:240: __sub-make] Chyba 2
    
    since !SRSO builds would use the dummy return thunk as reported by
    [email protected], https://bugzilla.kernel.org/show_bug.cgi?id=218679.
    
    Reported-by: kernel test robot <[email protected]>
    Closes: https://lore.kernel.org/oe-lkp/[email protected]
    Signed-off-by: Borislav Petkov (AMD) <[email protected]>
    Link: https://lore.kernel.org/all/[email protected]/
    Signed-off-by: Linus Torvalds <[email protected]>
    bp3tk0v authored and torvalds committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    0e11073 View commit details
    Browse the repository at this point in the history
  41. security: Place security_path_post_mknod() where the original IMA cal…

    …l was
    
    Commit 08abce6 ("security: Introduce path_post_mknod hook")
    introduced security_path_post_mknod(), to replace the IMA-specific call
    to ima_post_path_mknod().
    
    For symmetry with security_path_mknod(), security_path_post_mknod() was
    called after a successful mknod operation, for any file type, rather
    than only for regular files at the time there was the IMA call.
    
    However, as reported by VFS maintainers, successful mknod operation does
    not mean that the dentry always has an inode attached to it (for
    example, not for FIFOs on a SAMBA mount).
    
    If that condition happens, the kernel crashes when
    security_path_post_mknod() attempts to verify if the inode associated to
    the dentry is private.
    
    Move security_path_post_mknod() where the ima_post_path_mknod() call was,
    which is obviously correct from IMA/EVM perspective. IMA/EVM are the only
    in-kernel users, and only need to inspect regular files.
    
    Reported-by: Steve French <[email protected]>
    Closes: https://lore.kernel.org/linux-kernel/CAH2r5msAVzxCUHHG8VKrMPUKQHmBpE6K9_vjhgDa1uAvwx4ppw@mail.gmail.com/
    Suggested-by: Al Viro <[email protected]>
    Fixes: 08abce6 ("security: Introduce path_post_mknod hook")
    Signed-off-by: Roberto Sassu <[email protected]>
    Reviewed-by: Christian Brauner <[email protected]>
    Reviewed-by: Mimi Zohar <[email protected]>
    Acked-by: Paul Moore <[email protected]>
    Signed-off-by: Linus Torvalds <[email protected]>
    robertosassu authored and torvalds committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    701b389 View commit details
    Browse the repository at this point in the history
  42. Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm

    Pull KVM fixes from Paolo Bonzini:
     "ARM:
    
       - Ensure perf events programmed to count during guest execution are
         actually enabled before entering the guest in the nVHE
         configuration
    
       - Restore out-of-range handler for stage-2 translation faults
    
       - Several fixes to stage-2 TLB invalidations to avoid stale
         translations, possibly including partial walk caches
    
       - Fix early handling of architectural VHE-only systems to ensure E2H
         is appropriately set
    
       - Correct a format specifier warning in the arch_timer selftest
    
       - Make the KVM banner message correctly handle all of the possible
         configurations
    
      RISC-V:
    
       - Remove redundant semicolon in num_isa_ext_regs()
    
       - Fix APLIC setipnum_le/be write emulation
    
       - Fix APLIC in_clrip[x] read emulation
    
      x86:
    
       - Fix a bug in KVM_SET_CPUID{2,} where KVM looks at the wrong CPUID
         entries (old vs. new) and ultimately neglects to clear PV_UNHALT
         from vCPUs with HLT-exiting disabled
    
       - Documentation fixes for SEV
    
       - Fix compat ABI for KVM_MEMORY_ENCRYPT_OP
    
       - Fix a 14-year-old goof in a declaration shared by host and guest;
         the enabled field used by Linux when running as a guest pushes the
         size of "struct kvm_vcpu_pv_apf_data" from 64 to 68 bytes. This is
         really unconsequential because KVM never consumes anything beyond
         the first 64 bytes, but the resulting struct does not match the
         documentation
    
      Selftests:
    
       - Fix spelling mistake in arch_timer selftest"
    
    * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (25 commits)
      KVM: arm64: Rationalise KVM banner output
      arm64: Fix early handling of FEAT_E2H0 not being implemented
      KVM: arm64: Ensure target address is granule-aligned for range TLBI
      KVM: arm64: Use TLBI_TTL_UNKNOWN in __kvm_tlb_flush_vmid_range()
      KVM: arm64: Don't pass a TLBI level hint when zapping table entries
      KVM: arm64: Don't defer TLB invalidation when zapping table entries
      KVM: selftests: Fix __GUEST_ASSERT() format warnings in ARM's arch timer test
      KVM: arm64: Fix out-of-IPA space translation fault handling
      KVM: arm64: Fix host-programmed guest events in nVHE
      RISC-V: KVM: Fix APLIC in_clrip[x] read emulation
      RISC-V: KVM: Fix APLIC setipnum_le/be write emulation
      RISC-V: KVM: Remove second semicolon
      KVM: selftests: Fix spelling mistake "trigged" -> "triggered"
      Documentation: kvm/sev: clarify usage of KVM_MEMORY_ENCRYPT_OP
      Documentation: kvm/sev: separate description of firmware
      KVM: SEV: fix compat ABI for KVM_MEMORY_ENCRYPT_OP
      KVM: selftests: Check that PV_UNHALT is cleared when HLT exiting is disabled
      KVM: x86: Use actual kvm_cpuid.base for clearing KVM_FEATURE_PV_UNHALT
      KVM: x86: Introduce __kvm_get_hypervisor_cpuid() helper
      KVM: SVM: Return -EINVAL instead of -EBUSY on attempt to re-init SEV/SEV-ES
      ...
    torvalds committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    0f099dc View commit details
    Browse the repository at this point in the history
  43. Merge tag 'vboxsf-v6.9-1' of git://git.kernel.org/pub/scm/linux/kerne…

    …l/git/hansg/linux
    
    Pull vboxsf fixes from Hans de Goede:
    
     - Compiler warning fixes
    
     - Explicitly deny setlease attempts
    
    * tag 'vboxsf-v6.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/hansg/linux:
      vboxsf: explicitly deny setlease attempts
      vboxsf: Remove usage of the deprecated ida_simple_xx() API
      vboxsf: Avoid an spurious warning if load_nls_xxx() fails
      vboxsf: remove redundant variable out_len
    torvalds committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    c85af71 View commit details
    Browse the repository at this point in the history
  44. ASoC: SOF: Intel: lnl: Disable DMIC/SSP offload on remove

    During probe the DMIC/SSP offload is enabled and it is not reversed on
    remove.
    
    Add a remove wrapper for LNL to disable the offload for DMIC and SSP
    similarly to what is done during probe.
    
    Signed-off-by: Peter Ujfalusi <[email protected]>
    Reviewed-by: Pierre-Louis Bossart <[email protected]>
    Reviewed-by: Bard Liao <[email protected]>
    Link: https://msgid.link/r/[email protected]
    Signed-off-by: Mark Brown <[email protected]>
    ujfalusi authored and broonie committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    3f5eb32 View commit details
    Browse the repository at this point in the history
  45. drm/i915/psr: Calculate PIPE_SRCSZ_ERLY_TPT value

    When early transport is enabled we need to write PIPE_SRCSZ_ERLY_TPT on
    every flip doing selective update. This patch calculates
    PIPE_SRCSZ_ERLY_TPT same way as is done for PSR2_MAN_TRK_CTL value and
    stores i in intel_crtc_state->pipe_srcsz_early_tpt to be written later
    during flip.
    
    Bspec: 68927
    
    Signed-off-by: Jouni Högander <[email protected]>
    Reviewed-by: Mika Kahola <[email protected]>
    Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
    (cherry picked from commit f3b899f)
    Signed-off-by: Rodrigo Vivi <[email protected]>
    hogander authored and rodrigovivi committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    64d845f View commit details
    Browse the repository at this point in the history
  46. drm/i915/psr: Move writing early transport pipe src

    Currently PIPE_SRCSZ_ERLY_TPT is written in
    intel_display.c:intel_set_pipe_src_size. This doesn't work as
    intel_set_pipe_src_size is called only on modeset.
    
    Bspec: 68927
    
    Fixes: 3291bbb ("drm/i915/psr: Configure PIPE_SRCSZ_ERLY_TPT for psr2 early transport")
    Signed-off-by: Jouni Högander <[email protected]>
    Reviewed-by: Mika Kahola <[email protected]>
    Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
    (cherry picked from commit b52c409)
    Signed-off-by: Rodrigo Vivi <[email protected]>
    hogander authored and rodrigovivi committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    4e29234 View commit details
    Browse the repository at this point in the history
  47. drm/i915/psr: Fix intel_psr2_sel_fetch_et_alignment usage

    Currently we are not aligning selective update area to cover cursor fully
    when cursor is not updated by itself but still in the selective update
    area. Fix this by checking cursor separately after
    drm_atomic_add_affected_planes.
    
    Bspec: 68927
    
    Fixes: 1bff93b ("drm/i915/psr: Extend SU area to cover cursor fully if needed")
    Signed-off-by: Jouni Högander <[email protected]>
    Reviewed-by: Mika Kahola <[email protected]>
    Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
    (cherry picked from commit d37b3da)
    Signed-off-by: Rodrigo Vivi <[email protected]>
    hogander authored and rodrigovivi committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    bf1f6f8 View commit details
    Browse the repository at this point in the history
  48. drm/i915/gt: Limit the reserved VM space to only the platforms that n…

    …eed it
    
    Commit 9bb66c1 ("drm/i915: Reserve some kernel space per
    vm") reduces the available VM space of one page in order to apply
    Wa_16018031267 and Wa_16018063123.
    
    This page was reserved indiscrimitely in all platforms even when
    not needed. Limit it to DG2 onwards.
    
    Fixes: 9bb66c1 ("drm/i915: Reserve some kernel space per vm")
    Signed-off-by: Andi Shyti <[email protected]>
    Cc: Andrzej Hajda <[email protected]>
    Cc: Chris Wilson <[email protected]>
    Cc: Jonathan Cavitt <[email protected]>
    Cc: Nirmoy Das <[email protected]>
    Reviewed-by: Nirmoy Das <[email protected]>
    Acked-by: Michal Mrozek <[email protected]>
    Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
    (cherry picked from commit 9721634)
    Signed-off-by: Rodrigo Vivi <[email protected]>
    Andi Shyti authored and rodrigovivi committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    94bf3e6 View commit details
    Browse the repository at this point in the history
  49. drm/i915/gt: Disable HW load balancing for CCS

    The hardware should not dynamically balance the load between CCS
    engines. Wa_14019159160 recommends disabling it across all
    platforms.
    
    Fixes: d2eae8e ("drm/i915/dg2: Drop force_probe requirement")
    Signed-off-by: Andi Shyti <[email protected]>
    Cc: Chris Wilson <[email protected]>
    Cc: Joonas Lahtinen <[email protected]>
    Cc: Matt Roper <[email protected]>
    Cc: <[email protected]> # v6.2+
    Reviewed-by: Matt Roper <[email protected]>
    Acked-by: Michal Mrozek <[email protected]>
    Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
    (cherry picked from commit f5d2904)
    Signed-off-by: Rodrigo Vivi <[email protected]>
    Andi Shyti authored and rodrigovivi committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    bc9a1ec View commit details
    Browse the repository at this point in the history
  50. drm/i915/gt: Do not generate the command streamer for all the CCS

    We want a fixed load CCS balancing consisting in all slices
    sharing one single user engine. For this reason do not create the
    intel_engine_cs structure with its dedicated command streamer for
    CCS slices beyond the first.
    
    Fixes: d2eae8e ("drm/i915/dg2: Drop force_probe requirement")
    Signed-off-by: Andi Shyti <[email protected]>
    Cc: Chris Wilson <[email protected]>
    Cc: Joonas Lahtinen <[email protected]>
    Cc: Matt Roper <[email protected]>
    Cc: <[email protected]> # v6.2+
    Acked-by: Michal Mrozek <[email protected]>
    Reviewed-by: Matt Roper <[email protected]>
    Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
    (cherry picked from commit c7a5aa4)
    Signed-off-by: Rodrigo Vivi <[email protected]>
    Andi Shyti authored and rodrigovivi committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    ea315f9 View commit details
    Browse the repository at this point in the history
  51. drm/i915/gt: Enable only one CCS for compute workload

    Enable only one CCS engine by default with all the compute sices
    allocated to it.
    
    While generating the list of UABI engines to be exposed to the
    user, exclude any additional CCS engines beyond the first
    instance.
    
    This change can be tested with igt i915_query.
    
    Fixes: d2eae8e ("drm/i915/dg2: Drop force_probe requirement")
    Signed-off-by: Andi Shyti <[email protected]>
    Cc: Chris Wilson <[email protected]>
    Cc: Joonas Lahtinen <[email protected]>
    Cc: Matt Roper <[email protected]>
    Cc: <[email protected]> # v6.2+
    Reviewed-by: Matt Roper <[email protected]>
    Acked-by: Michal Mrozek <[email protected]>
    Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
    (cherry picked from commit 2bebae0)
    Signed-off-by: Rodrigo Vivi <[email protected]>
    Andi Shyti authored and rodrigovivi committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    6db3125 View commit details
    Browse the repository at this point in the history
  52. drm/i915/dp: Fix the computation for compressed_bpp for DISPLAY < 13

    For DISPLAY < 13, compressed bpp is chosen from a list of
    supported compressed bpps. Fix the condition to choose the
    appropriate compressed bpp from the list.
    
    Fixes: 1c56e9a ("drm/i915/dp: Get optimal link config to have best compressed bpp")
    Cc: Ankit Nautiyal <[email protected]>
    Cc: Stanislav Lisovskiy <[email protected]>
    Cc: Jani Nikula <[email protected]>
    Cc: <[email protected]> # v6.7+
    Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/10162
    Signed-off-by: Ankit Nautiyal <[email protected]>
    Reviewed-by: Suraj Kandpal <[email protected]>
    Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
    (cherry picked from commit 5a1da42)
    Signed-off-by: Rodrigo Vivi <[email protected]>
    aknautiyal authored and rodrigovivi committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    f7caddf View commit details
    Browse the repository at this point in the history
  53. drm/i915/mst: Limit MST+DSC to TGL+

    The MST code currently assumes that glk+ already supports MST+DSC,
    which is incorrect. We need to check for TGL+ actually. ICL does
    support SST+DSC, but supposedly it can't do MST+FEC which will
    also rule out MST+DSC.
    
    Note that a straight TGL+ check doesn't work here because DSC
    support can get fused out, so we do need to also check 'has_dsc'.
    
    Cc: [email protected]
    Fixes: d51f25e ("drm/i915: Add DSC support to MST path")
    Reviewed-by: Uma Shankar <[email protected]>
    Signed-off-by: Ville Syrjälä <[email protected]>
    Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
    (cherry picked from commit c9c92f2)
    Signed-off-by: Rodrigo Vivi <[email protected]>
    vsyrjala authored and rodrigovivi committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    51bc633 View commit details
    Browse the repository at this point in the history
  54. drm/i915/mst: Reject FEC+MST on ICL

    ICL supposedly doesn't support FEC on MST. Reject it.
    
    Cc: [email protected]
    Fixes: d51f25e ("drm/i915: Add DSC support to MST path")
    Reviewed-by: Uma Shankar <[email protected]>
    Signed-off-by: Ville Syrjälä <[email protected]>
    Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
    (cherry picked from commit b648ce2)
    Signed-off-by: Rodrigo Vivi <[email protected]>
    vsyrjala authored and rodrigovivi committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    99f8550 View commit details
    Browse the repository at this point in the history
  55. bcachefs: Clear recovery_passes_required as they complete without errors

    Signed-off-by: Kent Overstreet <[email protected]>
    Kent Overstreet committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    27fcec6 View commit details
    Browse the repository at this point in the history
  56. bcachefs: bch2_shoot_down_journal_keys()

    Signed-off-by: Kent Overstreet <[email protected]>
    Kent Overstreet committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    bdbf953 View commit details
    Browse the repository at this point in the history
  57. bcachefs: Etyzinger cleanups

    Pull out eytzinger.c and kill eytzinger_cmp_fn. We now provide
    eytzinger0_sort and eytzinger0_sort_r, which use the standard cmp_func_t
    and cmp_r_func_t callbacks.
    
    Signed-off-by: Kent Overstreet <[email protected]>
    Kent Overstreet committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    ca1e02f View commit details
    Browse the repository at this point in the history
  58. bcachefs: bch2_btree_root_alloc() -> bch2_btree_root_alloc_fake()

    Signed-off-by: Kent Overstreet <[email protected]>
    Kent Overstreet committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    f2f61f4 View commit details
    Browse the repository at this point in the history
  59. bcachefs: Don't skip fake btree roots in fsck

    When a btree root is unreadable, we might still have keys fro the
    journal to walk and mark.
    
    Signed-off-by: Kent Overstreet <[email protected]>
    Kent Overstreet committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    b268aa4 View commit details
    Browse the repository at this point in the history
  60. bcachefs: Repair pass for scanning for btree nodes

    If a btree root or interior btree node goes bad, we're going to lose a
    lot of data, unless we can recover the nodes that it pointed to by
    scanning.
    
    Fortunately btree node headers are fully self describing, and
    additionally the magic number is xored with the filesytem UUID, so we
    can do so safely.
    
    This implements the scanning - next patch will rework topology repair to
    make use of the found nodes.
    
    Signed-off-by: Kent Overstreet <[email protected]>
    Kent Overstreet committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    4409b80 View commit details
    Browse the repository at this point in the history
  61. bcachefs: Topology repair now uses nodes found by scanning to fill holes

    With the new btree node scan code, we can now recover from corrupt btree
    roots - simply create a new fake root at depth 1, and then insert all
    the leaves we found.
    
    If the root wasn't corrupt but there's corruption elsewhere in the
    btree, we can fill in holes as needed with the newest version of a given
    node(s) from the scan; we also check if a given btree node is older than
    what we found from the scan.
    
    Signed-off-by: Kent Overstreet <[email protected]>
    Kent Overstreet committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    43f5ea4 View commit details
    Browse the repository at this point in the history
  62. bcachefs: Flag btrees with missing data

    We need this to know when we should attempt to reconstruct the snapshots
    btree
    
    Signed-off-by: Kent Overstreet <[email protected]>
    Kent Overstreet committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    55936af View commit details
    Browse the repository at this point in the history
  63. bcachefs: Reconstruct missing snapshot nodes

    When the snapshots btree is going, we'll have to delete huge amounts of
    data - unless we can reconstruct it by looking at the keys that refer to
    it.
    
    Signed-off-by: Kent Overstreet <[email protected]>
    Kent Overstreet committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    a292be3 View commit details
    Browse the repository at this point in the history
  64. bcachefs: Check for extents that point to same space

    In backpointer repair, if we get a missing backpointer - but there's
    already a backpointer that points to an existing extent - we've got
    multiple extents that point to the same space and need to decide which
    to keep.
    
    Signed-off-by: Kent Overstreet <[email protected]>
    Kent Overstreet committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    4c02e63 View commit details
    Browse the repository at this point in the history
  65. bcachefs: Subvolume reconstruction

    We can now recreate missing subvolumes from dirents and/or inodes.
    
    Signed-off-by: Kent Overstreet <[email protected]>
    Kent Overstreet committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    cc05329 View commit details
    Browse the repository at this point in the history
  66. bcachefs: reconstruct_inode()

    If an inode is missing, but corresponding extents and dirent still
    exist, it's well worth recreating it - this does so.
    
    Signed-off-by: Kent Overstreet <[email protected]>
    Kent Overstreet committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    09d4c2a View commit details
    Browse the repository at this point in the history
  67. nios2: Only use built-in devicetree blob if configured to do so

    Starting with commit 7b937cc ("of: Create of_root if no dtb provided
    by firmware"), attempts to boot nios2 images with an external devicetree
    blob result in a crash.
    
    Kernel panic - not syncing: early_init_dt_alloc_memory_arch:
    	Failed to allocate 72 bytes align=0x40
    
    For nios2, a built-in devicetree blob always overrides devicetree blobs
    provided by ROMMON/BIOS. This includes the new dummy devicetree blob.
    Result is that the dummy devicetree blob is used even if an external
    devicetree blob is provided. Since the dummy devicetree blob does not
    include any memory information, memory allocations fail, resulting in
    the crash.
    
    To fix the problem, only use the built-in devicetree blob if
    CONFIG_NIOS2_DTB_SOURCE_BOOL is enabled.
    
    Fixes: 7b937cc ("of: Create of_root if no dtb provided by firmware")
    Cc: Frank Rowand <[email protected]>
    Cc: Stephen Boyd <[email protected]>
    Cc: Rob Herring <[email protected]>
    Signed-off-by: Guenter Roeck <[email protected]>
    Reviewed-by: Rob Herring <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Rob Herring <[email protected]>
    groeck authored and robherring committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    de164a7 View commit details
    Browse the repository at this point in the history
  68. smb3: retrying on failed server close

    In the current implementation, CIFS close sends a close to the
    server and does not check for the success of the server close.
    This patch adds functionality to check for server close return
    status and retries in case of an EBUSY or EAGAIN error.
    
    This can help avoid handle leaks
    
    Cc: [email protected]
    Signed-off-by: Ritvik Budhiraja <[email protected]>
    Signed-off-by: Steve French <[email protected]>
    ritbudhiraja authored and Steve French committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    173217b View commit details
    Browse the repository at this point in the history
  69. smb: client: fix potential UAF in cifs_debug_files_proc_show()

    Skip sessions that are being teared down (status == SES_EXITING) to
    avoid UAF.
    
    Cc: [email protected]
    Signed-off-by: Paulo Alcantara (Red Hat) <[email protected]>
    Signed-off-by: Steve French <[email protected]>
    pcacjr authored and Steve French committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    ca545b7 View commit details
    Browse the repository at this point in the history
  70. smb: client: fix potential UAF in cifs_dump_full_key()

    Skip sessions that are being teared down (status == SES_EXITING) to
    avoid UAF.
    
    Cc: [email protected]
    Signed-off-by: Paulo Alcantara (Red Hat) <[email protected]>
    Signed-off-by: Steve French <[email protected]>
    pcacjr authored and Steve French committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    58acd1f View commit details
    Browse the repository at this point in the history
  71. smb: client: fix potential UAF in cifs_stats_proc_write()

    Skip sessions that are being teared down (status == SES_EXITING) to
    avoid UAF.
    
    Cc: [email protected]
    Signed-off-by: Paulo Alcantara (Red Hat) <[email protected]>
    Signed-off-by: Steve French <[email protected]>
    pcacjr authored and Steve French committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    d3da25c View commit details
    Browse the repository at this point in the history
  72. smb: client: fix potential UAF in cifs_stats_proc_show()

    Skip sessions that are being teared down (status == SES_EXITING) to
    avoid UAF.
    
    Cc: [email protected]
    Signed-off-by: Paulo Alcantara (Red Hat) <[email protected]>
    Signed-off-by: Steve French <[email protected]>
    pcacjr authored and Steve French committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    0865ffe View commit details
    Browse the repository at this point in the history
  73. smb: client: fix potential UAF in smb2_is_valid_lease_break()

    Skip sessions that are being teared down (status == SES_EXITING) to
    avoid UAF.
    
    Cc: [email protected]
    Signed-off-by: Paulo Alcantara (Red Hat) <[email protected]>
    Signed-off-by: Steve French <[email protected]>
    pcacjr authored and Steve French committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    705c76f View commit details
    Browse the repository at this point in the history
  74. smb: client: fix potential UAF in smb2_is_valid_oplock_break()

    Skip sessions that are being teared down (status == SES_EXITING) to
    avoid UAF.
    
    Cc: [email protected]
    Signed-off-by: Paulo Alcantara (Red Hat) <[email protected]>
    Signed-off-by: Steve French <[email protected]>
    pcacjr authored and Steve French committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    2286348 View commit details
    Browse the repository at this point in the history
  75. smb: client: fix potential UAF in is_valid_oplock_break()

    Skip sessions that are being teared down (status == SES_EXITING) to
    avoid UAF.
    
    Cc: [email protected]
    Signed-off-by: Paulo Alcantara (Red Hat) <[email protected]>
    Signed-off-by: Steve French <[email protected]>
    pcacjr authored and Steve French committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    69ccf04 View commit details
    Browse the repository at this point in the history
  76. smb: client: fix potential UAF in smb2_is_network_name_deleted()

    Skip sessions that are being teared down (status == SES_EXITING) to
    avoid UAF.
    
    Cc: [email protected]
    Signed-off-by: Paulo Alcantara (Red Hat) <[email protected]>
    Signed-off-by: Steve French <[email protected]>
    pcacjr authored and Steve French committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    6398156 View commit details
    Browse the repository at this point in the history
  77. smb: client: fix potential UAF in cifs_signal_cifsd_for_reconnect()

    Skip sessions that are being teared down (status == SES_EXITING) to
    avoid UAF.
    
    Cc: [email protected]
    Signed-off-by: Paulo Alcantara (Red Hat) <[email protected]>
    Signed-off-by: Steve French <[email protected]>
    pcacjr authored and Steve French committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    e0e5040 View commit details
    Browse the repository at this point in the history
  78. vdso: Use CONFIG_PAGE_SHIFT in vdso/datapage.h

    Both the vdso rework and the CONFIG_PAGE_SHIFT changes were merged during
    the v6.9 merge window, so it is now possible to use CONFIG_PAGE_SHIFT
    instead of including asm/page.h in the vdso.
    
    This avoids the workaround for arm64 - commit 8b3843a ("vdso/datapage:
    Quick fix - use asm/page-def.h for ARM64") and addresses a build warning
    for powerpc64:
    
    In file included from <built-in>:4:
    In file included from /home/arnd/arm-soc/arm-soc/lib/vdso/gettimeofday.c:5:
    In file included from ../include/vdso/datapage.h:25:
    arch/powerpc/include/asm/page.h:230:9: error: result of comparison of constant 13835058055282163712 with expression of type 'unsigned long' is always true [-Werror,-Wtautological-constant-out-of-range-compare]
      230 |         return __pa(kaddr) >> PAGE_SHIFT;
          |                ^~~~~~~~~~~
    arch/powerpc/include/asm/page.h:217:37: note: expanded from macro '__pa'
      217 |         VIRTUAL_WARN_ON((unsigned long)(x) < PAGE_OFFSET);              \
          |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
    arch/powerpc/include/asm/page.h:202:73: note: expanded from macro 'VIRTUAL_WARN_ON'
      202 | #define VIRTUAL_WARN_ON(x)      WARN_ON(IS_ENABLED(CONFIG_DEBUG_VIRTUAL) && (x))
          |                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
    arch/powerpc/include/asm/bug.h:88:25: note: expanded from macro 'WARN_ON'
       88 |         int __ret_warn_on = !!(x);                              \
          |                                ^
    
    Signed-off-by: Arnd Bergmann <[email protected]>
    Signed-off-by: Thomas Gleixner <[email protected]>
    Reviewed-by: Kees Cook <[email protected]>
    Acked-by: Michael Ellerman <[email protected]> (powerpc)
    Link: https://lore.kernel.org/r/[email protected]
    arndb authored and KAGA-KOKO committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    cffaefd View commit details
    Browse the repository at this point in the history
  79. idpf: fix kernel panic on unknown packet types

    In the very rare case where a packet type is unknown to the driver,
    idpf_rx_process_skb_fields would return early without calling
    eth_type_trans to set the skb protocol / the network layer handler.
    This is especially problematic if tcpdump is running when such a
    packet is received, i.e. it would cause a kernel panic.
    
    Instead, call eth_type_trans for every single packet, even when
    the packet type is unknown.
    
    Fixes: 3a8845a ("idpf: add RX splitq napi poll support")
    Reported-by: Balazs Nemeth <[email protected]>
    Signed-off-by: Joshua Hay <[email protected]>
    Reviewed-by: Jesse Brandeburg <[email protected]>
    Reviewed-by: Przemek Kitszel <[email protected]>
    Tested-by: Salvatore Daniele <[email protected]>
    Signed-off-by: Pavan Kumar Linga <[email protected]>
    Tested-by: Krishneil Singh <[email protected]>
    Signed-off-by: Tony Nguyen <[email protected]>
    jahay1 authored and anguy11 committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    dd19e82 View commit details
    Browse the repository at this point in the history
  80. i2c: pxa: hide unused icr_bits[] variable

    The function using this is hidden in an #ifdef, so the variable
    needs the same one for a clean W=1 build:
    
    drivers/i2c/busses/i2c-pxa.c:327:26: error: 'icr_bits' defined but not used [-Werror=unused-const-variable=]
    
    Fixes: d6a7b5f ("[ARM] 4827/1: fix two warnings in drivers/i2c/busses/i2c-pxa.c")
    Signed-off-by: Arnd Bergmann <[email protected]>
    Signed-off-by: Andi Shyti <[email protected]>
    arndb authored and Andi Shyti committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    9519777 View commit details
    Browse the repository at this point in the history
  81. riscv: Fix vector state restore in rt_sigreturn()

    The RISC-V Vector specification states in "Appendix D: Calling
    Convention for Vector State" [1] that "Executing a system call causes
    all caller-saved vector registers (v0-v31, vl, vtype) and vstart to
    become unspecified.". In the RISC-V kernel this is called "discarding
    the vstate".
    
    Returning from a signal handler via the rt_sigreturn() syscall, vector
    discard is also performed. However, this is not an issue since the
    vector state should be restored from the sigcontext, and therefore not
    care about the vector discard.
    
    The "live state" is the actual vector register in the running context,
    and the "vstate" is the vector state of the task. A dirty live state,
    means that the vstate and live state are not in synch.
    
    When vectorized user_from_copy() was introduced, an bug sneaked in at
    the restoration code, related to the discard of the live state.
    
    An example when this go wrong:
    
      1. A userland application is executing vector code
      2. The application receives a signal, and the signal handler is
         entered.
      3. The application returns from the signal handler, using the
         rt_sigreturn() syscall.
      4. The live vector state is discarded upon entering the
         rt_sigreturn(), and the live state is marked as "dirty", indicating
         that the live state need to be synchronized with the current
         vstate.
      5. rt_sigreturn() restores the vstate, except the Vector registers,
         from the sigcontext
      6. rt_sigreturn() restores the Vector registers, from the sigcontext,
         and now the vectorized user_from_copy() is used. The dirty live
         state from the discard is saved to the vstate, making the vstate
         corrupt.
      7. rt_sigreturn() returns to the application, which crashes due to
         corrupted vstate.
    
    Note that the vectorized user_from_copy() is invoked depending on the
    value of CONFIG_RISCV_ISA_V_UCOPY_THRESHOLD. Default is 768, which
    means that vlen has to be larger than 128b for this bug to trigger.
    
    The fix is simply to mark the live state as non-dirty/clean prior
    performing the vstate restore.
    
    Link: https://github.com/riscv/riscv-isa-manual/releases/download/riscv-isa-release-8abdb41-2024-03-26/unpriv-isa-asciidoc.pdf # [1]
    Reported-by: Charlie Jenkins <[email protected]>
    Reported-by: Vineet Gupta <[email protected]>
    Fixes: c2a658d ("riscv: lib: vectorize copy_to_user/copy_from_user")
    Signed-off-by: Björn Töpel <[email protected]>
    Reviewed-by: Andy Chiu <[email protected]>
    Tested-by: Vineet Gupta <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Cc: [email protected]
    Signed-off-by: Palmer Dabbelt <[email protected]>
    bjorn-rivos authored and palmer-dabbelt committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    c27fa53 View commit details
    Browse the repository at this point in the history

Commits on Apr 4, 2024

  1. scx: Allow calling scx kfuncs from BPF_PROG_TYPE_SYSCALL

    We'll want to be able to issue BPF_PROG_RUN calls in order to
    synchronously call into the kernel from user space scheduling
    components. The most natural prog type for this seems to be
    BPF_PROG_TYPE_SYSCALL, which is a very safe program type. Let's allow
    invoking the core kfuncs from this program type as well.
    
    Signed-off-by: David Vernet <[email protected]>
    Byte-Lab committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    3b1871a View commit details
    Browse the repository at this point in the history
  2. scx/selftest: Add testcase invoking a kfunc with BPF_PROG_RUN

    Now that we can invoke scx kfuncs inside of a BPF_PROG_TYPE_SYSCALL
    program, let's add some selftests that validate the behavior.
    
    Signed-off-by: David Vernet <[email protected]>
    Byte-Lab committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    711d8c1 View commit details
    Browse the repository at this point in the history
  3. net: fec: Set mac_managed_pm during probe

    Setting mac_managed_pm during interface up is too late.
    
    In situations where the link is not brought up yet and the system suspends
    the regular PHY power management will run. Since the FEC ETHEREN control
    bit is cleared (automatically) on suspend the controller is off in resume.
    When the regular PHY power management resume path runs in this context it
    will write to the MII_DATA register but nothing will be transmitted on the
    MDIO bus.
    
    This can be observed by the following log:
    
        fec 5b040000.ethernet eth0: MDIO read timeout
        Microchip LAN87xx T1 5b040000.ethernet-1:04: PM: dpm_run_callback(): mdio_bus_phy_resume+0x0/0xc8 returns -110
        Microchip LAN87xx T1 5b040000.ethernet-1:04: PM: failed to resume: error -110
    
    The data written will however remain in the MII_DATA register.
    
    When the link later is set to administrative up it will trigger a call to
    fec_restart() which will restore the MII_SPEED register. This triggers the
    quirk explained in f166f89 ("net: ethernet: fec: Replace interrupt
    driven MDIO with polled IO") causing an extra MII_EVENT.
    
    This extra event desynchronizes all the MDIO register reads, causing them
    to complete too early. Leading all reads to read as 0 because
    fec_enet_mdio_wait() returns too early.
    
    When a Microchip LAN8700R PHY is connected to the FEC, the 0 reads causes
    the PHY to be initialized incorrectly and the PHY will not transmit any
    ethernet signal in this state. It cannot be brought out of this state
    without a power cycle of the PHY.
    
    Fixes: 557d5dc ("net: fec: use mac-managed PHY PM")
    Closes: https://lore.kernel.org/netdev/[email protected]/
    Signed-off-by: Wei Fang <[email protected]>
    [jernberg: commit message]
    Signed-off-by: John Ernberg <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Wei Fang authored and kuba-moo committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    cbc17e7 View commit details
    Browse the repository at this point in the history
  4. Merge branch 'net-fec-fix-to-suspend-resume-with-mac_managed_pm'

    John Ernberg says:
    
    ====================
    net: fec: Fix to suspend / resume with mac_managed_pm
    
    Since the introduction of mac_managed_pm in the FEC driver there were some
    discrepancies regarding power management of the PHY.
    
    This failed on our board that has a permanently powered Microchip LAN8700R
    attached to the FEC. Although the root cause of the failure can be traced
    back to f166f89 ("net: ethernet: fec: Replace interrupt driven MDIO
    with polled IO") and probably even before that, we only started noticing
    the problem going from 5.10 to 6.1.
    
    Since 557d5dc ("net: fec: use mac-managed PHY PM") is actually a fix
    to most of the power management sequencing problems that came with power
    managing the MDIO bus which for the FEC meant adding a race with FEC
    resume (and phy_start() if netif was running) and PHY resume.
    
    That it worked before for us was probably just luck...
    
    Thanks to Wei's response to my report at [1] I was able to pick up his
    patch and start honing in on the remaining missing details.
    
    [1]: https://lore.kernel.org/netdev/[email protected]/
    
    v3: https://lore.kernel.org/netdev/[email protected]/
    v2: https://lore.kernel.org/netdev/[email protected]/
    v1: https://lore.kernel.org/netdev/[email protected]/
    ====================
    
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    kuba-moo committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    22c5e0b View commit details
    Browse the repository at this point in the history
  5. net: txgbe: fix i2c dev name cannot match clkdev

    txgbe clkdev shortened clk_name, so i2c_dev info_name
    also need to shorten. Otherwise, i2c_dev cannot initialize
    clock.
    
    Fixes: e30cef0 ("net: txgbe: fix clk_name exceed MAX_DEV_ID limits")
    Signed-off-by: Duanqiang Wen <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Duanqiang Wen authored and kuba-moo committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    c644920 View commit details
    Browse the repository at this point in the history
  6. net: stmmac: fix rx queue priority assignment

    The driver should ensure that same priority is not mapped to multiple
    rx queues. From DesignWare Cores Ethernet Quality-of-Service
    Databook, section 17.1.29 MAC_RxQ_Ctrl2:
    "[...]The software must ensure that the content of this field is
    mutually exclusive to the PSRQ fields for other queues, that is,
    the same priority is not mapped to multiple Rx queues[...]"
    
    Previously rx_queue_priority() function was:
    - clearing all priorities from a queue
    - adding new priorities to that queue
    After this patch it will:
    - first assign new priorities to a queue
    - then remove those priorities from all other queues
    - keep other priorities previously assigned to that queue
    
    Fixes: a8f5102 ("net: stmmac: TX and RX queue priority configuration")
    Fixes: 2142754 ("net: stmmac: Add MAC related callbacks for XGMAC2")
    Signed-off-by: Piotr Wejman <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    wp9006 authored and kuba-moo committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    b3da86d View commit details
    Browse the repository at this point in the history
  7. net: phy: micrel: lan8814: Fix when enabling/disabling 1-step timesta…

    …mping
    
    There are 2 issues with the blamed commit.
    1. When the phy is initialized, it would enable the disabled of UDPv4
       checksums. The UDPv6 checksum is already enabled by default. So when
       1-step is configured then it would clear these flags.
    2. After the 1-step is configured, then if 2-step is configured then the
       1-step would be still configured because it is not clearing the flag.
       So the sync frames will still have origin timestamps set.
    
    Fix this by reading first the value of the register and then
    just change bit 12 as this one determines if the timestamp needs to
    be inserted in the frame, without changing any other bits.
    
    Fixes: ece1950 ("net: phy: micrel: 1588 support for LAN8814 phy")
    Signed-off-by: Horatiu Vultur <[email protected]>
    Reviewed-by: Divya Koppera <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    HoratiuVultur authored and kuba-moo committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    de99e1e View commit details
    Browse the repository at this point in the history
  8. net/sched: fix lockdep splat in qdisc_tree_reduce_backlog()

    qdisc_tree_reduce_backlog() is called with the qdisc lock held,
    not RTNL.
    
    We must use qdisc_lookup_rcu() instead of qdisc_lookup()
    
    syzbot reported:
    
    WARNING: suspicious RCU usage
    6.1.74-syzkaller #0 Not tainted
    -----------------------------
    net/sched/sch_api.c:305 suspicious rcu_dereference_protected() usage!
    
    other info that might help us debug this:
    
    rcu_scheduler_active = 2, debug_locks = 1
    3 locks held by udevd/1142:
      #0: ffffffff87c729a0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:306 [inline]
      #0: ffffffff87c729a0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:747 [inline]
      #0: ffffffff87c729a0 (rcu_read_lock){....}-{1:2}, at: net_tx_action+0x64a/0x970 net/core/dev.c:5282
      #1: ffff888171861108 (&sch->q.lock){+.-.}-{2:2}, at: spin_lock include/linux/spinlock.h:350 [inline]
      #1: ffff888171861108 (&sch->q.lock){+.-.}-{2:2}, at: net_tx_action+0x754/0x970 net/core/dev.c:5297
      #2: ffffffff87c729a0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:306 [inline]
      #2: ffffffff87c729a0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:747 [inline]
      #2: ffffffff87c729a0 (rcu_read_lock){....}-{1:2}, at: qdisc_tree_reduce_backlog+0x84/0x580 net/sched/sch_api.c:792
    
    stack backtrace:
    CPU: 1 PID: 1142 Comm: udevd Not tainted 6.1.74-syzkaller #0
    Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024
    Call Trace:
     <TASK>
      [<ffffffff85b85f14>] __dump_stack lib/dump_stack.c:88 [inline]
      [<ffffffff85b85f14>] dump_stack_lvl+0x1b1/0x28f lib/dump_stack.c:106
      [<ffffffff85b86007>] dump_stack+0x15/0x1e lib/dump_stack.c:113
      [<ffffffff81802299>] lockdep_rcu_suspicious+0x1b9/0x260 kernel/locking/lockdep.c:6592
      [<ffffffff84f0054c>] qdisc_lookup+0xac/0x6f0 net/sched/sch_api.c:305
      [<ffffffff84f037c3>] qdisc_tree_reduce_backlog+0x243/0x580 net/sched/sch_api.c:811
      [<ffffffff84f5b78c>] pfifo_tail_enqueue+0x32c/0x4b0 net/sched/sch_fifo.c:51
      [<ffffffff84fbcf63>] qdisc_enqueue include/net/sch_generic.h:833 [inline]
      [<ffffffff84fbcf63>] netem_dequeue+0xeb3/0x15d0 net/sched/sch_netem.c:723
      [<ffffffff84eecab9>] dequeue_skb net/sched/sch_generic.c:292 [inline]
      [<ffffffff84eecab9>] qdisc_restart net/sched/sch_generic.c:397 [inline]
      [<ffffffff84eecab9>] __qdisc_run+0x249/0x1e60 net/sched/sch_generic.c:415
      [<ffffffff84d7aa96>] qdisc_run+0xd6/0x260 include/net/pkt_sched.h:125
      [<ffffffff84d85d29>] net_tx_action+0x7c9/0x970 net/core/dev.c:5313
      [<ffffffff85e002bd>] __do_softirq+0x2bd/0x9bd kernel/softirq.c:616
      [<ffffffff81568bca>] invoke_softirq kernel/softirq.c:447 [inline]
      [<ffffffff81568bca>] __irq_exit_rcu+0xca/0x230 kernel/softirq.c:700
      [<ffffffff81568ae9>] irq_exit_rcu+0x9/0x20 kernel/softirq.c:712
      [<ffffffff85b89f52>] sysvec_apic_timer_interrupt+0x42/0x90 arch/x86/kernel/apic/apic.c:1107
      [<ffffffff85c00ccb>] asm_sysvec_apic_timer_interrupt+0x1b/0x20 arch/x86/include/asm/idtentry.h:656
    
    Fixes: d636fc5 ("net: sched: add rcu annotations around qdisc->qdisc_sleeping")
    Reported-by: syzbot <[email protected]>
    Signed-off-by: Eric Dumazet <[email protected]>
    Reviewed-by: Jiri Pirko <[email protected]>
    Acked-by: Jamal Hadi Salim <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Eric Dumazet authored and kuba-moo committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    7eb3223 View commit details
    Browse the repository at this point in the history
  9. net: mana: Fix Rx DMA datasize and skb_over_panic

    mana_get_rxbuf_cfg() aligns the RX buffer's DMA datasize to be
    multiple of 64. So a packet slightly bigger than mtu+14, say 1536,
    can be received and cause skb_over_panic.
    
    Sample dmesg:
    [ 5325.237162] skbuff: skb_over_panic: text:ffffffffc043277a len:1536 put:1536 head:ff1100018b517000 data:ff1100018b517100 tail:0x700 end:0x6ea dev:<NULL>
    [ 5325.243689] ------------[ cut here ]------------
    [ 5325.245748] kernel BUG at net/core/skbuff.c:192!
    [ 5325.247838] invalid opcode: 0000 [#1] PREEMPT SMP NOPTI
    [ 5325.258374] RIP: 0010:skb_panic+0x4f/0x60
    [ 5325.302941] Call Trace:
    [ 5325.304389]  <IRQ>
    [ 5325.315794]  ? skb_panic+0x4f/0x60
    [ 5325.317457]  ? asm_exc_invalid_op+0x1f/0x30
    [ 5325.319490]  ? skb_panic+0x4f/0x60
    [ 5325.321161]  skb_put+0x4e/0x50
    [ 5325.322670]  mana_poll+0x6fa/0xb50 [mana]
    [ 5325.324578]  __napi_poll+0x33/0x1e0
    [ 5325.326328]  net_rx_action+0x12e/0x280
    
    As discussed internally, this alignment is not necessary. To fix
    this bug, remove it from the code. So oversized packets will be
    marked as CQE_RX_TRUNCATED by NIC, and dropped.
    
    Cc: [email protected]
    Fixes: 2fbbd71 ("net: mana: Enable RX path to handle various MTU sizes")
    Signed-off-by: Haiyang Zhang <[email protected]>
    Reviewed-by: Dexuan Cui <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    haiyangz authored and kuba-moo committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    c0de6ab View commit details
    Browse the repository at this point in the history
  10. ata: sata_mv: Fix PCI device ID table declaration compilation warning

    Building with W=1 shows a warning for an unused variable when CONFIG_PCI
    is diabled:
    
    drivers/ata/sata_mv.c:790:35: error: unused variable 'mv_pci_tbl' [-Werror,-Wunused-const-variable]
    static const struct pci_device_id mv_pci_tbl[] = {
    
    Move the table into the same block that containsn the pci_driver
    definition.
    
    Fixes: 7bb3c52 ("sata_mv: Remove PCI dependency")
    Signed-off-by: Arnd Bergmann <[email protected]>
    Signed-off-by: Damien Le Moal <[email protected]>
    arndb authored and damien-lemoal committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    3137b83 View commit details
    Browse the repository at this point in the history
  11. Merge pull request #172 from sched-ext/kfuncs_syscall

    scx: Allow calling scx kfuncs from BPF_PROG_TYPE_SYSCALL
    htejun authored Apr 4, 2024
    Configuration menu
    Copy the full SHA
    ba16c88 View commit details
    Browse the repository at this point in the history
  12. ata: sata_gemini: Check clk_enable() result

    The call to clk_enable() in gemini_sata_start_bridge() can fail.
    Add a check to detect such failure.
    
    Signed-off-by: Chen Ni <[email protected]>
    Signed-off-by: Damien Le Moal <[email protected]>
    Chen Ni authored and damien-lemoal committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    e85006a View commit details
    Browse the repository at this point in the history
  13. x86/numa/32: Include missing <asm/pgtable_areas.h>

    The __vmalloc_start_set declaration is in a header that is not included
    in numa_32.c in current linux-next:
    
      arch/x86/mm/numa_32.c: In function 'initmem_init':
      arch/x86/mm/numa_32.c:57:9: error: '__vmalloc_start_set' undeclared (first use in this function)
         57 |         __vmalloc_start_set = true;
            |         ^~~~~~~~~~~~~~~~~~~
      arch/x86/mm/numa_32.c:57:9: note: each undeclared identifier is reported only once for each function it appears in
    
    Add an explicit #include.
    
    Signed-off-by: Arnd Bergmann <[email protected]>
    Signed-off-by: Ingo Molnar <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    arndb authored and Ingo Molnar committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    9852b1d View commit details
    Browse the repository at this point in the history
  14. tg3: Remove residual error handling in tg3_suspend

    As of now, tg3_power_down_prepare always ends with success, but
    the error handling code from former tg3_set_power_state call is still here.
    
    This code became unreachable in commit c866b7e ("tg3: Do not use
    legacy PCI power management").
    
    Remove (now unreachable) error handling code for simplification and change
    tg3_power_down_prepare to a void function as its result is no more checked.
    
    Signed-off-by: Nikita Kiryushin <[email protected]>
    Reviewed-by: Michael Chan <[email protected]>
    Reviewed-by: Simon Horman <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Paolo Abeni <[email protected]>
    nkiryushin authored and Paolo Abeni committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    9ab4ad2 View commit details
    Browse the repository at this point in the history
  15. x86/coco: Require seeding RNG with RDRAND on CoCo systems

    There are few uses of CoCo that don't rely on working cryptography and
    hence a working RNG. Unfortunately, the CoCo threat model means that the
    VM host cannot be trusted and may actively work against guests to
    extract secrets or manipulate computation. Since a malicious host can
    modify or observe nearly all inputs to guests, the only remaining source
    of entropy for CoCo guests is RDRAND.
    
    If RDRAND is broken -- due to CPU hardware fault -- the RNG as a whole
    is meant to gracefully continue on gathering entropy from other sources,
    but since there aren't other sources on CoCo, this is catastrophic.
    This is mostly a concern at boot time when initially seeding the RNG, as
    after that the consequences of a broken RDRAND are much more
    theoretical.
    
    So, try at boot to seed the RNG using 256 bits of RDRAND output. If this
    fails, panic(). This will also trigger if the system is booted without
    RDRAND, as RDRAND is essential for a safe CoCo boot.
    
    Add this deliberately to be "just a CoCo x86 driver feature" and not
    part of the RNG itself. Many device drivers and platforms have some
    desire to contribute something to the RNG, and add_device_randomness()
    is specifically meant for this purpose.
    
    Any driver can call it with seed data of any quality, or even garbage
    quality, and it can only possibly make the quality of the RNG better or
    have no effect, but can never make it worse.
    
    Rather than trying to build something into the core of the RNG, consider
    the particular CoCo issue just a CoCo issue, and therefore separate it
    all out into driver (well, arch/platform) code.
    
      [ bp: Massage commit message. ]
    
    Signed-off-by: Jason A. Donenfeld <[email protected]>
    Signed-off-by: Borislav Petkov (AMD) <[email protected]>
    Reviewed-by: Elena Reshetova <[email protected]>
    Reviewed-by: Kirill A. Shutemov <[email protected]>
    Reviewed-by: Theodore Ts'o <[email protected]>
    Cc: [email protected]
    Link: https://lore.kernel.org/r/[email protected]
    zx2c4 authored and bp3tk0v committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    99485c4 View commit details
    Browse the repository at this point in the history
  16. x86/kvm/Kconfig: Have KVM_AMD_SEV select ARCH_HAS_CC_PLATFORM

    The functionality to load SEV-SNP guests by the host will soon rely on
    cc_platform* helpers because the cpu_feature* API with the early
    patching is insufficient when SNP support needs to be disabled late.
    
    Therefore, pull that functionality in.
    
    Fixes: 216d106 ("x86/sev: Add SEV-SNP host initialization support")
    Signed-off-by: Borislav Petkov (AMD) <[email protected]>
    Reviewed-by: Tom Lendacky <[email protected]>
    Tested-by: Srikanth Aithal <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    bp3tk0v committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    54f5f47 View commit details
    Browse the repository at this point in the history
  17. x86/cc: Add cc_platform_set/_clear() helpers

    Add functionality to set and/or clear different attributes of the
    machine as a confidential computing platform. Add the first one too:
    whether the machine is running as a host for SEV-SNP guests.
    
    Fixes: 216d106 ("x86/sev: Add SEV-SNP host initialization support")
    Signed-off-by: Borislav Petkov (AMD) <[email protected]>
    Reviewed-by: Tom Lendacky <[email protected]>
    Tested-by: Srikanth Aithal <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    bp3tk0v committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    bc6f707 View commit details
    Browse the repository at this point in the history
  18. x86/CPU/AMD: Track SNP host status with cc_platform_*()

    The host SNP worthiness can determined later, after alternatives have
    been patched, in snp_rmptable_init() depending on cmdline options like
    iommu=pt which is incompatible with SNP, for example.
    
    Which means that one cannot use X86_FEATURE_SEV_SNP and will need to
    have a special flag for that control.
    
    Use that newly added CC_ATTR_HOST_SEV_SNP in the appropriate places.
    
    Move kdump_sev_callback() to its rightful place, while at it.
    
    Fixes: 216d106 ("x86/sev: Add SEV-SNP host initialization support")
    Signed-off-by: Borislav Petkov (AMD) <[email protected]>
    Reviewed-by: Tom Lendacky <[email protected]>
    Tested-by: Srikanth Aithal <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    bp3tk0v committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    0ecaefb View commit details
    Browse the repository at this point in the history
  19. Revert "tg3: Remove residual error handling in tg3_suspend"

    This reverts commit 9ab4ad2.
    
    I went out of coffee and applied it to the wrong tree. Blame on me.
    
    Signed-off-by: Paolo Abeni <[email protected]>
    Paolo Abeni committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    72076fc View commit details
    Browse the repository at this point in the history
  20. netfilter: nf_tables: release batch on table validation from abort path

    Unlike early commit path stage which triggers a call to abort, an
    explicit release of the batch is required on abort, otherwise mutex is
    released and commit_list remains in place.
    
    Add WARN_ON_ONCE to ensure commit_list is empty from the abort path
    before releasing the mutex.
    
    After this patch, commit_list is always assumed to be empty before
    grabbing the mutex, therefore
    
      03c1f1e ("netfilter: Cleanup nft_net->module_list from nf_tables_exit_net()")
    
    only needs to release the pending modules for registration.
    
    Cc: [email protected]
    Fixes: c0391b6 ("netfilter: nf_tables: missing validation from the abort path")
    Signed-off-by: Pablo Neira Ayuso <[email protected]>
    ummakynes committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    a45e688 View commit details
    Browse the repository at this point in the history
  21. netfilter: nf_tables: release mutex after nft_gc_seq_end from abort path

    The commit mutex should not be released during the critical section
    between nft_gc_seq_begin() and nft_gc_seq_end(), otherwise, async GC
    worker could collect expired objects and get the released commit lock
    within the same GC sequence.
    
    nf_tables_module_autoload() temporarily releases the mutex to load
    module dependencies, then it goes back to replay the transaction again.
    Move it at the end of the abort phase after nft_gc_seq_end() is called.
    
    Cc: [email protected]
    Fixes: 7203443 ("netfilter: nf_tables: GC transaction race with abort path")
    Reported-by: Kuan-Ting Chen <[email protected]>
    Signed-off-by: Pablo Neira Ayuso <[email protected]>
    ummakynes committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    0d459e2 View commit details
    Browse the repository at this point in the history
  22. netfilter: nf_tables: flush pending destroy work before exit_net release

    Similar to 2c9f029 ("netfilter: nf_tables: flush pending destroy
    work before netlink notifier") to address a race between exit_net and
    the destroy workqueue.
    
    The trace below shows an element to be released via destroy workqueue
    while exit_net path (triggered via module removal) has already released
    the set that is used in such transaction.
    
    [ 1360.547789] BUG: KASAN: slab-use-after-free in nf_tables_trans_destroy_work+0x3f5/0x590 [nf_tables]
    [ 1360.547861] Read of size 8 at addr ffff888140500cc0 by task kworker/4:1/152465
    [ 1360.547870] CPU: 4 PID: 152465 Comm: kworker/4:1 Not tainted 6.8.0+ #359
    [ 1360.547882] Workqueue: events nf_tables_trans_destroy_work [nf_tables]
    [ 1360.547984] Call Trace:
    [ 1360.547991]  <TASK>
    [ 1360.547998]  dump_stack_lvl+0x53/0x70
    [ 1360.548014]  print_report+0xc4/0x610
    [ 1360.548026]  ? __virt_addr_valid+0xba/0x160
    [ 1360.548040]  ? __pfx__raw_spin_lock_irqsave+0x10/0x10
    [ 1360.548054]  ? nf_tables_trans_destroy_work+0x3f5/0x590 [nf_tables]
    [ 1360.548176]  kasan_report+0xae/0xe0
    [ 1360.548189]  ? nf_tables_trans_destroy_work+0x3f5/0x590 [nf_tables]
    [ 1360.548312]  nf_tables_trans_destroy_work+0x3f5/0x590 [nf_tables]
    [ 1360.548447]  ? __pfx_nf_tables_trans_destroy_work+0x10/0x10 [nf_tables]
    [ 1360.548577]  ? _raw_spin_unlock_irq+0x18/0x30
    [ 1360.548591]  process_one_work+0x2f1/0x670
    [ 1360.548610]  worker_thread+0x4d3/0x760
    [ 1360.548627]  ? __pfx_worker_thread+0x10/0x10
    [ 1360.548640]  kthread+0x16b/0x1b0
    [ 1360.548653]  ? __pfx_kthread+0x10/0x10
    [ 1360.548665]  ret_from_fork+0x2f/0x50
    [ 1360.548679]  ? __pfx_kthread+0x10/0x10
    [ 1360.548690]  ret_from_fork_asm+0x1a/0x30
    [ 1360.548707]  </TASK>
    
    [ 1360.548719] Allocated by task 192061:
    [ 1360.548726]  kasan_save_stack+0x20/0x40
    [ 1360.548739]  kasan_save_track+0x14/0x30
    [ 1360.548750]  __kasan_kmalloc+0x8f/0xa0
    [ 1360.548760]  __kmalloc_node+0x1f1/0x450
    [ 1360.548771]  nf_tables_newset+0x10c7/0x1b50 [nf_tables]
    [ 1360.548883]  nfnetlink_rcv_batch+0xbc4/0xdc0 [nfnetlink]
    [ 1360.548909]  nfnetlink_rcv+0x1a8/0x1e0 [nfnetlink]
    [ 1360.548927]  netlink_unicast+0x367/0x4f0
    [ 1360.548935]  netlink_sendmsg+0x34b/0x610
    [ 1360.548944]  ____sys_sendmsg+0x4d4/0x510
    [ 1360.548953]  ___sys_sendmsg+0xc9/0x120
    [ 1360.548961]  __sys_sendmsg+0xbe/0x140
    [ 1360.548971]  do_syscall_64+0x55/0x120
    [ 1360.548982]  entry_SYSCALL_64_after_hwframe+0x55/0x5d
    
    [ 1360.548994] Freed by task 192222:
    [ 1360.548999]  kasan_save_stack+0x20/0x40
    [ 1360.549009]  kasan_save_track+0x14/0x30
    [ 1360.549019]  kasan_save_free_info+0x3b/0x60
    [ 1360.549028]  poison_slab_object+0x100/0x180
    [ 1360.549036]  __kasan_slab_free+0x14/0x30
    [ 1360.549042]  kfree+0xb6/0x260
    [ 1360.549049]  __nft_release_table+0x473/0x6a0 [nf_tables]
    [ 1360.549131]  nf_tables_exit_net+0x170/0x240 [nf_tables]
    [ 1360.549221]  ops_exit_list+0x50/0xa0
    [ 1360.549229]  free_exit_list+0x101/0x140
    [ 1360.549236]  unregister_pernet_operations+0x107/0x160
    [ 1360.549245]  unregister_pernet_subsys+0x1c/0x30
    [ 1360.549254]  nf_tables_module_exit+0x43/0x80 [nf_tables]
    [ 1360.549345]  __do_sys_delete_module+0x253/0x370
    [ 1360.549352]  do_syscall_64+0x55/0x120
    [ 1360.549360]  entry_SYSCALL_64_after_hwframe+0x55/0x5d
    
    (gdb) list *__nft_release_table+0x473
    0x1e033 is in __nft_release_table (net/netfilter/nf_tables_api.c:11354).
    11349           list_for_each_entry_safe(flowtable, nf, &table->flowtables, list) {
    11350                   list_del(&flowtable->list);
    11351                   nft_use_dec(&table->use);
    11352                   nf_tables_flowtable_destroy(flowtable);
    11353           }
    11354           list_for_each_entry_safe(set, ns, &table->sets, list) {
    11355                   list_del(&set->list);
    11356                   nft_use_dec(&table->use);
    11357                   if (set->flags & (NFT_SET_MAP | NFT_SET_OBJECT))
    11358                           nft_map_deactivate(&ctx, set);
    (gdb)
    
    [ 1360.549372] Last potentially related work creation:
    [ 1360.549376]  kasan_save_stack+0x20/0x40
    [ 1360.549384]  __kasan_record_aux_stack+0x9b/0xb0
    [ 1360.549392]  __queue_work+0x3fb/0x780
    [ 1360.549399]  queue_work_on+0x4f/0x60
    [ 1360.549407]  nft_rhash_remove+0x33b/0x340 [nf_tables]
    [ 1360.549516]  nf_tables_commit+0x1c6a/0x2620 [nf_tables]
    [ 1360.549625]  nfnetlink_rcv_batch+0x728/0xdc0 [nfnetlink]
    [ 1360.549647]  nfnetlink_rcv+0x1a8/0x1e0 [nfnetlink]
    [ 1360.549671]  netlink_unicast+0x367/0x4f0
    [ 1360.549680]  netlink_sendmsg+0x34b/0x610
    [ 1360.549690]  ____sys_sendmsg+0x4d4/0x510
    [ 1360.549697]  ___sys_sendmsg+0xc9/0x120
    [ 1360.549706]  __sys_sendmsg+0xbe/0x140
    [ 1360.549715]  do_syscall_64+0x55/0x120
    [ 1360.549725]  entry_SYSCALL_64_after_hwframe+0x55/0x5d
    
    Fixes: 0935d55 ("netfilter: nf_tables: asynchronous release")
    Signed-off-by: Pablo Neira Ayuso <[email protected]>
    ummakynes committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    24cea96 View commit details
    Browse the repository at this point in the history
  23. netfilter: nf_tables: reject new basechain after table flag update

    When dormant flag is toggled, hooks are disabled in the commit phase by
    iterating over current chains in table (existing and new).
    
    The following configuration allows for an inconsistent state:
    
      add table x
      add chain x y { type filter hook input priority 0; }
      add table x { flags dormant; }
      add chain x w { type filter hook input priority 1; }
    
    which triggers the following warning when trying to unregister chain w
    which is already unregistered.
    
    [  127.322252] WARNING: CPU: 7 PID: 1211 at net/netfilter/core.c:50                                                                     1 __nf_unregister_net_hook+0x21a/0x260
    [...]
    [  127.322519] Call Trace:
    [  127.322521]  <TASK>
    [  127.322524]  ? __warn+0x9f/0x1a0
    [  127.322531]  ? __nf_unregister_net_hook+0x21a/0x260
    [  127.322537]  ? report_bug+0x1b1/0x1e0
    [  127.322545]  ? handle_bug+0x3c/0x70
    [  127.322552]  ? exc_invalid_op+0x17/0x40
    [  127.322556]  ? asm_exc_invalid_op+0x1a/0x20
    [  127.322563]  ? kasan_save_free_info+0x3b/0x60
    [  127.322570]  ? __nf_unregister_net_hook+0x6a/0x260
    [  127.322577]  ? __nf_unregister_net_hook+0x21a/0x260
    [  127.322583]  ? __nf_unregister_net_hook+0x6a/0x260
    [  127.322590]  ? __nf_tables_unregister_hook+0x8a/0xe0 [nf_tables]
    [  127.322655]  nft_table_disable+0x75/0xf0 [nf_tables]
    [  127.322717]  nf_tables_commit+0x2571/0x2620 [nf_tables]
    
    Fixes: 179d9ba ("netfilter: nf_tables: fix table flag updates")
    Signed-off-by: Pablo Neira Ayuso <[email protected]>
    ummakynes committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    994209d View commit details
    Browse the repository at this point in the history
  24. netfilter: nf_tables: Fix potential data-race in __nft_flowtable_type…

    …_get()
    
    nft_unregister_flowtable_type() within nf_flow_inet_module_exit() can
    concurrent with __nft_flowtable_type_get() within nf_tables_newflowtable().
    And thhere is not any protection when iterate over nf_tables_flowtables
    list in __nft_flowtable_type_get(). Therefore, there is pertential
    data-race of nf_tables_flowtables list entry.
    
    Use list_for_each_entry_rcu() to iterate over nf_tables_flowtables list
    in __nft_flowtable_type_get(), and use rcu_read_lock() in the caller
    nft_flowtable_type_get() to protect the entire type query process.
    
    Fixes: 3b49e2e ("netfilter: nf_tables: add flow table netlink frontend")
    Signed-off-by: Ziyang Xuan <[email protected]>
    Signed-off-by: Pablo Neira Ayuso <[email protected]>
    Ziyang Xuan authored and ummakynes committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    2422501 View commit details
    Browse the repository at this point in the history
  25. netfilter: nf_tables: discard table flag update with pending basechai…

    …n deletion
    
    Hook unregistration is deferred to the commit phase, same occurs with
    hook updates triggered by the table dormant flag. When both commands are
    combined, this results in deleting a basechain while leaving its hook
    still registered in the core.
    
    Fixes: 179d9ba ("netfilter: nf_tables: fix table flag updates")
    Signed-off-by: Pablo Neira Ayuso <[email protected]>
    ummakynes committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    1bc83a0 View commit details
    Browse the repository at this point in the history
  26. net: ravb: Always process TX descriptor ring

    The TX queue should be serviced each time the poll function is called,
    even if the full RX work budget has been consumed. This prevents
    starvation of the TX queue when RX bandwidth usage is high.
    
    Fixes: c156633 ("Renesas Ethernet AVB driver proper")
    Signed-off-by: Paul Barker <[email protected]>
    Reviewed-by: Sergey Shtylyov <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Paolo Abeni <[email protected]>
    pbrkr authored and Paolo Abeni committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    596a425 View commit details
    Browse the repository at this point in the history
  27. net: ravb: Always update error counters

    The error statistics should be updated each time the poll function is
    called, even if the full RX work budget has been consumed. This prevents
    the counts from becoming stuck when RX bandwidth usage is high.
    
    This also ensures that error counters are not updated after we've
    re-enabled interrupts as that could result in a race condition.
    
    Also drop an unnecessary space.
    
    Fixes: c156633 ("Renesas Ethernet AVB driver proper")
    Signed-off-by: Paul Barker <[email protected]>
    Reviewed-by: Sergey Shtylyov <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Paolo Abeni <[email protected]>
    pbrkr authored and Paolo Abeni committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    101b764 View commit details
    Browse the repository at this point in the history
  28. net: dsa: sja1105: Fix parameters order in sja1110_pcs_mdio_write_c45()

    The definition and declaration of sja1110_pcs_mdio_write_c45() don't have
    parameters in the same order.
    
    Knowing that sja1110_pcs_mdio_write_c45() is used as a function pointer
    in 'sja1105_info' structure with .pcs_mdio_write_c45, and that we have:
    
       int (*pcs_mdio_write_c45)(struct mii_bus *bus, int phy, int mmd,
    				  int reg, u16 val);
    
    it is likely that the definition is the one to change.
    
    Found with cppcheck, funcArgOrderDifferent.
    
    Fixes: ae27154 ("net: dsa: sja1105: C45 only transactions for PCS")
    Signed-off-by: Christophe JAILLET <[email protected]>
    Reviewed-by: Michael Walle <[email protected]>
    Reviewed-by: Vladimir Oltean <[email protected]>
    Link: https://lore.kernel.org/r/ff2a5af67361988b3581831f7bd1eddebfb4c48f.1712082763.git.christophe.jaillet@wanadoo.fr
    Signed-off-by: Paolo Abeni <[email protected]>
    tititiou36 authored and Paolo Abeni committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    c120209 View commit details
    Browse the repository at this point in the history
  29. ASoC: SOF: amd: fix for false dsp interrupts

    Before ACP firmware loading, DSP interrupts are not expected.
    Sometimes after reboot, it's observed that before ACP firmware is loaded
    false DSP interrupt is reported.
    Registering the interrupt handler before acp initialization causing false
    interrupts sometimes on reboot as ACP reset is not applied.
    Correct the sequence by invoking acp initialization sequence prior to
    registering interrupt handler.
    
    Fixes: 738a2b5 ("ASoC: SOF: amd: Add IPC support for ACP IP block")
    Signed-off-by: Vijendar Mukunda <[email protected]>
    Link: https://msgid.link/r/[email protected]
    Signed-off-by: Mark Brown <[email protected]>
    vijendarmukunda authored and broonie committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    b9846a3 View commit details
    Browse the repository at this point in the history
  30. drm/xe: Use ring ops TLB invalidation for rebinds

    For each rebind we insert a GuC TLB invalidation and add a
    corresponding unordered TLB invalidation fence. This might
    add a huge number of TLB invalidation fences to wait for so
    rather than doing that, defer the TLB invalidation to the
    next ring ops for each affected exec queue. Since the TLB
    is invalidated on exec_queue switch, we need to invalidate
    once for each affected exec_queue.
    
    v2:
    - Simplify if-statements around the tlb_flush_seqno.
      (Matthew Brost)
    - Add some comments and asserts.
    
    Fixes: 5387e86 ("drm/xe: Add TLB invalidation fence after rebinds issued from execs")
    Cc: Matthew Brost <[email protected]>
    Cc: <[email protected]> # v6.8+
    Signed-off-by: Thomas Hellström <[email protected]>
    Reviewed-by: Matthew Brost <[email protected]>
    Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
    (cherry picked from commit 4fc4899)
    Signed-off-by: Lucas De Marchi <[email protected]>
    Thomas Hellström authored and lucasdemarchi committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    3c88b8f View commit details
    Browse the repository at this point in the history
  31. drm/xe: Rework rebinding

    Instead of handling the vm's rebind fence separately,
    which is error prone if they are not strictly ordered,
    attach rebind fences as kernel fences to the vm's resv.
    
    Fixes: dd08ebf ("drm/xe: Introduce a new DRM driver for Intel GPUs")
    Cc: Rodrigo Vivi <[email protected]>
    Cc: Matthew Brost <[email protected]>
    Cc: <[email protected]> # v6.8+
    Signed-off-by: Thomas Hellström <[email protected]>
    Reviewed-by: Matthew Brost <[email protected]>
    Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
    (cherry picked from commit 5a091af)
    Signed-off-by: Lucas De Marchi <[email protected]>
    Thomas Hellström authored and lucasdemarchi committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    a00e7e3 View commit details
    Browse the repository at this point in the history
  32. drm/xe: Make TLB invalidation fences unordered

    They can actually complete out-of-order, so allocate a unique
    fence context for each fence.
    
    Fixes: 5387e86 ("drm/xe: Add TLB invalidation fence after rebinds issued from execs")
    Cc: Matthew Brost <[email protected]>
    Cc: <[email protected]> # v6.8+
    Signed-off-by: Thomas Hellström <[email protected]>
    Reviewed-by: Matthew Brost <[email protected]>
    Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
    (cherry picked from commit 0453f17)
    Signed-off-by: Lucas De Marchi <[email protected]>
    Thomas Hellström authored and lucasdemarchi committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    fd1c808 View commit details
    Browse the repository at this point in the history
  33. drm/xe: Move vma rebinding to the drm_exec locking loop

    Rebinding might allocate page-table bos, causing evictions.
    To support blocking locking during these evictions,
    perform the rebinding in the drm_exec locking loop.
    
    Also Reserve fence slots where actually needed rather than trying to
    predict how many fence slots will be needed over a complete
    wound-wait transaction.
    
    v2:
    - Remove a leftover call to xe_vm_rebind() (Matt Brost)
    - Add a helper function xe_vm_validate_rebind() (Matt Brost)
    v3:
    - Add comments and squash with previous patch (Matt Brost)
    
    Fixes: 24f947d ("drm/xe: Use DRM GPUVM helpers for external- and evicted objects")
    Fixes: 29f424e ("drm/xe/exec: move fence reservation")
    Cc: Matthew Auld <[email protected]>
    Signed-off-by: Thomas Hellström <[email protected]>
    Reviewed-by: Matthew Brost <[email protected]>
    Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
    (cherry picked from commit 7ee7dd6)
    Signed-off-by: Lucas De Marchi <[email protected]>
    Thomas Hellström authored and lucasdemarchi committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    3edd52b View commit details
    Browse the repository at this point in the history
  34. drm/xe: Use ordered wq for preempt fence waiting

    Preempt fences can sleep waiting for an exec queue suspend operation to
    complete. If the system_unbound_wq is used for waiting and the number of
    waiters exceeds max_active this will result in other users of the
    system_unbound_wq getting starved. Use a device private work queue for
    preempt fences to avoid starvation of the system_unbound_wq.
    
    Even though suspend operations can complete out-of-order, all suspend
    operations within a VM need to complete before the preempt rebind worker
    can start. With that, use a device private ordered wq for preempt fence
    waiting.
    
    v2:
     - Add comment about cleanup on failure (Matt R)
     - Update commit message (Lucas)
    
    Fixes: dd08ebf ("drm/xe: Introduce a new DRM driver for Intel GPUs")
    Signed-off-by: Matthew Brost <[email protected]>
    Reviewed-by: Lucas De Marchi <[email protected]>
    Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
    Signed-off-by: Lucas De Marchi <[email protected]>
    (cherry picked from commit 37c15c4)
    Signed-off-by: Lucas De Marchi <[email protected]>
    mbrost05 authored and lucasdemarchi committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    77a0110 View commit details
    Browse the repository at this point in the history
  35. SUNRPC: Fix a slow server-side memory leak with RPC-over-TCP

    Jan Schunk reports that his small NFS servers suffer from memory
    exhaustion after just a few days. A bisect shows that commit
    e18e157 ("SUNRPC: Send RPC message on TCP with a single
    sock_sendmsg() call") is the first bad commit.
    
    That commit assumed that sock_sendmsg() releases all the pages in
    the underlying bio_vec array, but the reality is that it doesn't.
    svc_xprt_release() releases the rqst's response pages, but the
    record marker page fragment isn't one of those, so it is never
    released.
    
    This is a narrow fix that can be applied to stable kernels. A
    more extensive fix is in the works.
    
    Reported-by: Jan Schunk <[email protected]>
    Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218671
    Fixes: e18e157 ("SUNRPC: Send RPC message on TCP with a single sock_sendmsg() call")
    Cc: Alexander Duyck <[email protected]>
    Cc: Jakub Kacinski <[email protected]>
    Cc: David Howells <[email protected]>
    Reviewed-by: David Howells <[email protected]>
    Signed-off-by: Chuck Lever <[email protected]>
    chucklever committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    05258a0 View commit details
    Browse the repository at this point in the history
  36. gpio: cdev: check for NULL labels when sanitizing them for irqs

    We need to take into account that a line's consumer label may be NULL
    and not try to kstrdup() it in that case but rather pass the NULL
    pointer up the stack to the interrupt request function.
    
    To that end: let make_irq_label() return NULL as a valid return value
    and use ERR_PTR() instead to signal an allocation failure to callers.
    
    Cc: [email protected]
    Fixes: b344908 ("gpio: cdev: sanitize the label before requesting the interrupt")
    Reported-by: Linux Kernel Functional Testing <[email protected]>
    Closes: https://lore.kernel.org/lkml/[email protected]/
    Signed-off-by: Bartosz Golaszewski <[email protected]>
    Tested-by: Anders Roxell <[email protected]>
    Bartosz Golaszewski committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    b3b9596 View commit details
    Browse the repository at this point in the history
  37. x86/mce: Make sure to grab mce_sysfs_mutex in set_bank()

    Modifying a MCA bank's MCA_CTL bits which control which error types to
    be reported is done over
    
      /sys/devices/system/machinecheck/
      ├── machinecheck0
      │   ├── bank0
      │   ├── bank1
      │   ├── bank10
      │   ├── bank11
      ...
    
    sysfs nodes by writing the new bit mask of events to enable.
    
    When the write is accepted, the kernel deletes all current timers and
    reinits all banks.
    
    Doing that in parallel can lead to initializing a timer which is already
    armed and in the timer wheel, i.e., in use already:
    
      ODEBUG: init active (active state 0) object: ffff888063a28000 object
      type: timer_list hint: mce_timer_fn+0x0/0x240 arch/x86/kernel/cpu/mce/core.c:2642
      WARNING: CPU: 0 PID: 8120 at lib/debugobjects.c:514
      debug_print_object+0x1a0/0x2a0 lib/debugobjects.c:514
    
    Fix that by grabbing the sysfs mutex as the rest of the MCA sysfs code
    does.
    
    Reported by: Yue Sun <[email protected]>
    Reported by: xingwei lee <[email protected]>
    Signed-off-by: Borislav Petkov (AMD) <[email protected]>
    Cc: <[email protected]>
    Link: https://lore.kernel.org/r/CAEkJfYNiENwQY8yV1LYJ9LjJs%[email protected]
    bp3tk0v committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    3ddf944 View commit details
    Browse the repository at this point in the history
  38. nvme: don't create a multipath node for zero capacity devices

    Apparently there are nvme controllers around that report namespaces
    in the namespace list which have zero capacity.  Return -ENXIO instead
    of -ENODEV from nvme_update_ns_info_block so we don't create a hidden
    multipath node for these namespaces but entirely ignore them.
    
    Fixes: 46e7422 ("nvme: move common logic into nvme_update_ns_info")
    Reported-by: Nilay Shroff <[email protected]>
    Signed-off-by: Christoph Hellwig <[email protected]>
    Tested-by: Nilay Shroff <[email protected]>
    Reviewed-by: Chaitanya Kulkarni <[email protected]>
    Signed-off-by: Keith Busch <[email protected]>
    Christoph Hellwig authored and keithbusch committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    0551ec9 View commit details
    Browse the repository at this point in the history
  39. nvmet: implement unique discovery NQN

    Unique discovery NQNs allow to differentiate between discovery
    services from (typically physically separate) NVMe-oF subsystems.
    This is required for establishing secured connections as otherwise
    the credentials won't be unique and the integrity of the connection
    cannot be guaranteed.
    This patch adds a configfs attribute 'discovery_nqn' in the 'nvmet'
    configfs directory to specify the unique discovery NQN.
    
    Signed-off-by: Hannes Reinecke <[email protected]>
    Reviewed-by: Sagi Grimberg <[email protected]>
    Reviewed-by: Chaitanya Kulkarni <[email protected]>
    Signed-off-by: Keith Busch <[email protected]>
    Hannes Reinecke authored and keithbusch committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    95409e2 View commit details
    Browse the repository at this point in the history
  40. nvmet-fc: move RCU read lock to nvmet_fc_assoc_exists

    The RCU lock is only needed for the lookup loop and not for
    list_ad_tail_rcu call. Thus move it down the call chain into
    nvmet_fc_assoc_exists.
    
    While at it also fix the name typo of the function.
    
    Signed-off-by: Daniel Wagner <[email protected]>
    Reviewed-by: Hannes Reinecke <[email protected]>
    Signed-off-by: Keith Busch <[email protected]>
    igaw authored and keithbusch committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    db67bb3 View commit details
    Browse the repository at this point in the history
  41. nvme-fc: rename free_ctrl callback to match name pattern

    Rename nvme_fc_nvme_ctrl_freed to nvme_fc_free_ctrl to match the name
    pattern for the callback.
    
    Reviewed-by: Christoph Hellwig <[email protected]>
    Reviewed-by: Sagi Grimberg <[email protected]>
    Reviewed-by: Hannes Reinecke <[email protected]>
    Signed-off-by: Daniel Wagner <[email protected]>
    Signed-off-by: Keith Busch <[email protected]>
    igaw authored and keithbusch committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    205fb5f View commit details
    Browse the repository at this point in the history
  42. net: usb: ax88179_178a: avoid the interface always configured as rand…

    …om address
    
    After the commit d2689b6 ("net: usb: ax88179_178a: avoid two
    consecutive device resets"), reset is not executed from bind operation and
    mac address is not read from the device registers or the devicetree at that
    moment. Since the check to configure if the assigned mac address is random
    or not for the interface, happens after the bind operation from
    usbnet_probe, the interface keeps configured as random address, although the
    address is correctly read and set during open operation (the only reset
    now).
    
    In order to keep only one reset for the device and to avoid the interface
    always configured as random address, after reset, configure correctly the
    suitable field from the driver, if the mac address is read successfully from
    the device registers or the devicetree. Take into account if a locally
    administered address (random) was previously stored.
    
    cc: [email protected] # 6.6+
    Fixes: d2689b6 ("net: usb: ax88179_178a: avoid two consecutive device resets")
    Reported-by: Dave Stevenson  <[email protected]>
    Signed-off-by: Jose Ignacio Tornos Martinez <[email protected]>
    Reviewed-by: Simon Horman <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    jtornosm authored and kuba-moo committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    2e91bb9 View commit details
    Browse the repository at this point in the history
  43. net/sched: act_skbmod: prevent kernel-infoleak

    syzbot found that tcf_skbmod_dump() was copying four bytes
    from kernel stack to user space [1].
    
    The issue here is that 'struct tc_skbmod' has a four bytes hole.
    
    We need to clear the structure before filling fields.
    
    [1]
    BUG: KMSAN: kernel-infoleak in instrument_copy_to_user include/linux/instrumented.h:114 [inline]
     BUG: KMSAN: kernel-infoleak in copy_to_user_iter lib/iov_iter.c:24 [inline]
     BUG: KMSAN: kernel-infoleak in iterate_ubuf include/linux/iov_iter.h:29 [inline]
     BUG: KMSAN: kernel-infoleak in iterate_and_advance2 include/linux/iov_iter.h:245 [inline]
     BUG: KMSAN: kernel-infoleak in iterate_and_advance include/linux/iov_iter.h:271 [inline]
     BUG: KMSAN: kernel-infoleak in _copy_to_iter+0x366/0x2520 lib/iov_iter.c:185
      instrument_copy_to_user include/linux/instrumented.h:114 [inline]
      copy_to_user_iter lib/iov_iter.c:24 [inline]
      iterate_ubuf include/linux/iov_iter.h:29 [inline]
      iterate_and_advance2 include/linux/iov_iter.h:245 [inline]
      iterate_and_advance include/linux/iov_iter.h:271 [inline]
      _copy_to_iter+0x366/0x2520 lib/iov_iter.c:185
      copy_to_iter include/linux/uio.h:196 [inline]
      simple_copy_to_iter net/core/datagram.c:532 [inline]
      __skb_datagram_iter+0x185/0x1000 net/core/datagram.c:420
      skb_copy_datagram_iter+0x5c/0x200 net/core/datagram.c:546
      skb_copy_datagram_msg include/linux/skbuff.h:4050 [inline]
      netlink_recvmsg+0x432/0x1610 net/netlink/af_netlink.c:1962
      sock_recvmsg_nosec net/socket.c:1046 [inline]
      sock_recvmsg+0x2c4/0x340 net/socket.c:1068
      __sys_recvfrom+0x35a/0x5f0 net/socket.c:2242
      __do_sys_recvfrom net/socket.c:2260 [inline]
      __se_sys_recvfrom net/socket.c:2256 [inline]
      __x64_sys_recvfrom+0x126/0x1d0 net/socket.c:2256
     do_syscall_64+0xd5/0x1f0
     entry_SYSCALL_64_after_hwframe+0x6d/0x75
    
    Uninit was stored to memory at:
      pskb_expand_head+0x30f/0x19d0 net/core/skbuff.c:2253
      netlink_trim+0x2c2/0x330 net/netlink/af_netlink.c:1317
      netlink_unicast+0x9f/0x1260 net/netlink/af_netlink.c:1351
      nlmsg_unicast include/net/netlink.h:1144 [inline]
      nlmsg_notify+0x21d/0x2f0 net/netlink/af_netlink.c:2610
      rtnetlink_send+0x73/0x90 net/core/rtnetlink.c:741
      rtnetlink_maybe_send include/linux/rtnetlink.h:17 [inline]
      tcf_add_notify net/sched/act_api.c:2048 [inline]
      tcf_action_add net/sched/act_api.c:2071 [inline]
      tc_ctl_action+0x146e/0x19d0 net/sched/act_api.c:2119
      rtnetlink_rcv_msg+0x1737/0x1900 net/core/rtnetlink.c:6595
      netlink_rcv_skb+0x375/0x650 net/netlink/af_netlink.c:2559
      rtnetlink_rcv+0x34/0x40 net/core/rtnetlink.c:6613
      netlink_unicast_kernel net/netlink/af_netlink.c:1335 [inline]
      netlink_unicast+0xf4c/0x1260 net/netlink/af_netlink.c:1361
      netlink_sendmsg+0x10df/0x11f0 net/netlink/af_netlink.c:1905
      sock_sendmsg_nosec net/socket.c:730 [inline]
      __sock_sendmsg+0x30f/0x380 net/socket.c:745
      ____sys_sendmsg+0x877/0xb60 net/socket.c:2584
      ___sys_sendmsg+0x28d/0x3c0 net/socket.c:2638
      __sys_sendmsg net/socket.c:2667 [inline]
      __do_sys_sendmsg net/socket.c:2676 [inline]
      __se_sys_sendmsg net/socket.c:2674 [inline]
      __x64_sys_sendmsg+0x307/0x4a0 net/socket.c:2674
     do_syscall_64+0xd5/0x1f0
     entry_SYSCALL_64_after_hwframe+0x6d/0x75
    
    Uninit was stored to memory at:
      __nla_put lib/nlattr.c:1041 [inline]
      nla_put+0x1c6/0x230 lib/nlattr.c:1099
      tcf_skbmod_dump+0x23f/0xc20 net/sched/act_skbmod.c:256
      tcf_action_dump_old net/sched/act_api.c:1191 [inline]
      tcf_action_dump_1+0x85e/0x970 net/sched/act_api.c:1227
      tcf_action_dump+0x1fd/0x460 net/sched/act_api.c:1251
      tca_get_fill+0x519/0x7a0 net/sched/act_api.c:1628
      tcf_add_notify_msg net/sched/act_api.c:2023 [inline]
      tcf_add_notify net/sched/act_api.c:2042 [inline]
      tcf_action_add net/sched/act_api.c:2071 [inline]
      tc_ctl_action+0x1365/0x19d0 net/sched/act_api.c:2119
      rtnetlink_rcv_msg+0x1737/0x1900 net/core/rtnetlink.c:6595
      netlink_rcv_skb+0x375/0x650 net/netlink/af_netlink.c:2559
      rtnetlink_rcv+0x34/0x40 net/core/rtnetlink.c:6613
      netlink_unicast_kernel net/netlink/af_netlink.c:1335 [inline]
      netlink_unicast+0xf4c/0x1260 net/netlink/af_netlink.c:1361
      netlink_sendmsg+0x10df/0x11f0 net/netlink/af_netlink.c:1905
      sock_sendmsg_nosec net/socket.c:730 [inline]
      __sock_sendmsg+0x30f/0x380 net/socket.c:745
      ____sys_sendmsg+0x877/0xb60 net/socket.c:2584
      ___sys_sendmsg+0x28d/0x3c0 net/socket.c:2638
      __sys_sendmsg net/socket.c:2667 [inline]
      __do_sys_sendmsg net/socket.c:2676 [inline]
      __se_sys_sendmsg net/socket.c:2674 [inline]
      __x64_sys_sendmsg+0x307/0x4a0 net/socket.c:2674
     do_syscall_64+0xd5/0x1f0
     entry_SYSCALL_64_after_hwframe+0x6d/0x75
    
    Local variable opt created at:
      tcf_skbmod_dump+0x9d/0xc20 net/sched/act_skbmod.c:244
      tcf_action_dump_old net/sched/act_api.c:1191 [inline]
      tcf_action_dump_1+0x85e/0x970 net/sched/act_api.c:1227
    
    Bytes 188-191 of 248 are uninitialized
    Memory access of size 248 starts at ffff888117697680
    Data copied to user address 00007ffe56d855f0
    
    Fixes: 86da71b ("net_sched: Introduce skbmod action")
    Signed-off-by: Eric Dumazet <[email protected]>
    Acked-by: Jamal Hadi Salim <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Eric Dumazet authored and kuba-moo committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    d313eb8 View commit details
    Browse the repository at this point in the history
  44. Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/gi…

    …t/tnguy/net-queue
    
    Tony Nguyen says:
    
    ====================
    Intel Wired LAN Driver Updates 2024-04-03 (ice, idpf)
    
    This series contains updates to ice and idpf drivers.
    
    Dan Carpenter initializes some pointer declarations to NULL as needed for
    resource cleanup on ice driver.
    
    Petr Oros corrects assignment of VLAN operators to fix Rx VLAN filtering
    in legacy mode for ice.
    
    Joshua calls eth_type_trans() on unknown packets to prevent possible
    kernel panic on idpf.
    
    * '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue:
      idpf: fix kernel panic on unknown packet types
      ice: fix enabling RX VLAN filtering
      ice: Fix freeing uninitialized pointers
    ====================
    
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    kuba-moo committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    a66323e View commit details
    Browse the repository at this point in the history
  45. Merge tag 'nf-24-04-04' of git://git.kernel.org/pub/scm/linux/kernel/…

    …git/netfilter/nf
    
    Pablo Neira Ayuso says:
    
    ====================
    Netfilter fixes for net
    
    The following patchset contains Netfilter fixes for net:
    
    Patch #1 unlike early commit path stage which triggers a call to abort,
             an explicit release of the batch is required on abort, otherwise
             mutex is released and commit_list remains in place.
    
    Patch #2 release mutex after nft_gc_seq_end() in commit path, otherwise
             async GC worker could collect expired objects.
    
    Patch #3 flush pending destroy work in module removal path, otherwise UaF
             is possible.
    
    Patch #4 and #6 restrict the table dormant flag with basechain updates
    	 to fix state inconsistency in the hook registration.
    
    Patch #5 adds missing RCU read side lock to flowtable type to avoid races
    	 with module removal.
    
    * tag 'nf-24-04-04' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf:
      netfilter: nf_tables: discard table flag update with pending basechain deletion
      netfilter: nf_tables: Fix potential data-race in __nft_flowtable_type_get()
      netfilter: nf_tables: reject new basechain after table flag update
      netfilter: nf_tables: flush pending destroy work before exit_net release
      netfilter: nf_tables: release mutex after nft_gc_seq_end from abort path
      netfilter: nf_tables: release batch on table validation from abort path
    ====================
    
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    kuba-moo committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    d432f7b View commit details
    Browse the repository at this point in the history
  46. netfilter: validate user input for expected length

    I got multiple syzbot reports showing old bugs exposed
    by BPF after commit 20f2505 ("bpf: Try to avoid kzalloc
    in cgroup/{s,g}etsockopt")
    
    setsockopt() @optlen argument should be taken into account
    before copying data.
    
     BUG: KASAN: slab-out-of-bounds in copy_from_sockptr_offset include/linux/sockptr.h:49 [inline]
     BUG: KASAN: slab-out-of-bounds in copy_from_sockptr include/linux/sockptr.h:55 [inline]
     BUG: KASAN: slab-out-of-bounds in do_replace net/ipv4/netfilter/ip_tables.c:1111 [inline]
     BUG: KASAN: slab-out-of-bounds in do_ipt_set_ctl+0x902/0x3dd0 net/ipv4/netfilter/ip_tables.c:1627
    Read of size 96 at addr ffff88802cd73da0 by task syz-executor.4/7238
    
    CPU: 1 PID: 7238 Comm: syz-executor.4 Not tainted 6.9.0-rc2-next-20240403-syzkaller #0
    Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
    Call Trace:
     <TASK>
      __dump_stack lib/dump_stack.c:88 [inline]
      dump_stack_lvl+0x241/0x360 lib/dump_stack.c:114
      print_address_description mm/kasan/report.c:377 [inline]
      print_report+0x169/0x550 mm/kasan/report.c:488
      kasan_report+0x143/0x180 mm/kasan/report.c:601
      kasan_check_range+0x282/0x290 mm/kasan/generic.c:189
      __asan_memcpy+0x29/0x70 mm/kasan/shadow.c:105
      copy_from_sockptr_offset include/linux/sockptr.h:49 [inline]
      copy_from_sockptr include/linux/sockptr.h:55 [inline]
      do_replace net/ipv4/netfilter/ip_tables.c:1111 [inline]
      do_ipt_set_ctl+0x902/0x3dd0 net/ipv4/netfilter/ip_tables.c:1627
      nf_setsockopt+0x295/0x2c0 net/netfilter/nf_sockopt.c:101
      do_sock_setsockopt+0x3af/0x720 net/socket.c:2311
      __sys_setsockopt+0x1ae/0x250 net/socket.c:2334
      __do_sys_setsockopt net/socket.c:2343 [inline]
      __se_sys_setsockopt net/socket.c:2340 [inline]
      __x64_sys_setsockopt+0xb5/0xd0 net/socket.c:2340
     do_syscall_64+0xfb/0x240
     entry_SYSCALL_64_after_hwframe+0x72/0x7a
    RIP: 0033:0x7fd22067dde9
    Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48
    RSP: 002b:00007fd21f9ff0c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000036
    RAX: ffffffffffffffda RBX: 00007fd2207abf80 RCX: 00007fd22067dde9
    RDX: 0000000000000040 RSI: 0000000000000000 RDI: 0000000000000003
    RBP: 00007fd2206ca47a R08: 0000000000000001 R09: 0000000000000000
    R10: 0000000020000880 R11: 0000000000000246 R12: 0000000000000000
    R13: 000000000000000b R14: 00007fd2207abf80 R15: 00007ffd2d0170d8
     </TASK>
    
    Allocated by task 7238:
      kasan_save_stack mm/kasan/common.c:47 [inline]
      kasan_save_track+0x3f/0x80 mm/kasan/common.c:68
      poison_kmalloc_redzone mm/kasan/common.c:370 [inline]
      __kasan_kmalloc+0x98/0xb0 mm/kasan/common.c:387
      kasan_kmalloc include/linux/kasan.h:211 [inline]
      __do_kmalloc_node mm/slub.c:4069 [inline]
      __kmalloc_noprof+0x200/0x410 mm/slub.c:4082
      kmalloc_noprof include/linux/slab.h:664 [inline]
      __cgroup_bpf_run_filter_setsockopt+0xd47/0x1050 kernel/bpf/cgroup.c:1869
      do_sock_setsockopt+0x6b4/0x720 net/socket.c:2293
      __sys_setsockopt+0x1ae/0x250 net/socket.c:2334
      __do_sys_setsockopt net/socket.c:2343 [inline]
      __se_sys_setsockopt net/socket.c:2340 [inline]
      __x64_sys_setsockopt+0xb5/0xd0 net/socket.c:2340
     do_syscall_64+0xfb/0x240
     entry_SYSCALL_64_after_hwframe+0x72/0x7a
    
    The buggy address belongs to the object at ffff88802cd73da0
     which belongs to the cache kmalloc-8 of size 8
    The buggy address is located 0 bytes inside of
     allocated 1-byte region [ffff88802cd73da0, ffff88802cd73da1)
    
    The buggy address belongs to the physical page:
    page: refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88802cd73020 pfn:0x2cd73
    flags: 0xfff80000000000(node=0|zone=1|lastcpupid=0xfff)
    page_type: 0xffffefff(slab)
    raw: 00fff80000000000 ffff888015041280 dead000000000100 dead000000000122
    raw: ffff88802cd73020 000000008080007f 00000001ffffefff 0000000000000000
    page dumped because: kasan: bad access detected
    page_owner tracks the page as allocated
    page last allocated via order 0, migratetype Unmovable, gfp_mask 0x12cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY), pid 5103, tgid 2119833701 (syz-executor.4), ts 5103, free_ts 70804600828
      set_page_owner include/linux/page_owner.h:32 [inline]
      post_alloc_hook+0x1f3/0x230 mm/page_alloc.c:1490
      prep_new_page mm/page_alloc.c:1498 [inline]
      get_page_from_freelist+0x2e7e/0x2f40 mm/page_alloc.c:3454
      __alloc_pages_noprof+0x256/0x6c0 mm/page_alloc.c:4712
      __alloc_pages_node_noprof include/linux/gfp.h:244 [inline]
      alloc_pages_node_noprof include/linux/gfp.h:271 [inline]
      alloc_slab_page+0x5f/0x120 mm/slub.c:2249
      allocate_slab+0x5a/0x2e0 mm/slub.c:2412
      new_slab mm/slub.c:2465 [inline]
      ___slab_alloc+0xcd1/0x14b0 mm/slub.c:3615
      __slab_alloc+0x58/0xa0 mm/slub.c:3705
      __slab_alloc_node mm/slub.c:3758 [inline]
      slab_alloc_node mm/slub.c:3936 [inline]
      __do_kmalloc_node mm/slub.c:4068 [inline]
      kmalloc_node_track_caller_noprof+0x286/0x450 mm/slub.c:4089
      kstrdup+0x3a/0x80 mm/util.c:62
      device_rename+0xb5/0x1b0 drivers/base/core.c:4558
      dev_change_name+0x275/0x860 net/core/dev.c:1232
      do_setlink+0xa4b/0x41f0 net/core/rtnetlink.c:2864
      __rtnl_newlink net/core/rtnetlink.c:3680 [inline]
      rtnl_newlink+0x180b/0x20a0 net/core/rtnetlink.c:3727
      rtnetlink_rcv_msg+0x89b/0x10d0 net/core/rtnetlink.c:6594
      netlink_rcv_skb+0x1e3/0x430 net/netlink/af_netlink.c:2559
      netlink_unicast_kernel net/netlink/af_netlink.c:1335 [inline]
      netlink_unicast+0x7ea/0x980 net/netlink/af_netlink.c:1361
    page last free pid 5146 tgid 5146 stack trace:
      reset_page_owner include/linux/page_owner.h:25 [inline]
      free_pages_prepare mm/page_alloc.c:1110 [inline]
      free_unref_page+0xd3c/0xec0 mm/page_alloc.c:2617
      discard_slab mm/slub.c:2511 [inline]
      __put_partials+0xeb/0x130 mm/slub.c:2980
      put_cpu_partial+0x17c/0x250 mm/slub.c:3055
      __slab_free+0x2ea/0x3d0 mm/slub.c:4254
      qlink_free mm/kasan/quarantine.c:163 [inline]
      qlist_free_all+0x9e/0x140 mm/kasan/quarantine.c:179
      kasan_quarantine_reduce+0x14f/0x170 mm/kasan/quarantine.c:286
      __kasan_slab_alloc+0x23/0x80 mm/kasan/common.c:322
      kasan_slab_alloc include/linux/kasan.h:201 [inline]
      slab_post_alloc_hook mm/slub.c:3888 [inline]
      slab_alloc_node mm/slub.c:3948 [inline]
      __do_kmalloc_node mm/slub.c:4068 [inline]
      __kmalloc_node_noprof+0x1d7/0x450 mm/slub.c:4076
      kmalloc_node_noprof include/linux/slab.h:681 [inline]
      kvmalloc_node_noprof+0x72/0x190 mm/util.c:634
      bucket_table_alloc lib/rhashtable.c:186 [inline]
      rhashtable_rehash_alloc+0x9e/0x290 lib/rhashtable.c:367
      rht_deferred_worker+0x4e1/0x2440 lib/rhashtable.c:427
      process_one_work kernel/workqueue.c:3218 [inline]
      process_scheduled_works+0xa2c/0x1830 kernel/workqueue.c:3299
      worker_thread+0x86d/0xd70 kernel/workqueue.c:3380
      kthread+0x2f0/0x390 kernel/kthread.c:388
      ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147
      ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:243
    
    Memory state around the buggy address:
     ffff88802cd73c80: 07 fc fc fc 05 fc fc fc 05 fc fc fc fa fc fc fc
     ffff88802cd73d00: fa fc fc fc fa fc fc fc fa fc fc fc fa fc fc fc
    >ffff88802cd73d80: fa fc fc fc 01 fc fc fc fa fc fc fc fa fc fc fc
                                   ^
     ffff88802cd73e00: fa fc fc fc fa fc fc fc 05 fc fc fc 07 fc fc fc
     ffff88802cd73e80: 07 fc fc fc 07 fc fc fc 07 fc fc fc 07 fc fc fc
    
    Fixes: 1da177e ("Linux-2.6.12-rc2")
    Reported-by: syzbot <[email protected]>
    Signed-off-by: Eric Dumazet <[email protected]>
    Reviewed-by: Pablo Neira Ayuso <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Eric Dumazet authored and kuba-moo committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    0c83842 View commit details
    Browse the repository at this point in the history
  47. gpio: cdev: fix missed label sanitizing in debounce_setup()

    When adding sanitization of the label, the path through
    edge_detector_setup() that leads to debounce_setup() was overlooked.
    A request taking this path does not allocate a new label and the
    request label is freed twice when the request is released, resulting
    in memory corruption.
    
    Add label sanitization to debounce_setup().
    
    Cc: [email protected]
    Fixes: b344908 ("gpio: cdev: sanitize the label before requesting the interrupt")
    Signed-off-by: Kent Gibson <[email protected]>
    [Bartosz: rebased on top of the fix for empty GPIO labels]
    Co-developed-by: Bartosz Golaszewski <[email protected]>
    Signed-off-by: Bartosz Golaszewski <[email protected]>
    warthog618 authored and Bartosz Golaszewski committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    8309234 View commit details
    Browse the repository at this point in the history
  48. PM: EM: fix wrong utilization estimation in em_cpu_energy()

    Commit 1b600da ("PM: EM: Optimize em_cpu_energy() and remove division")
    has added back map_util_perf() in em_cpu_energy() computation which has
    been removed with the rework of scheduler/cpufreq interface.
    This is wrong because sugov_effective_cpu_perf() already takes care of
    mapping the utilization to a performance level.
    
    Fixes: 1b600da ("PM: EM: Optimize em_cpu_energy() and remove division")
    Signed-off-by: Vincent Guittot <[email protected]>
    Reviewed-by: Lukasz Luba <[email protected]>
    Signed-off-by: Rafael J. Wysocki <[email protected]>
    vingu-linaro authored and rafaeljw committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    8130b05 View commit details
    Browse the repository at this point in the history
  49. Merge tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel…

    …/git/bpf/bpf
    
    Daniel Borkmann says:
    
    ====================
    pull-request: bpf 2024-04-04
    
    We've added 7 non-merge commits during the last 5 day(s) which contain
    a total of 9 files changed, 75 insertions(+), 24 deletions(-).
    
    The main changes are:
    
    1) Fix x86 BPF JIT under retbleed=stuff which causes kernel panics due to
       incorrect destination IP calculation and incorrect IP for relocations,
       from Uros Bizjak and Joan Bruguera Micó.
    
    2) Fix BPF arena file descriptor leaks in the verifier,
       from Anton Protopopov.
    
    3) Defer bpf_link deallocation to after RCU grace period as currently
       running multi-{kprobes,uprobes} programs might still access cookie
       information from the link, from Andrii Nakryiko.
    
    4) Fix a BPF sockmap lock inversion deadlock in map_delete_elem reported
       by syzkaller, from Jakub Sitnicki.
    
    5) Fix resolve_btfids build with musl libc due to missing linux/types.h
       include, from Natanael Copa.
    
    * tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf:
      bpf, sockmap: Prevent lock inversion deadlock in map delete elem
      x86/bpf: Fix IP for relocating call depth accounting
      x86/bpf: Fix IP after emitting call depth accounting
      bpf: fix possible file descriptor leaks in verifier
      tools/resolve_btfids: fix build with musl libc
      bpf: support deferring bpf_link dealloc to after RCU grace period
      bpf: put uprobe link's path and task in release callback
    ====================
    
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    kuba-moo committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    1cfa2f1 View commit details
    Browse the repository at this point in the history
  50. ASoC: SOF: Core: Add remove_late() to sof_init_environment failure path

    In cases where the sof driver is unable to find the firmware and/or
    topology file [1], it exits without releasing the i915 runtime
    pm wakeref [2]. This results in dmesg warnings[3] during
    suspend/resume or driver unbind. Add remove_late() to the failure path
    of sof_init_environment so that i915 wakeref is released appropriately
    
    [1]
    
    [    8.990366] sof-audio-pci-intel-mtl 0000:00:1f.3: SOF firmware and/or topology file not found.
    [    8.990396] sof-audio-pci-intel-mtl 0000:00:1f.3: Supported default profiles
    [    8.990398] sof-audio-pci-intel-mtl 0000:00:1f.3: - ipc type 1 (Requested):
    [    8.990399] sof-audio-pci-intel-mtl 0000:00:1f.3:  Firmware file: intel/sof-ipc4/mtl/sof-mtl.ri
    [    8.990401] sof-audio-pci-intel-mtl 0000:00:1f.3:  Topology file: intel/sof-ace-tplg/sof-mtl-rt711-2ch.tplg
    [    8.990402] sof-audio-pci-intel-mtl 0000:00:1f.3: Check if you have 'sof-firmware' package installed.
    [    8.990403] sof-audio-pci-intel-mtl 0000:00:1f.3: Optionally it can be manually downloaded from:
    [    8.990404] sof-audio-pci-intel-mtl 0000:00:1f.3:    https://github.com/thesofproject/sof-bin/
    [    8.999088] sof-audio-pci-intel-mtl 0000:00:1f.3: error: sof_probe_work failed err: -2
    
    [2]
    
    ref_tracker: 0000:00:02.0@ffff9b8511b6a378 has 1/5 users at
         track_intel_runtime_pm_wakeref.part.0+0x36/0x70 [i915]
         __intel_runtime_pm_get+0x51/0xb0 [i915]
         intel_runtime_pm_get+0x17/0x20 [i915]
         intel_display_power_get+0x2f/0x70 [i915]
         i915_audio_component_get_power+0x23/0x120 [i915]
         snd_hdac_display_power+0x89/0x130 [snd_hda_core]
         hda_codec_i915_init+0x3f/0x50 [snd_sof_intel_hda]
         hda_dsp_probe_early+0x170/0x250 [snd_sof_intel_hda_common]
         snd_sof_device_probe+0x224/0x320 [snd_sof]
         sof_pci_probe+0x15b/0x220 [snd_sof_pci]
         hda_pci_intel_probe+0x30/0x70 [snd_sof_intel_hda_common]
         local_pci_probe+0x4c/0xb0
         pci_device_probe+0xcc/0x250
         really_probe+0x18e/0x420
         __driver_probe_device+0x7e/0x170
         driver_probe_device+0x23/0xa0
    
    [3]
    [  484.105070] ------------[ cut here ]------------
    [  484.108238] thunderbolt 0000:00:0d.2: PM: pci_pm_suspend_late+0x0/0x50 returned 0 after 0 usecs
    [  484.117106] i915 0000:00:02.0: i915 raw-wakerefs=1 wakelocks=1 on cleanup
    [  484.792005] WARNING: CPU: 2 PID: 2405 at drivers/gpu/drm/i915/intel_runtime_pm.c:444 intel_runtime_pm_driver_release+0x6c/0x80
    
    Tested-by: Rodrigo Vivi <[email protected]>
    Reviewed-by: Rodrigo Vivi <[email protected]>
    Reviewed-by: Bard Liao <[email protected]>
    Reviewed-by: Péter Ujfalusi <[email protected]>
    Reviewed-by: Kai Vehmanen <[email protected]>
    Signed-off-by: Chaitanya Kumar Borah <[email protected]>
    Signed-off-by: Pierre-Louis Bossart <[email protected]>
    Acked-by: Lucas De Marchi <[email protected]>
    Link: thesofproject/linux#4878
    Signed-off-by: Rodrigo Vivi <[email protected]>
    Link: https://msgid.link/r/[email protected]
    Signed-off-by: Mark Brown <[email protected]>
    ckborah authored and broonie committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    90f8917 View commit details
    Browse the repository at this point in the history
  51. riscv: use KERN_INFO in do_trap

    Print the instruction dump with info instead of emergency level.  The
    unhandled signal message is only for informational purpose.
    
    Fixes: b8a03a6 ("riscv: add userland instruction dump to RISC-V splats")
    Signed-off-by: Andreas Schwab <[email protected]>
    Reviewed-by: Conor Dooley <[email protected]>
    Reviewed-by: Atish Patra <[email protected]>
    Reviewed-by: Yunhui Cui <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Palmer Dabbelt <[email protected]>
    andreas-schwab authored and palmer-dabbelt committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    dd33e5d View commit details
    Browse the repository at this point in the history
  52. Merge tag 'nvme-6.9-2024-04-04' of git://git.infradead.org/nvme into …

    …block-6.9
    
    Pull NVMe fixes from Keith:
    
    "nvme fixes for Linux 6.9
    
     - Atomic queue limits fixes (Christoph)
     - Fabrics fixes (Hannes, Daniel)"
    
    * tag 'nvme-6.9-2024-04-04' of git://git.infradead.org/nvme:
      nvme-fc: rename free_ctrl callback to match name pattern
      nvmet-fc: move RCU read lock to nvmet_fc_assoc_exists
      nvmet: implement unique discovery NQN
      nvme: don't create a multipath node for zero capacity devices
      nvme: split nvme_update_zone_info
      nvme-multipath: don't inherit LBA-related fields for the multipath node
    axboe committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    9d0e852 View commit details
    Browse the repository at this point in the history
  53. riscv: Fix warning by declaring arch_cpu_idle() as noinstr

    The following warning appears when using ftrace:
    
    [89855.443413] RCU not on for: arch_cpu_idle+0x0/0x1c
    [89855.445640] WARNING: CPU: 5 PID: 0 at include/linux/trace_recursion.h:162 arch_ftrace_ops_list_func+0x208/0x228
    [89855.445824] Modules linked in: xt_conntrack(E) nft_chain_nat(E) xt_MASQUERADE(E) nf_conntrack_netlink(E) xt_addrtype(E) nft_compat(E) nf_tables(E) nfnetlink(E) br_netfilter(E) cfg80211(E) nls_iso8859_1(E) ofpart(E) redboot(E) cmdlinepart(E) cfi_cmdset_0001(E) virtio_net(E) cfi_probe(E) cfi_util(E) 9pnet_virtio(E) gen_probe(E) net_failover(E) virtio_rng(E) failover(E) 9pnet(E) physmap(E) map_funcs(E) chipreg(E) mtd(E) uio_pdrv_genirq(E) uio(E) dm_multipath(E) scsi_dh_rdac(E) scsi_dh_emc(E) scsi_dh_alua(E) drm(E) efi_pstore(E) backlight(E) ip_tables(E) x_tables(E) raid10(E) raid456(E) async_raid6_recov(E) async_memcpy(E) async_pq(E) async_xor(E) xor(E) async_tx(E) raid6_pq(E) raid1(E) raid0(E) virtio_blk(E)
    [89855.451563] CPU: 5 PID: 0 Comm: swapper/5 Tainted: G            E      6.8.0-rc6ubuntu-defconfig #2
    [89855.451726] Hardware name: riscv-virtio,qemu (DT)
    [89855.451899] epc : arch_ftrace_ops_list_func+0x208/0x228
    [89855.452016]  ra : arch_ftrace_ops_list_func+0x208/0x228
    [89855.452119] epc : ffffffff8016b216 ra : ffffffff8016b216 sp : ffffaf808090fdb0
    [89855.452171]  gp : ffffffff827c7680 tp : ffffaf808089ad40 t0 : ffffffff800c0dd8
    [89855.452216]  t1 : 0000000000000001 t2 : 0000000000000000 s0 : ffffaf808090fe30
    [89855.452306]  s1 : 0000000000000000 a0 : 0000000000000026 a1 : ffffffff82cd6ac8
    [89855.452423]  a2 : ffffffff800458c8 a3 : ffffaf80b1870640 a4 : 0000000000000000
    [89855.452646]  a5 : 0000000000000000 a6 : 00000000ffffffff a7 : ffffffffffffffff
    [89855.452698]  s2 : ffffffff82766872 s3 : ffffffff80004caa s4 : ffffffff80ebea90
    [89855.452743]  s5 : ffffaf808089bd40 s6 : 8000000a00006e00 s7 : 0000000000000008
    [89855.452787]  s8 : 0000000000002000 s9 : 0000000080043700 s10: 0000000000000000
    [89855.452831]  s11: 0000000000000000 t3 : 0000000000100000 t4 : 0000000000000064
    [89855.452874]  t5 : 000000000000000c t6 : ffffaf80b182dbfc
    [89855.452929] status: 0000000200000100 badaddr: 0000000000000000 cause: 0000000000000003
    [89855.453053] [<ffffffff8016b216>] arch_ftrace_ops_list_func+0x208/0x228
    [89855.453191] [<ffffffff8000e082>] ftrace_call+0x8/0x22
    [89855.453265] [<ffffffff800a149c>] do_idle+0x24c/0x2ca
    [89855.453357] [<ffffffff8000da54>] return_to_handler+0x0/0x26
    [89855.453429] [<ffffffff8000b716>] smp_callin+0x92/0xb6
    [89855.453785] ---[ end trace 0000000000000000 ]---
    
    To fix this, mark arch_cpu_idle() as noinstr, like it is done in commit
    a9cbc1b ("s390/idle: mark arch_cpu_idle() noinstr").
    
    Reported-by: Evgenii Shatokhin <[email protected]>
    Closes: https://lore.kernel.org/linux-riscv/[email protected]/
    Fixes: cfbc4f8 ("riscv: Select ARCH_WANTS_NO_INSTR")
    Signed-off-by: Alexandre Ghiti <[email protected]>
    Reviewed-by: Andy Chiu <[email protected]>
    Tested-by: Andy Chiu <[email protected]>
    Acked-by: Puranjay Mohan <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Palmer Dabbelt <[email protected]>
    Alexandre Ghiti authored and palmer-dabbelt committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    8a48ea8 View commit details
    Browse the repository at this point in the history
  54. riscv: Disable preemption when using patch_map()

    patch_map() uses fixmap mappings to circumvent the non-writability of
    the kernel text mapping.
    
    The __set_fixmap() function only flushes the current cpu tlb, it does
    not emit an IPI so we must make sure that while we use a fixmap mapping,
    the current task is not migrated on another cpu which could miss the
    newly introduced fixmap mapping.
    
    So in order to avoid any task migration, disable the preemption.
    
    Reported-by: Andrea Parri <[email protected]>
    Closes: https://lore.kernel.org/all/ZcS+GAaM25LXsBOl@andrea/
    Reported-by: Andy Chiu <[email protected]>
    Closes: https://lore.kernel.org/linux-riscv/CABgGipUMz3Sffu-CkmeUB1dKVwVQ73+7=sgC45-m0AE9RCjOZg@mail.gmail.com/
    Fixes: cad539b ("riscv: implement a memset like function for text")
    Fixes: 0ff7c3b ("riscv: Use text_mutex instead of patch_lock")
    Co-developed-by: Andy Chiu <[email protected]>
    Signed-off-by: Andy Chiu <[email protected]>
    Signed-off-by: Alexandre Ghiti <[email protected]>
    Acked-by: Puranjay Mohan <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Palmer Dabbelt <[email protected]>
    Alexandre Ghiti authored and palmer-dabbelt committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    a370c24 View commit details
    Browse the repository at this point in the history
  55. riscv: process: Fix kernel gp leakage

    childregs represents the registers which are active for the new thread
    in user context. For a kernel thread, childregs->gp is never used since
    the kernel gp is not touched by switch_to. For a user mode helper, the
    gp value can be observed in user space after execve or possibly by other
    means.
    
    [From the email thread]
    
    The /* Kernel thread */ comment is somewhat inaccurate in that it is also used
    for user_mode_helper threads, which exec a user process, e.g. /sbin/init or
    when /proc/sys/kernel/core_pattern is a pipe. Such threads do not have
    PF_KTHREAD set and are valid targets for ptrace etc. even before they exec.
    
    childregs is the *user* context during syscall execution and it is observable
    from userspace in at least five ways:
    
    1. kernel_execve does not currently clear integer registers, so the starting
       register state for PID 1 and other user processes started by the kernel has
       sp = user stack, gp = kernel __global_pointer$, all other integer registers
       zeroed by the memset in the patch comment.
    
       This is a bug in its own right, but I'm unwilling to bet that it is the only
       way to exploit the issue addressed by this patch.
    
    2. ptrace(PTRACE_GETREGSET): you can PTRACE_ATTACH to a user_mode_helper thread
       before it execs, but ptrace requires SIGSTOP to be delivered which can only
       happen at user/kernel boundaries.
    
    3. /proc/*/task/*/syscall: this is perfectly happy to read pt_regs for
       user_mode_helpers before the exec completes, but gp is not one of the
       registers it returns.
    
    4. PERF_SAMPLE_REGS_USER: LOCKDOWN_PERF normally prevents access to kernel
       addresses via PERF_SAMPLE_REGS_INTR, but due to this bug kernel addresses
       are also exposed via PERF_SAMPLE_REGS_USER which is permitted under
       LOCKDOWN_PERF. I have not attempted to write exploit code.
    
    5. Much of the tracing infrastructure allows access to user registers. I have
       not attempted to determine which forms of tracing allow access to user
       registers without already allowing access to kernel registers.
    
    Fixes: 7db91e5 ("RISC-V: Task implementation")
    Cc: [email protected]
    Signed-off-by: Stefan O'Rear <[email protected]>
    Reviewed-by: Alexandre Ghiti <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Palmer Dabbelt <[email protected]>
    sorear authored and palmer-dabbelt committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    d14fa1f View commit details
    Browse the repository at this point in the history
  56. scx: Add a few missing config options from selftests

    Let's include some options necessary for BTF
    
    Signed-off-by: David Vernet <[email protected]>
    Byte-Lab committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    0cd5c16 View commit details
    Browse the repository at this point in the history
  57. scx: Update minimal testcase to be completely minimal

    Now that libbpf has been fixed to accommodate a struct_ops map with no
    struct_ops progs, let's update the minimal testcase to not have any
    struct_ops progs.
    
    Signed-off-by: David Vernet <[email protected]>
    Byte-Lab committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    e138c7c View commit details
    Browse the repository at this point in the history
  58. scx: Use __COMPAT_ENUM_OR_ZERO for reading exit values

    Instead of hard-coding the enum values, let's use libbpf to read them.
    Also fix a bug in prog_run.
    
    Signed-off-by: David Vernet <[email protected]>
    Byte-Lab committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    635e5f8 View commit details
    Browse the repository at this point in the history
  59. Merge tag 'bcachefs-2024-04-03' of https://evilpiepirate.org/git/bcac…

    …hefs
    
    Pull bcachefs repair code from Kent Overstreet:
     "A couple more small fixes, and new repair code.
    
      We can now automatically recover from arbitrary corrupted interior
      btree nodes by scanning, and we can reconstruct metadata as needed to
      bring a filesystem back into a working, consistent, read-write state
      and preserve access to whatevver wasn't corrupted.
    
      Meaning - you can blow away all metadata except for extents and
      dirents leaf nodes, and repair will reconstruct everything else and
      give you your data, and under the correct paths. If inodes are missing
      i_size will be slightly off and permissions/ownership/timestamps will
      be gone, and we do still need the snapshots btree if snapshots were in
      use - in the future we'll be able to guess the snapshot tree structure
      in some situations.
    
      IOW - aside from shaking out remaining bugs (fuzz testing is still
      coming), repair code should be complete and if repair ever doesn't
      work that's the highest priority bug that I want to know about
      immediately.
    
      This patchset was kindly tested by a user from India who accidentally
      wiped one drive out of a three drive filesystem with no replication on
      the family computer - it took a couple weeks but we got everything
      important back"
    
    * tag 'bcachefs-2024-04-03' of https://evilpiepirate.org/git/bcachefs:
      bcachefs: reconstruct_inode()
      bcachefs: Subvolume reconstruction
      bcachefs: Check for extents that point to same space
      bcachefs: Reconstruct missing snapshot nodes
      bcachefs: Flag btrees with missing data
      bcachefs: Topology repair now uses nodes found by scanning to fill holes
      bcachefs: Repair pass for scanning for btree nodes
      bcachefs: Don't skip fake btree roots in fsck
      bcachefs: bch2_btree_root_alloc() -> bch2_btree_root_alloc_fake()
      bcachefs: Etyzinger cleanups
      bcachefs: bch2_shoot_down_journal_keys()
      bcachefs: Clear recovery_passes_required as they complete without errors
      bcachefs: ratelimit informational fsck errors
      bcachefs: Check for bad needs_discard before doing discard
      bcachefs: Improve bch2_btree_update_to_text()
      mean_and_variance: Drop always failing tests
      bcachefs: fix nocow lock deadlock
      bcachefs: BCH_WATERMARK_interior_updates
      bcachefs: Fix btree node reserve
    torvalds committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    ec25bd8 View commit details
    Browse the repository at this point in the history
  60. Merge tag 'net-6.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/…

    …git/netdev/net
    
    Pull networking fixes from Jakub Kicinski:
     "Including fixes from netfilter, bluetooth and bpf.
    
      Fairly usual collection of driver and core fixes. The large selftest
      accompanying one of the fixes is also becoming a common occurrence.
    
      Current release - regressions:
    
       - ipv6: fix infinite recursion in fib6_dump_done()
    
       - net/rds: fix possible null-deref in newly added error path
    
      Current release - new code bugs:
    
       - net: do not consume a full cacheline for system_page_pool
    
       - bpf: fix bpf_arena-related file descriptor leaks in the verifier
    
       - drv: ice: fix freeing uninitialized pointers, fixing misuse of the
         newfangled __free() auto-cleanup
    
      Previous releases - regressions:
    
       - x86/bpf: fixes the BPF JIT with retbleed=stuff
    
       - xen-netfront: add missing skb_mark_for_recycle, fix page pool
         accounting leaks, revealed by recently added explicit warning
    
       - tcp: fix bind() regression for v6-only wildcard and v4-mapped-v6
         non-wildcard addresses
    
       - Bluetooth:
          - replace "hci_qca: Set BDA quirk bit if fwnode exists in DT" with
            better workarounds to un-break some buggy Qualcomm devices
          - set conn encrypted before conn establishes, fix re-connecting to
            some headsets which use slightly unusual sequence of msgs
    
       - mptcp:
          - prevent BPF accessing lowat from a subflow socket
          - don't account accept() of non-MPC client as fallback to TCP
    
       - drv: mana: fix Rx DMA datasize and skb_over_panic
    
       - drv: i40e: fix VF MAC filter removal
    
      Previous releases - always broken:
    
       - gro: various fixes related to UDP tunnels - netns crossing
         problems, incorrect checksum conversions, and incorrect packet
         transformations which may lead to panics
    
       - bpf: support deferring bpf_link dealloc to after RCU grace period
    
       - nf_tables:
          - release batch on table validation from abort path
          - release mutex after nft_gc_seq_end from abort path
          - flush pending destroy work before exit_net release
    
       - drv: r8169: skip DASH fw status checks when DASH is disabled"
    
    * tag 'net-6.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (81 commits)
      netfilter: validate user input for expected length
      net/sched: act_skbmod: prevent kernel-infoleak
      net: usb: ax88179_178a: avoid the interface always configured as random address
      net: dsa: sja1105: Fix parameters order in sja1110_pcs_mdio_write_c45()
      net: ravb: Always update error counters
      net: ravb: Always process TX descriptor ring
      netfilter: nf_tables: discard table flag update with pending basechain deletion
      netfilter: nf_tables: Fix potential data-race in __nft_flowtable_type_get()
      netfilter: nf_tables: reject new basechain after table flag update
      netfilter: nf_tables: flush pending destroy work before exit_net release
      netfilter: nf_tables: release mutex after nft_gc_seq_end from abort path
      netfilter: nf_tables: release batch on table validation from abort path
      Revert "tg3: Remove residual error handling in tg3_suspend"
      tg3: Remove residual error handling in tg3_suspend
      net: mana: Fix Rx DMA datasize and skb_over_panic
      net/sched: fix lockdep splat in qdisc_tree_reduce_backlog()
      net: phy: micrel: lan8814: Fix when enabling/disabling 1-step timestamping
      net: stmmac: fix rx queue priority assignment
      net: txgbe: fix i2c dev name cannot match clkdev
      net: fec: Set mac_managed_pm during probe
      ...
    torvalds committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    c88b9b4 View commit details
    Browse the repository at this point in the history
  61. Merge pull request #173 from sched-ext/selftests

    Fix up some selftests
    htejun authored Apr 4, 2024
    Configuration menu
    Copy the full SHA
    e74f696 View commit details
    Browse the repository at this point in the history

Commits on Apr 5, 2024

  1. x86/cpufeatures: Add CPUID_LNX_5 to track recently added Linux-define…

    …d word
    
    Add CPUID_LNX_5 to track cpufeatures' word 21, and add the appropriate
    compile-time assert in KVM to prevent direct lookups on the features in
    CPUID_LNX_5.  KVM uses X86_FEATURE_* flags to manage guest CPUID, and so
    must translate features that are scattered by Linux from the Linux-defined
    bit to the hardware-defined bit, i.e. should never try to directly access
    scattered features in guest CPUID.
    
    Opportunistically add NR_CPUID_WORDS to enum cpuid_leafs, along with a
    compile-time assert in KVM's CPUID infrastructure to ensure that future
    additions update cpuid_leafs along with NCAPINTS.
    
    No functional change intended.
    
    Fixes: 7f274e6 ("x86/cpufeatures: Add new word for scattered features")
    Cc: Sandipan Das <[email protected]>
    Signed-off-by: Sean Christopherson <[email protected]>
    Acked-by: Dave Hansen <[email protected]>
    Signed-off-by: Linus Torvalds <[email protected]>
    sean-jc authored and torvalds committed Apr 5, 2024
    Configuration menu
    Copy the full SHA
    8cb4a9a View commit details
    Browse the repository at this point in the history
  2. Merge tag 'drm-misc-fixes-2024-04-04' of https://gitlab.freedesktop.o…

    …rg/drm/misc/kernel into drm-fixes
    
    Short summary of fixes pull:
    
    display:
    - fix typos in kerneldoc
    
    nouveau:
    - uvmm: fix remap address calculation
    - minor cleanups
    
    panfrost:
    - fix power-transition timeouts
    
    prime:
    - unbreak dma-buf export for virt-gpu
    
    Signed-off-by: Dave Airlie <[email protected]>
    
    From: Thomas Zimmermann <[email protected]>
    Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
    airlied committed Apr 5, 2024
    Configuration menu
    Copy the full SHA
    4cf09f1 View commit details
    Browse the repository at this point in the history
  3. Merge tag 'drm-xe-fixes-2024-04-04' of https://gitlab.freedesktop.org…

    …/drm/xe/kernel into drm-fixes
    
    - Stop using system_unbound_wq for preempt fences,
      as this can cause starvation when reaching more
      than max_active defined by workqueue
    - Fix saving unordered rebinding fences by attaching
      them as kernel feces to the vm's resv
    - Fix TLB invalidation fences completing out of order
    - Move rebind TLB invalidation to the ring ops to reduce
      the latency
    
    Signed-off-by: Dave Airlie <[email protected]>
    
    From: Lucas De Marchi <[email protected]>
    Link: https://patchwork.freedesktop.org/patch/msgid/tizan6wdpxu4ayudeikjglxdgzmnhdzj3li3z2pgkierjtozzw@lbfddeg43a7h
    airlied committed Apr 5, 2024
    Configuration menu
    Copy the full SHA
    a5b5ab3 View commit details
    Browse the repository at this point in the history
  4. Merge tag 'drm-intel-fixes-2024-04-04' of https://anongit.freedesktop…

    ….org/git/drm/drm-intel into drm-fixes
    
    Display fixes:
    - A few DisplayPort related fixes (Imre, Arun, Ankit, Ville)
    - eDP PSR fixes (Jouni)
    
    Core/GT fixes:
    - Remove some VM space restrictions on older platforms (Andi)
    - Disable automatic load CCS load balancing (Andi)
    
    Signed-off-by: Dave Airlie <[email protected]>
    
    From: Rodrigo Vivi <[email protected]>
    Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
    airlied committed Apr 5, 2024
    Configuration menu
    Copy the full SHA
    4c85957 View commit details
    Browse the repository at this point in the history
  5. Merge tag 'asoc-fix-v6.9-rc2' of https://git.kernel.org/pub/scm/linux…

    …/kernel/git/broonie/sound into for-linus
    
    ASoC: Fixes for v6.9
    
    A relatively large set of fixes here, the biggest piece of it is a
    series correcting some problems with the delay reporting for Intel SOF
    cards but there's a bunch of other things.  Everything here is driver
    specific except for a fix in the core for an issue with sign extension
    handling volume controls.
    tiwai committed Apr 5, 2024
    Configuration menu
    Copy the full SHA
    100c854 View commit details
    Browse the repository at this point in the history
  6. timers/migration: Fix ignored event due to missing CPU update

    When a group event is updated with its expiry unchanged but a different
    CPU, that target change may go unnoticed and the event may be propagated
    up with a stale CPU value. The following depicts a scenario that has
    been actually observed:
    
                           [GRP2:0]
                       migrator = GRP1:1
                       active   = GRP1:1
                       nextevt  = TGRP1:0 (T0)
                        /              \
                   [GRP1:0]           [GRP1:1]
                migrator = NONE       [...]
                active   = NONE
                nextevt  = TGRP0:0 (T0)
                /           \
            [GRP0:0]       [...]
          migrator = NONE
          active   = NONE
          nextevt  = T0
          /         \
        0 (T0)       1 (T1)
        idle         idle
    
    0) The hierarchy has 3 levels. The left part (GRP1:0) is all idle,
    including CPU 0 and CPU 1 which have a timer each: T0 and T1. They have
    the same expiry value.
    
                           [GRP2:0]
                       migrator = GRP1:1
                       active   = GRP1:1
                       nextevt  = KTIME_MAX
                        /              \
                   [GRP1:0]           [GRP1:1]
                migrator = NONE       [...]
                active   = NONE
                nextevt  = TGRP0:0 (T0)
                /           \
            [GRP0:0]       [...]
          migrator = NONE
          active   = NONE
          nextevt  = T0
          /         \
        0 (T0)       1 (T1)
        idle         idle
    
    1) The migrator in GRP1:1 handles remotely T0. The event is dequeued
    from the top and T0 executed.
    
                           [GRP2:0]
                       migrator = GRP1:1
                       active   = GRP1:1
                       nextevt  = KTIME_MAX
                        /              \
                   [GRP1:0]           [GRP1:1]
                migrator = NONE       [...]
                active   = NONE
                nextevt  = TGRP0:0 (T0)
                /           \
            [GRP0:0]       [...]
          migrator = NONE
          active   = NONE
          nextevt  = T1
          /         \
        0            1 (T1)
        idle         idle
    
    2) The migrator in GRP1:1 fetches the next timer for CPU 0 and finds
    none. But it updates the events from its groups, starting with GRP0:0
    which now has T1 as its next event. So far so good.
    
                           [GRP2:0]
                       migrator = GRP1:1
                       active   = GRP1:1
                       nextevt  = KTIME_MAX
                        /              \
                   [GRP1:0]           [GRP1:1]
                migrator = NONE       [...]
                active   = NONE
                nextevt  = TGRP0:0 (T0)
                /           \
            [GRP0:0]       [...]
          migrator = NONE
          active   = NONE
          nextevt  = T1
          /         \
        0            1 (T1)
        idle         idle
    
    3) The migrator in GRP1:1 proceeds upward and updates the events in
    GRP1:0. The child event TGRP0:0 is found queued with the same expiry
    as before. And therefore it is left unchanged. However the target CPU
    is not the same but that fact is ignored so TGRP0:0 still points to
    CPU 0 when it should point to CPU 1.
    
                           [GRP2:0]
                       migrator = GRP1:1
                       active   = GRP1:1
                       nextevt  = TGRP1:0 (T0)
                        /              \
                   [GRP1:0]           [GRP1:1]
                migrator = NONE       [...]
                active   = NONE
                nextevt  = TGRP0:0 (T0)
                /           \
            [GRP0:0]       [...]
          migrator = NONE
          active   = NONE
          nextevt  = T1
          /         \
        0            1 (T1)
        idle         idle
    
    4) The propagation has reached the top level and TGRP1:0, having TGRP0:0
    as its first event, also wrongly points to CPU 0. TGRP1:0 is added to
    the top level group.
    
                           [GRP2:0]
                       migrator = GRP1:1
                       active   = GRP1:1
                       nextevt  = KTIME_MAX
                        /              \
                   [GRP1:0]           [GRP1:1]
                migrator = NONE       [...]
                active   = NONE
                nextevt  = TGRP0:0 (T0)
                /           \
            [GRP0:0]       [...]
          migrator = NONE
          active   = NONE
          nextevt  = T1
          /         \
        0            1 (T1)
        idle         idle
    
    5) The migrator in GRP1:1 dequeues the next event in top level pointing
    to CPU 0. But since it actually doesn't see any real event in CPU 0, it
    early returns.
    
    6) T1 is left unhandled until either CPU 0 or CPU 1 wake up.
    
    Some other bad scenario may involve trees with just two levels.
    
    Fix this with unconditionally updating the CPU of the child event before
    considering to early return while updating a queued event with an
    unchanged expiry value.
    
    Fixes: 7ee9887 ("timers: Implement the hierarchical pull model")
    Signed-off-by: Frederic Weisbecker <[email protected]>
    Signed-off-by: Thomas Gleixner <[email protected]>
    Reviewed-by: Anna-Maria Behnsen <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Frederic Weisbecker authored and KAGA-KOKO committed Apr 5, 2024
    Configuration menu
    Copy the full SHA
    61f7fdf View commit details
    Browse the repository at this point in the history
  7. timers/migration: Return early on deactivation

    Commit 4b6f4c5 ("timer/migration: Remove buggy early return on
    deactivation") removed the logic to return early in tmigr_update_events()
    on deactivation. With this the problem with a not properly updated first
    global event in a hierarchy containing only a single group was fixed.
    
    But when having a look at this code path with a hierarchy with more than a
    single level, now unnecessary work is done (example is partially copied
    from the message of the commit mentioned above):
    
                                [GRP1:0]
                             migrator = GRP0:0
                             active   = GRP0:0
                             nextevt  = T0:0i, T0:1
                             /              \
                  [GRP0:0]                  [GRP0:1]
               migrator = 0              migrator = NONE
               active   = 0              active   = NONE
               nextevt  = T0i, T1        nextevt  = T2
               /         \                /         \
              0 (T0i)     1 (T1)         2 (T2)      3
          active         idle            idle       idle
    
    0) CPU 0 is active thus its event is ignored (the letter 'i') and so are
    upper levels' events. CPU 1 is idle and has the timer T1 enqueued.
    CPU 2 also has a timer. The expiry order is T0 (ignored) < T1 < T2
    
                                [GRP1:0]
                             migrator = GRP0:0
                             active   = GRP0:0
                             nextevt  = T0:0i, T0:1
                             /              \
                  [GRP0:0]                  [GRP0:1]
               migrator = NONE           migrator = NONE
               active   = NONE           active   = NONE
               nextevt  = T1             nextevt  = T2
               /         \                /         \
              0 (T0i)     1 (T1)         2 (T2)      3
            idle         idle            idle         idle
    
    1) CPU 0 goes idle without global event queued. Therefore KTIME_MAX is
    pushed as its next expiry and its own event kept as "ignore". Without this
    early return the following steps happen in tmigr_update_events() when
    child = null and group = GRP0:0 :
    
      lock(GRP0:0->lock);
      timerqueue_del(GRP0:0, T0i);
      unlock(GRP0:0->lock);
    
    
                                [GRP1:0]
                             migrator = NONE
                             active   = NONE
                             nextevt  = T0:0, T0:1
                             /              \
                  [GRP0:0]                  [GRP0:1]
               migrator = NONE           migrator = NONE
               active   = NONE           active   = NONE
               nextevt  = T1             nextevt  = T2
               /         \                /         \
              0 (T0i)     1 (T1)         2 (T2)      3
            idle         idle            idle         idle
    
    2) The change now propagates up to the top. Then tmigr_update_events()
    updates the group event of GRP0:0 and executes the following steps
    (child = GRP0:0 and group = GRP0:0):
    
      lock(GRP0:0->lock);
      lock(GRP1:0->lock);
      evt = tmigr_next_groupevt(GRP0:0); -> this removes the ignored events
    					in GRP0:0
      ... update GRP1:0 group event and timerqueue ...
      unlock(GRP1:0->lock);
      unlock(GRP0:0->lock);
    
    So the dance in 1) with locking the GRP0:0->lock and removing the T0i from
    the timerqueue is redundand as this is done nevertheless in 2) when
    tmigr_next_groupevt(GRP0:0) is executed.
    
    Revert commit 4b6f4c5 ("timer/migration: Remove buggy early return on
    deactivation") and add a condition into return path to skip the return
    only, when hierarchy contains a single group. Adapt comments accordingly.
    
    Fixes: 4b6f4c5 ("timer/migration: Remove buggy early return on deactivation")
    Signed-off-by: Anna-Maria Behnsen <[email protected]>
    Signed-off-by: Thomas Gleixner <[email protected]>
    Reviewed-by: Frederic Weisbecker <[email protected]>
    Link: https://lore.kernel.org/r/87cyr49on2.fsf@somnus
    anna-marialx authored and KAGA-KOKO committed Apr 5, 2024
    Configuration menu
    Copy the full SHA
    7a96a84 View commit details
    Browse the repository at this point in the history
  8. aio: Fix null ptr deref in aio_complete() wakeup

    list_del_init_careful() needs to be the last access to the wait queue
    entry - it effectively unlocks access.
    
    Previously, finish_wait() would see the empty list head and skip taking
    the lock, and then we'd return - but the completion path would still
    attempt to do the wakeup after the task_struct pointer had been
    overwritten.
    
    Fixes: 71eb6b6 ("fs/aio: obey min_nr when doing wakeups")
    Cc: [email protected]
    Link: https://lore.kernel.org/linux-fsdevel/CAHTA-ubfwwB51A5Wg5M6H_rPEQK9pNf8FkAGH=vr=FEkyRrtqw@mail.gmail.com/
    Signed-off-by: Kent Overstreet <[email protected]>
    Link: https://lore.kernel.org/stable/20240331215212.522544-1-kent.overstreet%40linux.dev
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Christian Brauner <[email protected]>
    Kent Overstreet authored and brauner committed Apr 5, 2024
    Configuration menu
    Copy the full SHA
    caeb4b0 View commit details
    Browse the repository at this point in the history
  9. scx: Cosmetic changes to kfuncs

    - Make __bpf_kfunc_start/end_defs() blocks strict so that they only contain
      kfunc definitions.
    
    - Match BTF_KFUNCS table with kfunc definition blocks so that they always
      come right after in the same order.
    
    - Add function comment to scx_bpf_select_cpu_dfl() and rename @found to
      @is_idle which is more accurate and consistent with the BPF side
      declaration.
    htejun committed Apr 5, 2024
    Configuration menu
    Copy the full SHA
    5e32ef4 View commit details
    Browse the repository at this point in the history
  10. Merge tag 'vfs-6.9-rc3.fixes' of git://git.kernel.org/pub/scm/linux/k…

    …ernel/git/vfs/vfs
    
    Pull vfs fixes from Christian Brauner:
     "This contains a few small fixes. This comes with some delay because I
      wanted to wait on people running their reproducers and the Easter
      Holidays meant that those replies came in a little later than usual:
    
       - Fix handling of preventing writes to mounted block devices.
    
         Since last kernel we allow to prevent writing to mounted block
         devices provided CONFIG_BLK_DEV_WRITE_MOUNTED isn't set and the
         block device is opened with restricted writes. When we switched to
         opening block devices as files we altered the mechanism by which we
         recognize when a block device has been opened with write
         restrictions.
    
         The detection logic assumed that only read-write mounted
         filesystems would apply write restrictions to their block devices
         from other openers. That of course is not true since it also makes
         sense to apply write restrictions for filesystems that are
         read-only.
    
         Fix the detection logic using an FMODE_* bit. We still have a few
         left since we freed up a couple a while ago. I also picked up a
         patch to free up four additional FMODE_* bits scheduled for the
         next merge window.
    
       - Fix counting the number of writers to a block device. This just
         changes the logic to be consistent.
    
       - Fix a bug in aio causing a NULL pointer derefernce after we
         implemented batched processing in aio.
    
       - Finally, add the changes we discussed that allows to yield block
         devices early even though file closing itself is deferred.
    
         This also allows us to remove two holder operations to get and
         release the holder to align lifetime of file and holder of the
         block device"
    
    * tag 'vfs-6.9-rc3.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs:
      aio: Fix null ptr deref in aio_complete() wakeup
      fs,block: yield devices early
      block: count BLK_OPEN_RESTRICT_WRITES openers
      block: handle BLK_OPEN_RESTRICT_WRITES correctly
    torvalds committed Apr 5, 2024
    Configuration menu
    Copy the full SHA
    fae0268 View commit details
    Browse the repository at this point in the history
  11. Merge pull request #174 from sched-ext/htejun/misc

    scx: Cosmetic changes to kfuncs
    htejun authored Apr 5, 2024
    Configuration menu
    Copy the full SHA
    779538f View commit details
    Browse the repository at this point in the history
  12. Merge tag '6.9-rc2-ksmbd-server-fixes' of git://git.samba.org/ksmbd

    Pull smb server fixes from Steve French:
     "Three fixes, all also for stable:
    
       - encryption fix
    
       - memory overrun fix
    
       - oplock break fix"
    
    * tag '6.9-rc2-ksmbd-server-fixes' of git://git.samba.org/ksmbd:
      ksmbd: do not set SMB2_GLOBAL_CAP_ENCRYPTION for SMB 3.1.1
      ksmbd: validate payload size in ipc response
      ksmbd: don't send oplock break if rename fails
    torvalds committed Apr 5, 2024
    Configuration menu
    Copy the full SHA
    405ac6a View commit details
    Browse the repository at this point in the history
  13. Merge tag '9p-for-6.9-rc3' of https://github.com/martinetd/linux

    Pull minor 9p cleanups from Dominique Martinet:
    
     - kernel doc fix & removal of unused flag
    
     - fix some bogus debug statement for read/write
    
    * tag '9p-for-6.9-rc3' of https://github.com/martinetd/linux:
      9p: remove SLAB_MEM_SPREAD flag usage
      9p: Fix read/write debug statements to report server reply
      9p/trans_fd: remove Excess kernel-doc comment
    torvalds committed Apr 5, 2024
    Configuration menu
    Copy the full SHA
    e8b0ccb View commit details
    Browse the repository at this point in the history
  14. scx: Fix trivial grammatical typo

    Had an extra "is", remove to make the sentence correct.
    
    Signed-off-by: David Vernet <[email protected]>
    Byte-Lab committed Apr 5, 2024
    Configuration menu
    Copy the full SHA
    01a08c4 View commit details
    Browse the repository at this point in the history
  15. Merge pull request #175 from sched-ext/typo

    scx: Fix trivial grammatical typo
    htejun authored Apr 5, 2024
    Configuration menu
    Copy the full SHA
    aaf86e5 View commit details
    Browse the repository at this point in the history
  16. nfsd: hold a lighter-weight client reference over CB_RECALL_ANY

    Currently the CB_RECALL_ANY job takes a cl_rpc_users reference to the
    client. While a callback job is technically an RPC that counter is
    really more for client-driven RPCs, and this has the effect of
    preventing the client from being unhashed until the callback completes.
    
    If nfsd decides to send a CB_RECALL_ANY just as the client reboots, we
    can end up in a situation where the callback can't complete on the (now
    dead) callback channel, but the new client can't connect because the old
    client can't be unhashed. This usually manifests as a NFS4ERR_DELAY
    return on the CREATE_SESSION operation.
    
    The job is only holding a reference to the client so it can clear a flag
    after the RPC completes. Fix this by having CB_RECALL_ANY instead hold a
    reference to the cl_nfsdfs.cl_ref. Typically we only take that sort of
    reference when dealing with the nfsdfs info files, but it should work
    appropriately here to ensure that the nfs4_client doesn't disappear.
    
    Fixes: 44df6f4 ("NFSD: add delegation reaper to react to low memory condition")
    Reported-by: Vladimir Benes <[email protected]>
    Signed-off-by: Jeff Layton <[email protected]>
    Signed-off-by: Chuck Lever <[email protected]>
    jtlayton authored and chucklever committed Apr 5, 2024
    Configuration menu
    Copy the full SHA
    10396f4 View commit details
    Browse the repository at this point in the history
  17. Merge branch 'acpi-thermal'

    * acpi-thermal:
      ACPI: thermal: Register thermal zones without valid trip points
    rafaeljw committed Apr 5, 2024
    Configuration menu
    Copy the full SHA
    6f824c9 View commit details
    Browse the repository at this point in the history
  18. mm/secretmem: fix GUP-fast succeeding on secretmem folios

    folio_is_secretmem() currently relies on secretmem folios being LRU
    folios, to save some cycles.
    
    However, folios might reside in a folio batch without the LRU flag set, or
    temporarily have their LRU flag cleared.  Consequently, the LRU flag is
    unreliable for this purpose.
    
    In particular, this is the case when secretmem_fault() allocates a fresh
    page and calls filemap_add_folio()->folio_add_lru().  The folio might be
    added to the per-cpu folio batch and won't get the LRU flag set until the
    batch was drained using e.g., lru_add_drain().
    
    Consequently, folio_is_secretmem() might not detect secretmem folios and
    GUP-fast can succeed in grabbing a secretmem folio, crashing the kernel
    when we would later try reading/writing to the folio, because the folio
    has been unmapped from the directmap.
    
    Fix it by removing that unreliable check.
    
    Link: https://lkml.kernel.org/r/[email protected]
    Fixes: 1507f51 ("mm: introduce memfd_secret system call to create "secret" memory areas")
    Signed-off-by: David Hildenbrand <[email protected]>
    Reported-by: xingwei lee <[email protected]>
    Reported-by: yue sun <[email protected]>
    Closes: https://lore.kernel.org/lkml/CABOYnLyevJeravW=QrH0JUPYEcDN160aZFb7kwndm-J2rmz0HQ@mail.gmail.com/
    Debugged-by: Miklos Szeredi <[email protected]>
    Tested-by: Miklos Szeredi <[email protected]>
    Reviewed-by: Mike Rapoport (IBM) <[email protected]>
    Cc: Lorenzo Stoakes <[email protected]>
    Cc: <[email protected]>
    Signed-off-by: Andrew Morton <[email protected]>
    davidhildenbrand authored and akpm00 committed Apr 5, 2024
    Configuration menu
    Copy the full SHA
    65291dc View commit details
    Browse the repository at this point in the history
  19. init: open output files from cpio unpacking with O_LARGEFILE

    If a member of a cpio archive for an initrd or initrams is larger than
    2Gb, we'll eventually fail to write to that file when we get to that
    limit, unless O_LARGEFILE is set.
    
    The problem can be seen with this recipe, assuming that BLK_DEV_RAM
    is not configured:
    
    cd /tmp
    dd if=/dev/zero of=BIGFILE bs=1048576 count=2200
    echo BIGFILE | cpio -o -H newc -R root:root > initrd.img
    kexec -l /boot/vmlinuz-$(uname -r) --initrd=initrd.img --reuse-cmdline
    kexec -e
    
    The console will show 'Initramfs unpacking failed: write error'.  With
    the patch, the error is gone.
    
    Link: https://lkml.kernel.org/r/[email protected]
    Signed-off-by: John Sperbeck <[email protected]>
    Cc: Jens Axboe <[email protected]>
    Cc: Nick Desaulniers <[email protected]>
    Cc: Peter Zijlstra <[email protected]>
    Cc: Randy Dunlap <[email protected]>
    Cc: Thomas Gleixner <[email protected]>
    Signed-off-by: Andrew Morton <[email protected]>
    John Sperbeck authored and akpm00 committed Apr 5, 2024
    Configuration menu
    Copy the full SHA
    8434f9a View commit details
    Browse the repository at this point in the history
  20. mm: vmalloc: bail out early in find_vmap_area() if vmap is not init

    During the boot the s390 system triggers "spinlock bad magic" messages
    if the spinlock debugging is enabled:
    
    [    0.465445] BUG: spinlock bad magic on CPU#0, swapper/0
    [    0.465490]  lock: single+0x1860/0x1958, .magic: 00000000, .owner: <none>/-1, .owner_cpu: 0
    [    0.466067] CPU: 0 PID: 0 Comm: swapper Not tainted 6.8.0-12955-g8e938e398669 #1
    [    0.466188] Hardware name: QEMU 8561 QEMU (KVM/Linux)
    [    0.466270] Call Trace:
    [    0.466470]  [<00000000011f26c8>] dump_stack_lvl+0x98/0xd8
    [    0.466516]  [<00000000001dcc6a>] do_raw_spin_lock+0x8a/0x108
    [    0.466545]  [<000000000042146c>] find_vmap_area+0x6c/0x108
    [    0.466572]  [<000000000042175a>] find_vm_area+0x22/0x40
    [    0.466597]  [<000000000012f152>] __set_memory+0x132/0x150
    [    0.466624]  [<0000000001cc0398>] vmem_map_init+0x40/0x118
    [    0.466651]  [<0000000001cc0092>] paging_init+0x22/0x68
    [    0.466677]  [<0000000001cbbed2>] setup_arch+0x52a/0x708
    [    0.466702]  [<0000000001cb6140>] start_kernel+0x80/0x5c8
    [    0.466727]  [<0000000000100036>] startup_continue+0x36/0x40
    
    it happens because such system tries to access some vmap areas
    whereas the vmalloc initialization is not even yet done:
    
    [    0.465490] lock: single+0x1860/0x1958, .magic: 00000000, .owner: <none>/-1, .owner_cpu: 0
    [    0.466067] CPU: 0 PID: 0 Comm: swapper Not tainted 6.8.0-12955-g8e938e398669 #1
    [    0.466188] Hardware name: QEMU 8561 QEMU (KVM/Linux)
    [    0.466270] Call Trace:
    [    0.466470] dump_stack_lvl (lib/dump_stack.c:117)
    [    0.466516] do_raw_spin_lock (kernel/locking/spinlock_debug.c:87 kernel/locking/spinlock_debug.c:115)
    [    0.466545] find_vmap_area (mm/vmalloc.c:1059 mm/vmalloc.c:2364)
    [    0.466572] find_vm_area (mm/vmalloc.c:3150)
    [    0.466597] __set_memory (arch/s390/mm/pageattr.c:360 arch/s390/mm/pageattr.c:393)
    [    0.466624] vmem_map_init (./arch/s390/include/asm/set_memory.h:55 arch/s390/mm/vmem.c:660)
    [    0.466651] paging_init (arch/s390/mm/init.c:97)
    [    0.466677] setup_arch (arch/s390/kernel/setup.c:972)
    [    0.466702] start_kernel (init/main.c:899)
    [    0.466727] startup_continue (arch/s390/kernel/head64.S:35)
    [    0.466811] INFO: lockdep is turned off.
    ...
    [    0.718250] vmalloc init - busy lock init 0000000002871860
    [    0.718328] vmalloc init - busy lock init 00000000028731b8
    
    Some background. It worked before because the lock that is in question
    was statically defined and initialized. As of now, the locks and data
    structures are initialized in the vmalloc_init() function.
    
    To address that issue add the check whether the "vmap_initialized"
    variable is set, if not find_vmap_area() bails out on entry returning NULL.
    
    Link: https://lkml.kernel.org/r/[email protected]
    Fixes: 7221066 ("mm: vmalloc: offload free_vmap_area_lock lock")
    Signed-off-by: Uladzislau Rezki (Sony) <[email protected]>
    Tested-by: Guenter Roeck <[email protected]>
    Reviewed-by: Baoquan He <[email protected]>
    Acked-by: Heiko Carstens <[email protected]>
    Cc: Christoph Hellwig <[email protected]>
    Cc: Dave Chinner <[email protected]>
    Cc: Lorenzo Stoakes <[email protected]>
    Cc: Matthew Wilcox (Oracle) <[email protected]>
    Cc: Oleksiy Avramchenko <[email protected]>
    Signed-off-by: Andrew Morton <[email protected]>
    urezki authored and akpm00 committed Apr 5, 2024
    Configuration menu
    Copy the full SHA
    4ed91fa View commit details
    Browse the repository at this point in the history
  21. mm: vmalloc: fix lockdep warning

    A lockdep reports a possible deadlock in the find_vmap_area_exceed_addr_lock()
    function:
    
    ============================================
    WARNING: possible recursive locking detected
    6.9.0-rc1-00060-ged3ccc57b108-dirty #6140 Not tainted
    --------------------------------------------
    drgn/455 is trying to acquire lock:
    ffff0000c00131d0 (&vn->busy.lock/1){+.+.}-{2:2}, at: find_vmap_area_exceed_addr_lock+0x64/0x124
    
    but task is already holding lock:
    ffff0000c0011878 (&vn->busy.lock/1){+.+.}-{2:2}, at: find_vmap_area_exceed_addr_lock+0x64/0x124
    
    other info that might help us debug this:
     Possible unsafe locking scenario:
    
           CPU0
           ----
      lock(&vn->busy.lock/1);
      lock(&vn->busy.lock/1);
    
     *** DEADLOCK ***
    
    indeed it can happen if the find_vmap_area_exceed_addr_lock() gets called
    concurrently because it tries to acquire two nodes locks.  It was done to
    prevent removing a lowest VA found on a previous step.
    
    To address this a lowest VA is found first without holding a node lock
    where it resides.  As a last step we check if a VA still there because it
    can go away, if removed, proceed with next lowest.
    
    [[email protected]: fix comment typos, per Baoquan]
    Link: https://lkml.kernel.org/r/[email protected]
    Fixes: 53becf3 ("mm: vmalloc: support multiple nodes in vread_iter")
    Signed-off-by: Uladzislau Rezki (Sony) <[email protected]>
    Tested-by: Jens Axboe <[email protected]>
    Tested-by: Omar Sandoval <[email protected]>
    Reported-by: Jens Axboe <[email protected]>
    Cc: Baoquan He <[email protected]>
    Cc: Christoph Hellwig <[email protected]>
    Cc: Dave Chinner <[email protected]>
    Cc: Lorenzo Stoakes <[email protected]>
    Cc: Matthew Wilcox (Oracle) <[email protected]>
    Cc: Oleksiy Avramchenko <[email protected]>
    Signed-off-by: Andrew Morton <[email protected]>
    urezki authored and akpm00 committed Apr 5, 2024
    Configuration menu
    Copy the full SHA
    fc2c226 View commit details
    Browse the repository at this point in the history
  22. selftests/mm: include strings.h for ffsl

    Got a compilation error on Android for ffsl after 91b80cc
    ("selftests: mm: fix map_hugetlb failure on 64K page size systems")
    included vm_util.h.
    
    Link: https://lkml.kernel.org/r/[email protected]
    Fixes: af605d2 ("selftests/mm: merge util.h into vm_util.h")
    Signed-off-by: Edward Liaw <[email protected]>
    Reviewed-by: Muhammad Usama Anjum <[email protected]>
    Cc: Axel Rasmussen <[email protected]>
    Cc: David Hildenbrand <[email protected]>
    Cc: "Mike Rapoport (IBM)" <[email protected]>
    Cc: Peter Xu <[email protected]>
    Cc: Shuah Khan <[email protected]>
    Cc: <[email protected]>
    Signed-off-by: Andrew Morton <[email protected]>
    edliaw authored and akpm00 committed Apr 5, 2024
    Configuration menu
    Copy the full SHA
    176517c View commit details
    Browse the repository at this point in the history
  23. MAINTAINERS: change vmware.com addresses to broadcom.com

    Update all remaining vmware.com email addresses to actual broadcom.com.
    
    Add corresponding .mailmap entries for maintainers who contributed in the
    past as the vmware.com address will start bouncing soon.
    
    Maintainership update. Jeff Sipek has left VMware, Nick Shi will be
    maintaining VMware PTP.
    
    Link: https://lkml.kernel.org/r/[email protected]
    Signed-off-by: Alexey Makhalov <[email protected]>
    Acked-by: Florian Fainelli <[email protected]>
    Acked-by: Ajay Kaher <[email protected]>
    Acked-by: Ronak Doshi <[email protected]>
    Acked-by: Nick Shi <[email protected]>
    Acked-by: Bryan Tan <[email protected]>
    Acked-by: Vishnu Dasa <[email protected]>
    Acked-by: Vishal Bhakta <[email protected]>
    Cc: Greg Kroah-Hartman <[email protected]>
    Signed-off-by: Andrew Morton <[email protected]>
    YustasSwamp authored and akpm00 committed Apr 5, 2024
    Configuration menu
    Copy the full SHA
    87f0e65 View commit details
    Browse the repository at this point in the history
  24. x86/mm/pat: fix VM_PAT handling in COW mappings

    PAT handling won't do the right thing in COW mappings: the first PTE (or,
    in fact, all PTEs) can be replaced during write faults to point at anon
    folios.  Reliably recovering the correct PFN and cachemode using
    follow_phys() from PTEs will not work in COW mappings.
    
    Using follow_phys(), we might just get the address+protection of the anon
    folio (which is very wrong), or fail on swap/nonswap entries, failing
    follow_phys() and triggering a WARN_ON_ONCE() in untrack_pfn() and
    track_pfn_copy(), not properly calling free_pfn_range().
    
    In free_pfn_range(), we either wouldn't call memtype_free() or would call
    it with the wrong range, possibly leaking memory.
    
    To fix that, let's update follow_phys() to refuse returning anon folios,
    and fallback to using the stored PFN inside vma->vm_pgoff for COW mappings
    if we run into that.
    
    We will now properly handle untrack_pfn() with COW mappings, where we
    don't need the cachemode.  We'll have to fail fork()->track_pfn_copy() if
    the first page was replaced by an anon folio, though: we'd have to store
    the cachemode in the VMA to make this work, likely growing the VMA size.
    
    For now, lets keep it simple and let track_pfn_copy() just fail in that
    case: it would have failed in the past with swap/nonswap entries already,
    and it would have done the wrong thing with anon folios.
    
    Simple reproducer to trigger the WARN_ON_ONCE() in untrack_pfn():
    
    <--- C reproducer --->
     #include <stdio.h>
     #include <sys/mman.h>
     #include <unistd.h>
     #include <liburing.h>
    
     int main(void)
     {
             struct io_uring_params p = {};
             int ring_fd;
             size_t size;
             char *map;
    
             ring_fd = io_uring_setup(1, &p);
             if (ring_fd < 0) {
                     perror("io_uring_setup");
                     return 1;
             }
             size = p.sq_off.array + p.sq_entries * sizeof(unsigned);
    
             /* Map the submission queue ring MAP_PRIVATE */
             map = mmap(0, size, PROT_READ | PROT_WRITE, MAP_PRIVATE,
                        ring_fd, IORING_OFF_SQ_RING);
             if (map == MAP_FAILED) {
                     perror("mmap");
                     return 1;
             }
    
             /* We have at least one page. Let's COW it. */
             *map = 0;
             pause();
             return 0;
     }
    <--- C reproducer --->
    
    On a system with 16 GiB RAM and swap configured:
     # ./iouring &
     # memhog 16G
     # killall iouring
    [  301.552930] ------------[ cut here ]------------
    [  301.553285] WARNING: CPU: 7 PID: 1402 at arch/x86/mm/pat/memtype.c:1060 untrack_pfn+0xf4/0x100
    [  301.553989] Modules linked in: binfmt_misc nft_fib_inet nft_fib_ipv4 nft_fib_ipv6 nft_fib nft_reject_g
    [  301.558232] CPU: 7 PID: 1402 Comm: iouring Not tainted 6.7.5-100.fc38.x86_64 #1
    [  301.558772] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.16.3-0-ga6ed6b701f0a-prebu4
    [  301.559569] RIP: 0010:untrack_pfn+0xf4/0x100
    [  301.559893] Code: 75 c4 eb cf 48 8b 43 10 8b a8 e8 00 00 00 3b 6b 28 74 b8 48 8b 7b 30 e8 ea 1a f7 000
    [  301.561189] RSP: 0018:ffffba2c0377fab8 EFLAGS: 00010282
    [  301.561590] RAX: 00000000ffffffea RBX: ffff9208c8ce9cc0 RCX: 000000010455e047
    [  301.562105] RDX: 07fffffff0eb1e0a RSI: 0000000000000000 RDI: ffff9208c391d200
    [  301.562628] RBP: 0000000000000000 R08: ffffba2c0377fab8 R09: 0000000000000000
    [  301.563145] R10: ffff9208d2292d50 R11: 0000000000000002 R12: 00007fea890e0000
    [  301.563669] R13: 0000000000000000 R14: ffffba2c0377fc08 R15: 0000000000000000
    [  301.564186] FS:  0000000000000000(0000) GS:ffff920c2fbc0000(0000) knlGS:0000000000000000
    [  301.564773] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    [  301.565197] CR2: 00007fea88ee8a20 CR3: 00000001033a8000 CR4: 0000000000750ef0
    [  301.565725] PKRU: 55555554
    [  301.565944] Call Trace:
    [  301.566148]  <TASK>
    [  301.566325]  ? untrack_pfn+0xf4/0x100
    [  301.566618]  ? __warn+0x81/0x130
    [  301.566876]  ? untrack_pfn+0xf4/0x100
    [  301.567163]  ? report_bug+0x171/0x1a0
    [  301.567466]  ? handle_bug+0x3c/0x80
    [  301.567743]  ? exc_invalid_op+0x17/0x70
    [  301.568038]  ? asm_exc_invalid_op+0x1a/0x20
    [  301.568363]  ? untrack_pfn+0xf4/0x100
    [  301.568660]  ? untrack_pfn+0x65/0x100
    [  301.568947]  unmap_single_vma+0xa6/0xe0
    [  301.569247]  unmap_vmas+0xb5/0x190
    [  301.569532]  exit_mmap+0xec/0x340
    [  301.569801]  __mmput+0x3e/0x130
    [  301.570051]  do_exit+0x305/0xaf0
    ...
    
    Link: https://lkml.kernel.org/r/[email protected]
    Signed-off-by: David Hildenbrand <[email protected]>
    Reported-by: Wupeng Ma <[email protected]>
    Closes: https://lkml.kernel.org/r/[email protected]
    Fixes: b1a86e1 ("x86, pat: remove the dependency on 'vm_pgoff' in track/untrack pfn vma routines")
    Fixes: 5899329 ("x86: PAT: implement track/untrack of pfnmap regions for x86 - v3")
    Acked-by: Ingo Molnar <[email protected]>
    Cc: Dave Hansen <[email protected]>
    Cc: Andy Lutomirski <[email protected]>
    Cc: Peter Zijlstra <[email protected]>
    Cc: Thomas Gleixner <[email protected]>
    Cc: Borislav Petkov <[email protected]>
    Cc: "H. Peter Anvin" <[email protected]>
    Cc: <[email protected]>
    Signed-off-by: Andrew Morton <[email protected]>
    davidhildenbrand authored and akpm00 committed Apr 5, 2024
    Configuration menu
    Copy the full SHA
    04c35ab View commit details
    Browse the repository at this point in the history
  25. stackdepot: rename pool_index to pool_index_plus_1

    Commit 3ee34ea ("lib/stackdepot: fix first entry having a 0-handle")
    changed the meaning of the pool_index field to mean "the pool index plus
    1".  This made the code accessing this field less self-documenting, as
    well as causing debuggers such as drgn to not be able to easily remain
    compatible with both old and new kernels, because they typically do that
    by testing for presence of the new field.  Because stackdepot is a
    debugging tool, we should make sure that it is debugger friendly. 
    Therefore, give the field a different name to improve readability as well
    as enabling debugger backwards compatibility.
    
    This is needed in 6.9, which would otherwise become an odd release with
    the new semantics and old name so debuggers wouldn't recognize the new
    semantics there.
    
    Fixes: 3ee34ea ("lib/stackdepot: fix first entry having a 0-handle")
    Link: https://lkml.kernel.org/r/[email protected]
    Link: https://linux-review.googlesource.com/id/Ib3e70c36c1d230dd0a118dc22649b33e768b9f88
    Signed-off-by: Peter Collingbourne <[email protected]>
    Acked-by: Vlastimil Babka <[email protected]>
    Reviewed-by: Alexander Potapenko <[email protected]>
    Acked-by: Marco Elver <[email protected]>
    Acked-by: Oscar Salvador <[email protected]>
    Cc: Andrey Konovalov <[email protected]>
    Cc: Michal Hocko <[email protected]>
    Cc: Omar Sandoval <[email protected]>
    Signed-off-by: Andrew Morton <[email protected]>
    pcc authored and akpm00 committed Apr 5, 2024
    Configuration menu
    Copy the full SHA
    a6c1d9c View commit details
    Browse the repository at this point in the history
  26. Merge tag 'drm-fixes-2024-04-05' of https://gitlab.freedesktop.org/dr…

    …m/kernel
    
    Pull drm fixes from Dave Airlie:
     "Weekly fixes, mostly xe and i915, amdgpu on a week off, otherwise a
      nouveau fix for a crash with new vulkan cts tests, and a couple of
      cleanups and misc fixes.
    
      display:
       - fix typos in kerneldoc
    
      prime:
       - unbreak dma-buf export for virt-gpu
    
      nouveau:
       - uvmm: fix remap address calculation
       - minor cleanups
    
      panfrost:
       - fix power-transition timeouts
    
      xe:
       - Stop using system_unbound_wq for preempt fences
       - Fix saving unordered rebinding fences by attaching them as kernel
         feces to the vm's resv
       - Fix TLB invalidation fences completing out of order
       - Move rebind TLB invalidation to the ring ops to reduce the latency
    
      i915:
       - A few DisplayPort related fixes
       - eDP PSR fixes
       - Remove some VM space restrictions on older platforms
       - Disable automatic load CCS load balancing"
    
    * tag 'drm-fixes-2024-04-05' of https://gitlab.freedesktop.org/drm/kernel: (22 commits)
      drm/xe: Use ordered wq for preempt fence waiting
      drm/xe: Move vma rebinding to the drm_exec locking loop
      drm/xe: Make TLB invalidation fences unordered
      drm/xe: Rework rebinding
      drm/xe: Use ring ops TLB invalidation for rebinds
      drm/i915/mst: Reject FEC+MST on ICL
      drm/i915/mst: Limit MST+DSC to TGL+
      drm/i915/dp: Fix the computation for compressed_bpp for DISPLAY < 13
      drm/i915/gt: Enable only one CCS for compute workload
      drm/i915/gt: Do not generate the command streamer for all the CCS
      drm/i915/gt: Disable HW load balancing for CCS
      drm/i915/gt: Limit the reserved VM space to only the platforms that need it
      drm/i915/psr: Fix intel_psr2_sel_fetch_et_alignment usage
      drm/i915/psr: Move writing early transport pipe src
      drm/i915/psr: Calculate PIPE_SRCSZ_ERLY_TPT value
      drm/i915/dp: Remove support for UHBR13.5
      drm/i915/dp: Fix DSC state HW readout for SST connectors
      drm/display: fix typo
      drm/prime: Unbreak virtgpu dma-buf export
      nouveau/uvmm: fix addr/range calcs for remap operations
      ...
    torvalds committed Apr 5, 2024
    Configuration menu
    Copy the full SHA
    89103a1 View commit details
    Browse the repository at this point in the history
  27. Merge tag 'sound-6.9-rc3' of git://git.kernel.org/pub/scm/linux/kerne…

    …l/git/tiwai/sound
    
    Pull sound fixes from Takashi Iwai:
     "This became a bit bigger collection of patches, but almost all are
      about device-specific fixes, and should be safe for 6.9:
    
       - Lots of ASoC Intel SOF-related fixes/updates
    
       - Locking fixes in SoundWire drivers
    
       - ASoC AMD ACP/SOF updates
    
       - ASoC ES8326 codec fixes
    
       - HD-audio codec fixes and quirks
    
       - A regression fix in emu10k1 synth code"
    
    * tag 'sound-6.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (49 commits)
      ASoC: SOF: Core: Add remove_late() to sof_init_environment failure path
      ASoC: SOF: amd: fix for false dsp interrupts
      ASoC: SOF: Intel: lnl: Disable DMIC/SSP offload on remove
      ASoC: Intel: avs: boards: Add modules description
      ASoC: codecs: ES8326: Removing the control of ADC_SCALE
      ASoC: codecs: ES8326: Solve a headphone detection issue after suspend and resume
      ASoC: codecs: ES8326: modify clock table
      ASoC: codecs: ES8326: Solve error interruption issue
      ALSA: line6: Zero-initialize message buffers
      ALSA: hda/realtek: cs35l41: Support ASUS ROG G634JYR
      ALSA: hda/realtek: Update Panasonic CF-SZ6 quirk to support headset with microphone
      ALSA: hda/realtek: Add sound quirks for Lenovo Legion slim 7 16ARHA7 models
      Revert "ALSA: emu10k1: fix synthesizer sample playback position and caching"
      OSS: dmasound/paula: Mark driver struct with __refdata to prevent section mismatch
      ALSA: hda/realtek: Add quirks for ASUS Laptops using CS35L56
      ASoC: amd: acp: fix for acp_init function error handling
      ASoC: tas2781: mark dvc_tlv with __maybe_unused
      ASoC: ops: Fix wraparound for mask in snd_soc_get_volsw
      ASoC: rt-sdw*: add __func__ to all error logs
      ASoC: rt722-sdca-sdw: fix locking sequence
      ...
    torvalds committed Apr 5, 2024
    Configuration menu
    Copy the full SHA
    c42881d View commit details
    Browse the repository at this point in the history
  28. Merge tag 'ata-6.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/…

    …git/libata/linux
    
    Pull ata fixes from Damien Le Moal:
    
     - Compilation warning fixes from Arnd: one in the sata_sx4 driver due
       to an incorrect calculation of the parameters passed to memcpy() and
       another one in the sata_mv driver when CONFIG_PCI is not set
    
     - Drop the owner driver field assignment in the pata_macio driver. That
       is not needed as the PCI core code does that already (Krzysztof)
    
     - Remove an unusued field in struct st_ahci_drv_data of the ahci_st
       driver (Christophe)
    
     - Add a missing clock probe error check in the sata_gemini driver
       (Chen)
    
    * tag 'ata-6.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux:
      ata: sata_gemini: Check clk_enable() result
      ata: sata_mv: Fix PCI device ID table declaration compilation warning
      ata: ahci_st: Remove an unused field in struct st_ahci_drv_data
      ata: pata_macio: drop driver owner assignment
      ata: sata_sx4: fix pdc20621_get_from_dimm() on 64-bit
    torvalds committed Apr 5, 2024
    Configuration menu
    Copy the full SHA
    4c3fc34 View commit details
    Browse the repository at this point in the history
  29. Merge tag 'gpio-fixes-for-v6.9-rc3' of git://git.kernel.org/pub/scm/l…

    …inux/kernel/git/brgl/linux
    
    Pull gpio fixes from Bartosz Golaszewski:
    
     - make sure GPIO devices are registered with the subsystem before
       trying to return them to a caller of gpio_device_find()
    
     - fix two issues with incorrect sanitization of the interrupt labels
    
    * tag 'gpio-fixes-for-v6.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux:
      gpio: cdev: fix missed label sanitizing in debounce_setup()
      gpio: cdev: check for NULL labels when sanitizing them for irqs
      gpiolib: Fix triggering "kobject: 'gpiochipX' is not initialized, yet" kobject_get() errors
    torvalds committed Apr 5, 2024
    Configuration menu
    Copy the full SHA
    2e69af1 View commit details
    Browse the repository at this point in the history
  30. Merge tag 'thermal-6.9-rc3' of git://git.kernel.org/pub/scm/linux/ker…

    …nel/git/rafael/linux-pm
    
    Pull thermal control fixes from Rafael Wysocki:
     "These fix two power allocator thermal governor issues and an ACPI
      thermal driver regression that all were introduced during the 6.8
      development cycle.
    
      Specifics:
    
       - Allow the power allocator thermal governor to bind to a thermal
         zone without cooling devices and/or without trip points (Nikita
         Travkin)
    
       - Make the ACPI thermal driver register a tripless thermal zone when
         it cannot find any usable trip points instead of returning an error
         from acpi_thermal_add() (Stephen Horvath)"
    
    * tag 'thermal-6.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
      thermal: gov_power_allocator: Allow binding without trip points
      thermal: gov_power_allocator: Allow binding without cooling devices
      ACPI: thermal: Register thermal zones without valid trip points
    torvalds committed Apr 5, 2024
    Configuration menu
    Copy the full SHA
    b21defc View commit details
    Browse the repository at this point in the history
  31. Merge tag 'pm-6.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/g…

    …it/rafael/linux-pm
    
    Pull power management fix from Rafael Wysocki:
     "Fix a recent Energy Model change that went against a recent scheduler
      change made independently (Vincent Guittot)"
    
    * tag 'pm-6.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
      PM: EM: fix wrong utilization estimation in em_cpu_energy()
    torvalds committed Apr 5, 2024
    Configuration menu
    Copy the full SHA
    2f9fd9e View commit details
    Browse the repository at this point in the history
  32. Merge tag 's390-6.9-3' of git://git.kernel.org/pub/scm/linux/kernel/g…

    …it/s390/linux
    
    Pull s390 fixes from Alexander Gordeev:
    
     - Fix missing NULL pointer check when determining guest/host fault
    
     - Mark all functions in asm/atomic_ops.h, asm/atomic.h and
       asm/preempt.h as __always_inline to avoid unwanted instrumentation
    
     - Fix removal of a Processor Activity Instrumentation (PAI) sampling
       event in PMU device driver
    
     - Align system call table on 8 bytes
    
    * tag 's390-6.9-3' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
      s390/entry: align system call table on 8 bytes
      s390/pai: fix sampling event removal for PMU device driver
      s390/preempt: mark all functions __always_inline
      s390/atomic: mark all functions __always_inline
      s390/mm: fix NULL pointer dereference
    torvalds committed Apr 5, 2024
    Configuration menu
    Copy the full SHA
    5009447 View commit details
    Browse the repository at this point in the history
  33. Merge tag 'riscv-for-linus-6.9-rc3' of git://git.kernel.org/pub/scm/l…

    …inux/kernel/git/riscv/linux
    
    Pull RISC-V fixes from Palmer Dabbelt:
    
     - A fix for an __{get,put}_kernel_nofault to avoid an uninitialized
       value causing spurious failures
    
     - compat_vdso.so.dbg is now installed to the standard install location
    
     - A fix to avoid initializing PERF_SAMPLE_BRANCH_*-related events, as
       they aren't supported and will just later fail
    
     - A fix to make AT_VECTOR_SIZE_ARCH correct now that we're providing
       AT_MINSIGSTKSZ
    
     - pgprot_nx() is now implemented, which fixes vmap W^X protection
    
     - A fix for the vector save/restore code, which at least manifests as
       corrupted vector state when a signal is taken
    
     - A fix for a race condition in instruction patching
    
     - A fix to avoid leaking the kernel-mode GP to userspace, which is a
       kernel pointer leak that can be used to defeat KASLR in various ways
    
     - A handful of smaller fixes to build warnings, an overzealous printk,
       and some missing tracing annotations
    
    * tag 'riscv-for-linus-6.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
      riscv: process: Fix kernel gp leakage
      riscv: Disable preemption when using patch_map()
      riscv: Fix warning by declaring arch_cpu_idle() as noinstr
      riscv: use KERN_INFO in do_trap
      riscv: Fix vector state restore in rt_sigreturn()
      riscv: mm: implement pgprot_nx
      riscv: compat_vdso: align VDSOAS build log
      RISC-V: Update AT_VECTOR_SIZE_ARCH for new AT_MINSIGSTKSZ
      riscv: Mark __se_sys_* functions __used
      drivers/perf: riscv: Disable PERF_SAMPLE_BRANCH_* while not supported
      riscv: compat_vdso: install compat_vdso.so.dbg to /lib/modules/*/vdso/
      riscv: hwprobe: do not produce frtace relocation
      riscv: Fix spurious errors from __get/put_kernel_nofault
      riscv: mm: Fix prototype to avoid discarding const
    torvalds committed Apr 5, 2024
    Configuration menu
    Copy the full SHA
    261b8e8 View commit details
    Browse the repository at this point in the history
  34. Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/…

    …git/arm64/linux
    
    Pull arm64 fix from Catalin Marinas:
     "arm64/ptrace fix to use the correct SVE layout based on the saved
      floating point state rather than the TIF_SVE flag. The latter may be
      left on during syscalls even if the SVE state is discarded"
    
    * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
      arm64/ptrace: Use saved floating point state type to determine SVE layout
    torvalds committed Apr 5, 2024
    Configuration menu
    Copy the full SHA
    c783023 View commit details
    Browse the repository at this point in the history
  35. Merge tag 'mm-hotfixes-stable-2024-04-05-11-30' of git://git.kernel.o…

    …rg/pub/scm/linux/kernel/git/akpm/mm
    
    Pull misc fixes from Andrew Morton:
     "8 hotfixes, 3 are cc:stable
    
      There are a couple of fixups for this cycle's vmalloc changes and one
      for the stackdepot changes. And a fix for a very old x86 PAT issue
      which can cause a warning splat"
    
    * tag 'mm-hotfixes-stable-2024-04-05-11-30' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm:
      stackdepot: rename pool_index to pool_index_plus_1
      x86/mm/pat: fix VM_PAT handling in COW mappings
      MAINTAINERS: change vmware.com addresses to broadcom.com
      selftests/mm: include strings.h for ffsl
      mm: vmalloc: fix lockdep warning
      mm: vmalloc: bail out early in find_vmap_area() if vmap is not init
      init: open output files from cpio unpacking with O_LARGEFILE
      mm/secretmem: fix GUP-fast succeeding on secretmem folios
    torvalds committed Apr 5, 2024
    Configuration menu
    Copy the full SHA
    af709ad View commit details
    Browse the repository at this point in the history
  36. Merge tag 'devicetree-fixes-for-6.9-1' of git://git.kernel.org/pub/sc…

    …m/linux/kernel/git/robh/linux
    
    Pull devicetree fixes from Rob Herring:
    
     - Fix NIOS2 boot with external DTB
    
     - Add missing synchronization needed between fw_devlink and DT overlay
       removals
    
     - Fix some unit-address regex's to be hex only
    
     - Drop some 10+ year old "unstable binding" statements
    
     - Add new SoCs to QCom UFS binding
    
     - Add TPM bindings to TPM maintainers
    
    * tag 'devicetree-fixes-for-6.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
      nios2: Only use built-in devicetree blob if configured to do so
      dt-bindings: timer: narrow regex for unit address to hex numbers
      dt-bindings: soc: fsl: narrow regex for unit address to hex numbers
      dt-bindings: remoteproc: ti,davinci: remove unstable remark
      dt-bindings: clock: ti: remove unstable remark
      dt-bindings: clock: keystone: remove unstable remark
      of: module: prevent NULL pointer dereference in vsnprintf()
      dt-bindings: ufs: qcom: document SM6125 UFS
      dt-bindings: ufs: qcom: document SC7180 UFS
      dt-bindings: ufs: qcom: document SC8180X UFS
      of: dynamic: Synchronize of_changeset_destroy() with the devlink removals
      driver core: Introduce device_link_wait_removal()
      docs: dt-bindings: add missing address/size-cells to example
      MAINTAINERS: Add TPM DT bindings to TPM maintainers
    torvalds committed Apr 5, 2024
    Configuration menu
    Copy the full SHA
    84985eb View commit details
    Browse the repository at this point in the history
  37. Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/g…

    …it/jejb/scsi
    
    Pull SCSI fixes from James Bottomley:
     "The most important is the libsas fix, which is a problem for DMA to a
      kmalloc'd structure too small causing cache line interference. The
      other fixes (all in drivers) are mostly for allocation length fixes,
      error leg unwinding, suspend races and a missing retry"
    
    * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
      scsi: ufs: core: Fix MCQ mode dev command timeout
      scsi: libsas: Align SMP request allocation to ARCH_DMA_MINALIGN
      scsi: sd: Unregister device if device_add_disk() failed in sd_probe()
      scsi: ufs: core: WLUN suspend dev/link state error recovery
      scsi: mylex: Fix sysfs buffer lengths
    torvalds committed Apr 5, 2024
    Configuration menu
    Copy the full SHA
    4de2ff2 View commit details
    Browse the repository at this point in the history
  38. Merge tag 'io_uring-6.9-20240405' of git://git.kernel.dk/linux

    Pull io_uring fixes from Jens Axboe:
    
     - Backport of some fixes that came up during development of the 6.10
       io_uring patches. This includes some kbuf cleanups and reference
       fixes.
    
     - Disable multishot read if we don't have NOWAIT support on the target
    
     - Fix for a dependency issue with workqueue flushing
    
    * tag 'io_uring-6.9-20240405' of git://git.kernel.dk/linux:
      io_uring/kbuf: hold io_buffer_list reference over mmap
      io_uring/kbuf: protect io_buffer_list teardown with a reference
      io_uring/kbuf: get rid of bl->is_ready
      io_uring/kbuf: get rid of lower BGID lists
      io_uring: use private workqueue for exit work
      io_uring: disable io-wq execution of multishot NOWAIT requests
      io_uring/rw: don't allow multishot reads without NOWAIT support
    torvalds committed Apr 5, 2024
    Configuration menu
    Copy the full SHA
    4f72ed4 View commit details
    Browse the repository at this point in the history

Commits on Apr 6, 2024

  1. Merge tag 'block-6.9-20240405' of git://git.kernel.dk/linux

    Pull block fixes from Jens Axboe:
    
     - NVMe pull request via Keith:
          - Atomic queue limits fixes (Christoph)
          - Fabrics fixes (Hannes, Daniel)
    
     - Discard overflow fix (Li)
    
     - Cleanup fix for null_blk (Damien)
    
    * tag 'block-6.9-20240405' of git://git.kernel.dk/linux:
      nvme-fc: rename free_ctrl callback to match name pattern
      nvmet-fc: move RCU read lock to nvmet_fc_assoc_exists
      nvmet: implement unique discovery NQN
      nvme: don't create a multipath node for zero capacity devices
      nvme: split nvme_update_zone_info
      nvme-multipath: don't inherit LBA-related fields for the multipath node
      block: fix overflow in blk_ioctl_discard()
      nullblk: Fix cleanup order in null_add_dev() error path
    torvalds committed Apr 6, 2024
    Configuration menu
    Copy the full SHA
    8a05ef7 View commit details
    Browse the repository at this point in the history
  2. Merge tag 'regmap-fix-v6.9-rc2' of git://git.kernel.org/pub/scm/linux…

    …/kernel/git/broonie/regmap
    
    Pull regmap fixes from Mark Brown:
     "Richard found a nasty corner case in the maple tree code which he
      fixed, and also fixed a compiler warning which was showing up with the
      toolchain he uses and helpfully identified a possible incorrect error
      code which could have runtime impacts"
    
    * tag 'regmap-fix-v6.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap:
      regmap: maple: Fix uninitialized symbol 'ret' warnings
      regmap: maple: Fix cache corruption in regcache_maple_drop()
    torvalds committed Apr 6, 2024
    Configuration menu
    Copy the full SHA
    a6bec44 View commit details
    Browse the repository at this point in the history
  3. Merge tag 'regulator-fix-v6.9-rc2' of git://git.kernel.org/pub/scm/li…

    …nux/kernel/git/broonie/regulator
    
    Pull regulator fix from Mark Brown:
     "One simple regualtor fix, fixing module autoloading on tps65132"
    
    * tag 'regulator-fix-v6.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
      regulator: tps65132: Add of_match table
    torvalds committed Apr 6, 2024
    Configuration menu
    Copy the full SHA
    2066840 View commit details
    Browse the repository at this point in the history
  4. Merge tag 'spi-fix-v6.9-rc2' of git://git.kernel.org/pub/scm/linux/ke…

    …rnel/git/broonie/spi
    
    Pull spi fixes from Mark Brown:
     "A few small driver specific fixes, the most important being the
      s3c64xx change which is likely to be hit during normal operation"
    
    * tag 'spi-fix-v6.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi:
      spi: mchp-pci1xxx: Fix a possible null pointer dereference in pci1xxx_spi_probe
      spi: spi-fsl-lpspi: remove redundant spi_controller_put call
      spi: s3c64xx: Use DMA mode from fifo size
    torvalds committed Apr 6, 2024
    Configuration menu
    Copy the full SHA
    104db05 View commit details
    Browse the repository at this point in the history
  5. firewire: ohci: mask bus reset interrupts between ISR and bottom half

    In the FireWire OHCI interrupt handler, if a bus reset interrupt has
    occurred, mask bus reset interrupts until bus_reset_work has serviced and
    cleared the interrupt.
    
    Normally, we always leave bus reset interrupts masked. We infer the bus
    reset from the self-ID interrupt that happens shortly thereafter. A
    scenario where we unmask bus reset interrupts was introduced in 2008 in
    a007bb8: If
    OHCI_PARAM_DEBUG_BUSRESETS (8) is set in the debug parameter bitmask, we
    will unmask bus reset interrupts so we can log them.
    
    irq_handler logs the bus reset interrupt. However, we can't clear the bus
    reset event flag in irq_handler, because we won't service the event until
    later. irq_handler exits with the event flag still set. If the
    corresponding interrupt is still unmasked, the first bus reset will
    usually freeze the system due to irq_handler being called again each
    time it exits. This freeze can be reproduced by loading firewire_ohci
    with "modprobe firewire_ohci debug=-1" (to enable all debugging output).
    Apparently there are also some cases where bus_reset_work will get called
    soon enough to clear the event, and operation will continue normally.
    
    This freeze was first reported a few months after a007bb8 was committed,
    but until now it was never fixed. The debug level could safely be set
    to -1 through sysfs after the module was loaded, but this would be
    ineffectual in logging bus reset interrupts since they were only
    unmasked during initialization.
    
    irq_handler will now leave the event flag set but mask bus reset
    interrupts, so irq_handler won't be called again and there will be no
    freeze. If OHCI_PARAM_DEBUG_BUSRESETS is enabled, bus_reset_work will
    unmask the interrupt after servicing the event, so future interrupts
    will be caught as desired.
    
    As a side effect to this change, OHCI_PARAM_DEBUG_BUSRESETS can now be
    enabled through sysfs in addition to during initial module loading.
    However, when enabled through sysfs, logging of bus reset interrupts will
    be effective only starting with the second bus reset, after
    bus_reset_work has executed.
    
    Signed-off-by: Adam Goldman <[email protected]>
    Signed-off-by: Takashi Sakamoto <[email protected]>
    aaeegg authored and takaswie committed Apr 6, 2024
    Configuration menu
    Copy the full SHA
    752e3c5 View commit details
    Browse the repository at this point in the history
  6. Merge tag 'firewire-fixes-6.9-rc2' of git://git.kernel.org/pub/scm/li…

    …nux/kernel/git/ieee1394/linux1394
    
    Pull firewire fixes from Takashi Sakamoto:
     "The firewire-ohci kernel module has a parameter for verbose kernel
      logging. It is well-known that it logs the spurious IRQ for bus-reset
      event due to the unmasked register for IRQ event. This update fixes
      the issue"
    
    * tag 'firewire-fixes-6.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394:
      firewire: ohci: mask bus reset interrupts between ISR and bottom half
    torvalds committed Apr 6, 2024
    Configuration menu
    Copy the full SHA
    6c6e47d View commit details
    Browse the repository at this point in the history
  7. Merge tag 'i2c-host-fixes-6.9-rc3' of git://git.kernel.org/pub/scm/li…

    …nux/kernel/git/andi.shyti/linux into i2c/for-current
    
    An unused const variable kind of error has been fixed by placing
    the definition of icr_bits[] inside the ifdef block where it is
    used.
    Wolfram Sang committed Apr 6, 2024
    Configuration menu
    Copy the full SHA
    5ceeabb View commit details
    Browse the repository at this point in the history
  8. Merge branch 'linus' into x86/urgent, to pick up dependent commit

    We want to fix:
    
      0e11073 ("x86/retpoline: Do the necessary fixup to the Zen3/4 srso return thunk for !SRSO")
    
    So merge in Linus's latest into x86/urgent to have it available.
    
    Signed-off-by: Ingo Molnar <[email protected]>
    Ingo Molnar committed Apr 6, 2024
    Configuration menu
    Copy the full SHA
    5f2ca44 View commit details
    Browse the repository at this point in the history
  9. x86/retpoline: Add NOENDBR annotation to the SRSO dummy return thunk

    srso_alias_untrain_ret() is special code, even if it is a dummy
    which is called in the !SRSO case, so annotate it like its real
    counterpart, to address the following objtool splat:
    
      vmlinux.o: warning: objtool: .export_symbol+0x2b290: data relocation to !ENDBR: srso_alias_untrain_ret+0x0
    
    Fixes: 4535e1a ("x86/bugs: Fix the SRSO mitigation on Zen3/4")
    Signed-off-by: Borislav Petkov (AMD) <[email protected]>
    Signed-off-by: Ingo Molnar <[email protected]>
    Cc: Linus Torvalds <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    bp3tk0v authored and Ingo Molnar committed Apr 6, 2024
    Configuration menu
    Copy the full SHA
    b377c66 View commit details
    Browse the repository at this point in the history
  10. Merge tag '6.9-rc2-smb3-client-fixes' of git://git.samba.org/sfrench/…

    …cifs-2.6
    
    Pull smb client fixes from Steve French:
    
     - fix to retry close to avoid potential handle leaks when server
       returns EBUSY
    
     - DFS fixes including a fix for potential use after free
    
     - fscache fix
    
     - minor strncpy cleanup
    
     - reconnect race fix
    
     - deal with various possible UAF race conditions tearing sessions down
    
    * tag '6.9-rc2-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6:
      smb: client: fix potential UAF in cifs_signal_cifsd_for_reconnect()
      smb: client: fix potential UAF in smb2_is_network_name_deleted()
      smb: client: fix potential UAF in is_valid_oplock_break()
      smb: client: fix potential UAF in smb2_is_valid_oplock_break()
      smb: client: fix potential UAF in smb2_is_valid_lease_break()
      smb: client: fix potential UAF in cifs_stats_proc_show()
      smb: client: fix potential UAF in cifs_stats_proc_write()
      smb: client: fix potential UAF in cifs_dump_full_key()
      smb: client: fix potential UAF in cifs_debug_files_proc_show()
      smb3: retrying on failed server close
      smb: client: serialise cifs_construct_tcon() with cifs_mount_mutex
      smb: client: handle DFS tcons in cifs_construct_tcon()
      smb: client: refresh referral without acquiring refpath_lock
      smb: client: guarantee refcounted children from parent session
      cifs: Fix caching to try to do open O_WRONLY as rdwr on server
      smb: client: fix UAF in smb2_reconnect_server()
      smb: client: replace deprecated strncpy with strscpy
    torvalds committed Apr 6, 2024
    Configuration menu
    Copy the full SHA
    119c289 View commit details
    Browse the repository at this point in the history
  11. Merge tag 'xfs-6.9-fixes-2' of git://git.kernel.org/pub/scm/fs/xfs/xf…

    …s-linux
    
    Pull xfs fix from Chandan Babu:
    
     - Allow creating new links to special files which were not associated
       with a project quota
    
    * tag 'xfs-6.9-fixes-2' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
      xfs: allow cross-linking special files without project quota
    torvalds committed Apr 6, 2024
    Configuration menu
    Copy the full SHA
    9520c19 View commit details
    Browse the repository at this point in the history
  12. Merge tag 'i2c-for-6.9-rc3' of git://git.kernel.org/pub/scm/linux/ker…

    …nel/git/wsa/linux
    
    Pull i2c fix from Wolfram Sang:
     "A host driver build fix"
    
    * tag 'i2c-for-6.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
      i2c: pxa: hide unused icr_bits[] variable
    torvalds committed Apr 6, 2024
    Configuration menu
    Copy the full SHA
    cf17b95 View commit details
    Browse the repository at this point in the history
  13. Merge tag 'nfsd-6.9-2' of git://git.kernel.org/pub/scm/linux/kernel/g…

    …it/cel/linux
    
    Pull nfsd fixes from Chuck Lever:
    
     - Address a slow memory leak with RPC-over-TCP
    
     - Prevent another NFS4ERR_DELAY loop during CREATE_SESSION
    
    * tag 'nfsd-6.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux:
      nfsd: hold a lighter-weight client reference over CB_RECALL_ANY
      SUNRPC: Fix a slow server-side memory leak with RPC-over-TCP
    torvalds committed Apr 6, 2024
    Configuration menu
    Copy the full SHA
    f2f80ac View commit details
    Browse the repository at this point in the history
  14. scx: Spaces -> tabs in a couple places

    Trivial cleanup
    
    Signed-off-by: David Vernet <[email protected]>
    Byte-Lab committed Apr 6, 2024
    Configuration menu
    Copy the full SHA
    5fe9b9b View commit details
    Browse the repository at this point in the history
  15. Merge pull request #176 from sched-ext/fix_tabs

    scx: Spaces -> tabs in a couple places
    htejun authored Apr 6, 2024
    Configuration menu
    Copy the full SHA
    35d303a View commit details
    Browse the repository at this point in the history

Commits on Apr 7, 2024

  1. Merge tag 'perf-urgent-2024-04-07' of git://git.kernel.org/pub/scm/li…

    …nux/kernel/git/tip/tip
    
    Pull x86 perf fix from Ingo Molnar:
     "Fix a combined PEBS events bug on x86 Intel CPUs"
    
    * tag 'perf-urgent-2024-04-07' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
      perf/x86/intel/ds: Don't clear ->pebs_data_cfg for the last PEBS event
    torvalds committed Apr 7, 2024
    Configuration menu
    Copy the full SHA
    e2948ef View commit details
    Browse the repository at this point in the history
  2. Merge tag 'timers-urgent-2024-04-07' of git://git.kernel.org/pub/scm/…

    …linux/kernel/git/tip/tip
    
    Pull timer fixes from Ingo Molnar:
     "Fix various timer bugs:
    
       - Fix a timer migration bug that may result in missed events
    
       - Fix timer migration group hierarchy event updates
    
       - Fix a PowerPC64 build warning
    
       - Fix a handful of DocBook annotation bugs"
    
    * tag 'timers-urgent-2024-04-07' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
      timers/migration: Return early on deactivation
      timers/migration: Fix ignored event due to missing CPU update
      vdso: Use CONFIG_PAGE_SHIFT in vdso/datapage.h
      timers: Fix text inconsistencies and spelling
      tick/sched: Fix struct tick_sched doc warnings
      tick/sched: Fix various kernel-doc warnings
      timers: Fix kernel-doc format and add Return values
      time/timekeeping: Fix kernel-doc warnings and typos
      time/timecounter: Fix inline documentation
    torvalds committed Apr 7, 2024
    Configuration menu
    Copy the full SHA
    3520c35 View commit details
    Browse the repository at this point in the history
  3. Merge tag 'x86-urgent-2024-04-07' of git://git.kernel.org/pub/scm/lin…

    …ux/kernel/git/tip/tip
    
    Pull x86 fixes from Ingo Molnar:
    
     - Fix MCE timer reinit locking
    
     - Fix/improve CoCo guest random entropy pool init
    
     - Fix SEV-SNP late disable bugs
    
     - Fix false positive objtool build warning
    
     - Fix header dependency bug
    
     - Fix resctrl CPU offlining bug
    
    * tag 'x86-urgent-2024-04-07' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
      x86/retpoline: Add NOENDBR annotation to the SRSO dummy return thunk
      x86/mce: Make sure to grab mce_sysfs_mutex in set_bank()
      x86/CPU/AMD: Track SNP host status with cc_platform_*()
      x86/cc: Add cc_platform_set/_clear() helpers
      x86/kvm/Kconfig: Have KVM_AMD_SEV select ARCH_HAS_CC_PLATFORM
      x86/coco: Require seeding RNG with RDRAND on CoCo systems
      x86/numa/32: Include missing <asm/pgtable_areas.h>
      x86/resctrl: Fix uninitialized memory read when last CPU of domain goes offline
    torvalds committed Apr 7, 2024
    Configuration menu
    Copy the full SHA
    9fe3084 View commit details
    Browse the repository at this point in the history
  4. Linux 6.9-rc3

    torvalds committed Apr 7, 2024
    Configuration menu
    Copy the full SHA
    fec50db View commit details
    Browse the repository at this point in the history

Commits on Apr 8, 2024

  1. scx: Add scx_ops_exit() macro for exiting from ext.c

    We currently provide scx_ops_error() as a way for ext.c to cause a
    scheduler to be evicted due to erroneous behavior (for example, due to
    returning an invalid CPU from ops.select_cpu()). Now that we have a
    method for exiting gracefully with an exit code from BPF programs, we
    can similarly provide an scx_ops_exit() macro that allows ext.c to exit
    and pipe an exit code up to user space.
    
    This patch adds that macro. A subsequent patch will use it to exit and
    plumb up hotplug events.
    
    Signed-off-by: David Vernet <[email protected]>
    Byte-Lab committed Apr 8, 2024
    Configuration menu
    Copy the full SHA
    0213f1b View commit details
    Browse the repository at this point in the history

Commits on Apr 10, 2024

  1. scx: Exit a scheduler for unhandled hotplug events

    A scheduler may implement ops.cpu_online() and ops.cpu_offline() for CPU
    onlining and offlining events respectively. If a scheduler does _not_
    implement these callbacks, it's indicative that they do not support
    hotplug. Given that a scheduler that doesn't support hotplug is
    essentially guaranteed to perform incorrectly if a hotplug event occurs,
    let's update ext.c to do the sane thing, and exit the scheduler
    automatically.
    
    Given that there may be other events in the future that could cause the
    scheduler to initiate an exit, we create a new enum scx_exit_code type
    that reserves the top bit of the exit_code field in struct
    scx_exit_info, and defines SCX_ECODE_RESTART. We could as an alternative
    instead just return something like -EAGAIN to signify that user space
    can try restarting the scheduler.
    
    Signed-off-by: David Vernet <[email protected]>
    Byte-Lab committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    e41cbfa View commit details
    Browse the repository at this point in the history
  2. scx: Add more user_exit_info macros for exit code

    Now that we have bits reserved for system exit code reasons and actions,
    as well as bits available for user by user space, let's add some
    ease-of-use macro to user_exit_info.h. A subsequent patch will add
    selftests that use these macros.
    
    Signed-off-by: David Vernet <[email protected]>
    Byte-Lab committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    e298904 View commit details
    Browse the repository at this point in the history
  3. scx: Add selftests for hotplug operations

    We've recently added some logic related to hotplug:
    
    - If a hotplug event occurs and a scheduler hasn't implemented a
      callback for it, we automatically exit the scheduler with specific,
      built-in exit codes
    
    - With scx_bpf_exit(), a scheduler can choose to manually exit the
      scheduler in a hotplug event, or do something else. In any case, the
      scheduler should _not_ be automatically exited by the kernel
    
    Let's add selftests to validate these conditions.
    
    Signed-off-by: David Vernet <[email protected]>
    Byte-Lab committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    e77fa31 View commit details
    Browse the repository at this point in the history
  4. Merge pull request #177 from sched-ext/hotplug_restart

    scx: Exit a scheduler for unhandled hotplug events
    htejun authored Apr 10, 2024
    Configuration menu
    Copy the full SHA
    37b3f83 View commit details
    Browse the repository at this point in the history
  5. scx: Fix allocation of scx_kick_cpus_pnt_seqs[]

    The allocation could be too short if the possible CPU IDs have holes. Use
    nr_cpu_ids instead of num_possible_cpus().
    htejun committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    a0cca0e View commit details
    Browse the repository at this point in the history
  6. scx: Reorder kfunc decls in common.bpf.h

    So that they are in the same order as the definitions in ext.c. No
    functional changes.
    htejun committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    9054b79 View commit details
    Browse the repository at this point in the history
  7. scx: Make ops_cpu_valid() invoke scx_ops_error() automtically

    So that the callers don't have to do it explicitly.
    htejun committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    1226dcc View commit details
    Browse the repository at this point in the history
  8. scx: Move defs of sched_ext_ops and friends to ext.c

    There's no reason to keep the defs of sched_ext_ops and friends in
    include/linux/sched/ext.h. They're exposed only through vmlinux.h which
    doesn't care where the ops is defined. Let's move all the things which don't
    need to be shared in the kernel tree into ext.c. No functional change.
    
    So that the callers don't have to do it explicitly.
    htejun committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    653a19e View commit details
    Browse the repository at this point in the history
  9. scx: Add scx_bpf_nr_cpu_ids(), scx_bpf_get_possible/online_cpumask() …

    …and scx_put_cpumask()
    
    These are useful to have in general. scx_put_cpumask() is a bit sad but
    hopefully BPF will develop a way to annotate static lifetime at some point
    and we won't need these.
    htejun committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    ce08a32 View commit details
    Browse the repository at this point in the history
  10. Merge pull request #178 from sched-ext/htejun/reorg

    scx: Reorg code a bit and add possible/online cpumask helpers
    htejun authored Apr 10, 2024
    Configuration menu
    Copy the full SHA
    1aee870 View commit details
    Browse the repository at this point in the history
  11. scx: Fix a few typos

    Update the copyright in a selftest, and make a comment for an exit_code
    field a bit more generic to reflect that exit_code can be defined when
    gracefully exiting from the main kernel, not just BPF. Finally, update a
    pr_err message to print the correct path to the sched_ext sysfs node.
    
    Signed-off-by: David Vernet <[email protected]>
    Byte-Lab committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    8c5b199 View commit details
    Browse the repository at this point in the history

Commits on Apr 11, 2024

  1. scx: Add hotplug sequence number

    We currently have a possibly tricky race w.r.t. hotplug that schedulers
    don't have a good way to account for. Once a scheduler has inspected a
    host topology, if a hotplug event occurs before a scheduler is attached
    and loaded, then the scheduler will have no way of knowing that its view
    of the host topology is incorrect. Hotplug events _after_ this are fine,
    as we'll either pass the events to the scheduler, or evict the scheduler
    directly. But if a hotplug event happens between inspecting the host
    topology and attaching the scheduler, we have a problem.
    
    To address this, we can use a monotonically increasing hotplug sequence
    number that is incremented any time a hotplug event occurs, and expose
    it through a sysfs node in /sys/kernel/sched_ext/. Using this, a user
    space scheduler can look at the sequence number before loading, and then
    compare it to the sequence number during attach to see if a hotplug
    event occurred. If so, we can fail to attach, and return to user space.
    
    This patch adds the aforementioned sysfs node. A subsequent patch will
    update the struct sched_ext_ops and the attach path to check this value
    to ensure that a hotplug event hasn't occurred.
    
    Signed-off-by: David Vernet <[email protected]>
    Byte-Lab committed Apr 11, 2024
    Configuration menu
    Copy the full SHA
    8584503 View commit details
    Browse the repository at this point in the history
  2. scx: Add hotplug seq to sched_ext_ops

    We'll need to have a hotplug sequence number in struct sched_ext_ops if
    we want to enable user space to deterministically detect a hotplug event
    between reading a host's topology, and attaching its scheduler.
    
    A prior change added a global hotplug sequence number and exported it
    through a sysfs file. This one connects the two by also adding logic to
    fail to attach if there is a mismatch between the two. A subsequent
    patch will add tests.
    
    Signed-off-by: David Vernet <[email protected]>
    Byte-Lab committed Apr 11, 2024
    Configuration menu
    Copy the full SHA
    89a0d6f View commit details
    Browse the repository at this point in the history
  3. scx: Add new macros to compat.h

    Now that we have the hotplug sequence number, schedulers can set the
    sequence number when opening the skeleton to detect hotplug events. In
    order to provide backwards compatibility and avoid excess boilerplate,
    let's add a new SCX_OPS_OPEN() macro that encapsulates this for the
    caller.
    
    In addition, we add an SCX_HOTPLUG_SQN() macro that can be used to read
    the current global sequence number from
    /sys/kernel/sched_ext/hotplug_sqn. This is called by SCX_OPS_OPEN() when
    running on a kernel with hotplug sqn support.
    
    Signed-off-by: David Vernet <[email protected]>
    Byte-Lab committed Apr 11, 2024
    Configuration menu
    Copy the full SHA
    b276ddd View commit details
    Browse the repository at this point in the history
  4. scx: Add selftests for validating hotplug seq checks

    Now that we have full hotplug sequence number support, as well as the
    necessary macros in compat.h, let's extend the hotplug selftest to also
    validate that the sequence number can be used to detect hotplug events.
    
    Signed-off-by: David Vernet <[email protected]>
    Byte-Lab committed Apr 11, 2024
    Configuration menu
    Copy the full SHA
    9fabb99 View commit details
    Browse the repository at this point in the history
  5. Merge pull request #179 from sched-ext/hotplug_final_pieces

    scx: Add hotplug sequence number
    Byte-Lab authored Apr 11, 2024
    Configuration menu
    Copy the full SHA
    71694be View commit details
    Browse the repository at this point in the history

Commits on Apr 12, 2024

  1. scx_qmap: Add struct cpu_ctx

    Use a struct instead of u64[2]. This will ease future changes. No functional
    changes.
    htejun committed Apr 12, 2024
    Configuration menu
    Copy the full SHA
    16ab1af View commit details
    Browse the repository at this point in the history
  2. scx: Uninline scx_notify_sched_tick() and scx_notify_pick_next_task()

    These two functions being inlined ends up bringing out a bunch of other
    stuff into kernel/sched/ext.h. Let's uninline them.
    
    - Uninline both and rename scx_notify_sched_tick() to scx_tick() and
      scx_notify_pick_next_task() to scx_next_task_picked(). The notify term is
      a bit unusual and more often used with notifier chains which isn't the
      case here.
    
    - Call scx_tick() while holding rq lock. This doesn't make difference now
      but will ease future changes.
    
    - Move the stuff which was in kernel/sched/ext.h to support the inline
      functions into kernel/sched/ext.c. After this, both ext header files are
      really lean containing only what's needed to integrate with the rest of
      the kernel.
    
    - Some other cosmetic changes.
    
    Other than scx_tick() being called under rq lock. No functional changes.
    htejun committed Apr 12, 2024
    Configuration menu
    Copy the full SHA
    57e39d9 View commit details
    Browse the repository at this point in the history
  3. sched: Factor out update_other_load_avgs() from __update_blocked_othe…

    …rs()
    
    RT, DL, thermal and irq load and utilization metrics need to be decayed and
    updated periodically and before consumption to keep the numbers reasonable.
    This is currently done from __update_blocked_others() as a part of the fair
    class load balance path. Let's factor it out to update_other_load_avgs().
    Pure refactor. No functional changes.
    
    This will be used by the new BPF extensible scheduling class to ensure that
    the above metrics are properly maintained.
    
    Signed-off-by: Tejun Heo <[email protected]>
    htejun committed Apr 12, 2024
    Configuration menu
    Copy the full SHA
    39c9a0b View commit details
    Browse the repository at this point in the history
  4. scx: Should update load avg and util metrics for other classes and me…

    …chanisms
    
    Without this, e.g., RT util metric gets stuck high which can mislead the
    schedutil cpufreq governor.
    htejun committed Apr 12, 2024
    Configuration menu
    Copy the full SHA
    09f2c40 View commit details
    Browse the repository at this point in the history
  5. cpufreq_schedutil: Refactor sugov_cpu_is_busy()

    sugov_cpu_is_busy() is used to avoid decreasing performance level while the
    CPU is busy and called by sugov_update_single_freq() and
    sugov_update_single_perf(). Both callers repeat the same pattern to first
    test for uclamp and then the business. Let's refactor so that the tests
    aren't repeated.
    
    The new helper is named sugov_hold_freq() and tests both the uclamp
    exception and CPU business. No functional changes. This will make adding
    more exception conditions easier.
    
    Signed-off-by: Tejun Heo <[email protected]>
    htejun committed Apr 12, 2024
    Configuration menu
    Copy the full SHA
    c4e4144 View commit details
    Browse the repository at this point in the history
  6. scx: Implement sched_ext_ops.tick()

    This gets called on every tick if the CPU is executing an SCX task. e.g. It
    can be used to terminate the slice of the current task early.
    htejun committed Apr 12, 2024
    Configuration menu
    Copy the full SHA
    1d88435 View commit details
    Browse the repository at this point in the history
  7. scx: Implement scx_bpf_cpuperf_cap() and scx_bpf_cpuperf_cur()

    To monitor the current performance state of each CPU.
    htejun committed Apr 12, 2024
    Configuration menu
    Copy the full SHA
    2c2b2e3 View commit details
    Browse the repository at this point in the history
  8. scx: Implement scx_bpf_cpuperf_set()

    This allows the BPF scheduler to request a specific performance level for
    each CPU. SCX defaults to max perf if scx_bpf_cpuperf_set() is not called.
    htejun committed Apr 12, 2024
    Configuration menu
    Copy the full SHA
    fbc1f9a View commit details
    Browse the repository at this point in the history
  9. Merge pull request #180 from sched-ext/htejun/cpufreq

    scx: Implement cpufreq support
    htejun authored Apr 12, 2024
    Configuration menu
    Copy the full SHA
    41442f4 View commit details
    Browse the repository at this point in the history
  10. scx: Mark sched_ext uclamp enabled

    No reason not to.
    htejun committed Apr 12, 2024
    Configuration menu
    Copy the full SHA
    0511de1 View commit details
    Browse the repository at this point in the history
  11. Merge pull request #181 from sched-ext/htejun/cpufreq

    scx: Mark sched_ext uclamp enabled
    Byte-Lab authored Apr 12, 2024
    Configuration menu
    Copy the full SHA
    283928c View commit details
    Browse the repository at this point in the history
  12. Merge tag 'v6.9-rc3' into scx-6.9-rc3

    Linux 6.9-rc3
    Byte-Lab committed Apr 12, 2024
    Configuration menu
    Copy the full SHA
    7e9525c View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    a267290 View commit details
    Browse the repository at this point in the history
  14. v6.9-rc3-scx1

    Signed-off-by: David Vernet <[email protected]>
    Byte-Lab committed Apr 12, 2024
    Configuration menu
    Copy the full SHA
    ad9d5d2 View commit details
    Browse the repository at this point in the history