1. 10 Jul, 2024 1 commit
  2. 06 Jul, 2024 1 commit
  3. 25 Jun, 2024 2 commits
    • 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
  4. 11 Jun, 2024 13 commits
  5. 09 Jun, 2024 5 commits
    • Linus Torvalds's avatar
      Linux 6.10-rc3 · 83a7eefe
      Linus Torvalds authored
      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
    • Linus Torvalds's avatar
      Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux · 771ed661
      Linus Torvalds authored
      Pull clk fix from Stephen Boyd:
       "One fix for the SiFive PRCI clocks so that the device boots again.
      
        This driver was registering clkdev lookups that were always going to
        be useless. This wasn't a problem until clkdev started returning an
        error in these cases, causing this driver to fail probe, and thus boot
        to fail because clks are essential for most drivers. The fix is
        simple, don't use clkdev because this is a DT based system where
        clkdev isn't used"
      
      * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux:
        clk: sifive: Do not register clkdevs for PRCI clocks
      771ed661
    • Linus Torvalds's avatar
      Merge tag '6.10-rc2-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6 · c5dbc2ed
      Linus Torvalds authored
      Pull smb client fixes from Steve French:
       "Two small smb3 client fixes:
      
         - fix deadlock in umount
      
         - minor cleanup due to netfs change"
      
      * tag '6.10-rc2-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6:
        cifs: Don't advance the I/O iterator before terminating subrequest
        smb: client: fix deadlock in smb2_find_smb_tcon()
      c5dbc2ed
  6. 08 Jun, 2024 8 commits
  7. 07 Jun, 2024 10 commits