1. 23 May, 2024 1 commit
    • Shuah Khan's avatar
      tools/latency-collector: Fix -Wformat-security compile warns · df73757c
      Shuah Khan authored
      Fix the following -Wformat-security compile warnings adding missing
      format arguments:
      
      latency-collector.c: In function ‘show_available’:
      latency-collector.c:938:17: warning: format not a string literal and
      no format arguments [-Wformat-security]
        938 |                 warnx(no_tracer_msg);
            |                 ^~~~~
      
      latency-collector.c:943:17: warning: format not a string literal and
      no format arguments [-Wformat-security]
        943 |                 warnx(no_latency_tr_msg);
            |                 ^~~~~
      
      latency-collector.c: In function ‘find_default_tracer’:
      latency-collector.c:986:25: warning: format not a string literal and
      no format arguments [-Wformat-security]
        986 |                         errx(EXIT_FAILURE, no_tracer_msg);
            |
                               ^~~~
      latency-collector.c: In function ‘scan_arguments’:
      latency-collector.c:1881:33: warning: format not a string literal and
      no format arguments [-Wformat-security]
       1881 |                                 errx(EXIT_FAILURE, no_tracer_msg);
            |                                 ^~~~
      
      Link: https://lore.kernel.org/linux-trace-kernel/20240404011009.32945-1-skhan@linuxfoundation.org
      
      Cc: stable@vger.kernel.org
      Fixes: e23db805 ("tracing/tools: Add the latency-collector to tools directory")
      Signed-off-by: default avatarShuah Khan <skhan@linuxfoundation.org>
      Signed-off-by: default avatarSteven Rostedt (Google) <rostedt@goodmis.org>
      df73757c
  2. 16 May, 2024 4 commits
    • John Kacur's avatar
      rtla: Documentation: Fix -t, --trace · 59c22f70
      John Kacur authored
      Move -t, --trace from common_options.rst to
      common_osnoise_options.rst and
      common_timerlat_options.rst
      
      so that it will appear in the man pages
      
      rtla-timerlat-hist.1
      rtla-timerlat-top.1
      rtla-osnoise-hist.1
      rtla-osnoise-top.1
      
      Remove the equals ('=') sign and add a space.
      
      Link: https://lkml.kernel.org/r/20240516143121.12614-1-jkacur@redhat.com
      
      Cc: Daniel Bristot de Oliveria <bristot@kernel.org>
      Signed-off-by: default avatarJohn Kacur <jkacur@redhat.com>
      Signed-off-by: default avatarDaniel Bristot de Oliveira <bristot@kernel.org>
      59c22f70
    • John Kacur's avatar
      rtla: Fix -t\--trace[=file] · 842fc5b8
      John Kacur authored
      The -t option has an optional argument.
      The usual case is for a short option to be specified without an '='
      and for the long version to be specified with an '='
      
      Various forms of this do not work as expected.
      For example:
      rtla timerlat hist -T50 -tfile.txt
      will result in a truncated file name of "ile.txt"
      
      Another example is that the long form without the '=' will result in the
      default file name instead of the requested file name.
      
      This patch properly parses the optional argument with and without '='
      and with and without spaces for the short form.
      
      This patch was also tested using -t and --trace without providing a file
      name both as the last requested option and with a following long and
      short option.
      
      For example:
      
        rtla timerlat hist -T50 -t -u
        rtla timerlat hist -T50 --trace -u
      
      This fix is applied to both timerlat top and hist
      and to osnoise top and hist.
      
      Here is the full testing for rtla timerlat hist.
      Before applying the patch
      
        rtla timerlat hist -T50 -t=file.txt
          Works as expected, "file.txt"
      
        rtla timerlat hist -T50 -tfile.txt
          Truncated file name "ile.txt"
      
        rtla timerlat hist -T50 -t file.txt
          Default file name instead of file.txt
      
        rtla timerlat hist -T50 --trace=file.txt
          Truncated file name "ile.txt"
      
        rtla timerlat hist -T50 --trace file.txt
          Default file name "timerlat_trace.txt" instead of "file.txt"
      
      After applying the patch:
      
        rtla timerlat hist -T50 -t=file.txt
          Works as expected, "file.txt"
      
        rtla timerlat hist -T50 -tfile.txt
          Works as expected, "file.txt"
      
        rtla timerlat hist -T50 -t file.txt
          Works as expected, "file.txt"
      
        rtla timerlat hist -T50 --trace=file.txt
          Works as expected, "file.txt"
      
        rtla timerlat hist -T50 --trace file.txt
          Works as expected, "file.txt"
      
      In addition the following tests were performed to make sure that
      the default file name worked as expected including with trailing
      options.
      
        rtla timerlat hist -T50 -t
          Works as expected "timerlat_trace.txt"
      
        rtla timerlat hist -T50 --trace
          Works as expected "timerlat_trace.txt"
      
        rtla timerlat hist -T50 -t -u
          Works as expected "timerlat_trace.txt"
      
        rtla timerlat hist -T50 --trace -u
          Works as expected "timerlat_trace.txt"
      
      Link: https://lkml.kernel.org/r/20240515183024.59985-1-jkacur@redhat.com
      
      Cc: Daniel Bristot de Oliveria <bristot@kernel.org>
      Signed-off-by: default avatarJohn Kacur <jkacur@redhat.com>
      Signed-off-by: default avatarDaniel Bristot de Oliveira <bristot@kernel.org>
      842fc5b8
    • John Kacur's avatar
      rtla/timerlat: Fix histogram report when a cpu count is 0 · 01b05fc0
      John Kacur authored
      On short runs it is possible to get no samples on a cpu, like this:
      
        # rtla timerlat hist -u -T50
      
        Index   IRQ-001   Thr-001   Usr-001   IRQ-002   Thr-002   Usr-002
        2             1         0         0         0         0         0
        33            0         1         0         0         0         0
        36            0         0         1         0         0         0
        49            0         0         0         1         0         0
        52            0         0         0         0         1         0
        over:         0         0         0         0         0         0
        count:        1         1         1         1         1         0
        min:          2        33        36        49        52 18446744073709551615
        avg:          2        33        36        49        52         -
        max:          2        33        36        49        52         0
        rtla timerlat hit stop tracing
          IRQ handler delay:		(exit from idle)	    48.21 us (91.09 %)
          IRQ latency:						    49.11 us
          Timerlat IRQ duration:				     2.17 us (4.09 %)
          Blocking thread:					     1.01 us (1.90 %)
        	               swapper/2:0        		     1.01 us
        ------------------------------------------------------------------------
          Thread latency:					    52.93 us (100%)
      
        Max timerlat IRQ latency from idle: 49.11 us in cpu 2
      
      Note, the value 18446744073709551615 is the same as ~0.
      
      Fix this by reporting no results for the min, avg and max if the count
      is 0.
      
      Link: https://lkml.kernel.org/r/20240510190318.44295-1-jkacur@redhat.com
      
      Cc: stable@vger.kernel.org
      Fixes: 1eeb6328 ("rtla/timerlat: Add timerlat hist mode")
      Suggested-by: default avatarDaniel Bristot de Oliveria <bristot@kernel.org>
      Signed-off-by: default avatarJohn Kacur <jkacur@redhat.com>
      Signed-off-by: default avatarDaniel Bristot de Oliveira <bristot@kernel.org>
      01b05fc0
    • Daniel Bristot de Oliveira's avatar
      rtla: Add --trace-buffer-size option · e9a4062e
      Daniel Bristot de Oliveira authored
      Add the option allow the users to set a different buffer size for the
      trace. For example, in large systems, the user might be interested on
      reducing the trace buffer to avoid large tracing files.
      
      The buffer size is specified in kB, and it is only affecting
      the tracing instance.
      
      The function trace_set_buffer_size() appears on libtracefs v1.6,
      so increase the minimum required version on Makefile.config.
      
      Link: https://lkml.kernel.org/r/e7c9ca5b3865f28e131a49ec3b984fadf2d056c6.1715860611.git.bristot@kernel.org
      
      Cc: Jonathan Corbet <corbet@lwn.net>
      Cc: Juri Lelli <juri.lelli@redhat.com>
      Cc: John Kacur <jkacur@redhat.com>
      Signed-off-by: default avatarDaniel Bristot de Oliveira <bristot@kernel.org>
      e9a4062e
  3. 15 May, 2024 7 commits
  4. 12 May, 2024 5 commits
  5. 11 May, 2024 10 commits
  6. 10 May, 2024 13 commits
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-2024-05-11' of https://gitlab.freedesktop.org/drm/kernel · cf87f46f
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "This should be the last set of fixes for 6.9, i915, xe and amdgpu are
        the bulk here, one of the previous nouveau fixes turned up an issue,
        so reverting it, otherwise one core and a couple of meson fixes.
      
        core:
         - fix connector debugging output
      
        i915:
         - Automate CCS Mode setting during engine resets
         - Fix audio time stamp programming for DP
         - Fix parsing backlight BDB data
      
        xe:
         - Fix use zero-length element array
         - Move more from system wq to ordered private wq
         - Do not ignore return for drmm_mutex_init
      
        amdgpu:
         - DCN 3.5 fix
         - MST DSC fixes
         - S0i3 fix
         - S4 fix
         - HDP MMIO mapping fix
         - Fix a regression in visible vram handling
      
        amdkfd:
         - Spatial partition fix
      
        meson:
         - dw-hdmi: power-up fixes
         - dw-hdmi: add badngap setting for g12
      
        nouveau:
         - revert SG_DEBUG fix that has a side effect"
      
      * tag 'drm-fixes-2024-05-11' of https://gitlab.freedesktop.org/drm/kernel:
        Revert "drm/nouveau/firmware: Fix SG_DEBUG error with nvkm_firmware_ctor()"
        drm/amdgpu: Fix comparison in amdgpu_res_cpu_visible
        drm/amdkfd: don't allow mapping the MMIO HDP page with large pages
        drm/xe: Use ordered WQ for G2H handler
        drm/xe/guc: Check error code when initializing the CT mutex
        drm/xe/ads: Use flexible-array
        Revert "drm/amdkfd: Add partition id field to location_id"
        dm/amd/pm: Fix problems with reboot/shutdown for some SMU 13.0.4/13.0.11 users
        drm/amd/display: MST DSC check for older devices
        drm/amd/display: Fix idle optimization checks for multi-display and dual eDP
        drm/amd/display: Fix DSC-re-computing
        drm/amd/display: Enable urgent latency adjustments for DCN35
        drm/connector: Add \n to message about demoting connector force-probes
        drm/i915/bios: Fix parsing backlight BDB data
        drm/i915/audio: Fix audio time stamp programming for DP
        drm/i915/gt: Automate CCS Mode setting during engine resets
        drm/meson: dw-hdmi: add bandgap setting for g12
        drm/meson: dw-hdmi: power up phy on device init
      cf87f46f
    • Linus Torvalds's avatar
      Merge tag 'mm-hotfixes-stable-2024-05-10-13-14' of... · c22c3e07
      Linus Torvalds authored
      Merge tag 'mm-hotfixes-stable-2024-05-10-13-14' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
      
      Pull MM fixes from Andrew Morton:
       "18 hotfixes, 7 of which are cc:stable.
      
        More fixups for this cycle's page_owner updates. And a few userfaultfd
        fixes. Otherwise, random singletons - see the individual changelogs
        for details"
      
      * tag 'mm-hotfixes-stable-2024-05-10-13-14' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm:
        mailmap: add entry for Barry Song
        selftests/mm: fix powerpc ARCH check
        mailmap: add entry for John Garry
        XArray: set the marks correctly when splitting an entry
        selftests/vDSO: fix runtime errors on LoongArch
        selftests/vDSO: fix building errors on LoongArch
        mm,page_owner: don't remove __GFP_NOLOCKDEP in add_stack_record_to_list
        fs/proc/task_mmu: fix uffd-wp confusion in pagemap_scan_pmd_entry()
        fs/proc/task_mmu: fix loss of young/dirty bits during pagemap scan
        mm/vmalloc: fix return value of vb_alloc if size is 0
        mm: use memalloc_nofs_save() in page_cache_ra_order()
        kmsan: compiler_types: declare __no_sanitize_or_inline
        lib/test_xarray.c: fix error assumptions on check_xa_multi_store_adv_add()
        tools: fix userspace compilation with new test_xarray changes
        MAINTAINERS: update URL's for KEYS/KEYRINGS_INTEGRITY and TPM DEVICE DRIVER
        mm: page_owner: fix wrong information in dump_page_owner
        maple_tree: fix mas_empty_area_rev() null pointer dereference
        mm/userfaultfd: reset ptes when close() for wr-protected ones
      c22c3e07
    • Dave Airlie's avatar
      Revert "drm/nouveau/firmware: Fix SG_DEBUG error with nvkm_firmware_ctor()" · a222a647
      Dave Airlie authored
      This reverts commit 52a6947b.
      
      This causes loading failures in
      [    0.367379] nouveau 0000:01:00.0: NVIDIA GP104 (134000a1)
      [    0.474499] nouveau 0000:01:00.0: bios: version 86.04.50.80.13
      [    0.474620] nouveau 0000:01:00.0: pmu: firmware unavailable
      [    0.474977] nouveau 0000:01:00.0: fb: 8192 MiB GDDR5
      [    0.484371] nouveau 0000:01:00.0: sec2(acr): mbox 00000001 00000000
      [    0.484377] nouveau 0000:01:00.0: sec2(acr):load: boot failed: -5
      [    0.484379] nouveau 0000:01:00.0: acr: init failed, -5
      [    0.484466] nouveau 0000:01:00.0: init failed with -5
      [    0.484468] nouveau: DRM-master:00000000:00000080: init failed with -5
      [    0.484470] nouveau 0000:01:00.0: DRM-master: Device allocation failed: -5
      [    0.485078] nouveau 0000:01:00.0: probe with driver nouveau failed with error -50
      
      I tried tracking it down but ran out of time this week, will revisit next week.
      Reported-by: default avatarDan Moulding <dan@danm.net>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      a222a647
    • Dave Airlie's avatar
      Merge tag 'drm-misc-fixes-2024-05-10' of... · b61821bb
      Dave Airlie authored
      Merge tag 'drm-misc-fixes-2024-05-10' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-fixes
      
      Short summary of fixes pull:
      
      core:
      - fix connector debugging output
      
      meson:
      - dw-hdmi: power-up fixes
      - dw-hdmi: add badngap setting for g12
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      
      From: Thomas Zimmermann <tzimmermann@suse.de>
      Link: https://patchwork.freedesktop.org/patch/msgid/20240510072027.GA9131@linux.fritz.box
      b61821bb
    • Linus Torvalds's avatar
      Merge tag 'gpio-fixes-for-v6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux · cfb4be1a
      Linus Torvalds authored
      Pull gpio fixes from Bartosz Golaszewski:
       "Some last-minute fixes for this release from the GPIO subsystem.
      
        The first two address a regression in performance reported to me after
        the conversion to using SRCU in GPIOLIB that was merged during the
        v6.9 merge window. The second patch is not technically a fix but since
        after the first one we no longer need to use a per-descriptor SRCU
        struct, I think it's worth to simplify the code before it gets
        released on Sunday.
      
        The next two commits fix two memory issues: one use-after-free bug and
        one instance of possibly leaking kernel stack memory to user-space.
      
        Summary:
      
         - fix a performance regression in GPIO requesting and releasing after
           the conversion to SRCU
      
         - fix a use-after-free bug due to a race-condition
      
         - fix leaking stack memory to user-space in a GPIO uABI corner case"
      
      * tag 'gpio-fixes-for-v6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux:
        gpiolib: cdev: fix uninitialised kfifo
        gpiolib: cdev: Fix use after free in lineinfo_changed_notify
        gpiolib: use a single SRCU struct for all GPIO descriptors
        gpiolib: fix the speed of descriptor label setting with SRCU
      cfb4be1a
    • Dave Airlie's avatar
      Merge tag 'amd-drm-fixes-6.9-2024-05-10' of... · 06fbf84f
      Dave Airlie authored
      Merge tag 'amd-drm-fixes-6.9-2024-05-10' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes
      
      amd-drm-fixes-6.9-2024-05-10:
      
      amdgpu:
      - DCN 3.5 fix
      - MST DSC fixes
      - S0i3 fix
      - S4 fix
      - HDP MMIO mapping fix
      - Fix a regression in visible vram handling
      
      amdkfd:
      - Spatial partition fix
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      
      From: Alex Deucher <alexander.deucher@amd.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20240510171110.1394940-1-alexander.deucher@amd.com
      06fbf84f
    • Barry Song's avatar
      mailmap: add entry for Barry Song · 672614a3
      Barry Song authored
      Include a .mailmap entry to synchronize with both my past and current
      emails.  Among them, three business mailboxes are dead.
      
      Link: https://lkml.kernel.org/r/20240506042009.10854-1-21cnbao@gmail.comSigned-off-by: default avatarBarry Song <v-songbaohua@oppo.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      672614a3
    • Michael Ellerman's avatar
      selftests/mm: fix powerpc ARCH check · 7e642344
      Michael Ellerman authored
      In commit 0518dbe9 ("selftests/mm: fix cross compilation with LLVM")
      the logic to detect the machine architecture in the Makefile was changed
      to use ARCH, and only fallback to uname -m if ARCH is unset.  However the
      tests of ARCH were not updated to account for the fact that ARCH is
      "powerpc" for powerpc builds, not "ppc64".
      
      Fix it by changing the checks to look for "powerpc", and change the
      uname -m logic to convert "ppc64.*" into "powerpc".
      
      With that fixed the following tests now build for powerpc again:
       * protection_keys
       * va_high_addr_switch
       * virtual_address_range
       * write_to_hugetlbfs
      
      Link: https://lkml.kernel.org/r/20240506115825.66415-1-mpe@ellerman.id.au
      Fixes: 0518dbe9 ("selftests/mm: fix cross compilation with LLVM")
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      Cc: Mark Brown <broonie@kernel.org>
      Cc: <stable@vger.kernel.org>	[6.4+]
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      7e642344
    • Linus Torvalds's avatar
      Merge tag 'block-6.9-20240510' of git://git.kernel.dk/linux · f4345f05
      Linus Torvalds authored
      Pull block fixes from Jens Axboe:
      
       - NVMe pull request via Keith:
           - nvme target fixes (Sagi, Dan, Maurizo)
           - new vendor quirk for broken MSI (Sean)
      
       - Virtual boundary fix for a regression in this merge window (Ming)
      
      * tag 'block-6.9-20240510' of git://git.kernel.dk/linux:
        nvmet-rdma: fix possible bad dereference when freeing rsps
        nvmet: prevent sprintf() overflow in nvmet_subsys_nsid_exists()
        nvmet: make nvmet_wq unbound
        nvmet-auth: return the error code to the nvmet_auth_ctrl_hash() callers
        nvme-pci: Add quirk for broken MSIs
        block: set default max segment size in case of virt_boundary
      f4345f05
    • Linus Torvalds's avatar
      Merge tag 'spi-fix-v6.9-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi · ed44935c
      Linus Torvalds authored
      Pull spi fixes from Mark Brown:
       "Two device specific fixes here, one avoiding glitches on chip select
        with the STM32 driver and one for incorrectly configured clocks on the
        Microchip QSPI controller"
      
      * tag 'spi-fix-v6.9-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi:
        spi: microchip-core-qspi: fix setting spi bus clock rate
        spi: stm32: enable controller before asserting CS
      ed44935c
    • Linus Torvalds's avatar
      Merge tag 'regulator-fix-v6.9-rc7' of... · 99dff484
      Linus Torvalds authored
      Merge tag 'regulator-fix-v6.9-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator
      
      Pull regulator fixes from Mark Brown:
       "Two fixes here, one from Johan which fixes error handling when we
        attempt to create duplicate debugfs files and one for an incorrect
        specification of ramp_delay with the rtq2208"
      
      * tag 'regulator-fix-v6.9-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
        regulator: core: fix debugfs creation regression
        regulator: rtq2208: Fix the BUCK ramp_delay range to maximum of 16mVstep/us
      99dff484
    • Linus Torvalds's avatar
      Merge tag 'timers-urgent-2024-05-10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 92d50301
      Linus Torvalds authored
      Pull timer fix from Ingo Molnar:
       "Fix possible (but unlikely) out-of-bounds access in the timer
        migration per-CPU-init code"
      
      * tag 'timers-urgent-2024-05-10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        timers/migration: Prevent out of bounds access on failure
      92d50301
    • Linus Torvalds's avatar
      Merge tag 'iommu-fixes-v6.9-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu · 98957025
      Linus Torvalds authored
      Pull iommu fixes from Joerg Roedel:
      
       - Fix offset miscalculation on ARM-SMMU driver
      
       - AMD IOMMU fix for initializing state of untrusted devices
      
      * tag 'iommu-fixes-v6.9-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
        iommu/arm-smmu: Use the correct type in nvidia_smmu_context_fault()
        iommu/amd: Enhance def_domain_type to handle untrusted device
      98957025