Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
  1. Jul 15, 2024
  2. Jul 09, 2024
  3. Jul 05, 2024
  4. Jun 24, 2024
    • Andrii Nakryiko's avatar
      selftests/bpf: add test validating uprobe/uretprobe stack traces · 637c26f9
      Andrii Nakryiko authored
      Add a set of tests to validate that stack traces captured from or in the
      presence of active uprobes and uretprobes are valid and complete.
      
      For this we use BPF program that are installed either on entry or exit
      of user function, plus deep-nested USDT. One of target funtions
      (target_1) is recursive to generate two different entries in the stack
      trace for the same uprobe/uretprobe, testing potential edge conditions.
      
      If there is no fixes, we get something like this for one of the scenarios:
      
       caller: 0x758fff - 0x7595ab
       target_1: 0x758fd5 - 0x758fff
       target_2: 0x758fca - 0x758fd5
       target_3: 0x758fbf - 0x758fca
       target_4: 0x758fb3 - 0x758fbf
       ENTRY #0: 0x758fb3 (in target_4)
       ENTRY #1: 0x758fd3 (in target_2)
       ENTRY #2: 0x758ffd (in target_1)
       ENTRY #3: 0x7fffffffe000
       ENTRY #4: 0x7fffffffe000
       ENTRY #5: 0x6f8f39
       ENTRY #6: 0x6fa6f0
       ENTRY #7: 0x7f403f229590
      
      Entry #3 and #4 (0x7fffffffe000) are uretprobe trampoline addresses
      which obscure actual target_1 and another target_1 invocations. Also
      note that between entry #0 and entry #1 we are missing an entry for
      target_3.
      
      With fixes, we get desired full stack traces:
      
       caller: 0x758fff - 0x7595ab
       target_1: 0x758fd5 - 0x758fff
       target_2: 0x758fca - 0x758fd5
       target_3: 0x758fbf - 0x758fca
       target_4: 0x758fb3 - 0x758fbf
       ENTRY #0: 0x758fb7 (in target_4)
       ENTRY #1: 0x758fc8 (in target_3)
       ENTRY #2: 0x758fd3 (in target_2)
       ENTRY #3: 0x758ffd (in target_1)
       ENTRY #4: 0x758ff3 (in target_1)
       ENTRY #5: 0x75922c (in caller)
       ENTRY #6: 0x6f8f39
       ENTRY #7: 0x6fa6f0
       ENTRY #8: 0x7f986adc4cd0
      
      Now there is a logical and complete sequence of function calls.
      
      Link: https://lore.kernel.org/all/20240522013845.1631305-5-andrii@kernel.org/
      
      
      
      Signed-off-by: default avatarAndrii Nakryiko <andrii@kernel.org>
      Acked-by: default avatarJiri Olsa <jolsa@kernel.org>
      Signed-off-by: default avatarMasami Hiramatsu (Google) <mhiramat@kernel.org>
      637c26f9
    • Andrii Nakryiko's avatar
      perf,uprobes: fix user stack traces in the presence of pending uretprobes · 4a365eb8
      Andrii Nakryiko authored
      When kernel has pending uretprobes installed, it hijacks original user
      function return address on the stack with a uretprobe trampoline
      address. There could be multiple such pending uretprobes (either on
      different user functions or on the same recursive one) at any given
      time within the same task.
      
      This approach interferes with the user stack trace capture logic, which
      would report suprising addresses (like 0x7fffffffe000) that correspond
      to a special "[uprobes]" section that kernel installs in the target
      process address space for uretprobe trampoline code, while logically it
      should be an address somewhere within the calling function of another
      traced user function.
      
      This is easy to correct for, though. Uprobes subsystem keeps track of
      pending uretprobes and records original return addresses. This patch is
      using this to do a post-processing step and restore each trampoline
      address entries with correct original return address. This is done only
      if there are pending uretprobes for current task.
      
      This is a similar approach to what fprobe/kretprobe infrastructure is
      doing when capturing kernel stack traces in the presence of pending
      return probes.
      
      Link: https://lore.kernel.org/all/20240522013845.1631305-3-andrii@kernel.org/
      
      
      
      Reported-by: default avatarRiham Selim <rihams@meta.com>
      Signed-off-by: default avatarAndrii Nakryiko <andrii@kernel.org>
      Signed-off-by: default avatarMasami Hiramatsu (Google) <mhiramat@kernel.org>
      4a365eb8
  5. Jun 11, 2024
  6. Jun 09, 2024
    • Linus Torvalds's avatar
      Linux 6.10-rc3 · 83a7eefe
      Linus Torvalds authored
      v6.10-rc3
      83a7eefe
    • Linus Torvalds's avatar
      Merge tag 'perf-tools-fixes-for-v6.10-2-2024-06-09' of... · b8481381
      Linus Torvalds authored
      Merge tag 'perf-tools-fixes-for-v6.10-2-2024-06-09' of git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools
      
      Pull perf tools fixes from Arnaldo Carvalho de Melo:
      
       - Update copies of kernel headers, which resulted in support for the
         new 'mseal' syscall, SUBVOL statx return mask bit, RISC-V and PPC
         prctls, fcntl's DUPFD_QUERY, POSTED_MSI_NOTIFICATION IRQ vector,
         'map_shadow_stack' syscall for x86-32.
      
       - Revert perf.data record memory allocation optimization that ended up
         causing a regression, work is being done to re-introduce it in the
         next merge window.
      
       - Fix handling of minimal vmlinux.h file used with BPF's CO-RE when
         interrupting the build.
      
      * tag 'perf-tools-fixes-for-v6.10-2-2024-06-09' of git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools:
        perf bpf: Fix handling of minimal vmlinux.h file when interrupting the build
        Revert "perf record: Reduce memory for recording PERF_RECORD_LOST_SAMPLES event"
        tools headers arm64: Sync arm64's cputype.h with the kernel sources
        tools headers uapi: Sync linux/stat.h with the kernel sources to pick STATX_SUBVOL
        tools headers UAPI: Update i915_drm.h with the kernel sources
        tools headers UAPI: Sync kvm headers with the kernel sources
        tools arch x86: Sync the msr-index.h copy with the kernel sources
        tools headers: Update the syscall tables and unistd.h, mostly to support the new 'mseal' syscall
        perf trace beauty: Update the arch/x86/include/asm/irq_vectors.h copy with the kernel sources to pick POSTED_MSI_NOTIFICATION
        perf beauty: Update copy of linux/socket.h with the kernel sources
        tools headers UAPI: Sync fcntl.h with the kernel sources to pick F_DUPFD_QUERY
        tools headers UAPI: Sync linux/prctl.h with the kernel sources
        tools include UAPI: Sync linux/stat.h with the kernel sources
      b8481381
    • Linus Torvalds's avatar
      Merge tag 'edac_urgent_for_v6.10_rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras · 637c2dfc
      Linus Torvalds authored
      Pull EDAC fixes from Borislav Petkov:
      
       - Convert PCI core error codes to proper error numbers since latter get
         propagated all the way up to the module loading functions
      
      * tag 'edac_urgent_for_v6.10_rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras:
        EDAC/igen6: Convert PCIBIOS_* return codes to errnos
        EDAC/amd64: Convert PCIBIOS_* return codes to errnos
      637c2dfc
  7. Jun 08, 2024
  8. Jun 07, 2024
    • Linus Torvalds's avatar
      Merge tag 'mm-hotfixes-stable-2024-06-07-15-24' of... · dc772f82
      Linus Torvalds authored
      Merge tag 'mm-hotfixes-stable-2024-06-07-15-24' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
      
      Pull misc fixes from Andrew Morton:
       "14 hotfixes, 6 of which are cc:stable.
      
        All except the nilfs2 fix affect MM and all are singletons - see the
        chagelogs for details"
      
      * tag 'mm-hotfixes-stable-2024-06-07-15-24' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm:
        nilfs2: fix nilfs_empty_dir() misjudgment and long loop on I/O errors
        mm: fix xyz_noprof functions calling profiled functions
        codetag: avoid race at alloc_slab_obj_exts
        mm/hugetlb: do not call vma_add_reservation upon ENOMEM
        mm/ksm: fix ksm_zero_pages accounting
        mm/ksm: fix ksm_pages_scanned accounting
        kmsan: do not wipe out origin when doing partial unpoisoning
        vmalloc: check CONFIG_EXECMEM in is_vmalloc_or_module_addr()
        mm: page_alloc: fix highatomic typing in multi-block buddies
        nilfs2: fix potential kernel bug due to lack of writeback flag waiting
        memcg: remove the lockdep assert from __mod_objcg_mlstate()
        mm: arm64: fix the out-of-bounds issue in contpte_clear_young_dirty_ptes
        mm: huge_mm: fix undefined reference to `mthp_stats' for CONFIG_SYSFS=n
        mm: drop the 'anon_' prefix for swap-out mTHP counters
      dc772f82
    • Linus Torvalds's avatar
      Merge tag 'gpio-fixes-for-v6.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux · e60721bf
      Linus Torvalds authored
      Pull gpio fixes from Bartosz Golaszewski:
      
       - interrupt handling and Kconfig fixes for gpio-tqmx86
      
       - add a buffer for storing output values in gpio-tqmx86 as reading back
         the registers always returns the input values
      
       - add missing MODULE_DESCRIPTION()s to several GPIO drivers
      
      * tag 'gpio-fixes-for-v6.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux:
        gpio: add missing MODULE_DESCRIPTION() macros
        gpio: tqmx86: fix broken IRQ_TYPE_EDGE_BOTH interrupt type
        gpio: tqmx86: store IRQ trigger type and unmask status separately
        gpio: tqmx86: introduce shadow register for GPIO output value
        gpio: tqmx86: fix typo in Kconfig label
      e60721bf
    • Linus Torvalds's avatar
      Merge tag 'block-6.10-20240607' of git://git.kernel.dk/linux · 602079a0
      Linus Torvalds authored
      Pull block fixes from Jens Axboe:
      
       - Fix for null_blk block size validation (Andreas)
      
       - NVMe pull request via Keith:
            - Use reserved tags for special fabrics operations (Chunguang)
            - Persistent Reservation status masking fix (Weiwen)
      
      * tag 'block-6.10-20240607' of git://git.kernel.dk/linux:
        null_blk: fix validation of block size
        nvme: fix nvme_pr_* status code parsing
        nvme-fabrics: use reserved tag for reg read/write command
      602079a0
    • Linus Torvalds's avatar
      Merge tag 'io_uring-6.10-20240607' of git://git.kernel.dk/linux · e3391589
      Linus Torvalds authored
      Pull io_uring fixes from Jens Axboe:
      
       - Fix a locking order issue with setting max async thread workers
         (Hagar)
      
       - Fix for a NULL pointer dereference for failed async flagged requests
         using ring provided buffers. This doesn't affect the current kernel,
         but it does affect older kernels, and is being queued up for 6.10
         just to make the stable process easier (me)
      
       - Fix for NAPI timeout calculations for how long to busy poll, and
         subsequently how much to sleep post that if a wait timeout is passed
         in (me)
      
       - Fix for a regression in this release cycle, where we could end up
         using a partially unitialized match value for io-wq (Su)
      
      * tag 'io_uring-6.10-20240607' of git://git.kernel.dk/linux:
        io_uring: fix possible deadlock in io_register_iowq_max_workers()
        io_uring/io-wq: avoid garbage value of 'match' in io_wq_enqueue()
        io_uring/napi: fix timeout calculation
        io_uring: check for non-NULL file pointer in io_file_can_poll()
      e3391589
    • Linus Torvalds's avatar
      Merge tag 'for-6.10-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux · 07978330
      Linus Torvalds authored
      Pull btrfs fixes from David Sterba:
      
       - fix handling of folio private changes.
      
         The private value holds pointer to our extent buffer structure
         representing a metadata range. Release and create of the range was
         not properly synchronized when updating the private bit which ended
         up in double folio_put, leading to all sorts of breakage
      
       - fix a crash, reported as duplicate key in metadata, but caused by a
         race of fsync and size extending write. Requires prealloc target
         range + fsync and other conditions (log tree state, timing)
      
       - fix leak of qgroup extent records after transaction abort
      
      * tag 'for-6.10-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
        btrfs: protect folio::private when attaching extent buffer folios
        btrfs: fix leak of qgroup extent records after transaction abort
        btrfs: fix crash on racing fsync and size-extending write into prealloc
      07978330
    • Linus Torvalds's avatar
      Merge tag 'nfsd-6.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux · eecba7c0
      Linus Torvalds authored
      Pull nfsd fix from Chuck Lever:
      
       - Fix an occasional memory overwrite caused by a fix added in 6.10
      
      * tag 'nfsd-6.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux:
        SUNRPC: Fix loop termination condition in gss_free_in_token_pages()
      eecba7c0
    • Linus Torvalds's avatar
      Merge tag 'riscv-for-linus-6.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux · 0a02756d
      Linus Torvalds authored
      Pull RISC-V fixes from Palmer Dabbelt:
      
       - Another fix to avoid allocating pages that overlap with ERR_PTR,
         which manifests on rv32
      
       - A revert for the badaccess patch I incorrectly picked up an early
         version of
      
      * tag 'riscv-for-linus-6.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
        Revert "riscv: mm: accelerate pagefault when badaccess"
        riscv: fix overlap of allocated page and PTR_ERR
      0a02756d
    • Linus Torvalds's avatar
      Merge tag 's390-6.10-3' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux · 8d6b029e
      Linus Torvalds authored
      Pull s390 fixes from Alexander Gordeev:
      
       - Do not create PT_LOAD program header for the kenel image when the
         virtual memory informaton in OS_INFO data is not available. That
         fixes stand-alone dump failures against kernels that do not provide
         the virtual memory informaton
      
       - Add KVM s390 shared zeropage selftest
      
      * tag 's390-6.10-3' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
        KVM: s390x: selftests: Add shared zeropage test
        s390/crash: Do not use VM info if os_info does not have it
      8d6b029e
    • Linus Torvalds's avatar
      Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux · 8d437867
      Linus Torvalds authored
      Pull arm64 fixes from Will Deacon:
      
       - Fix spurious CPU hotplug warning message from SETEND emulation code
      
       - Fix the build when GCC wasn't inlining our I/O accessor internals
      
      * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
        arm64/io: add constant-argument check
        arm64: armv8_deprecated: Fix warning in isndep cpuhp starting process
      8d437867
    • Linus Torvalds's avatar
      Merge tag 'platform-drivers-x86-v6.10-3' of... · 96e09b8f
      Linus Torvalds authored
      Merge tag 'platform-drivers-x86-v6.10-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86
      
      Pull x86 platform driver fixes from Hans de Goede:
      
       -  Default silead touchscreen driver to 10 fingers and drop 10 finger
          setting from all DMI quirks. More of a cleanup then a pure fix, but
          since the DMI quirks always get updated through the fixes branch
          this avoids conflicts.
      
       -  Kconfig fix for randconfig builds
      
       -  dell-smbios: Fix wrong token data in sysfs
      
       -  amd-hsmp: Fix driver poking unsupported hw when loaded manually
      
      * tag 'platform-drivers-x86-v6.10-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86:
        platform/x86/amd/hsmp: Check HSMP support on AMD family of processors
        platform/x86: dell-smbios: Simplify error handling
        platform/x86: dell-smbios: Fix wrong token data in sysfs
        platform/x86: yt2-1380: add CONFIG_EXTCON dependency
        platform/x86: touchscreen_dmi: Use 2-argument strscpy()
        platform/x86: touchscreen_dmi: Drop "silead,max-fingers" property
        Input: silead - Always support 10 fingers
      96e09b8f