Skip to content
Snippets Groups Projects
  1. Dec 01, 2024
    • Linus Torvalds's avatar
      Merge tag 'irq_urgent_for_v6.13_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 63f4993b
      Linus Torvalds authored
      Pull irq fixes from Borislav Petkov:
      
       - Move the ->select callback to the correct ops structure in
         irq-mvebu-sei to fix some Marvell Armada platforms
      
       - Add a workaround for Hisilicon ITS erratum 162100801 which can cause
         some virtual interrupts to get lost
      
       - More platform_driver::remove() conversion
      
      * tag 'irq_urgent_for_v6.13_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        irqchip: Switch back to struct platform_driver::remove()
        irqchip/gicv3-its: Add workaround for hip09 ITS erratum 162100801
        irqchip/irq-mvebu-sei: Move misplaced select() callback to SEI CP domain
      63f4993b
    • Linus Torvalds's avatar
      Merge tag 'x86_urgent_for_v6.13_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 58ac609b
      Linus Torvalds authored
      Pull x86 fixes from Borislav Petkov:
      
       - Add a terminating zero end-element to the array describing AMD CPUs
         affected by erratum 1386 so that the matching loop actually
         terminates instead of going off into the weeds
      
       - Update the boot protocol documentation to mention the fact that the
         preferred address to load the kernel to is considered in the
         relocatable kernel case too
      
       - Flush the memory buffer containing the microcode patch after applying
         microcode on AMD Zen1 and Zen2, to avoid unnecessary slowdowns
      
       - Make sure the PPIN CPU feature flag is cleared on all CPUs if PPIN
         has been disabled
      
      * tag 'x86_urgent_for_v6.13_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/CPU/AMD: Terminate the erratum_1386_microcode array
        x86/Documentation: Update algo in init_size description of boot protocol
        x86/microcode/AMD: Flush patch buffer mapping after application
        x86/mm: Carve out INVLPG inline asm for use by others
        x86/cpu: Fix PPIN initialization
      58ac609b
    • Linus Torvalds's avatar
      strscpy: write destination buffer only once · 9022ed0e
      Linus Torvalds authored
      
      The point behind strscpy() was to once and for all avoid all the
      problems with 'strncpy()' and later broken "fixed" versions like
      strlcpy() that just made things worse.
      
      So strscpy not only guarantees NUL-termination (unlike strncpy), it also
      doesn't do unnecessary padding at the destination.  But at the same time
      also avoids byte-at-a-time reads and writes by _allowing_ some extra NUL
      writes - within the size, of course - so that the whole copy can be done
      with word operations.
      
      It is also stable in the face of a mutable source string: it explicitly
      does not read the source buffer multiple times (so an implementation
      using "strnlen()+memcpy()" would be wrong), and does not read the source
      buffer past the size (like the mis-design that is strlcpy does).
      
      Finally, the return value is designed to be simple and unambiguous: if
      the string cannot be copied fully, it returns an actual negative error,
      making error handling clearer and simpler (and the caller already knows
      the size of the buffer).  Otherwise it returns the string length of the
      result.
      
      However, there was one final stability issue that can be important to
      callers: the stability of the destination buffer.
      
      In particular, the same way we shouldn't read the source buffer more
      than once, we should avoid doing multiple writes to the destination
      buffer: first writing a potentially non-terminated string, and then
      terminating it with NUL at the end does not result in a stable result
      buffer.
      
      Yes, it gives the right result in the end, but if the rule for the
      destination buffer was that it is _always_ NUL-terminated even when
      accessed concurrently with updates, the final byte of the buffer needs
      to always _stay_ as a NUL byte.
      
      [ Note that "final byte is NUL" here is literally about the final byte
        in the destination array, not the terminating NUL at the end of the
        string itself. There is no attempt to try to make concurrent reads and
        writes give any kind of consistent string length or contents, but we
        do want to guarantee that there is always at least that final
        terminating NUL character at the end of the destination array if it
        existed before ]
      
      This is relevant in the kernel for the tsk->comm[] array, for example.
      Even without locking (for either readers or writers), we want to know
      that while the buffer contents may be garbled, it is always a valid C
      string and always has a NUL character at 'comm[TASK_COMM_LEN-1]' (and
      never has any "out of thin air" data).
      
      So avoid any "copy possibly non-terminated string, and terminate later"
      behavior, and write the destination buffer only once.
      
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      9022ed0e
    • Linus Torvalds's avatar
      Merge tag 'turbostat-2024.11.30' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux · bcc8eda6
      Linus Torvalds authored
      Pull turbostat updates from Len Brown:
      
       - assorted minor bug fixes
      
       - assorted platform specific tweaks
      
       - initial RAPL PSYS (SysWatt) support
      
      * tag 'turbostat-2024.11.30' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux:
        tools/power turbostat: 2024.11.30
        tools/power turbostat: Add RAPL psys as a built-in counter
        tools/power turbostat: Fix child's argument forwarding
        tools/power turbostat: Force --no-perf in --dump mode
        tools/power turbostat: Add support for /sys/class/drm/card1
        tools/power turbostat: Cache graphics sysfs file descriptors during probe
        tools/power turbostat: Consolidate graphics sysfs access
        tools/power turbostat: Remove unnecessary fflush() call
        tools/power turbostat: Enhance platform divergence description
        tools/power turbostat: Add initial support for GraniteRapids-D
        tools/power turbostat: Remove PC3 support on Lunarlake
        tools/power turbostat: Rename arl_features to lnl_features
        tools/power turbostat: Add back PC8 support on Arrowlake
        tools/power turbostat: Remove PC7/PC9 support on MTL
        tools/power turbostat: Honor --show CPU, even when even when num_cpus=1
        tools/power turbostat: Fix trailing '\n' parsing
        tools/power turbostat: Allow using cpu device in perf counters on hybrid platforms
        tools/power turbostat: Fix column printing for PMT xtal_time counters
        tools/power turbostat: fix GCC9 build regression
      bcc8eda6
    • Linus Torvalds's avatar
      Merge tag 'pci-v6.13-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci · 0cb71708
      Linus Torvalds authored
      Pull PCI fix from Bjorn Helgaas:
      
       - When removing a PCI device, only look up and remove a platform device
         if there is an associated device node for which there could be a
         platform device, to fix a merge window regression (Brian Norris)
      
      * tag 'pci-v6.13-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci:
        PCI/pwrctrl: Unregister platform device only if one actually exists
      0cb71708
    • Linus Torvalds's avatar
      Merge tag 'lsm-pr-20241129' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/lsm · 8a6a03ad
      Linus Torvalds authored
      Pull ima fix from Paul Moore:
       "One small patch to fix a function parameter / local variable naming
        snafu that went up to you in the current merge window"
      
      * tag 'lsm-pr-20241129' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/lsm:
        ima: uncover hidden variable in ima_match_rules()
      8a6a03ad
  2. Nov 30, 2024
    • Linus Torvalds's avatar
      Merge tag 'block-6.13-20242901' of git://git.kernel.dk/linux · cfd47302
      Linus Torvalds authored
      Pull more block updates from Jens Axboe:
      
       - NVMe pull request via Keith:
            - Use correct srcu list traversal (Breno)
            - Scatter-gather support for metadata (Keith)
            - Fabrics shutdown race condition fix (Nilay)
            - Persistent reservations updates (Guixin)
      
       - Add the required bits for MD atomic write support for raid0/1/10
      
       - Correct return value for unknown opcode in ublk
      
       - Fix deadlock with zone revalidation
      
       - Fix for the io priority request vs bio cleanups
      
       - Use the correct unsigned int type for various limit helpers
      
       - Fix for a race in loop
      
       - Cleanup blk_rq_prep_clone() to prevent uninit-value warning and make
         it easier for actual humans to read
      
       - Fix potential UAF when iterating tags
      
       - A few fixes for bfq-iosched UAF issues
      
       - Fix for brd discard not decrementing the allocated page count
      
       - Various little fixes and cleanups
      
      * tag 'block-6.13-20242901' of git://git.kernel.dk/linux: (36 commits)
        brd: decrease the number of allocated pages which discarded
        block, bfq: fix bfqq uaf in bfq_limit_depth()
        block: Don't allow an atomic write be truncated in blkdev_write_iter()
        mq-deadline: don't call req_get_ioprio from the I/O completion handler
        block: Prevent potential deadlock in blk_revalidate_disk_zones()
        block: Remove extra part pointer NULLify in blk_rq_init()
        nvme: tuning pr code by using defined structs and macros
        nvme: introduce change ptpl and iekey definition
        block: return bool from get_disk_ro and bdev_read_only
        block: remove a duplicate definition for bdev_read_only
        block: return bool from blk_rq_aligned
        block: return unsigned int from blk_lim_dma_alignment_and_pad
        block: return unsigned int from queue_dma_alignment
        block: return unsigned int from bdev_io_opt
        block: req->bio is always set in the merge code
        block: don't bother checking the data direction for merges
        block: blk-mq: fix uninit-value in blk_rq_prep_clone and refactor
        Revert "block, bfq: merge bfq_release_process_ref() into bfq_put_cooperator()"
        md/raid10: Atomic write support
        md/raid1: Atomic write support
        ...
      cfd47302
    • Linus Torvalds's avatar
      Merge tag 'io_uring-6.13-20242901' of git://git.kernel.dk/linux · dd54fcce
      Linus Torvalds authored
      Pull more io_uring updates from Jens Axboe:
      
       - Remove a leftover struct from when the cqwait registered waiting was
         transitioned to regions.
      
       - Fix for an issue introduced in this merge window, where nop->fd might
         be used uninitialized. Ensure it's always set.
      
       - Add capping of the task_work run in local task_work mode, to prevent
         bursty and long chains from adding too much latency.
      
       - Work around xa_store() leaving ->head non-NULL if it encounters an
         allocation error during storing. Just a debug trigger, and can go
         away once xa_store() behaves in a more expected way for this
         condition. Not a major thing as it basically requires fault injection
         to trigger it.
      
       - Fix a few mapping corner cases
      
       - Fix KCSAN complaint on reading the table size post unlock. Again not
         a "real" issue, but it's easy to silence by just keeping the reading
         inside the lock that protects it.
      
      * tag 'io_uring-6.13-20242901' of git://git.kernel.dk/linux:
        io_uring/tctx: work around xa_store() allocation error issue
        io_uring: fix corner case forgetting to vunmap
        io_uring: fix task_work cap overshooting
        io_uring: check for overflows in io_pin_pages
        io_uring/nop: ensure nop->fd is always initialized
        io_uring: limit local tw done
        io_uring: add io_local_work_pending()
        io_uring/region: return negative -E2BIG in io_create_region()
        io_uring: protect register tracing
        io_uring: remove io_uring_cqwait_reg_arg
      dd54fcce
    • Linus Torvalds's avatar
      Merge tag 'dma-mapping-6.13-2024-11-30' of git://git.infradead.org/users/hch/dma-mapping · 133577ca
      Linus Torvalds authored
      Pull dma-mapping fix from Christoph Hellwig:
      
       - fix physical address calculation for struct dma_debug_entry (Fedor
         Pchelkin)
      
      * tag 'dma-mapping-6.13-2024-11-30' of git://git.infradead.org/users/hch/dma-mapping:
        dma-debug: fix physical address calculation for struct dma_debug_entry
      133577ca
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm · c4bb3a2d
      Linus Torvalds authored
      Pull more kvm updates from Paolo Bonzini:
      
       - ARM fixes
      
       - RISC-V Svade and Svadu (accessed and dirty bit) extension support for
         host and guest
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
        KVM: riscv: selftests: Add Svade and Svadu Extension to get-reg-list test
        RISC-V: KVM: Add Svade and Svadu Extensions Support for Guest/VM
        dt-bindings: riscv: Add Svade and Svadu Entries
        RISC-V: Add Svade and Svadu Extensions Support
        KVM: arm64: Use MDCR_EL2.HPME to evaluate overflow of hyp counters
        KVM: arm64: Ignore PMCNTENSET_EL0 while checking for overflow status
        KVM: arm64: Mark set_sysreg_masks() as inline to avoid build failure
        KVM: arm64: vgic-its: Add stronger type-checking to the ITS entry sizes
        KVM: arm64: vgic: Kill VGIC_MAX_PRIVATE definition
        KVM: arm64: vgic: Make vgic_get_irq() more robust
        KVM: arm64: vgic-v3: Sanitise guest writes to GICR_INVLPIR
      c4bb3a2d
    • Linus Torvalds's avatar
      Merge tag 'sh-for-v6.13-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/glaubitz/sh-linux · 0ff86d8d
      Linus Torvalds authored
      Pull sh updates from John Paul Adrian Glaubitz:
       "Two small fixes.
      
        The first one by Huacai Chen addresses a runtime warning when
        CONFIG_CPUMASK_OFFSTACK and CONFIG_DEBUG_PER_CPU_MAPS are selected
        which occurs because the cpuinfo code on sh incorrectly uses NR_CPUS
        when iterating CPUs instead of the runtime limit nr_cpu_ids.
      
        A second fix by Dan Carpenter fixes a use-after-free bug in
        register_intc_controller() which occurred as a result of improper
        error handling in the interrupt controller driver code when
        registering an interrupt controller during plat_irq_setup() on sh"
      
      * tag 'sh-for-v6.13-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/glaubitz/sh-linux:
        sh: intc: Fix use-after-free bug in register_intc_controller()
        sh: cpuinfo: Fix a warning for CONFIG_CPUMASK_OFFSTACK
      0ff86d8d
    • Linus Torvalds's avatar
      Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux · 50ee4a6f
      Linus Torvalds authored
      Pull arm64 fixes from Catalin Marinas:
      
       - Deselect ARCH_CORRECT_STACKTRACE_ON_KRETPROBE so that tests depending
         on it don't run (and fail) on arm64
      
       - Fix lockdep assert in the Arm SMMUv3 PMU driver
      
       - Fix the port and device ID bits setting in the Arm CMN perf driver
      
      * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
        perf/arm-cmn: Ensure port and device id bits are set properly
        perf/arm-smmuv3: Fix lockdep assert in ->event_init()
        arm64: disable ARCH_CORRECT_STACKTRACE_ON_KRETPROBE tests
      50ee4a6f
    • Len Brown's avatar
      tools/power turbostat: 2024.11.30 · 86d23773
      Len Brown authored
      
      since 2024.07.26:
      
      assorted minor bug fixes
      assorted platform specific tweaks
      initial RAPL PSYS (SysWatt) support
      
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      86d23773
    • Patryk Wlazlyn's avatar
      tools/power turbostat: Add RAPL psys as a built-in counter · e5f687b8
      Patryk Wlazlyn authored
      
      Introduce the counter as a part of global, platform counters structure.
      We open the counter for only one cpu, but otherwise treat it as an
      ordinary RAPL counter, allowing for grouped perf read.
      
      The counter is disabled by default, because it's interpretation may
      require additional, platform specific information, making it unsuitable
      for general use.
      
      Signed-off-by: default avatarPatryk Wlazlyn <patryk.wlazlyn@linux.intel.com>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      e5f687b8
    • Patryk Wlazlyn's avatar
      tools/power turbostat: Fix child's argument forwarding · 1da0daf7
      Patryk Wlazlyn authored
      
      Add '+' to optstring when early scanning for --no-msr and --no-perf.
      It causes option processing to stop as soon as a nonoption argument is
      encountered, effectively skipping child's arguments.
      
      Fixes: 3e404846 ("tools/power turbostat: Add --no-msr option")
      Signed-off-by: default avatarPatryk Wlazlyn <patryk.wlazlyn@linux.intel.com>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      1da0daf7
    • Patryk Wlazlyn's avatar
      tools/power turbostat: Force --no-perf in --dump mode · bcfab871
      Patryk Wlazlyn authored
      
      Force the --no-perf early to prevent using it as a source. User asks for
      raw values, but perf returns them relative to the opening of the file
      descriptor.
      
      Signed-off-by: default avatarPatryk Wlazlyn <patryk.wlazlyn@linux.intel.com>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      bcfab871
    • Zhang Rui's avatar
      tools/power turbostat: Add support for /sys/class/drm/card1 · 03109e2f
      Zhang Rui authored
      
      On some machines, the graphics device is enumerated as
      /sys/class/drm/card1 instead of /sys/class/drm/card0. The current
      implementation does not handle this scenario, resulting in the loss of
      graphics C6 residency and frequency information.
      
      Add support for /sys/class/drm/card1, ensuring that turbostat can
      retrieve and display the graphics columns for these platforms.
      
      Signed-off-by: default avatarZhang Rui <rui.zhang@intel.com>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      03109e2f
    • Zhang Rui's avatar
      tools/power turbostat: Cache graphics sysfs file descriptors during probe · c7538f33
      Zhang Rui authored
      
      Snapshots of the graphics sysfs knobs are taken based on file
      descriptors. To optimize this process, open the files and cache the file
      descriptors during the graphics probe phase. As a result, the previously
      cached pathnames become redundant and are removed.
      
      This change aims to streamline the code without altering its functionality.
      
      No functional change intended.
      
      Signed-off-by: default avatarZhang Rui <rui.zhang@intel.com>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      c7538f33
    • Zhang Rui's avatar
      tools/power turbostat: Consolidate graphics sysfs access · d071004e
      Zhang Rui authored
      
      Currently, there is an inconsistency in how graphics sysfs knobs are
      accessed: graphics residency sysfs knobs are opened and closed for each
      read, while graphics frequency sysfs knobs are opened once and remain
      open until turbostat exits. This inconsistency is confusing and adds
      unnecessary code complexity.
      
      Consolidate the access method by opening the sysfs files once and
      reusing the file pointers for subsequent accesses. This approach
      simplifies the code and ensures a consistent method for accessing
      graphics sysfs knobs.
      
      Signed-off-by: default avatarZhang Rui <rui.zhang@intel.com>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      d071004e
    • Zhang Rui's avatar
      tools/power turbostat: Remove unnecessary fflush() call · ba99a4fc
      Zhang Rui authored
      
      The graphics sysfs knobs are read-only, making the use of fflush()
      before reading them redundant.
      
      Remove the unnecessary fflush() call.
      
      Signed-off-by: default avatarZhang Rui <rui.zhang@intel.com>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      ba99a4fc
    • Zhang Rui's avatar
      tools/power turbostat: Enhance platform divergence description · 1958f4e1
      Zhang Rui authored
      
      In various generations, platforms often share a majority of features,
      diverging only in a few specific aspects. The current approach of using
      hardcoded values in 'platform_features' structure fails to effectively
      represent these divergences.
      
      To improve the description of platform divergence:
      1. Each newly introduced 'platform_features' structure must have a base,
         typically derived from the previous generation.
      2. Platform feature values should be inherited from the base structure
         rather than being hardcoded.
      This approach ensures a more accurate and maintainable representation of
      platform-specific features across different generations.
      
      Converts `adl_features` and `lnl_features` to follow this new scheme.
      
      No functional change.
      
      Signed-off-by: default avatarZhang Rui <rui.zhang@intel.com>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      1958f4e1
    • Zhang Rui's avatar
      tools/power turbostat: Add initial support for GraniteRapids-D · d39d586e
      Zhang Rui authored
      
      Add initial support for GraniteRapids-D. It shares the same features
      with SapphireRapids.
      
      Signed-off-by: default avatarZhang Rui <rui.zhang@intel.com>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      d39d586e
    • Zhang Rui's avatar
      tools/power turbostat: Remove PC3 support on Lunarlake · 26c57a15
      Zhang Rui authored
      
      Lunarlake supports CC1/CC6/CC7/PC2/PC6/PC10.
      
      Remove PC3 support on Lunarlake.
      
      Signed-off-by: default avatarZhang Rui <rui.zhang@intel.com>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      26c57a15
    • Zhang Rui's avatar
      tools/power turbostat: Rename arl_features to lnl_features · 3ae5f343
      Zhang Rui authored
      
      As ARL shares the same features with ADL/RPL/MTL, now 'arl_features' is
      used by Lunarlake platform only.
      
      Rename 'arl_features' to 'lnl_features'.
      
      No functional change.
      
      Signed-off-by: default avatarZhang Rui <rui.zhang@intel.com>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      3ae5f343
    • Zhang Rui's avatar
      tools/power turbostat: Add back PC8 support on Arrowlake · b082e07a
      Zhang Rui authored
      
      Similar to ADL/RPL/MTL, ARL supports CC1/CC6/CC7/PC2/PC3/PC6/PC8/PC10.
      
      Add back PC8 support on Arrowlake.
      
      Signed-off-by: default avatarZhang Rui <rui.zhang@intel.com>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      b082e07a
    • Zhang Rui's avatar
      tools/power turbostat: Remove PC7/PC9 support on MTL · f5e2cf22
      Zhang Rui authored
      
      Similar to ADL/RPL, MTL support CC1/CC6/CC7/PC2/PC3/PC6/PC8/CP10.
      
      Remove PC7/PC9 support on MTL.
      
      Signed-off-by: default avatarZhang Rui <rui.zhang@intel.com>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      f5e2cf22
    • Patryk Wlazlyn's avatar
      tools/power turbostat: Honor --show CPU, even when even when num_cpus=1 · c808624e
      Patryk Wlazlyn authored
      
      Honor --show CPU and --show Core when "topo.num_cpus == 1".
      Previously turbostat assumed that on a 1-CPU system, these
      columns should never appear.
      
      Honoring these flags makes it easier for several programs
      that parse turbostat output.
      
      Signed-off-by: default avatarPatryk Wlazlyn <patryk.wlazlyn@linux.intel.com>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      c808624e
    • Zhang Rui's avatar
      tools/power turbostat: Fix trailing '\n' parsing · fed8511c
      Zhang Rui authored
      
      parse_cpu_string() parses the string input either from command line or
      from /sys/fs/cgroup/cpuset.cpus.effective to get a list of CPUs that
      turbostat can run with.
      
      The cpu string returned by /sys/fs/cgroup/cpuset.cpus.effective contains
      a trailing '\n', but strtoul() fails to treat this as an error.
      
      That says, for the code below
      	val = ("\n", NULL, 10);
      val returns 0, and errno is also not set.
      
      As a result, CPU0 is erroneously considered as allowed CPU and this
      causes failures when turbostat tries to run on CPU0.
      
       get_counters: Could not migrate to CPU 0
       ...
       turbostat: re-initialized with num_cpus 8, allowed_cpus 5
       get_counters: Could not migrate to CPU 0
      
      Add a check to return immediately if '\n' or '\0' is detected.
      
      Fixes: 8c3dd2c9 ("tools/power/turbostat: Abstrct function for parsing cpu string")
      Signed-off-by: default avatarZhang Rui <rui.zhang@intel.com>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      fed8511c
    • Patryk Wlazlyn's avatar
      tools/power turbostat: Allow using cpu device in perf counters on hybrid platforms · ae2cdf8d
      Patryk Wlazlyn authored
      
      Intel hybrid platforms expose different perf devices for P and E cores.
      Instead of one, "/sys/bus/event_source/devices/cpu" device, there are
      "/sys/bus/event_source/devices/{cpu_core,cpu_atom}".
      
      This, however makes it more complicated for the user,
      because most of the counters are available on both and had to be
      handled manually.
      
      This patch allows users to use "virtual" cpu device that is seemingly
      translated to cpu_core and cpu_atom perf devices, depending on the type
      of a CPU we are opening the counter for.
      
      Signed-off-by: default avatarPatryk Wlazlyn <patryk.wlazlyn@linux.intel.com>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      ae2cdf8d
    • Patryk Wlazlyn's avatar
      tools/power turbostat: Fix column printing for PMT xtal_time counters · ea8614c0
      Patryk Wlazlyn authored
      
      If the very first printed column was for a PMT counter of type xtal_time
      we would misalign the column header, because we were always printing the
      delimiter.
      
      Signed-off-by: default avatarPatryk Wlazlyn <patryk.wlazlyn@linux.intel.com>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      ea8614c0
    • Todd Brandt's avatar
      tools/power turbostat: fix GCC9 build regression · d4a05876
      Todd Brandt authored
      
      Fix build regression seen when using old gcc-9 compiler.
      
      Signed-off-by: default avatarTodd Brandt <todd.e.brandt@intel.com>
      Reviewed-by: default avatarChen Yu <yu.c.chen@intel.com>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      d4a05876
    • Linus Torvalds's avatar
      Merge tag 'kbuild-v6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild · 6a34dfa1
      Linus Torvalds authored
      Pull Kbuild updates from Masahiro Yamada:
      
       - Add generic support for built-in boot DTB files
      
       - Enable TAB cycling for dialog buttons in nconfig
      
       - Fix issues in streamline_config.pl
      
       - Refactor Kconfig
      
       - Add support for Clang's AutoFDO (Automatic Feedback-Directed
         Optimization)
      
       - Add support for Clang's Propeller, a profile-guided optimization.
      
       - Change the working directory to the external module directory for M=
         builds
      
       - Support building external modules in a separate output directory
      
       - Enable objtool for *.mod.o and additional kernel objects
      
       - Use lz4 instead of deprecated lz4c
      
       - Work around a performance issue with "git describe"
      
       - Refactor modpost
      
      * tag 'kbuild-v6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (85 commits)
        kbuild: rename .tmp_vmlinux.kallsyms0.syms to .tmp_vmlinux0.syms
        gitignore: Don't ignore 'tags' directory
        kbuild: add dependency from vmlinux to resolve_btfids
        modpost: replace tdb_hash() with hash_str()
        kbuild: deb-pkg: add python3:native to build dependency
        genksyms: reduce indentation in export_symbol()
        modpost: improve error messages in device_id_check()
        modpost: rename alias symbol for MODULE_DEVICE_TABLE()
        modpost: rename variables in handle_moddevtable()
        modpost: move strstarts() to modpost.h
        modpost: convert do_usb_table() to a generic handler
        modpost: convert do_of_table() to a generic handler
        modpost: convert do_pnp_device_entry() to a generic handler
        modpost: convert do_pnp_card_entries() to a generic handler
        modpost: call module_alias_printf() from all do_*_entry() functions
        modpost: pass (struct module *) to do_*_entry() functions
        modpost: remove DEF_FIELD_ADDR_VAR() macro
        modpost: deduplicate MODULE_ALIAS() for all drivers
        modpost: introduce module_alias_printf() helper
        modpost: remove unnecessary check in do_acpi_entry()
        ...
      6a34dfa1
    • Linus Torvalds's avatar
      Merge tag 'rtc-6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux · 0e287d31
      Linus Torvalds authored
      Pull RTC updates from Alexandre Belloni:
       "New drivers:
         - Amlogic A4 and A5 RTC
         - Marvell 88PM886 PMIC RTC
         - Renesas RTCA-3 for Renesas RZ/G3S
      
        Driver updates:
         - ab-eoz9: fix temperature and alarm support
         - cmos: improve locking behaviour
         - isl12022: add alarm support
         - m48t59: improve epoch handling
         - mt6359: add range
         - rzn1: fix BCD conversions and simplify driver"
      
      * tag 'rtc-6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (38 commits)
        rtc: ab-eoz9: don't fail temperature reads on undervoltage notification
        rtc: rzn1: reduce register access
        rtc: rzn1: drop superfluous wday calculation
        m68k: mvme147, mvme16x: Adopt rtc-m48t59 platform driver
        rtc: brcmstb-waketimer: don't include 'pm_wakeup.h' directly
        rtc: m48t59: Use platform_data struct for year offset value
        rtc: ab-eoz9: fix abeoz9_rtc_read_alarm
        rtc: rv3028: fix RV3028_TS_COUNT type
        rtc: rzn1: update Michel's email
        rtc: rzn1: fix BCD to rtc_time conversion errors
        rtc: amlogic-a4: fix compile error
        rtc: amlogic-a4: drop error messages
        MAINTAINERS: Add an entry for Amlogic RTC driver
        rtc: support for the Amlogic on-chip RTC
        dt-bindings: rtc: Add Amlogic A4 and A5 RTC
        rtc: add driver for Marvell 88PM886 PMIC RTC
        rtc: check if __rtc_read_time was successful in rtc_timer_do_work()
        rtc: pcf8563: Switch to regmap
        rtc: pcf8563: Sort headers alphabetically
        rtc: abx80x: Fix WDT bit position of the status register
        ...
      0e287d31
    • Linus Torvalds's avatar
      Merge tag 'uml-for-linus-6.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/uml/linux · 831c1926
      Linus Torvalds authored
      Pull UML updates from Richard Weinberger:
      
       - Lots of cleanups, mostly from Benjamin Berg and Tiwei Bie
      
       - Removal of unused code
      
       - Fix for sparse warnings
      
       - Cleanup around stub_exe()
      
      * tag 'uml-for-linus-6.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/uml/linux: (68 commits)
        hostfs: Fix the NULL vs IS_ERR() bug for __filemap_get_folio()
        um: move thread info into task
        um: Always dump trace for specified task in show_stack
        um: vector: Do not use drvdata in release
        um: net: Do not use drvdata in release
        um: ubd: Do not use drvdata in release
        um: ubd: Initialize ubd's disk pointer in ubd_add
        um: virtio_uml: query the number of vqs if supported
        um: virtio_uml: fix call_fd IRQ allocation
        um: virtio_uml: send SET_MEM_TABLE message with the exact size
        um: remove broken double fault detection
        um: remove duplicate UM_NSEC_PER_SEC definition
        um: remove file sync for stub data
        um: always include kconfig.h and compiler-version.h
        um: set DONTDUMP and DONTFORK flags on KASAN shadow memory
        um: fix sparse warnings in signal code
        um: fix sparse warnings from regset refactor
        um: Remove double zero check
        um: fix stub exe build with CONFIG_GCOV
        um: Use os_set_pdeathsig helper in winch thread/process
        ...
      831c1926
    • Linus Torvalds's avatar
      Merge tag 'ubifs-for-linus-6.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/ubifs · 04b43ea3
      Linus Torvalds authored
      Pull JFFS2, UBI and UBIFS updates from Richard Weinberger:
       "JFFS2:
         - Bug fix for rtime compression
         - Various cleanups
      
        UBI:
         - Cleanups for fastmap and wear leveling
      
        UBIFS:
         - Add support for FS_IOC_GETFSSYSFSPATH
         - Remove dead ioctl code
         - Fix UAF in ubifs_tnc_end_commit()"
      
      * tag 'ubifs-for-linus-6.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/ubifs: (25 commits)
        ubifs: Fix uninitialized use of err in ubifs_jnl_write_inode()
        jffs2: Prevent rtime decompress memory corruption
        jffs2: remove redundant check on outpos > pos
        fs: jffs2: Fix inconsistent indentation in jffs2_mark_node_obsolete
        jffs2: Correct some typos in comments
        jffs2: fix use of uninitialized variable
        jffs2: Use str_yes_no() helper function
        mtd: ubi: remove redundant check on bytes_left at end of function
        mtd: ubi: fix unreleased fwnode_handle in find_volume_fwnode()
        ubifs: authentication: Fix use-after-free in ubifs_tnc_end_commit
        ubi: fastmap: Fix duplicate slab cache names while attaching
        ubifs: xattr: remove unused anonymous enum
        ubifs: Reduce kfree() calls in ubifs_purge_xattrs()
        ubifs: Call iput(xino) only once in ubifs_purge_xattrs()
        ubi: wl: Close down wear-leveling before nand is suspended
        mtd: ubi: Rmove unused declaration in header file
        ubifs: Correct the total block count by deducting journal reservation
        ubifs: Convert to use ERR_CAST()
        ubifs: add support for FS_IOC_GETFSSYSFSPATH
        ubifs: remove unused ioctl flags GETFLAGS/SETFLAGS
        ...
      04b43ea3
    • Linus Torvalds's avatar
      Merge tag '9p-for-6.13-rc1' of https://github.com/martinetd/linux · e864effa
      Linus Torvalds authored
      Pull 9p updates from Dominique Martinet:
      
       - usbg: fix alloc failure handling & build-as-module
      
       - xen: couple of fixes
      
       - v9fs_cache_register/unregister code cleanup
      
      * tag '9p-for-6.13-rc1' of https://github.com/martinetd/linux:
        net/9p/usbg: allow building as standalone module
        9p/xen: fix release of IRQ
        9p/xen: fix init sequence
        net/9p/usbg: fix handling of the failed kzalloc() memory allocation
        fs/9p: replace functions v9fs_cache_{register|unregister} with direct calls
      e864effa
    • Linus Torvalds's avatar
      Merge tag 'ceph-for-6.13-rc1' of https://github.com/ceph/ceph-client · 9d0ad045
      Linus Torvalds authored
      Pull ceph updates from Ilya Dryomov:
       "A fix for the mount "device" string parser from Patrick and two cred
        reference counting fixups from Max, marked for stable.
      
        Also included a number of cleanups and a tweak to MAINTAINERS to avoid
        unnecessarily CCing netdev list"
      
      * tag 'ceph-for-6.13-rc1' of https://github.com/ceph/ceph-client:
        ceph: fix cred leak in ceph_mds_check_access()
        ceph: pass cred pointer to ceph_mds_auth_match()
        ceph: improve caps debugging output
        ceph: correct ceph_mds_cap_peer field name
        ceph: correct ceph_mds_cap_item field name
        ceph: miscellaneous spelling fixes
        ceph: Use strscpy() instead of strcpy() in __get_snap_name()
        ceph: Use str_true_false() helper in status_show()
        ceph: requalify some char pointers as const
        ceph: extract entity name from device id
        MAINTAINERS: exclude net/ceph from networking
        ceph: Remove fs/ceph deadcode
        libceph: Remove unused ceph_crypto_key_encode
        libceph: Remove unused ceph_osdc_watch_check
        libceph: Remove unused pagevec functions
        libceph: Remove unused ceph_pagelist functions
      9d0ad045
    • Linus Torvalds's avatar
      Merge tag 'nfs-for-6.13-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs · baf67f6a
      Linus Torvalds authored
      Pull NFS client updates from Trond Myklebust:
       "Bugfixes:
         - nfs/localio: fix for a memory corruption in nfs_local_read_done
         - Revert "nfs: don't reuse partially completed requests in
           nfs_lock_and_join_requests"
         - nfsv4:
             - ignore SB_RDONLY when mounting nfs
             - Fix a use-after-free problem in open()
         - sunrpc:
             - clear XPRT_SOCK_UPD_TIMEOUT when reseting the transport
             - timeout and cancel TLS handshake with -ETIMEDOUT
             - fix one UAF issue caused by sunrpc kernel tcp socket
             - Fix a hang in TLS sock_close if sk_write_pending
         - pNFS/blocklayout: Fix device registration issues
      
        Features and cleanups:
         - localio cleanups from Mike Snitzer
         - Clean up refcounting on the nfs version modules
         - __counted_by() annotations
         - nfs: make processes that are waiting for an I/O lock killable"
      
      * tag 'nfs-for-6.13-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: (24 commits)
        fs/nfs/io: make nfs_start_io_*() killable
        nfs/blocklayout: Limit repeat device registration on failure
        nfs/blocklayout: Don't attempt unregister for invalid block device
        sunrpc: fix one UAF issue caused by sunrpc kernel tcp socket
        SUNRPC: timeout and cancel TLS handshake with -ETIMEDOUT
        sunrpc: clear XPRT_SOCK_UPD_TIMEOUT when reset transport
        nfs: ignore SB_RDONLY when mounting nfs
        Revert "nfs: don't reuse partially completed requests in nfs_lock_and_join_requests"
        Revert "fs: nfs: fix missing refcnt by replacing folio_set_private by folio_attach_private"
        nfs/localio: must clear res.replen in nfs_local_read_done
        NFSv4.0: Fix a use-after-free problem in the asynchronous open()
        NFSv4.0: Fix the wake up of the next waiter in nfs_release_seqid()
        SUNRPC: Fix a hang in TLS sock_close if sk_write_pending
        sunrpc: remove newlines from tracepoints
        nfs: Annotate struct pnfs_commit_array with __counted_by()
        nfs/localio: eliminate need for nfs_local_fsync_work forward declaration
        nfs/localio: remove extra indirect nfs_to call to check {read,write}_iter
        nfs/localio: eliminate unnecessary kref in nfs_local_fsync_ctx
        nfs/localio: remove redundant suid/sgid handling
        NFS: Implement get_nfs_version()
        ...
      baf67f6a
    • Linus Torvalds's avatar
      Merge tag '6.13-rc-part2-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6 · 0235da0f
      Linus Torvalds authored
      Pull smb client updates from Steve French:
      
       - directory lease fixes
      
       - password rotation fixes
      
       - reconnect fix
      
       - fix for SMB3.02 mounts
      
       - DFS (global namespace) fixes
      
       - fixes for special file handling (most relating to better handling
         various types of symlinks)
      
       - two minor cleanups
      
      * tag '6.13-rc-part2-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6: (22 commits)
        cifs: update internal version number
        cifs: unlock on error in smb3_reconfigure()
        cifs: during remount, make sure passwords are in sync
        cifs: support mounting with alternate password to allow password rotation
        smb: Initialize cfid->tcon before performing network ops
        smb: During unmount, ensure all cached dir instances drop their dentry
        smb: client: fix noisy message when mounting shares
        smb: client: don't try following DFS links in cifs_tree_connect()
        smb: client: allow reconnect when sending ioctl
        smb: client: get rid of @nlsc param in cifs_tree_connect()
        smb: client: allow more DFS referrals to be cached
        cifs: Fix parsing reparse point with native symlink in SMB1 non-UNICODE session
        cifs: Validate content of WSL reparse point buffers
        cifs: Improve guard for excluding $LXDEV xattr
        cifs: Add support for parsing WSL-style symlinks
        cifs: Validate content of native symlink
        cifs: Fix parsing native symlinks relative to the export
        smb: client: fix NULL ptr deref in crypto_aead_setkey()
        Update misleading comment in cifs_chan_update_iface
        smb: client: change return value in open_cached_dir_by_dentry() if !cfids
        ...
      0235da0f
    • Linus Torvalds's avatar
      Merge tag '6.13-rc-ksmbd-server-fixes' of git://git.samba.org/ksmbd · 109daa23
      Linus Torvalds authored
      Pull smb server updates from Steve French:
      
       - fix use after free due to race in ksmd workqueue handler
      
       - debugging improvements
      
       - fix incorrectly formatted response when client attempts SMB1
      
       - improve memory allocation to reduce chance of OOM
      
       - improve delays between retries when killing sessions
      
      * tag '6.13-rc-ksmbd-server-fixes' of git://git.samba.org/ksmbd:
        ksmbd: fix use-after-free in SMB request handling
        ksmbd: add debug print for pending request during server shutdown
        ksmbd: add netdev-up/down event debug print
        ksmbd: add debug prints to know what smb2 requests were received
        ksmbd: add debug print for rdma capable
        ksmbd: use msleep instaed of schedule_timeout_interruptible()
        ksmbd: use __GFP_RETRY_MAYFAIL
        ksmbd: fix malformed unsupported smb1 negotiate response
      109daa23
Loading