1. 25 Oct, 2023 2 commits
    • Jens Axboe's avatar
      io_uring/rw: disable IOCB_DIO_CALLER_COMP · 838b35bb
      Jens Axboe authored
      If an application does O_DIRECT writes with io_uring and the file system
      supports IOCB_DIO_CALLER_COMP, then completions of the dio write side is
      done from the task_work that will post the completion event for said
      write as well.
      
      Whenever a dio write is done against a file, the inode i_dio_count is
      elevated. This enables other callers to use inode_dio_wait() to wait for
      previous writes to complete. If we defer the full dio completion to
      task_work, we are dependent on that task_work being run before the
      inode i_dio_count can be decremented.
      
      If the same task that issues io_uring dio writes with
      IOCB_DIO_CALLER_COMP performs a synchronous system call that calls
      inode_dio_wait(), then we can deadlock as we're blocked sleeping on
      the event to become true, but not processing the completions that will
      result in the inode i_dio_count being decremented.
      
      Until we can guarantee that this is the case, then disable the deferred
      caller completions.
      
      Fixes: 099ada2c ("io_uring/rw: add write support for IOCB_DIO_CALLER_COMP")
      Reported-by: default avatarAndres Freund <andres@anarazel.de>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      838b35bb
    • Jens Axboe's avatar
      io_uring/fdinfo: lock SQ thread while retrieving thread cpu/pid · 7644b1a1
      Jens Axboe authored
      We could race with SQ thread exit, and if we do, we'll hit a NULL pointer
      dereference when the thread is cleared. Grab the SQPOLL data lock before
      attempting to get the task cpu and pid for fdinfo, this ensures we have a
      stable view of it.
      
      Cc: stable@vger.kernel.org
      Link: https://bugzilla.kernel.org/show_bug.cgi?id=218032Reviewed-by: default avatarGabriel Krisman Bertazi <krisman@suse.de>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      7644b1a1
  2. 18 Oct, 2023 1 commit
    • Jens Axboe's avatar
      io_uring: fix crash with IORING_SETUP_NO_MMAP and invalid SQ ring address · 8b51a395
      Jens Axboe authored
      If we specify a valid CQ ring address but an invalid SQ ring address,
      we'll correctly spot this and free the allocated pages and clear them
      to NULL. However, we don't clear the ring page count, and hence will
      attempt to free the pages again. We've already cleared the address of
      the page array when freeing them, but we don't check for that. This
      causes the following crash:
      
      Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000
      Oops [#1]
      Modules linked in:
      CPU: 0 PID: 20 Comm: kworker/u2:1 Not tainted 6.6.0-rc5-dirty #56
      Hardware name: ucbbar,riscvemu-bare (DT)
      Workqueue: events_unbound io_ring_exit_work
      epc : io_pages_free+0x2a/0x58
       ra : io_rings_free+0x3a/0x50
       epc : ffffffff808811a2 ra : ffffffff80881406 sp : ffff8f80000c3cd0
       status: 0000000200000121 badaddr: 0000000000000000 cause: 000000000000000d
       [<ffffffff808811a2>] io_pages_free+0x2a/0x58
       [<ffffffff80881406>] io_rings_free+0x3a/0x50
       [<ffffffff80882176>] io_ring_exit_work+0x37e/0x424
       [<ffffffff80027234>] process_one_work+0x10c/0x1f4
       [<ffffffff8002756e>] worker_thread+0x252/0x31c
       [<ffffffff8002f5e4>] kthread+0xc4/0xe0
       [<ffffffff8000332a>] ret_from_fork+0xa/0x1c
      
      Check for a NULL array in io_pages_free(), but also clear the page counts
      when we free them to be on the safer side.
      
      Reported-by: rtm@csail.mit.edu
      Fixes: 03d89a2d ("io_uring: support for user allocated memory for rings/sqes")
      Cc: stable@vger.kernel.org
      Reviewed-by: default avatarJeff Moyer <jmoyer@redhat.com>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      8b51a395
  3. 05 Oct, 2023 1 commit
    • Jeff Moyer's avatar
      io-wq: fully initialize wqe before calling cpuhp_state_add_instance_nocalls() · 0f8baa3c
      Jeff Moyer authored
      I received a bug report with the following signature:
      
      [ 1759.937637] BUG: unable to handle page fault for address: ffffffffffffffe8
      [ 1759.944564] #PF: supervisor read access in kernel mode
      [ 1759.949732] #PF: error_code(0x0000) - not-present page
      [ 1759.954901] PGD 7ab615067 P4D 7ab615067 PUD 7ab617067 PMD 0
      [ 1759.960596] Oops: 0000 1 PREEMPT SMP PTI
      [ 1759.964804] CPU: 15 PID: 109 Comm: cpuhp/15 Kdump: loaded Tainted: G X ------- — 5.14.0-362.3.1.el9_3.x86_64 #1
      [ 1759.976609] Hardware name: HPE ProLiant DL380 Gen10/ProLiant DL380 Gen10, BIOS U30 06/20/2018
      [ 1759.985181] RIP: 0010:io_wq_for_each_worker.isra.0+0x24/0xa0
      [ 1759.990877] Code: 90 90 90 90 90 90 0f 1f 44 00 00 41 56 41 55 41 54 55 48 8d 6f 78 53 48 8b 47 78 48 39 c5 74 4f 49 89 f5 49 89 d4 48 8d 58 e8 <8b> 13 85 d2 74 32 8d 4a 01 89 d0 f0 0f b1 0b 75 5c 09 ca 78 3d 48
      [ 1760.009758] RSP: 0000:ffffb6f403603e20 EFLAGS: 00010286
      [ 1760.015013] RAX: 0000000000000000 RBX: ffffffffffffffe8 RCX: 0000000000000000
      [ 1760.022188] RDX: ffffb6f403603e50 RSI: ffffffffb11e95b0 RDI: ffff9f73b09e9400
      [ 1760.029362] RBP: ffff9f73b09e9478 R08: 000000000000000f R09: 0000000000000000
      [ 1760.036536] R10: ffffffffffffff00 R11: ffffb6f403603d80 R12: ffffb6f403603e50
      [ 1760.043712] R13: ffffffffb11e95b0 R14: ffffffffb28531e8 R15: ffff9f7a6fbdf548
      [ 1760.050887] FS: 0000000000000000(0000) GS:ffff9f7a6fbc0000(0000) knlGS:0000000000000000
      [ 1760.059025] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [ 1760.064801] CR2: ffffffffffffffe8 CR3: 00000007ab610002 CR4: 00000000007706e0
      [ 1760.071976] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      [ 1760.079150] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
      [ 1760.086325] PKRU: 55555554
      [ 1760.089044] Call Trace:
      [ 1760.091501] <TASK>
      [ 1760.093612] ? show_trace_log_lvl+0x1c4/0x2df
      [ 1760.097995] ? show_trace_log_lvl+0x1c4/0x2df
      [ 1760.102377] ? __io_wq_cpu_online+0x54/0xb0
      [ 1760.106584] ? __die_body.cold+0x8/0xd
      [ 1760.110356] ? page_fault_oops+0x134/0x170
      [ 1760.114479] ? kernelmode_fixup_or_oops+0x84/0x110
      [ 1760.119298] ? exc_page_fault+0xa8/0x150
      [ 1760.123247] ? asm_exc_page_fault+0x22/0x30
      [ 1760.127458] ? __pfx_io_wq_worker_affinity+0x10/0x10
      [ 1760.132453] ? __pfx_io_wq_worker_affinity+0x10/0x10
      [ 1760.137446] ? io_wq_for_each_worker.isra.0+0x24/0xa0
      [ 1760.142527] __io_wq_cpu_online+0x54/0xb0
      [ 1760.146558] cpuhp_invoke_callback+0x109/0x460
      [ 1760.151029] ? __pfx_io_wq_cpu_offline+0x10/0x10
      [ 1760.155673] ? __pfx_smpboot_thread_fn+0x10/0x10
      [ 1760.160320] cpuhp_thread_fun+0x8d/0x140
      [ 1760.164266] smpboot_thread_fn+0xd3/0x1a0
      [ 1760.168297] kthread+0xdd/0x100
      [ 1760.171457] ? __pfx_kthread+0x10/0x10
      [ 1760.175225] ret_from_fork+0x29/0x50
      [ 1760.178826] </TASK>
      [ 1760.181022] Modules linked in: rpcsec_gss_krb5 auth_rpcgss nfsv4 dns_resolver nfs lockd grace fscache netfs rfkill sunrpc vfat fat dm_multipath intel_rapl_msr intel_rapl_common isst_if_common ipmi_ssif nfit libnvdimm mgag200 i2c_algo_bit ioatdma drm_shmem_helper drm_kms_helper acpi_ipmi syscopyarea x86_pkg_temp_thermal sysfillrect ipmi_si intel_powerclamp sysimgblt ipmi_devintf coretemp acpi_power_meter ipmi_msghandler rapl pcspkr dca intel_pch_thermal intel_cstate ses lpc_ich intel_uncore enclosure hpilo mei_me mei acpi_tad fuse drm xfs sd_mod sg bnx2x nvme nvme_core crct10dif_pclmul crc32_pclmul nvme_common ghash_clmulni_intel smartpqi tg3 t10_pi mdio uas libcrc32c crc32c_intel scsi_transport_sas usb_storage hpwdt wmi dm_mirror dm_region_hash dm_log dm_mod
      [ 1760.248623] CR2: ffffffffffffffe8
      
      A cpu hotplug callback was issued before wq->all_list was initialized.
      This results in a null pointer dereference.  The fix is to fully setup
      the io_wq before calling cpuhp_state_add_instance_nocalls().
      Signed-off-by: default avatarJeff Moyer <jmoyer@redhat.com>
      Link: https://lore.kernel.org/r/x49y1ghnecs.fsf@segfault.boston.devel.redhat.comSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
      0f8baa3c
  4. 03 Oct, 2023 3 commits
    • Jens Axboe's avatar
      io_uring: don't allow IORING_SETUP_NO_MMAP rings on highmem pages · 223ef474
      Jens Axboe authored
      On at least arm32, but presumably any arch with highmem, if the
      application passes in memory that resides in highmem for the rings,
      then we should fail that ring creation. We fail it with -EINVAL, which
      is what kernels that don't support IORING_SETUP_NO_MMAP will do as well.
      
      Cc: stable@vger.kernel.org
      Fixes: 03d89a2d ("io_uring: support for user allocated memory for rings/sqes")
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      223ef474
    • Jens Axboe's avatar
      io_uring: ensure io_lockdep_assert_cq_locked() handles disabled rings · 1658633c
      Jens Axboe authored
      io_lockdep_assert_cq_locked() checks that locking is correctly done when
      a CQE is posted. If the ring is setup in a disabled state with
      IORING_SETUP_R_DISABLED, then ctx->submitter_task isn't assigned until
      the ring is later enabled. We generally don't post CQEs in this state,
      as no SQEs can be submitted. However it is possible to generate a CQE
      if tagged resources are being updated. If this happens and PROVE_LOCKING
      is enabled, then the locking check helper will dereference
      ctx->submitter_task, which hasn't been set yet.
      
      Fixup io_lockdep_assert_cq_locked() to handle this case correctly. While
      at it, convert it to a static inline as well, so that generated line
      offsets will actually reflect which condition failed, rather than just
      the line offset for io_lockdep_assert_cq_locked() itself.
      
      Reported-and-tested-by: syzbot+efc45d4e7ba6ab4ef1eb@syzkaller.appspotmail.com
      Fixes: f26cc959 ("io_uring: lockdep annotate CQ locking")
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      1658633c
    • Jens Axboe's avatar
      io_uring/kbuf: don't allow registered buffer rings on highmem pages · f8024f1f
      Jens Axboe authored
      syzbot reports that registering a mapped buffer ring on arm32 can
      trigger an OOPS. Registered buffer rings have two modes, one of them
      is the application passing in the memory that the buffer ring should
      reside in. Once those pages are mapped, we use page_address() to get
      a virtual address. This will obviously fail on highmem pages, which
      aren't mapped.
      
      Add a check if we have any highmem pages after mapping, and fail the
      attempt to register a provided buffer ring if we do. This will return
      the same error as kernels that don't support provided buffer rings to
      begin with.
      
      Link: https://lore.kernel.org/io-uring/000000000000af635c0606bcb889@google.com/
      Fixes: c56e022c ("io_uring: add support for user mapped provided buffer ring")
      Cc: stable@vger.kernel.org
      Reported-by: syzbot+2113e61b8848fa7951d8@syzkaller.appspotmail.com
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      f8024f1f
  5. 29 Sep, 2023 1 commit
  6. 14 Sep, 2023 1 commit
  7. 10 Sep, 2023 6 commits
    • Linus Torvalds's avatar
      Linux 6.6-rc1 · 0bb80ecc
      Linus Torvalds authored
      0bb80ecc
    • Linus Torvalds's avatar
      Merge tag 'topic/drm-ci-2023-08-31-1' of git://anongit.freedesktop.org/drm/drm · 1548b060
      Linus Torvalds authored
      Pull drm ci scripts from Dave Airlie:
       "This is a bunch of ci integration for the freedesktop gitlab instance
        where we currently do upstream userspace testing on diverse sets of
        GPU hardware. From my perspective I think it's an experiment worth
        going with and seeing how the benefits/noise playout keeping these
        files useful.
      
        Ideally I'd like to get this so we can do pre-merge testing on PRs
        eventually.
      
        Below is some info from danvet on why we've ended up making the
        decision and how we can roll it back if we decide it was a bad plan.
      
        Why in upstream?
      
         - like documentation, testcases, tools CI integration is one of these
           things where you can waste endless amounts of time if you
           accidentally have a version that doesn't match your source code
      
         - but also like the above, there's a balance, this is the initial cut
           of what we think makes sense to keep in sync vs out-of-tree,
           probably needs adjustment
      
         - gitlab supports out-of-repo gitlab integration and that's what's
           been used for the kernel in drm, but it results in per-driver
           fragmentation and lots of duplicated effort. the simple act of
           smashing an arbitrary winner into a topic branch already started
           surfacing patches on dri-devel and sparking good cross driver team
           discussions
      
        Why gitlab?
      
         - it's not any more shit than any of the other CI
      
         - drm userspace uses it extensively for everything in userspace, we
           have a lot of people and experience with this, including
           integration of hw testing labs
      
         - media userspace like gstreamer is also on gitlab.fd.o, and there's
           discussion to extend this to the media subsystem in some fashion
      
        Can this be shared?
      
         - there's definitely a pile of code that could move to scripts/ if
           other subsystem adopt ci integration in upstream kernel git. other
           bits are more drm/gpu specific like the igt-gpu-tests/tools
           integration
      
         - docker images can be run locally or in other CI runners
      
        Will we regret this?
      
         - it's all in one directory, intentionally, for easy deletion
      
         - probably 1-2 years in upstream to see whether this is worth it or a
           Big Mistake. that's roughly what it took to _really_ roll out solid
           CI in the bigger userspace projects we have on gitlab.fd.o like
           mesa3d"
      
      * tag 'topic/drm-ci-2023-08-31-1' of git://anongit.freedesktop.org/drm/drm:
        drm: ci: docs: fix build warning - add missing escape
        drm: Add initial ci/ subdirectory
      1548b060
    • Linus Torvalds's avatar
      Merge tag 'x86-urgent-2023-09-10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · e56b2b60
      Linus Torvalds authored
      Pull x86 fixes from Ingo Molnar:
       "Fix preemption delays in the SGX code, remove unnecessarily
        UAPI-exported code, fix a ld.lld linker (in)compatibility quirk and
        make the x86 SMP init code a bit more conservative to fix kexec()
        lockups"
      
      * tag 'x86-urgent-2023-09-10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/sgx: Break up long non-preemptible delays in sgx_vepc_release()
        x86: Remove the arch_calc_vm_prot_bits() macro from the UAPI
        x86/build: Fix linker fill bytes quirk/incompatibility for ld.lld
        x86/smp: Don't send INIT to non-present and non-booted CPUs
      e56b2b60
    • Linus Torvalds's avatar
      Merge tag 'perf-urgent-2023-09-10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · e79dbf03
      Linus Torvalds authored
      Pull x86 perf event fix from Ingo Molnar:
       "Work around a firmware bug in the uncore PMU driver, affecting certain
        Intel systems"
      
      * tag 'perf-urgent-2023-09-10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        perf/x86/uncore: Correct the number of CHAs on EMR
      e79dbf03
    • Linus Torvalds's avatar
      Merge tag 'perf-tools-for-v6.6-1-2023-09-05' of... · 535a265d
      Linus Torvalds authored
      Merge tag 'perf-tools-for-v6.6-1-2023-09-05' of git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools
      
      Pull perf tools updates from Arnaldo Carvalho de Melo:
       "perf tools maintainership:
      
         - Add git information for perf-tools and perf-tools-next trees and
           branches to the MAINTAINERS file. That is where development now
           takes place and myself and Namhyung Kim have write access, more
           people to come as we emulate other maintainer groups.
      
        perf record:
      
         - Record kernel data maps when 'perf record --data' is used, so that
           global variables can be resolved and used in tools that do data
           profiling.
      
        perf trace:
      
         - Remove the old, experimental support for BPF events in which a .c
           file was passed as an event: "perf trace -e hello.c" to then get
           compiled and loaded.
      
           The only known usage for that, that shipped with the kernel as an
           example for such events, augmented the raw_syscalls tracepoints and
           was converted to a libbpf skeleton, reusing all the user space
           components and the BPF code connected to the syscalls.
      
           In the end just the way to glue the BPF part and the user space
           type beautifiers changed, now being performed by libbpf skeletons.
      
           The next step is to use BTF to do pretty printing of all syscall
           types, as discussed with Alan Maguire and others.
      
           Now, on a perf built with BUILD_BPF_SKEL=1 we get most if not all
           path/filenames/strings, some of the networking data structures,
           perf_event_attr, etc, i.e. systemwide tracing of nanosleep calls
           and perf_event_open syscalls while 'perf stat' runs 'sleep' for 5
           seconds:
      
            # perf trace -a -e *nanosleep,perf* perf stat -e cycles,instructions sleep 5
               0.000 (   9.034 ms): perf/327641 perf_event_open(attr_uptr: { type: 0 (PERF_TYPE_HARDWARE), size: 136, config: 0 (PERF_COUNT_HW_CPU_CYCLES), sample_type: IDENTIFIER, read_format: TOTAL_TIME_ENABLED|TOTAL_TIME_RUNNING, disabled: 1, inherit: 1, enable_on_exec: 1, exclude_guest: 1 }, pid: 327642 (perf), cpu: -1, group_fd: -1, flags: FD_CLOEXEC) = 3
               9.039 (   0.006 ms): perf/327641 perf_event_open(attr_uptr: { type: 0 (PERF_TYPE_HARDWARE), size: 136, config: 0x1 (PERF_COUNT_HW_INSTRUCTIONS), sample_type: IDENTIFIER, read_format: TOTAL_TIME_ENABLED|TOTAL_TIME_RUNNING, disabled: 1, inherit: 1, enable_on_exec: 1, exclude_guest: 1 }, pid: 327642 (perf-exec), cpu: -1, group_fd: -1, flags: FD_CLOEXEC) = 4
                   ? (           ): gpm/991  ... [continued]: clock_nanosleep())               = 0
              10.133 (           ): sleep/327642 clock_nanosleep(rqtp: { .tv_sec: 5, .tv_nsec: 0 }, rmtp: 0x7ffd36f83ed0) ...
                   ? (           ): pool-gsd-smart/3051  ... [continued]: clock_nanosleep())   = 0
              30.276 (           ): gpm/991 clock_nanosleep(rqtp: { .tv_sec: 2, .tv_nsec: 0 }, rmtp: 0x7ffcc6f73710) ...
             223.215 (1000.430 ms): pool-gsd-smart/3051 clock_nanosleep(rqtp: { .tv_sec: 1, .tv_nsec: 0 }, rmtp: 0x7f6e7fffec90) = 0
              30.276 (2000.394 ms): gpm/991  ... [continued]: clock_nanosleep())               = 0
            1230.814 (           ): pool-gsd-smart/3051 clock_nanosleep(rqtp: { .tv_sec: 1, .tv_nsec: 0 }, rmtp: 0x7f6e7fffec90) ...
            1230.814 (1000.404 ms): pool-gsd-smart/3051  ... [continued]: clock_nanosleep())   = 0
            2030.886 (           ): gpm/991 clock_nanosleep(rqtp: { .tv_sec: 2, .tv_nsec: 0 }, rmtp: 0x7ffcc6f73710) ...
            2237.709 (1000.153 ms): pool-gsd-smart/3051 clock_nanosleep(rqtp: { .tv_sec: 1, .tv_nsec: 0 }, rmtp: 0x7f6e7fffec90) = 0
                   ? (           ): crond/1172  ... [continued]: clock_nanosleep())            = 0
            3242.699 (           ): pool-gsd-smart/3051 clock_nanosleep(rqtp: { .tv_sec: 1, .tv_nsec: 0 }, rmtp: 0x7f6e7fffec90) ...
            2030.886 (2000.385 ms): gpm/991  ... [continued]: clock_nanosleep())               = 0
            3728.078 (           ): crond/1172 clock_nanosleep(rqtp: { .tv_sec: 60, .tv_nsec: 0 }, rmtp: 0x7ffe0971dcf0) ...
            3242.699 (1000.158 ms): pool-gsd-smart/3051  ... [continued]: clock_nanosleep())   = 0
            4031.409 (           ): gpm/991 clock_nanosleep(rqtp: { .tv_sec: 2, .tv_nsec: 0 }, rmtp: 0x7ffcc6f73710) ...
              10.133 (5000.375 ms): sleep/327642  ... [continued]: clock_nanosleep())          = 0
      
            Performance counter stats for 'sleep 5':
      
                   2,617,347      cycles
                   1,855,997      instructions                     #    0.71  insn per cycle
      
                 5.002282128 seconds time elapsed
      
                 0.000855000 seconds user
                 0.000852000 seconds sys
      
        perf annotate:
      
         - Building with binutils' libopcode now is opt-in (BUILD_NONDISTRO=1)
           for licensing reasons, and we missed a build test on
           tools/perf/tests makefile.
      
           Since we now default to NDEBUG=1, we ended up segfaulting when
           building with BUILD_NONDISTRO=1 because a needed initialization
           routine was being "error checked" via an assert.
      
           Fix it by explicitly checking the result and aborting instead if it
           fails.
      
           We better back propagate the error, but at least 'perf annotate' on
           samples collected for a BPF program is back working when perf is
           built with BUILD_NONDISTRO=1.
      
        perf report/top:
      
         - Add back TUI hierarchy mode header, that is seen when using 'perf
           report/top --hierarchy'.
      
         - Fix the number of entries for 'e' key in the TUI that was
           preventing navigation of lines when expanding an entry.
      
        perf report/script:
      
         - Support cross platform register handling, allowing a perf.data file
           collected on one architecture to have registers sampled correctly
           displayed when analysis tools such as 'perf report' and 'perf
           script' are used on a different architecture.
      
         - Fix handling of event attributes in pipe mode, i.e. when one uses:
      
        	perf record -o - | perf report -i -
      
           When no perf.data files are used.
      
         - Handle files generated via pipe mode with a version of perf and
           then read also via pipe mode with a different version of perf,
           where the event attr record may have changed, use the record size
           field to properly support this version mismatch.
      
        perf probe:
      
         - Accessing global variables from uprobes isn't supported, make the
           error message state that instead of stating that some minimal
           kernel version is needed to have that feature. This seems just a
           tool limitation, the kernel probably has all that is needed.
      
        perf tests:
      
         - Fix a reference count related leak in the dlfilter v0 API where the
           result of a thread__find_symbol_fb() is not matched with an
           addr_location__exit() to drop the reference counts of the resolved
           components (machine, thread, map, symbol, etc). Add a dlfilter test
           to make sure that doesn't regresses.
      
         - Lots of fixes for the 'perf test' written in shell script related
           to problems found with the shellcheck utility.
      
         - Fixes for 'perf test' shell scripts testing features enabled when
           perf is built with BUILD_BPF_SKEL=1, such as 'perf stat' bpf
           counters.
      
         - Add perf record sample filtering test, things like the following
           example, that gets implemented as a BPF filter attached to the
           event:
      
             # perf record -e task-clock -c 10000 --filter 'ip < 0xffffffff00000000'
      
         - Improve the way the task_analyzer test checks if libtraceevent is
           linked, using 'perf version --build-options' instead of the more
           expensinve 'perf record -e "sched:sched_switch"'.
      
         - Add support for riscv in the mmap-basic test. (This went as well
           via the RiscV tree, same contents).
      
        libperf:
      
         - Implement riscv mmap support (This went as well via the RiscV tree,
           same contents).
      
        perf script:
      
         - New tool that converts perf.data files to the firefox profiler
           format so that one can use the visualizer at
           https://profiler.firefox.com/. Done by Anup Sharma as part of this
           year's Google Summer of Code.
      
           One can generate the output and upload it to the web interface but
           Anup also automated everything:
      
             perf script gecko -F 99 -a sleep 60
      
         - Support syscall name parsing on arm64.
      
         - Print "cgroup" field on the same line as "comm".
      
        perf bench:
      
         - Add new 'uprobe' benchmark to measure the overhead of uprobes
           with/without BPF programs attached to it.
      
         - breakpoints are not available on power9, skip that test.
      
        perf stat:
      
         - Add #num_cpus_online literal to be used in 'perf stat' metrics, and
           add this extra 'perf test' check that exemplifies its purpose:
      
        	TEST_ASSERT_VAL("#num_cpus_online",
                               expr__parse(&num_cpus_online, ctx, "#num_cpus_online") == 0);
        	TEST_ASSERT_VAL("#num_cpus", expr__parse(&num_cpus, ctx, "#num_cpus") == 0);
        	TEST_ASSERT_VAL("#num_cpus >= #num_cpus_online", num_cpus >= num_cpus_online);
      
        Miscellaneous:
      
         - Improve tool startup time by lazily reading PMU, JSON, sysfs data.
      
         - Improve error reporting in the parsing of events, passing YYLTYPE
           to error routines, so that the output can show were the parsing
           error was found.
      
         - Add 'perf test' entries to check the parsing of events
           improvements.
      
         - Fix various leak for things detected by -fsanitize=address, mostly
           things that would be freed at tool exit, including:
      
             - Free evsel->filter on the destructor.
      
             - Allow tools to register a thread->priv destructor and use it in
               'perf trace'.
      
             - Free evsel->priv in 'perf trace'.
      
             - Free string returned by synthesize_perf_probe_point() when the
               caller fails to do all it needs.
      
         - Adjust various compiler options to not consider errors some
           warnings when building with broken headers found in things like
           python, flex, bison, as we otherwise build with -Werror. Some for
           gcc, some for clang, some for some specific version of those, some
           for some specific version of flex or bison, or some specific
           combination of these components, bah.
      
         - Allow customization of clang options for BPF target, this helps
           building on gentoo where there are other oddities where BPF targets
           gets passed some compiler options intended for the native build, so
           building with WERROR=0 helps while these oddities are fixed.
      
         - Dont pass ERR_PTR() values to perf_session__delete() in 'perf top'
           and 'perf lock', fixing some segfaults when handling some odd
           failures.
      
         - Add LTO build option.
      
         - Fix format of unordered lists in the perf docs
           (tools/perf/Documentation)
      
         - Overhaul the bison files, using constructs such as YYNOMEM.
      
         - Remove unused tokens from the bison .y files.
      
         - Add more comments to various structs.
      
         - A few LoongArch enablement patches.
      
        Vendor events (JSON):
      
         - Add JSON metrics for Yitian 710 DDR (aarch64). Things like:
      
        	EventName, BriefDescription
        	visible_window_limit_reached_rd, "At least one entry in read queue reaches the visible window limit.",
        	visible_window_limit_reached_wr, "At least one entry in write queue reaches the visible window limit.",
        	op_is_dqsosc_mpc	       , "A DQS Oscillator MPC command to DRAM.",
        	op_is_dqsosc_mrr	       , "A DQS Oscillator MRR command to DRAM.",
        	op_is_tcr_mrr		       , "A Temperature Compensated Refresh(TCR) MRR command to DRAM.",
      
         - Add AmpereOne metrics (aarch64).
      
         - Update N2 and V2 metrics (aarch64) and events using Arm telemetry
           repo.
      
         - Update scale units and descriptions of common topdown metrics on
           aarch64. Things like:
             - "MetricExpr": "stall_slot_frontend / (#slots * cpu_cycles)",
             - "BriefDescription": "Frontend bound L1 topdown metric",
             + "MetricExpr": "100 * (stall_slot_frontend / (#slots * cpu_cycles))",
             + "BriefDescription": "This metric is the percentage of total slots that were stalled due to resource constraints in the frontend of the processor.",
      
         - Update events for intel: meteorlake to 1.04, sapphirerapids to
           1.15, Icelake+ metric constraints.
      
         - Update files for the power10 platform"
      
      * tag 'perf-tools-for-v6.6-1-2023-09-05' of git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools: (217 commits)
        perf parse-events: Fix driver config term
        perf parse-events: Fixes relating to no_value terms
        perf parse-events: Fix propagation of term's no_value when cloning
        perf parse-events: Name the two term enums
        perf list: Don't print Unit for "default_core"
        perf vendor events intel: Fix modifier in tma_info_system_mem_parallel_reads for skylake
        perf dlfilter: Avoid leak in v0 API test use of resolve_address()
        perf metric: Add #num_cpus_online literal
        perf pmu: Remove str from perf_pmu_alias
        perf parse-events: Make common term list to strbuf helper
        perf parse-events: Minor help message improvements
        perf pmu: Avoid uninitialized use of alias->str
        perf jevents: Use "default_core" for events with no Unit
        perf test stat_bpf_counters_cgrp: Enhance perf stat cgroup BPF counter test
        perf test shell stat_bpf_counters: Fix test on Intel
        perf test shell record_bpf_filter: Skip 6.2 kernel
        libperf: Get rid of attr.id field
        perf tools: Convert to perf_record_header_attr_id()
        libperf: Add perf_record_header_attr_id()
        perf tools: Handle old data in PERF_RECORD_ATTR
        ...
      535a265d
    • Linus Torvalds's avatar
      Merge tag '6.6-rc-smb3-client-fixes-part2' of git://git.samba.org/sfrench/cifs-2.6 · fd3a5940
      Linus Torvalds authored
      Pull smb client fixes from Steve French:
      
       - six smb3 client fixes including ones to allow controlling smb3
         directory caching timeout and limits, and one debugging improvement
      
       - one fix for nls Kconfig (don't need to expose NLS_UCS2_UTILS option)
      
       - one minor spnego registry update
      
      * tag '6.6-rc-smb3-client-fixes-part2' of git://git.samba.org/sfrench/cifs-2.6:
        spnego: add missing OID to oid registry
        smb3: fix minor typo in SMB2_GLOBAL_CAP_LARGE_MTU
        cifs: update internal module version number for cifs.ko
        smb3: allow controlling maximum number of cached directories
        smb3: add trace point for queryfs (statfs)
        nls: Hide new NLS_UCS2_UTILS
        smb3: allow controlling length of time directory entries are cached with dir leases
        smb: propagate error code of extract_sharename()
      fd3a5940
  8. 09 Sep, 2023 19 commits
    • David Howells's avatar
      iov_iter: Kunit tests for page extraction · a3c57ab7
      David Howells authored
      Add some kunit tests for page extraction for ITER_BVEC, ITER_KVEC and
      ITER_XARRAY type iterators.  ITER_UBUF and ITER_IOVEC aren't dealt with
      as they require userspace VM interaction.  ITER_DISCARD isn't dealt with
      either as that can't be extracted.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Christian Brauner <brauner@kernel.org>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: David Hildenbrand <david@redhat.com>
      Cc: John Hubbard <jhubbard@nvidia.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      a3c57ab7
    • David Howells's avatar
      iov_iter: Kunit tests for copying to/from an iterator · 2d71340f
      David Howells authored
      Add some kunit tests for page extraction for ITER_BVEC, ITER_KVEC and
      ITER_XARRAY type iterators.  ITER_UBUF and ITER_IOVEC aren't dealt with
      as they require userspace VM interaction.  ITER_DISCARD isn't dealt with
      either as that does nothing.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Christian Brauner <brauner@kernel.org>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: David Hildenbrand <david@redhat.com>
      Cc: John Hubbard <jhubbard@nvidia.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      2d71340f
    • David Howells's avatar
      iov_iter: Fix iov_iter_extract_pages() with zero-sized entries · f741bd71
      David Howells authored
      iov_iter_extract_pages() doesn't correctly handle skipping over initial
      zero-length entries in ITER_KVEC and ITER_BVEC-type iterators.
      
      The problem is that it accidentally reduces maxsize to 0 when it
      skipping and thus runs to the end of the array and returns 0.
      
      Fix this by sticking the calculated size-to-copy in a new variable
      rather than back in maxsize.
      
      Fixes: 7d58fe73 ("iov_iter: Add a function to extract a page list from an iterator")
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Cc: Christian Brauner <brauner@kernel.org>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: David Hildenbrand <david@redhat.com>
      Cc: John Hubbard <jhubbard@nvidia.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      f741bd71
    • Linus Torvalds's avatar
      Merge tag 'sh-for-v6.6-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/glaubitz/sh-linux · 6b8bb5b8
      Linus Torvalds authored
      Pull sh updates from Adrian Glaubitz:
      
       - Fix a use-after-free bug in the push-switch driver (Duoming Zhou)
      
       - Fix calls to dma_declare_coherent_memory() that incorrectly passed
         the buffer end address instead of the buffer size as the size
         parameter
      
      * tag 'sh-for-v6.6-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/glaubitz/sh-linux:
        sh: push-switch: Reorder cleanup operations to avoid use-after-free bug
        sh: boards: Fix CEU buffer size passed to dma_declare_coherent_memory()
      6b8bb5b8
    • Linus Torvalds's avatar
      Merge tag 'riscv-for-linus-6.6-mw2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux · 1b37a0a2
      Linus Torvalds authored
      Pull more RISC-V updates from Palmer Dabbelt:
      
       - The kernel now dynamically probes for misaligned access speed, as
         opposed to relying on a table of known implementations.
      
       - Support for non-coherent devices on systems using the Andes AX45MP
         core, including the RZ/Five SoCs.
      
       - Support for the V extension in ptrace(), again.
      
       - Support for KASLR.
      
       - Support for the BPF prog pack allocator in RISC-V.
      
       - A handful of bug fixes and cleanups.
      
      * tag 'riscv-for-linus-6.6-mw2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: (25 commits)
        soc: renesas: Kconfig: For ARCH_R9A07G043 select the required configs if dependencies are met
        riscv: Kconfig.errata: Add dependency for RISCV_SBI in ERRATA_ANDES config
        riscv: Kconfig.errata: Drop dependency for MMU in ERRATA_ANDES_CMO config
        riscv: Kconfig: Select DMA_DIRECT_REMAP only if MMU is enabled
        bpf, riscv: use prog pack allocator in the BPF JIT
        riscv: implement a memset like function for text
        riscv: extend patch_text_nosync() for multiple pages
        bpf: make bpf_prog_pack allocator portable
        riscv: libstub: Implement KASLR by using generic functions
        libstub: Fix compilation warning for rv32
        arm64: libstub: Move KASLR handling functions to kaslr.c
        riscv: Dump out kernel offset information on panic
        riscv: Introduce virtual kernel mapping KASLR
        RISC-V: Add ptrace support for vectors
        soc: renesas: Kconfig: Select the required configs for RZ/Five SoC
        cache: Add L2 cache management for Andes AX45MP RISC-V core
        dt-bindings: cache: andestech,ax45mp-cache: Add DT binding documentation for L2 cache controller
        riscv: mm: dma-noncoherent: nonstandard cache operations support
        riscv: errata: Add Andes alternative ports
        riscv: asm: vendorid_list: Add Andes Technology to the vendors list
        ...
      1b37a0a2
    • Duoming Zhou's avatar
      sh: push-switch: Reorder cleanup operations to avoid use-after-free bug · 246f80a0
      Duoming Zhou authored
      The original code puts flush_work() before timer_shutdown_sync()
      in switch_drv_remove(). Although we use flush_work() to stop
      the worker, it could be rescheduled in switch_timer(). As a result,
      a use-after-free bug can occur. The details are shown below:
      
            (cpu 0)                    |      (cpu 1)
      switch_drv_remove()              |
       flush_work()                    |
        ...                            |  switch_timer // timer
                                       |   schedule_work(&psw->work)
       timer_shutdown_sync()           |
       ...                             |  switch_work_handler // worker
       kfree(psw) // free              |
                                       |   psw->state = 0 // use
      
      This patch puts timer_shutdown_sync() before flush_work() to
      mitigate the bugs. As a result, the worker and timer will be
      stopped safely before the deallocate operations.
      
      Fixes: 9f5e8eee ("sh: generic push-switch framework.")
      Signed-off-by: default avatarDuoming Zhou <duoming@zju.edu.cn>
      Reviewed-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
      Reviewed-by: default avatarJohn Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
      Link: https://lore.kernel.org/r/20230802033737.9738-1-duoming@zju.edu.cnSigned-off-by: default avatarJohn Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
      246f80a0
    • Petr Tesarik's avatar
      sh: boards: Fix CEU buffer size passed to dma_declare_coherent_memory() · fb60211f
      Petr Tesarik authored
      In all these cases, the last argument to dma_declare_coherent_memory() is
      the buffer end address, but the expected value should be the size of the
      reserved region.
      
      Fixes: 39fb9930 ("media: arch: sh: ap325rxa: Use new renesas-ceu camera driver")
      Fixes: c2f9b05f ("media: arch: sh: ecovec: Use new renesas-ceu camera driver")
      Fixes: f3590dc3 ("media: arch: sh: kfr2r09: Use new renesas-ceu camera driver")
      Fixes: 186c446f ("media: arch: sh: migor: Use new renesas-ceu camera driver")
      Fixes: 1a3c230b ("media: arch: sh: ms7724se: Use new renesas-ceu camera driver")
      Signed-off-by: default avatarPetr Tesarik <petr.tesarik.ext@huawei.com>
      Reviewed-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
      Reviewed-by: default avatarJacopo Mondi <jacopo.mondi@ideasonboard.com>
      Reviewed-by: default avatarJohn Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
      Reviewed-by: default avatarLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
      Link: https://lore.kernel.org/r/20230724120742.2187-1-petrtesarik@huaweicloud.comSigned-off-by: default avatarJohn Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
      fb60211f
    • Linus Torvalds's avatar
      Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · 2a5a4326
      Linus Torvalds authored
      Pull more SCSI updates from James Bottomley:
       "Mostly small stragglers that missed the initial merge.
      
        Driver updates are qla2xxx and smartpqi (mp3sas has a high diffstat
        due to the volatile qualifier removal, fnic due to unused function
        removal and sd.c has a lot of code shuffling to remove forward
        declarations)"
      
      * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (38 commits)
        scsi: ufs: core: No need to update UPIU.header.flags and lun in advanced RPMB handler
        scsi: ufs: core: Add advanced RPMB support where UFSHCI 4.0 does not support EHS length in UTRD
        scsi: mpt3sas: Remove volatile qualifier
        scsi: mpt3sas: Perform additional retries if doorbell read returns 0
        scsi: libsas: Simplify sas_queue_reset() and remove unused code
        scsi: ufs: Fix the build for the old ARM OABI
        scsi: qla2xxx: Fix unused variable warning in qla2xxx_process_purls_pkt()
        scsi: fnic: Remove unused functions fnic_scsi_host_start/end_tag()
        scsi: qla2xxx: Fix spelling mistake "tranport" -> "transport"
        scsi: fnic: Replace sgreset tag with max_tag_id
        scsi: qla2xxx: Remove unused variables in qla24xx_build_scsi_type_6_iocbs()
        scsi: qla2xxx: Fix nvme_fc_rcv_ls_req() undefined error
        scsi: smartpqi: Change driver version to 2.1.24-046
        scsi: smartpqi: Enhance error messages
        scsi: smartpqi: Enhance controller offline notification
        scsi: smartpqi: Enhance shutdown notification
        scsi: smartpqi: Simplify lun_number assignment
        scsi: smartpqi: Rename pciinfo to pci_info
        scsi: smartpqi: Rename MACRO to clarify purpose
        scsi: smartpqi: Add abort handler
        ...
      2a5a4326
    • Linus Torvalds's avatar
      Merge tag 'driver-core-6.6-rc1-2' of... · 6b41fb27
      Linus Torvalds authored
      Merge tag 'driver-core-6.6-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
      
      Pull driver symbol lookup fix from Greg KH:
       "Here is one last fixup for your tree for 6.6-rc1. It resolves a
        problem with the way that symbol_get was changed in the module tree
        merge in your tree to fix up the DVB drivers which rely on this old
        api to attach new devices.
      
        As the changelog comment says:
      
          In commit 9011e49d ("modules: only allow symbol_get of
          EXPORT_SYMBOL_GPL modules") the use of symbol_get is properly
          restricted to GPL-only marked symbols. This interacts oddly with the
          DVB logic which only uses dvb_attach() to load the dvb driver which
          then uses symbol_get().
      
          Fix this up by properly marking all of the dvb_attach attach symbols
          as EXPORT_SYMBOL_GPL().
      
        This has been acked by Hans from the V4L driver side, Luis from the
        module side, Mauro on the media side, and Christoph said it was the
        correct solution, and was tested by the original reporter of the
        issue.
      
        It has passed 0-day testing, but has not been in linux-next due to it
        only being sent yesterday"
      
      * tag 'driver-core-6.6-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
        media: dvb: symbol fixup for dvb_attach()
      6b41fb27
    • Linus Torvalds's avatar
      Merge tag 'dma-mapping-6.6-2023-09-09' of git://git.infradead.org/users/hch/dma-mapping · 474197a4
      Linus Torvalds authored
      Pull dma-mapping fixes from Christoph Hellwig:
      
       - move a dma-debug call that prints a message out from a lock that's
         causing problems with the lock order in serial drivers (Sergey
         Senozhatsky)
      
       - fix the CONFIG_DMA_NUMA_CMA Kconfig entry to have the right
         dependency and not default to y (Christoph Hellwig)
      
       - move an ifdef a bit to remove a __maybe_unused that seems to trip up
         some sensitivities (Christoph Hellwig)
      
       - revert a bogus check in the CMA allocator (Zhenhua Huang)
      
      * tag 'dma-mapping-6.6-2023-09-09' of git://git.infradead.org/users/hch/dma-mapping:
        Revert "dma-contiguous: check for memory region overlap"
        dma-pool: remove a __maybe_unused label in atomic_pool_expand
        dma-contiguous: fix the Kconfig entry for CONFIG_DMA_NUMA_CMA
        dma-debug: don't call __dma_entry_alloc_check_leak() under free_entries_lock
      474197a4
    • Linus Torvalds's avatar
      Merge tag 'pci-v6.6-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci · 060249b5
      Linus Torvalds authored
      Pull PCI fixes from Bjorn Helgaas:
      
       - Add PCI_DYNAMIC_OF_NODES dependency on OF_IRQ to fix sparc64 build
         error (Lizhi Hou)
      
       - After coalescing host bridge resources, free any released resources
         to avoid a leak (Ross Lagerwall)
      
       - Revert a quirk that prevented NVIDIA T4 GPUs from using Secondary Bus
         Reset. The quirk worked around an issue that we now think is related
         to the Root Port, not the GPU (Bjorn Helgaas)
      
      * tag 'pci-v6.6-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci:
        Revert "PCI: Mark NVIDIA T4 GPUs to avoid bus reset"
        PCI: Free released resource after coalescing
        PCI: Fix CONFIG_PCI_DYNAMIC_OF_NODES kconfig dependencies
      060249b5
    • Linus Torvalds's avatar
      Merge tag 'ntb-6.6' of https://github.com/jonmason/ntb · fa9d4bf5
      Linus Torvalds authored
      Pull NTB updates from Jon Mason:
       "Link toggling fixes and debugfs error path fixes"
      
      [ And for everybody like me who always have to remind themselves what
        the TLA of the day is, and what NTB stands for - it's a PCIe
        "Non-Transparent Bridge" thing    - Linus ]
      
      * tag 'ntb-6.6' of https://github.com/jonmason/ntb:
        ntb: Check tx descriptors outstanding instead of head/tail for tx queue
        ntb: Fix calculation ntb_transport_tx_free_entry()
        ntb: Drop packets when qp link is down
        ntb: Clean up tx tail index on link down
        ntb: amd: Drop unnecessary error check for debugfs_create_dir
        NTB: ntb_tool: Switch to memdup_user_nul() helper
        dtivers: ntb: fix parameter check in perf_setup_dbgfs()
        ntb: Remove error checking for debugfs_create_dir()
      fa9d4bf5
    • Steve French's avatar
      spnego: add missing OID to oid registry · 5d153cd1
      Steve French authored
      Add missing OID to the registry. Some servers and clients (including
      Windows) now request "NEGOEX - SPNEGEO Extended Negotiation Security")
      
      See https://datatracker.ietf.org/doc/html/draft-zhu-negoex-02Reviewed-by: default avatarNamjae Jeon <linkinjeon@kernel.org>
      Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
      5d153cd1
    • Greg Kroah-Hartman's avatar
      media: dvb: symbol fixup for dvb_attach() · 86495af1
      Greg Kroah-Hartman authored
      In commit 9011e49d ("modules: only allow symbol_get of
      EXPORT_SYMBOL_GPL modules") the use of symbol_get is properly restricted
      to GPL-only marked symbols.  This interacts oddly with the DVB logic
      which only uses dvb_attach() to load the dvb driver which then uses
      symbol_get().
      
      Fix this up by properly marking all of the dvb_attach attach symbols as
      EXPORT_SYMBOL_GPL().
      
      Fixes: 9011e49d ("modules: only allow symbol_get of EXPORT_SYMBOL_GPL modules")
      Cc: stable <stable@kernel.org>
      Reported-by: default avatarStefan Lippers-Hollmann <s.l-h@gmx.de>
      Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: linux-media@vger.kernel.org
      Cc: linux-modules@vger.kernel.org
      Acked-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      Acked-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
      Link: https://lore.kernel.org/r/20230908092035.3815268-2-gregkh@linuxfoundation.orgSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      86495af1
    • Linus Torvalds's avatar
      Merge tag '6.6-rc-ksmbd' of git://git.samba.org/ksmbd · 6099776f
      Linus Torvalds authored
      Pull smb server update from Steve French:
       "After two years, many fixes and much testing, ksmbd is no longer
        experimental"
      
      * tag '6.6-rc-ksmbd' of git://git.samba.org/ksmbd:
        ksmbd: remove experimental warning
      6099776f
    • Linus Torvalds's avatar
      Merge tag 'xarray-6.6' of git://git.infradead.org/users/willy/xarray · 3095dd99
      Linus Torvalds authored
      Pull xarray fixes from Matthew Wilcox:
      
       - Fix a bug encountered by people using bittorrent where they'd get
         NULL pointer dereferences on page cache lookups when using XFS
      
       - Two documentation fixes
      
      * tag 'xarray-6.6' of git://git.infradead.org/users/willy/xarray:
        idr: fix param name in idr_alloc_cyclic() doc
        xarray: Document necessary flag in alloc functions
        XArray: Do not return sibling entries from xa_load()
      3095dd99
    • Linus Torvalds's avatar
      Merge tag 'block-6.6-2023-09-08' of git://git.kernel.dk/linux · 7402e635
      Linus Torvalds authored
      Pull block fixes from Jens Axboe:
      
       - Fix null_blk polled IO timeout handling (Chengming)
      
       - Regression fix for swapped arguments in drbd bvec_set_page()
         (Christoph)
      
       - String length handling fix for s390 dasd (Heiko)
      
       - Fixes for blk-throttle accounting (Yu)
      
       - Fix page pinning issue for same page segments (Christoph)
      
       - Remove redundant file_remove_privs() call (Christoph)
      
       - Fix a regression in partition handling for devices not supporting
         partitions (Li)
      
      * tag 'block-6.6-2023-09-08' of git://git.kernel.dk/linux:
        drbd: swap bvec_set_page len and offset
        block: fix pin count management when merging same-page segments
        null_blk: fix poll request timeout handling
        s390/dasd: fix string length handling
        block: don't add or resize partition on the disk with GENHD_FL_NO_PART
        block: remove the call to file_remove_privs in blkdev_write_iter
        blk-throttle: consider 'carryover_ios/bytes' in throtl_trim_slice()
        blk-throttle: use calculate_io/bytes_allowed() for throtl_trim_slice()
        blk-throttle: fix wrong comparation while 'carryover_ios/bytes' is negative
        blk-throttle: print signed value 'carryover_bytes/ios' for user
      7402e635
    • Linus Torvalds's avatar
      Merge tag 'io_uring-6.6-2023-09-08' of git://git.kernel.dk/linux · 7ccc3ebf
      Linus Torvalds authored
      Pull io_uring fixes from Jens Axboe:
       "A few fixes that should go into the 6.6-rc merge window:
      
         - Fix for a regression this merge window caused by the SQPOLL
           affinity patch, where we can race with SQPOLL thread shutdown and
           cause an oops when trying to set affinity (Gabriel)
      
         - Fix for a regression this merge window where fdinfo reading with
           for a ring setup with IORING_SETUP_NO_SQARRAY will attempt to
           deference the non-existing SQ ring array (me)
      
         - Add the patch that allows more finegrained control over who can use
           io_uring (Matteo)
      
         - Locking fix for a regression added this merge window for IOPOLL
           overflow (Pavel)
      
         - IOPOLL fix for stable, breaking our loop if helper threads are
           exiting (Pavel)
      
        Also had a fix for unreaped iopoll requests from io-wq from Ming, but
        we found an issue with that and hence it got reverted. Will get this
        sorted for a future rc"
      
      * tag 'io_uring-6.6-2023-09-08' of git://git.kernel.dk/linux:
        Revert "io_uring: fix IO hang in io_wq_put_and_exit from do_exit()"
        io_uring: fix unprotected iopoll overflow
        io_uring: break out of iowq iopoll on teardown
        io_uring: add a sysctl to disable io_uring system-wide
        io_uring/fdinfo: only print ->sq_array[] if it's there
        io_uring: fix IO hang in io_wq_put_and_exit from do_exit()
        io_uring: Don't set affinity on a dying sqpoll thread
      7ccc3ebf
    • Steve French's avatar
      smb3: fix minor typo in SMB2_GLOBAL_CAP_LARGE_MTU · 702c390b
      Steve French authored
      There was a minor typo in the define for SMB2_GLOBAL_CAP_LARGE_MTU
            0X00000004 instead of 0x00000004
      make it consistent
      Acked-by: default avatarNamjae Jeon <linkinjeon@kernel.org>
      Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
      702c390b
  9. 08 Sep, 2023 6 commits