1. 02 Jul, 2022 5 commits
    • Linus Torvalds's avatar
      Merge tag 'perf-tools-fixes-for-v5.19-2022-07-02' of... · bb7c5126
      Linus Torvalds authored
      Merge tag 'perf-tools-fixes-for-v5.19-2022-07-02' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux
      
      Pull perf tools fixes from Arnaldo Carvalho de Melo:
      
       - BPF program info linear (BPIL) data is accessed assuming 64-bit
         alignment resulting in undefined behavior as the data is just byte
         aligned. Fix it, Found using -fsanitize=undefined.
      
       - Fix 'perf offcpu' build on old kernels wrt task_struct's
         state/__state field.
      
       - Fix perf_event_attr.sample_type setting on the 'offcpu-time' event
         synthesized by the 'perf offcpu' tool.
      
       - Don't bail out when synthesizing PERF_RECORD_ events for pre-existing
         threads when one goes away while parsing its procfs entries.
      
       - Don't sort the task scan result from /proc, its not needed and
         introduces bugs when the main thread isn't the first one to be
         processed.
      
       - Fix uninitialized 'offset' variable on aarch64 in the unwind code.
      
       - Sync KVM headers with the kernel sources.
      
      * tag 'perf-tools-fixes-for-v5.19-2022-07-02' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux:
        perf synthetic-events: Ignore dead threads during event synthesis
        perf synthetic-events: Don't sort the task scan result from /proc
        perf unwind: Fix unitialized 'offset' variable on aarch64
        tools headers UAPI: Sync linux/kvm.h with the kernel sources
        perf bpf: 8 byte align bpil data
        tools kvm headers arm64: Update KVM headers from the kernel sources
        perf offcpu: Accept allowed sample types only
        perf offcpu: Fix build failure on old kernels
      bb7c5126
    • Linus Torvalds's avatar
      Merge tag 'powerpc-5.19-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux · 5411de07
      Linus Torvalds authored
      Pull powerpc fixes from Michael Ellerman:
      
       - Fix BPF uapi confusion about the correct type of bpf_user_pt_regs_t.
      
       - Fix virt_addr_valid() when memory is hotplugged above the boot-time
         high_memory value.
      
       - Fix a bug in 64-bit Book3E map_kernel_page() which would incorrectly
         allocate a PMD page at PUD level.
      
       - Fix a couple of minor issues found since we enabled KASAN for 64-bit
         Book3S.
      
      Thanks to Aneesh Kumar K.V, Cédric Le Goater, Christophe Leroy, Kefeng
      Wang, Liam Howlett, Nathan Lynch, and Naveen N. Rao.
      
      * tag 'powerpc-5.19-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
        powerpc/memhotplug: Add add_pages override for PPC
        powerpc/bpf: Fix use of user_pt_regs in uapi
        powerpc/prom_init: Fix kernel config grep
        powerpc/book3e: Fix PUD allocation size in map_kernel_page()
        powerpc/xive/spapr: correct bitmap allocation size
      5411de07
    • Namhyung Kim's avatar
      perf synthetic-events: Ignore dead threads during event synthesis · ff898552
      Namhyung Kim authored
      When it synthesize various task events, it scans the list of task
      first and then accesses later.  There's a window threads can die
      between the two and proc entries may not be available.
      
      Instead of bailing out, we can ignore that thread and move on.
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lore.kernel.org/lkml/20220701205458.985106-2-namhyung@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      ff898552
    • Namhyung Kim's avatar
      perf synthetic-events: Don't sort the task scan result from /proc · 363afa3a
      Namhyung Kim authored
      It should not sort the result as procfs already returns a proper
      ordering of tasks.  Actually sorting the order caused problems that it
      doesn't guararantee to process the main thread first.
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lore.kernel.org/lkml/20220701205458.985106-1-namhyung@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      363afa3a
    • Ivan Babrou's avatar
      perf unwind: Fix unitialized 'offset' variable on aarch64 · 5eb502b2
      Ivan Babrou authored
      Commit dc2cf4ca ("perf unwind: Fix segbase for ld.lld linked
      objects") uncovered the following issue on aarch64:
      
          util/unwind-libunwind-local.c: In function 'find_proc_info':
          util/unwind-libunwind-local.c:386:28: error: 'offset' may be used uninitialized in this function [-Werror=maybe-uninitialized]
          386 |                         if (ofs > 0) {
              |                            ^
          util/unwind-libunwind-local.c:199:22: note: 'offset' was declared here
          199 |         u64 address, offset;
              |                      ^~~~~~
          util/unwind-libunwind-local.c:371:20: error: 'offset' may be used uninitialized in this function [-Werror=maybe-uninitialized]
          371 |                 if (ofs <= 0) {
              |                    ^
          util/unwind-libunwind-local.c:199:22: note: 'offset' was declared here
          199 |         u64 address, offset;
              |                      ^~~~~~
          util/unwind-libunwind-local.c:363:20: error: 'offset' may be used uninitialized in this function [-Werror=maybe-uninitialized]
          363 |                 if (ofs <= 0) {
              |                    ^
          util/unwind-libunwind-local.c:199:22: note: 'offset' was declared here
          199 |         u64 address, offset;
              |                      ^~~~~~
          In file included from util/libunwind/arm64.c:37:
      
      Fixes: dc2cf4ca ("perf unwind: Fix segbase for ld.lld linked objects")
      Signed-off-by: default avatarIvan Babrou <ivan@cloudflare.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Fangrui Song <maskray@google.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: James Clark <james.clark@arm.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: kernel-team@cloudflare.com
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lore.kernel.org/lkml/20220701182046.12589-1-ivan@cloudflare.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      5eb502b2
  2. 01 Jul, 2022 18 commits
  3. 30 Jun, 2022 17 commits