Skip to content
Snippets Groups Projects
  1. Oct 02, 2024
    • Al Viro's avatar
      move asm/unaligned.h to linux/unaligned.h · 5f60d5f6
      Al Viro authored
      asm/unaligned.h is always an include of asm-generic/unaligned.h;
      might as well move that thing to linux/unaligned.h and include
      that - there's nothing arch-specific in that header.
      
      auto-generated by the following:
      
      for i in `git grep -l -w asm/unaligned.h`; do
      	sed -i -e "s/asm\/unaligned.h/linux\/unaligned.h/" $i
      done
      for i in `git grep -l -w asm-generic/unaligned.h`; do
      	sed -i -e "s/asm-generic\/unaligned.h/linux\/unaligned.h/" $i
      done
      git mv include/asm-generic/unaligned.h include/linux/unaligned.h
      git mv tools/include/asm-generic/unaligned.h tools/include/linux/unaligned.h
      sed -i -e "/unaligned.h/d" include/asm-generic/Kbuild
      sed -i -e "s/__ASM_GENERIC/__LINUX/" include/linux/unaligned.h tools/include/linux/unaligned.h
      5f60d5f6
  2. Sep 23, 2024
  3. Sep 20, 2024
  4. Sep 16, 2024
  5. Sep 13, 2024
  6. Sep 12, 2024
  7. Aug 30, 2024
    • Christophe Leroy's avatar
      selftests: vDSO: fix include order in build of test_vdso_chacha · f8d92fc5
      Christophe Leroy authored and Jason A. Donenfeld's avatar Jason A. Donenfeld committed
      
      Building test_vdso_chacha currently leads to following issue:
      
        In file included from /home/chleroy/linux-powerpc/include/linux/limits.h:7,
                         from /opt/powerpc64-e5500--glibc--stable-2024.02-1/powerpc64-buildroot-linux-gnu/sysroot/usr/include/bits/local_lim.h:38,
                         from /opt/powerpc64-e5500--glibc--stable-2024.02-1/powerpc64-buildroot-linux-gnu/sysroot/usr/include/bits/posix1_lim.h:161,
                         from /opt/powerpc64-e5500--glibc--stable-2024.02-1/powerpc64-buildroot-linux-gnu/sysroot/usr/include/limits.h:195,
                         from /opt/powerpc64-e5500--glibc--stable-2024.02-1/lib/gcc/powerpc64-buildroot-linux-gnu/12.3.0/include-fixed/limits.h:203,
                         from /opt/powerpc64-e5500--glibc--stable-2024.02-1/lib/gcc/powerpc64-buildroot-linux-gnu/12.3.0/include-fixed/syslimits.h:7,
                         from /opt/powerpc64-e5500--glibc--stable-2024.02-1/lib/gcc/powerpc64-buildroot-linux-gnu/12.3.0/include-fixed/limits.h:34,
                         from /tmp/sodium/usr/local/include/sodium/export.h:7,
                         from /tmp/sodium/usr/local/include/sodium/crypto_stream_chacha20.h:14,
                         from vdso_test_chacha.c:6:
        /opt/powerpc64-e5500--glibc--stable-2024.02-1/powerpc64-buildroot-linux-gnu/sysroot/usr/include/bits/xopen_lim.h:99:6: error: missing binary operator before token "("
           99 | # if INT_MAX == 32767
              |      ^~~~~~~
        /opt/powerpc64-e5500--glibc--stable-2024.02-1/powerpc64-buildroot-linux-gnu/sysroot/usr/include/bits/xopen_lim.h:102:7: error: missing binary operator before token "("
          102 | #  if INT_MAX == 2147483647
              |       ^~~~~~~
        /opt/powerpc64-e5500--glibc--stable-2024.02-1/powerpc64-buildroot-linux-gnu/sysroot/usr/include/bits/xopen_lim.h:126:6: error: missing binary operator before token "("
          126 | # if LONG_MAX == 2147483647
              |      ^~~~~~~~
      
      This is due to kernel include/linux/limits.h being included instead of
      libc's limits.h.
      
      This is because directory include/ is added through option -isystem so
      it goes prior to glibc's include directory.
      
      Replace -isystem by -idirafter.
      
      But this implies that now tools/include/linux/linkage.h is included
      instead of include/linux/linkage.h, so define a stub for
      SYM_FUNC_START() and SYM_FUNC_END().
      
      Signed-off-by: default avatarChristophe Leroy <christophe.leroy@csgroup.eu>
      Signed-off-by: default avatarJason A. Donenfeld <Jason@zx2c4.com>
      f8d92fc5
  8. Aug 29, 2024
    • James Clark's avatar
      perf: cs-etm: Support version 0.1 of HW_ID packets · 1506af6d
      James Clark authored
      
      v0.1 HW_ID packets have a new field that describes which sink each CPU
      writes to. Use the sink ID to link trace ID maps to each other so that
      mappings are shared wherever the sink is shared.
      
      Also update the error message to show that overlapping IDs aren't an
      error in per-thread mode, just not supported. In the future we can
      use the CPU ID from the AUX records, or watch for changing sink IDs on
      HW_ID packets to use the correct decoders.
      
      Reviewed-by: default avatarMike Leach <mike.leach@linaro.org>
      Signed-off-by: default avatarJames Clark <james.clark@arm.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Alexandre Torgue <alexandre.torgue@foss.st.com>
      Cc: Anshuman Khandual <anshuman.khandual@arm.com>
      Cc: Ganapatrao Kulkarni <gankulkarni@os.amperecomputing.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: John Garry <john.g.garry@oracle.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Leo Yan <leo.yan@linux.dev>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Suzuki Poulouse <suzuki.poulose@arm.com>
      Cc: Will Deacon <will@kernel.org>
      Link: https://lore.kernel.org/r/20240722101202.26915-7-james.clark@linaro.org
      
      
      Signed-off-by: default avatarJames Clark <james.clark@linaro.org>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      1506af6d
  9. Aug 23, 2024
  10. Aug 16, 2024
  11. Aug 12, 2024
  12. Aug 11, 2024
  13. Aug 10, 2024
  14. Aug 09, 2024
  15. Aug 08, 2024
  16. Aug 07, 2024
    • Namhyung Kim's avatar
      tools/include: Sync filesystem headers with the kernel sources · 845295f4
      Namhyung Kim authored
      
      To pick up changes from:
      
        0f9ca80f fs: Add initial atomic write support info to statx
        f9af549d fs: export mount options via statmount()
        0a3deb11 fs: Allow listmount() in foreign mount namespace
        09b31295 fs: export the mount ns id via statmount
        d04bccd8 listmount: allow listing in reverse order
        bfc69fd0 fs/procfs: add build ID fetching to PROCMAP_QUERY API
        ed5d583a fs/procfs: implement efficient VMA querying API for /proc/<pid>/maps
      
      This should be used to beautify FS syscall arguments and it addresses
      these tools/perf build warnings:
      
        Warning: Kernel ABI header differences:
        diff -u tools/include/uapi/linux/stat.h include/uapi/linux/stat.h
        diff -u tools/perf/trace/beauty/include/uapi/linux/fs.h include/uapi/linux/fs.h
        diff -u tools/perf/trace/beauty/include/uapi/linux/mount.h include/uapi/linux/mount.h
        diff -u tools/perf/trace/beauty/include/uapi/linux/stat.h include/uapi/linux/stat.h
      
      Please see tools/include/uapi/README for details (it's in the first patch
      of this series).
      
      Cc: Alexander Viro <viro@zeniv.linux.org.uk>
      Cc: Christian Brauner <brauner@kernel.org>
      Cc: Jan Kara <jack@suse.cz>
      Cc: linux-fsdevel@vger.kernel.org
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      845295f4
    • Namhyung Kim's avatar
      tools/include: Sync network socket headers with the kernel sources · ed86525f
      Namhyung Kim authored
      
      To pick up changes from:
      
        d25a92cc net/smc: Introduce IPPROTO_SMC
        060f4ba6 io_uring/net: move charging socket out of zc io_uring
        bb6aaf73 net: Split a __sys_listen helper for io_uring
        dc2e7797 net: Split a __sys_bind helper for io_uring
      
      This should be used to beautify socket syscall arguments and it addresses
      these tools/perf build warnings:
      
        Warning: Kernel ABI header differences:
        diff -u tools/include/uapi/linux/in.h include/uapi/linux/in.h
        diff -u tools/perf/trace/beauty/include/linux/socket.h include/linux/socket.h
      
      Please see tools/include/uapi/README for details (it's in the first patch
      of this series).
      
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Eric Dumazet <edumazet@google.com>
      Cc: Jakub Kicinski <kuba@kernel.org>
      Cc: Paolo Abeni <pabeni@redhat.com>
      Cc: netdev@vger.kernel.org
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      ed86525f
    • Namhyung Kim's avatar
      tools/include: Sync uapi/asm-generic/unistd.h with the kernel sources · 568901e7
      Namhyung Kim authored
      
      And arch syscall tables to pick up changes from:
      
        b1e31c13 powerpc: restore some missing spu syscalls
        d3882564 syscalls: fix compat_sys_io_pgetevents_time64 usage
        54233a42 uretprobe: change syscall number, again
        63ded110 uprobe: Change uretprobe syscall scope and number
        9142be9e x86/syscall: Mark exit[_group] syscall handlers __noreturn
        9aae1baa x86, arm: Add missing license tag to syscall tables files
        5c28424e syscalls: Fix to add sys_uretprobe to syscall.tbl
        190fec72 uprobe: Wire up uretprobe system call
      
      This should be used to beautify syscall arguments and it addresses
      these tools/perf build warnings:
      
        Warning: Kernel ABI header differences:
        diff -u tools/include/uapi/asm-generic/unistd.h include/uapi/asm-generic/unistd.h
        diff -u tools/perf/arch/x86/entry/syscalls/syscall_64.tbl arch/x86/entry/syscalls/syscall_64.tbl
        diff -u tools/perf/arch/powerpc/entry/syscalls/syscall.tbl arch/powerpc/kernel/syscalls/syscall.tbl
        diff -u tools/perf/arch/s390/entry/syscalls/syscall.tbl arch/s390/kernel/syscalls/syscall.tbl
      
      Please see tools/include/uapi/README for details (it's in the first patch
      of this series).
      
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: linux-arch@vger.kernel.org
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      568901e7
  17. Aug 06, 2024
  18. Jul 31, 2024
    • Athira Rajeev's avatar
      perf annotate: Add disasm_line__parse() to parse raw instruction for powerpc · 06dd4c5a
      Athira Rajeev authored
      
      Currently, the perf tool infrastructure uses the disasm_line__parse
      function to parse disassembled line.
      
      Example snippet from objdump:
      
        objdump  --start-address=<address> --stop-address=<address>  -d --no-show-raw-insn -C <vmlinux>
      
        c0000000010224b4:	lwz     r10,0(r9)
      
      This line "lwz r10,0(r9)" is parsed to extract instruction name,
      registers names and offset.
      
      In powerpc, the approach for data type profiling uses raw instruction
      instead of result from objdump to identify the instruction category and
      extract the source/target registers.
      
      Example: 38 01 81 e8     ld      r4,312(r1)
      
      Here "38 01 81 e8" is the raw instruction representation. Add function
      "disasm_line__parse_powerpc" to handle parsing of raw instruction.
      Also update "struct disasm_line" to save the binary code/
      With the change, function captures:
      
      line -> "38 01 81 e8     ld      r4,312(r1)"
      raw instruction "38 01 81 e8"
      
      Raw instruction is used later to extract the reg/offset fields. Macros
      are added to extract opcode and register fields. "struct disasm_line"
      is updated to carry union of "bytes" and "raw_insn" of 32 bit to carry raw
      code (raw).
      
      Function "disasm_line__parse_powerpc fills the raw instruction hex value
      and can use macros to get opcode. There is no changes in existing code
      paths, which parses the disassembled code.  The size of raw instruction
      depends on architecture.
      
      In case of powerpc, the parsing the disasm line needs to handle cases
      for reading binary code directly from DSO as well as parsing the objdump
      result. Hence adding the logic into separate function instead of
      updating "disasm_line__parse".  The architecture using the instruction
      name and present approach is not altered. Since this approach targets
      powerpc, the macro implementation is added for powerpc as of now.
      
      Since the disasm_line__parse is used in other cases (perf annotate) and
      not only data tye profiling, the powerpc callback includes changes to
      work with binary code as well as mnemonic representation.
      
      Also in case if the DSO read fails and libcapstone is not supported, the
      approach fallback to use objdump as option. Hence as option, patch has
      changes to ensure objdump option also works well.
      
      Reviewed-by: default avatarKajol Jain <kjain@linux.ibm.com>
      Reviewed-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Signed-off-by: default avatarAthira Rajeev <atrajeev@linux.vnet.ibm.com>
      Tested-by: default avatarKajol Jain <kjain@linux.ibm.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Akanksha J N <akanksha@linux.ibm.com>
      Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
      Cc: Disha Goel <disgoel@linux.vnet.ibm.com>
      Cc: Hari Bathini <hbathini@linux.ibm.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Madhavan Srinivasan <maddy@linux.ibm.com>
      Cc: Segher Boessenkool <segher@kernel.crashing.org>
      Link: https://lore.kernel.org/lkml/20240718084358.72242-5-atrajeev@linux.vnet.ibm.com
      
      
      [ Add check for strndup() result ]
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      06dd4c5a
  19. Jul 29, 2024
Loading