1. 08 Aug, 2024 1 commit
    • Ian Rogers's avatar
      perf hist: Fix reference counting of branch_info · b2f70c99
      Ian Rogers authored
      iter_finish_branch_entry() doesn't put the branch_info from/to map
      elements creating memory leaks. This can be seen with:
      
      ```
      $ perf record -e cycles -b perf test -w noploop
      $ perf report -D
      ...
      Direct leak of 984344 byte(s) in 123043 object(s) allocated from:
          #0 0x7fb2654f3bd7 in malloc libsanitizer/asan/asan_malloc_linux.cpp:69
          #1 0x564d3400d10b in map__get util/map.h:186
          #2 0x564d3400d10b in ip__resolve_ams util/machine.c:1981
          #3 0x564d34014d81 in sample__resolve_bstack util/machine.c:2151
          #4 0x564d34094790 in iter_prepare_branch_entry util/hist.c:898
          #5 0x564d34098fa4 in hist_entry_iter__add util/hist.c:1238
          #6 0x564d33d1f0c7 in process_sample_event tools/perf/builtin-report.c:334
          #7 0x564d34031eb7 in perf_session__deliver_event util/session.c:1655
          #8 0x564d3403ba52 in do_flush util/ordered-events.c:245
          #9 0x564d3403ba52 in __ordered_events__flush util/ordered-events.c:324
          #10 0x564d3402d32e in perf_session__process_user_event util/session.c:1708
          #11 0x564d34032480 in perf_session__process_event util/session.c:1877
          #12 0x564d340336ad in reader__read_event util/session.c:2399
          #13 0x564d34033fdc in reader__process_events util/session.c:2448
          #14 0x564d34033fdc in __perf_session__process_events util/session.c:2495
          #15 0x564d34033fdc in perf_session__process_events util/session.c:2661
          #16 0x564d33d27113 in __cmd_report tools/perf/builtin-report.c:1065
          #17 0x564d33d27113 in cmd_report tools/perf/builtin-report.c:1805
          #18 0x564d33e0ccb7 in run_builtin tools/perf/perf.c:350
          #19 0x564d33e0d45e in handle_internal_command tools/perf/perf.c:403
          #20 0x564d33cdd827 in run_argv tools/perf/perf.c:447
          #21 0x564d33cdd827 in main tools/perf/perf.c:561
      ...
      ```
      
      Clearing up the map_symbols properly creates maps reference count
      issues so resolve those. Resolving this issue doesn't improve peak
      heap consumption for the test above.
      
      Committer testing:
      
        $ sudo dnf install libasan
        $ make -k CORESIGHT=1 EXTRA_CFLAGS="-fsanitize=address" CC=clang O=/tmp/build/$(basename $PWD)/ -C tools/perf install-bin
      Reviewed-by: default avatarKan Liang <kan.liang@linux.intel.com>
      Signed-off-by: default avatarIan Rogers <irogers@google.com>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Sun Haiyong <sunhaiyong@loongson.cn>
      Cc: Yanteng Si <siyanteng@loongson.cn>
      Link: https://lore.kernel.org/r/20240807065136.1039977-1-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      b2f70c99
  2. 06 Aug, 2024 6 commits
    • Arnaldo Carvalho de Melo's avatar
      Merge remote-tracking branch 'torvalds/master' into perf-tools-next · 37ce8a56
      Arnaldo Carvalho de Melo authored
      To pick a patch that albeit being for tools/perf/ directory went thru a
      different tree and ended up breaking some recent tests introduced in the
      perf-tools-next tree to validate duplicate events in the JSON
      performance event files.
      
      Link: https://lore.kernel.org/lkml/ZrIqDMg7cBVhstYU@x1Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      37ce8a56
    • Linus Torvalds's avatar
      Merge tag 'platform-drivers-x86-v6.11-2' of... · eb5e56d1
      Linus Torvalds authored
      Merge tag 'platform-drivers-x86-v6.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86
      
      Pull x86 platform driver fixes from Ilpo Järvinen:
       "Fixes:
      
         - Fix ACPI notifier racing with itself (intel-vbtn)
      
         - Initialize local variable to cover a timeout corner case
           (intel/ifs)
      
         - WMI docs spelling
      
        New device IDs:
      
         - amd/{pmc,pmf}: AMD 1Ah model 60h series.
      
         - amd/pmf: SPS quirk support for ASUS ROG Ally X"
      
      * tag 'platform-drivers-x86-v6.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86:
        platform/x86/intel/ifs: Initialize union ifs_status to zero
        platform/x86: msi-wmi-platform: Fix spelling mistakes
        platform/x86/amd/pmf: Add new ACPI ID AMDI0107
        platform/x86/amd/pmc: Send OS_HINT command for new AMD platform
        platform/x86/amd: pmf: Add quirk for ROG Ally X
        platform/x86: intel-vbtn: Protect ACPI notify handler against recursion
      eb5e56d1
    • Ian Rogers's avatar
      perf jevents.py: Ensure event names aren't duplicated · 4bd38039
      Ian Rogers authored
      Duplicate event names break invariants in 'perf list'. Assert that an
      event name isn't duplicated so that broken JSON won't build.
      Signed-off-by: default avatarIan Rogers <irogers@google.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Albert Ou <aou@eecs.berkeley.edu>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Atish Patra <atishp@rivosinc.com>
      Cc: Changbin Du <changbin.du@huawei.com>
      Cc: Charles Ci-Jyun Wu <dminus@andestech.com>
      Cc: Eric Lin <eric.lin@sifive.com>
      Cc: Greentime Hu <greentime.hu@sifive.com>
      Cc: Guilherme Amadio <amadio@gentoo.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Inochi Amaoto <inochiama@outlook.com>
      Cc: James Clark <james.clark@linaro.org>
      Cc: Ji Sheng Teoh <jisheng.teoh@starfivetech.com>
      Cc: Jing Zhang <renyu.zj@linux.alibaba.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: Locus Wei-Han Chen <locus84@andestech.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Mike Leach <mike.leach@linaro.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Palmer Dabbelt <palmer@dabbelt.com>
      Cc: Paul Walmsley <paul.walmsley@sifive.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Samuel Holland <samuel.holland@sifive.com>
      Cc: Sandipan Das <sandipan.das@amd.com>
      Cc: Vincent Chen <vincent.chen@sifive.com>
      Cc: Will Deacon <will@kernel.org>
      Cc: Xu Yang <xu.yang_2@nxp.com>
      Link: https://lore.kernel.org/r/20240805194424.597244-5-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      4bd38039
    • Ian Rogers's avatar
      perf pmu-events: Remove duplicated ampereone event · c4f74bb6
      Ian Rogers authored
      OP_SPEC is repeated twice in the file which will break invariants in
      'perf list' as discussed in this thread:
      
        https://lore.kernel.org/linux-perf-users/20240719081651.24853-1-eric.lin@sifive.com/Signed-off-by: default avatarIan Rogers <irogers@google.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Albert Ou <aou@eecs.berkeley.edu>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Atish Patra <atishp@rivosinc.com>
      Cc: Changbin Du <changbin.du@huawei.com>
      Cc: Charles Ci-Jyun Wu <dminus@andestech.com>
      Cc: Eric Lin <eric.lin@sifive.com>
      Cc: Greentime Hu <greentime.hu@sifive.com>
      Cc: Guilherme Amadio <amadio@gentoo.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Inochi Amaoto <inochiama@outlook.com>
      Cc: James Clark <james.clark@linaro.org>
      Cc: Ji Sheng Teoh <jisheng.teoh@starfivetech.com>
      Cc: Jing Zhang <renyu.zj@linux.alibaba.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: Locus Wei-Han Chen <locus84@andestech.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Mike Leach <mike.leach@linaro.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Palmer Dabbelt <palmer@dabbelt.com>
      Cc: Paul Walmsley <paul.walmsley@sifive.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Samuel Holland <samuel.holland@sifive.com>
      Cc: Sandipan Das <sandipan.das@amd.com>
      Cc: Vincent Chen <vincent.chen@sifive.com>
      Cc: Will Deacon <will@kernel.org>
      Cc: Xu Yang <xu.yang_2@nxp.com>
      Link: https://lore.kernel.org/r/20240805194424.597244-3-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      c4f74bb6
    • Ian Rogers's avatar
      perf pmu-events: Change dependencies for empty-pmu-events.c test · b79f9a43
      Ian Rogers authored
      Switch from $? (all the prerequisites that are newer than the target)
      to $^ (all the prerequisites) as touching jevents.py will mean that
      empty-pmu-events.c won't be passed to the diff command breaking the
      build.
      Reported-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: default avatarIan Rogers <irogers@google.com>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Albert Ou <aou@eecs.berkeley.edu>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Atish Patra <atishp@rivosinc.com>
      Cc: Changbin Du <changbin.du@huawei.com>
      Cc: Charles Ci-Jyun Wu <dminus@andestech.com>
      Cc: Eric Lin <eric.lin@sifive.com>
      Cc: Greentime Hu <greentime.hu@sifive.com>
      Cc: Guilherme Amadio <amadio@gentoo.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Inochi Amaoto <inochiama@outlook.com>
      Cc: James Clark <james.clark@linaro.org>
      Cc: Ji Sheng Teoh <jisheng.teoh@starfivetech.com>
      Cc: Jing Zhang <renyu.zj@linux.alibaba.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: Locus Wei-Han Chen <locus84@andestech.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Mike Leach <mike.leach@linaro.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Palmer Dabbelt <palmer@dabbelt.com>
      Cc: Paul Walmsley <paul.walmsley@sifive.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Samuel Holland <samuel.holland@sifive.com>
      Cc: Sandipan Das <sandipan.das@amd.com>
      Cc: Vincent Chen <vincent.chen@sifive.com>
      Cc: Will Deacon <will@kernel.org>
      Cc: Xu Yang <xu.yang_2@nxp.com>
      Link: https://lore.kernel.org/r/20240805194424.597244-2-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      b79f9a43
    • Ian Rogers's avatar
      perf test: Add build test for JEVENTS_ARCH=all · 2576b20a
      Ian Rogers authored
      Building with JEVENTS_ARCH=all builds all CPU types and allows things
      like assertions to check the validity of the input JSON.
      Signed-off-by: default avatarIan Rogers <irogers@google.com>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Albert Ou <aou@eecs.berkeley.edu>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Atish Patra <atishp@rivosinc.com>
      Cc: Changbin Du <changbin.du@huawei.com>
      Cc: Charles Ci-Jyun Wu <dminus@andestech.com>
      Cc: Eric Lin <eric.lin@sifive.com>
      Cc: Greentime Hu <greentime.hu@sifive.com>
      Cc: Guilherme Amadio <amadio@gentoo.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Inochi Amaoto <inochiama@outlook.com>
      Cc: James Clark <james.clark@linaro.org>
      Cc: Ji Sheng Teoh <jisheng.teoh@starfivetech.com>
      Cc: Jing Zhang <renyu.zj@linux.alibaba.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: Locus Wei-Han Chen <locus84@andestech.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Mike Leach <mike.leach@linaro.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Palmer Dabbelt <palmer@dabbelt.com>
      Cc: Paul Walmsley <paul.walmsley@sifive.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Samuel Holland <samuel.holland@sifive.com>
      Cc: Sandipan Das <sandipan.das@amd.com>
      Cc: Vincent Chen <vincent.chen@sifive.com>
      Cc: Will Deacon <will@kernel.org>
      Cc: Xu Yang <xu.yang_2@nxp.com>
      Link: https://lore.kernel.org/r/20240805194424.597244-1-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      2576b20a
  3. 05 Aug, 2024 11 commits
    • Linus Torvalds's avatar
      Merge tag 'linux_kselftest-fixes-6.11-rc3' of... · b446a2da
      Linus Torvalds authored
      Merge tag 'linux_kselftest-fixes-6.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
      
      Pull kselftest fix from Shuah Khan:
       "A single fix to the conditional in ksft.py script which incorrectly
        flags a test suite failed when there are skipped tests in the mix.
      
        The logic is fixed to take skipped tests into account and report the
        test as passed"
      
      * tag 'linux_kselftest-fixes-6.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest:
        selftests: ksft: Fix finished() helper exit code on skipped tests
      b446a2da
    • Namhyung Kim's avatar
      perf annotate: Add --skip-empty option · ce533c9b
      Namhyung Kim authored
      Like in 'perf report', we want to hide empty events in the 'perf annotate'
      output.  This is consistent when the option is set in perf report.
      
      For example, the following command would use 3 events including dummy.
      
        $ perf mem record -a -- perf test -w noploop
      
        $ perf evlist
        cpu/mem-loads,ldlat=30/P
        cpu/mem-stores/P
        dummy:u
      
      Just using perf annotate with --group will show the all 3 events.
      
        $ perf annotate --group --stdio | head
         Percent                 |	Source code & Disassembly of ...
        --------------------------------------------------------------
                                 : 0     0xe060 <_dl_relocate_object>:
            0.00    0.00    0.00 :    e060:       pushq   %rbp
            0.00    0.00    0.00 :    e061:       movq    %rsp, %rbp
            0.00    0.00    0.00 :    e064:       pushq   %r15
            0.00    0.00    0.00 :    e066:       movq    %rdi, %r15
            0.00    0.00    0.00 :    e069:       pushq   %r14
            0.00    0.00    0.00 :    e06b:       pushq   %r13
            0.00    0.00    0.00 :    e06d:       movl    %edx, %r13d
      
      Now with --skip-empty, it'll hide the last dummy event.
      
        $ perf annotate --group --stdio --skip-empty | head
         Percent         |	Source code & Disassembly of ...
        ------------------------------------------------------
                         : 0     0xe060 <_dl_relocate_object>:
            0.00    0.00 :    e060:       pushq   %rbp
            0.00    0.00 :    e061:       movq    %rsp, %rbp
            0.00    0.00 :    e064:       pushq   %r15
            0.00    0.00 :    e066:       movq    %rdi, %r15
            0.00    0.00 :    e069:       pushq   %r14
            0.00    0.00 :    e06b:       pushq   %r13
            0.00    0.00 :    e06d:       movl    %edx, %r13d
      
      Committer testing:
      
        root@x1:~# perf evlist
        cpu_atom/mem-loads,ldlat=30/P
        cpu_atom/mem-stores/P
        dummy:u
        root@x1:~#
      
      Before:
      
        root@x1:~# perf annotate --group --stdio2 do_lookup_x | head -25
        Samples: 20  of events 'cpu_atom/mem-loads,ldlat=30/P, cpu_atom/mem-stores/P, dummy:u', 4000 Hz, Event count (approx.): 769079, [percent: local period]
        do_lookup_x() /usr/lib64/ld-linux-x86-64.so.2
        Percent                       0x9900 <do_lookup_x>:
                                        pushq      %rbp
                                        movq       %rsp,%rbp
                                        pushq      %r15
                                        pushq      %r14
                                        pushq      %r13
                                        pushq      %r12
                                        pushq      %rbx
                                        subq       $0x88,%rsp
                                        movq       %rdi,-0x50(%rbp)
                                        movl       8(%r9),%edi
                                        movq       0x10(%rbp),%r12
                                        movq       0x28(%rbp),%r10
                                        movq       %rdx,-0x70(%rbp)
                                        movq       %rcx,-0x58(%rbp)
                                        movq       %rdi,%r11
           0.00    5.73    0.00         movq       %r8,-0x68(%rbp)
                                        movq       (%r9),%r8
                                        movl       %esi,%eax
           8.30    0.00    0.00         movl       0x30(%rbp),%r9d
                                        movl       %esi,%r15d
                                        shrl       $6, %eax
                                        movq       %r8,%r13
        root@x1:~#
      
      After:
      
        root@x1:~# perf annotate --group --skip-empty --stdio2 do_lookup_x | head -25
        Samples: 20  of events 'cpu_atom/mem-loads,ldlat=30/P, cpu_atom/mem-stores/P', 4000 Hz, Event count (approx.): 769079, [percent: local period]
        do_lookup_x() /usr/lib64/ld-linux-x86-64.so.2
        Percent               0x9900 <do_lookup_x>:
                                pushq      %rbp
                                movq       %rsp,%rbp
                                pushq      %r15
                                pushq      %r14
                                pushq      %r13
                                pushq      %r12
                                pushq      %rbx
                                subq       $0x88,%rsp
                                movq       %rdi,-0x50(%rbp)
                                movl       8(%r9),%edi
                                movq       0x10(%rbp),%r12
                                movq       0x28(%rbp),%r10
                                movq       %rdx,-0x70(%rbp)
                                movq       %rcx,-0x58(%rbp)
                                movq       %rdi,%r11
           0.00    5.73         movq       %r8,-0x68(%rbp)
                                movq       (%r9),%r8
                                movl       %esi,%eax
           8.30    0.00         movl       0x30(%rbp),%r9d
                                movl       %esi,%r15d
                                shrl       $6, %eax
                                movq       %r8,%r13
        root@x1:~#
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: https://lore.kernel.org/r/20240803211332.1107222-6-namhyung@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      ce533c9b
    • Namhyung Kim's avatar
      perf annotate: Set al->data_nr using the notes->src->nr_events · bb588e38
      Namhyung Kim authored
      This is a preparation to support skipping empty events.
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: https://lore.kernel.org/r/20240803211332.1107222-5-namhyung@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      bb588e38
    • Namhyung Kim's avatar
      perf annotate: Use annotation__pcnt_width() consistently · b00e4d0d
      Namhyung Kim authored
      The annotation__pcnt_width() calculates the screen width for the
      overhead (percent) area considering event groups properly.  Use this
      function consistently so that we can make sure it has similar output
      in different modes.  But there's a difference in stdio and tui output:
      stdio uses 8 and tui uses 7 for a percent.
      
      Let's use 8 and adjust the print width in __annotation_line__write()
      properly.
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: https://lore.kernel.org/r/20240803211332.1107222-4-namhyung@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      b00e4d0d
    • Namhyung Kim's avatar
      perf annotate: Set notes->src->nr_events early · cb1e8bfc
      Namhyung Kim authored
      We want to use it in different places so make sure it sets properly
      in symbol__annotate() before creating the disasm lines.
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: https://lore.kernel.org/r/20240803211332.1107222-3-namhyung@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      cb1e8bfc
    • Namhyung Kim's avatar
      perf annotate: Use al->data_nr if possible · 2dc02c26
      Namhyung Kim authored
      The data_nr keeps the number of entries in al->data[] so it should use
      it when it iterates the array.  The notes->src->nr_events should have
      the same number but it'd be natural to use al->data_nr.
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: https://lore.kernel.org/r/20240803211332.1107222-2-namhyung@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      2dc02c26
    • Linus Torvalds's avatar
      Merge tag 'slab-fixes-for-6.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab · c813111d
      Linus Torvalds authored
      Pull slab fix from Vlastimil Babka:
       "Since v6.8 we've had a subtle breakage in SLUB with KFENCE enabled,
        that can cause a crash. It hasn't been found earlier due to quite
        specific conditions necessary (OOM during kmem_cache_alloc_bulk())"
      
      * tag 'slab-fixes-for-6.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab:
        mm, slub: do not call do_slab_free for kfence object
      c813111d
    • Brian Norris's avatar
      tools build: Correct bpf fixdep dependencies · dbb2a7a9
      Brian Norris authored
      The dependencies in tools/lib/bpf/Makefile are incorrect. Before we
      recurse to build $(BPF_IN_STATIC), we need to build its 'fixdep'
      executable.
      
      I can't use the usual shortcut from Makefile.include:
      
        <target>: <sources> fixdep
      
      because its 'fixdep' target relies on $(OUTPUT), and $(OUTPUT) differs
      in the parent 'make' versus the child 'make' -- so I imitate it via
      open-coding.
      
      I tweak a few $(MAKE) invocations while I'm at it, because
      1. I'm adding a new recursive make; and
      2. these recursive 'make's print spurious lines about files that are "up
         to date" (which isn't normally a feature in Kbuild subtargets) or
         "jobserver not available" (see [1])
      
      I also need to tweak the assignment of the OUTPUT variable, so that
      relative path builds work. For example, for 'make tools/lib/bpf', OUTPUT
      is unset, and is usually treated as "cwd" -- but recursive make will
      change cwd and so OUTPUT has a new meaning. For consistency, I ensure
      OUTPUT is always an absolute path.
      
      And $(Q) gets a backup definition in tools/build/Makefile.include,
      because Makefile.include is sometimes included without
      tools/build/Makefile, so the "quiet command" stuff doesn't actually work
      consistently without it.
      
      After this change, top-level builds result in an empty grep result from:
      
        $ grep 'cannot find fixdep' $(find tools/ -name '*.cmd')
      
      [1] https://www.gnu.org/software/make/manual/html_node/MAKE-Variable.html
      If we're not using $(MAKE) directly, then we need to use more '+'.
      Signed-off-by: default avatarBrian Norris <briannorris@chromium.org>
      Acked-by: default avatarAndrii Nakryiko <andrii@kernel.org>
      Acked-by: default avatarJiri Olsa <jolsa@kernel.org>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Josh Poimboeuf <jpoimboe@kernel.org>
      Cc: Masahiro Yamada <masahiroy@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Richter <tmricht@linux.ibm.com>
      Link: https://lore.kernel.org/r/20240715203325.3832977-4-briannorris@chromium.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      dbb2a7a9
    • Brian Norris's avatar
      tools build: Avoid circular .fixdep-in.o.cmd issues · ea974028
      Brian Norris authored
      The 'fixdep' tool is used to post-process dependency files for various
      reasons, and it runs after every object file generation command. This
      even includes 'fixdep' itself.
      
      In Kbuild, this isn't actually a problem, because it uses a single
      command to generate fixdep (a compile-and-link command on fixdep.c), and
      afterward runs the fixdep command on the accompanying .fixdep.cmd file.
      
      In tools/ builds (which notably is maintained separately from Kbuild),
      fixdep is generated in several phases:
      
       1. fixdep.c -> fixdep-in.o
       2. fixdep-in.o -> fixdep
      
      Thus, fixdep is not available in the post-processing for step 1, and
      instead, we generate .cmd files that look like:
      
        ## from tools/objtool/libsubcmd/.fixdep.o.cmd
        # cannot find fixdep (/path/to/linux/tools/objtool/libsubcmd//fixdep)
        [...]
      
      These invalid .cmd files are benign in some respects, but cause problems
      in others (such as the linked reports).
      
      Because the tools/ build system is rather complicated in its own right
      (and pointedly different than Kbuild), I choose to simply open-code the
      rule for building fixdep, and avoid the recursive-make indirection that
      produces the problem in the first place.
      Signed-off-by: default avatarBrian Norris <briannorris@chromium.org>
      Acked-by: default avatarJiri Olsa <jolsa@kernel.org>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Josh Poimboeuf <jpoimboe@kernel.org>
      Cc: Masahiro Yamada <masahiroy@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Richter <tmricht@linux.ibm.com>
      Link: https://lore.kernel.org/all/Zk-C5Eg84yt6_nml@google.com/
      Link: https://lore.kernel.org/r/20240715203325.3832977-3-briannorris@chromium.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      ea974028
    • Brian Norris's avatar
      tools build: Correct libsubcmd fixdep dependencies · 96f30c8f
      Brian Norris authored
      All built targets need fixdep to be built first, before handling object
      dependencies [1]. We're missing one such dependency before the libsubcmd
      target.
      
      This resolves .cmd file generation issues such that the following
      sequence produces many fewer results:
      
        $ git clean -xfd tools/
        $ make tools/objtool
        $ grep "cannot find fixdep" $(find tools/objtool -name '*.cmd')
      
      In particular, only a buggy tools/objtool/libsubcmd/.fixdep.o.cmd
      remains, due to circular dependencies of fixdep on itself.
      
      Such incomplete .cmd files don't usually cause a direct problem, since
      they're designed to fail "open", but they can cause some subtle problems
      that would otherwise be handled by proper fixdep'd dependency files. [2]
      
      [1] This problem is better described in commit abb26210 ("perf
      tools: Force fixdep compilation at the start of the build"). I don't
      apply its solution here, because additional recursive make can be a bit
      of overkill.
      
      [2] Example failure case:
      
        cp -arl linux-src linux-src2
        cd linux-src2
        make O=/path/to/out
        cd ../linux-src
        rm -rf ../linux-src2
        make O=/path/to/out
      
      Previously, we'd see errors like:
      
        make[6]: *** No rule to make target
        '/path/to/linux-src2/tools/include/linux/compiler.h', needed by
        '/path/to/out/tools/bpf/resolve_btfids/libsubcmd/exec-cmd.o'.  Stop.
      
      Now, the properly-fixdep'd .cmd files will ignore a missing
      /path/to/linux-src2/...
      Signed-off-by: default avatarBrian Norris <briannorris@chromium.org>
      Acked-by: default avatarJiri Olsa <jolsa@kernel.org>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Josh Poimboeuf <jpoimboe@kernel.org>
      Cc: Masahiro Yamada <masahiroy@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Richter <tmricht@linux.ibm.com>
      Link: https://lore.kernel.org/all/ZGVi9HbI43R5trN8@bhelgaas/
      Link: https://lore.kernel.org/all/Zk-C5Eg84yt6_nml@google.com/
      Link: https://lore.kernel.org/r/20240715203325.3832977-2-briannorris@chromium.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      96f30c8f
    • Namhyung Kim's avatar
      perf mem: Update documentation for new options · 13159a13
      Namhyung Kim authored
      Add a common options section and move some items to the section.  Also
      add description of new options to report options.
      Suggested-by: default avatarIan Rogers <irogers@google.com>
      Reviewed-by: default avatarIan Rogers <irogers@google.com>
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: https://lore.kernel.org/lkml/20240802180913.1023886-1-namhyung@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      13159a13
  4. 04 Aug, 2024 11 commits
    • Linus Torvalds's avatar
      Linux 6.11-rc2 · de9c2c66
      Linus Torvalds authored
      de9c2c66
    • Tetsuo Handa's avatar
      profiling: remove profile=sleep support · b88f5538
      Tetsuo Handa authored
      The kernel sleep profile is no longer working due to a recursive locking
      bug introduced by commit 42a20f86 ("sched: Add wrapper for get_wchan()
      to keep task blocked")
      
      Booting with the 'profile=sleep' kernel command line option added or
      executing
      
        # echo -n sleep > /sys/kernel/profiling
      
      after boot causes the system to lock up.
      
      Lockdep reports
      
        kthreadd/3 is trying to acquire lock:
        ffff93ac82e08d58 (&p->pi_lock){....}-{2:2}, at: get_wchan+0x32/0x70
      
        but task is already holding lock:
        ffff93ac82e08d58 (&p->pi_lock){....}-{2:2}, at: try_to_wake_up+0x53/0x370
      
      with the call trace being
      
         lock_acquire+0xc8/0x2f0
         get_wchan+0x32/0x70
         __update_stats_enqueue_sleeper+0x151/0x430
         enqueue_entity+0x4b0/0x520
         enqueue_task_fair+0x92/0x6b0
         ttwu_do_activate+0x73/0x140
         try_to_wake_up+0x213/0x370
         swake_up_locked+0x20/0x50
         complete+0x2f/0x40
         kthread+0xfb/0x180
      
      However, since nobody noticed this regression for more than two years,
      let's remove 'profile=sleep' support based on the assumption that nobody
      needs this functionality.
      
      Fixes: 42a20f86 ("sched: Add wrapper for get_wchan() to keep task blocked")
      Cc: stable@vger.kernel.org # v5.16+
      Signed-off-by: default avatarTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      b88f5538
    • Linus Torvalds's avatar
      Merge tag 'x86-urgent-2024-08-04' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · a5dbd76a
      Linus Torvalds authored
      Pull x86 fixes from Thomas Gleixner:
      
       - Prevent a deadlock on cpu_hotplug_lock in the aperf/mperf driver.
      
         A recent change in the ACPI code which consolidated code pathes moved
         the invocation of init_freq_invariance_cppc() to be moved to a CPU
         hotplug handler. The first invocation on AMD CPUs ends up enabling a
         static branch which dead locks because the static branch enable tries
         to acquire cpu_hotplug_lock but that lock is already held write by
         the hotplug machinery.
      
         Use static_branch_enable_cpuslocked() instead and take the hotplug
         lock read for the Intel code path which is invoked from the
         architecture code outside of the CPU hotplug operations.
      
       - Fix the number of reserved bits in the sev_config structure bit field
         so that the bitfield does not exceed 64 bit.
      
       - Add missing Zen5 model numbers
      
       - Fix the alignment assumptions of pti_clone_pgtable() and
         clone_entry_text() on 32-bit:
      
         The code assumes PMD aligned code sections, but on 32-bit the kernel
         entry text is not PMD aligned. So depending on the code size and
         location, which is configuration and compiler dependent, entry text
         can cross a PMD boundary. As the start is not PMD aligned adding PMD
         size to the start address is larger than the end address which
         results in partially mapped entry code for user space. That causes
         endless recursion on the first entry from userspace (usually #PF).
      
         Cure this by aligning the start address in the addition so it ends up
         at the next PMD start address.
      
         clone_entry_text() enforces PMD mapping, but on 32-bit the tail might
         eventually be PTE mapped, which causes a map fail because the PMD for
         the tail is not a large page mapping. Use PTI_LEVEL_KERNEL_IMAGE for
         the clone() invocation which resolves to PTE on 32-bit and PMD on
         64-bit.
      
       - Zero the 8-byte case for get_user() on range check failure on 32-bit
      
         The recend consolidation of the 8-byte get_user() case broke the
         zeroing in the failure case again. Establish it by clearing ECX
         before the range check and not afterwards as that obvioulsy can't be
         reached when the range check fails
      
      * tag 'x86-urgent-2024-08-04' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/uaccess: Zero the 8-byte get_range case on failure on 32-bit
        x86/mm: Fix pti_clone_entry_text() for i386
        x86/mm: Fix pti_clone_pgtable() alignment assumption
        x86/setup: Parse the builtin command line before merging
        x86/CPU/AMD: Add models 0x60-0x6f to the Zen5 range
        x86/sev: Fix __reserved field in sev_config
        x86/aperfmperf: Fix deadlock on cpu_hotplug_lock
      a5dbd76a
    • Linus Torvalds's avatar
      Merge tag 'timers-urgent-2024-08-04' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 61ca6c78
      Linus Torvalds authored
      Pull timer fixes from Thomas Gleixner:
       "Two fixes for the timer/clocksource code:
      
         - The recent fix to make the take over of the broadcast timer more
           reliable retrieves a per CPU pointer in preemptible context.
      
           This went unnoticed in testing as some compilers hoist the access
           into the non-preemotible section where the pointer is actually
           used, but obviously compilers can rightfully invoke it where the
           code put it.
      
           Move it into the non-preemptible section right to the actual usage
           side to cure it.
      
         - The clocksource watchdog is supposed to emit a warning when the
           retry count is greater than one and the number of retries reaches
           the limit.
      
           The condition is backwards and warns always when the count is
           greater than one. Fixup the condition to prevent spamming dmesg"
      
      * tag 'timers-urgent-2024-08-04' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        clocksource: Fix brown-bag boolean thinko in cs_watchdog_read()
        tick/broadcast: Move per CPU pointer access into the atomic section
      61ca6c78
    • Linus Torvalds's avatar
      Merge tag 'sched-urgent-2024-08-04' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 6cc82dc2
      Linus Torvalds authored
      Pull scheduler fixes from Thomas Gleixner:
      
       - When stime is larger than rtime due to accounting imprecision, then
         utime = rtime - stime becomes negative. As this is unsigned math, the
         result becomes a huge positive number.
      
         Cure it by resetting stime to rtime in that case, so utime becomes 0.
      
       - Restore consistent state when sched_cpu_deactivate() fails.
      
         When offlining a CPU fails in sched_cpu_deactivate() after the SMT
         present counter has been decremented, then the function aborts but
         fails to increment the SMT present counter and leaves it imbalanced.
         Consecutive operations cause it to underflow. Add the missing fixup
         for the error path.
      
         For SMT accounting the runqueue needs to marked online again in the
         error exit path to restore consistent state.
      
      * tag 'sched-urgent-2024-08-04' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        sched/core: Fix unbalance set_rq_online/offline() in sched_cpu_deactivate()
        sched/core: Introduce sched_set_rq_on/offline() helper
        sched/smt: Fix unbalance sched_smt_present dec/inc
        sched/smt: Introduce sched_smt_present_inc/dec() helper
        sched/cputime: Fix mul_u64_u64_div_u64() precision for cputime
      6cc82dc2
    • Linus Torvalds's avatar
      Merge tag 'perf-urgent-2024-08-04' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 1ddeb0ef
      Linus Torvalds authored
      Pull x86 perf fixes from Thomas Gleixner:
      
       - Move the smp_processor_id() invocation back into the non-preemtible
         region, so that the result is valid to use
      
       - Add the missing package C2 residency counters for Sierra Forest CPUs
         to make the newly added support actually useful
      
      * tag 'perf-urgent-2024-08-04' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        perf/x86: Fix smp_processor_id()-in-preemptible warnings
        perf/x86/intel/cstate: Add pkg C2 residency counter for Sierra Forest
      1ddeb0ef
    • Linus Torvalds's avatar
      Merge tag 'irq-urgent-2024-08-04' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 953f7764
      Linus Torvalds authored
      Pull irq fixes from Thomas Gleixner:
       "A couple of fixes for interrupt chip drivers:
      
         - Make sure to skip the clear register space in the MBIGEN driver
           when calculating the node register index. Otherwise the clear
           register is clobbered and the wrong node registers are accessed.
      
         - Fix a signed/unsigned confusion in the loongarch CPU driver which
           converts an error code to a huge "valid" interrupt number.
      
         - Convert the mesion GPIO interrupt controller lock to a raw spinlock
           so it works on RT.
      
         - Add a missing static to a internal function in the pic32 EVIC
           driver"
      
      * tag 'irq-urgent-2024-08-04' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        irqchip/mbigen: Fix mbigen node address layout
        irqchip/meson-gpio: Convert meson_gpio_irq_controller::lock to 'raw_spinlock_t'
        irqchip/irq-pic32-evic: Add missing 'static' to internal function
        irqchip/loongarch-cpu: Fix return value of lpic_gsi_to_irq()
      953f7764
    • Linus Torvalds's avatar
      Merge tag 'locking-urgent-2024-08-04' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 3bc70ad1
      Linus Torvalds authored
      Pull locking fixes from Thomas Gleixner:
       "Two fixes for locking and jump labels:
      
         - Ensure that the atomic_cmpxchg() conditions are correct and
           evaluating to true on any non-zero value except 1. The missing
           check of the return value leads to inconsisted state of the jump
           label counter.
      
         - Add a missing type conversion in the paravirt spinlock code which
           makes loongson build again"
      
      * tag 'locking-urgent-2024-08-04' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        jump_label: Fix the fix, brown paper bags galore
        locking/pvqspinlock: Correct the type of "old" variable in pv_kick_node()
      3bc70ad1
    • Rob Herring (Arm)'s avatar
      arm: dts: arm: versatile-ab: Fix duplicate clock node name · ff588380
      Rob Herring (Arm) authored
      Commit 04f08ef2 ("arm/arm64: dts: arm: Use generic clock and
      regulator nodenames") renamed nodes and created 2 "clock-24000000" nodes
      (at different paths).
      
      The kernel can't handle these duplicate names even though they are at
      different paths.  Fix this by renaming one of the nodes to "clock-pclk".
      
      This name is aligned with other Arm boards (those didn't have a known
      frequency to use in the node name).
      
      Fixes: 04f08ef2 ("arm/arm64: dts: arm: Use generic clock and regulator nodenames")
      Reported-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: default avatarRob Herring (Arm) <robh@kernel.org>
      Tested-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Tested-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      ff588380
    • Linus Torvalds's avatar
      Merge tag '6.11-rc1-smb-client-fixes' of git://git.samba.org/sfrench/cifs-2.6 · 3f3f6d61
      Linus Torvalds authored
      Pull smb client fixes from Steve French:
      
       - two reparse point fixes
      
       - minor cleanup
      
       - additional trace point (to help debug a recent problem)
      
      * tag '6.11-rc1-smb-client-fixes' of git://git.samba.org/sfrench/cifs-2.6:
        cifs: update internal version number
        smb: client: fix FSCTL_GET_REPARSE_POINT against NetApp
        smb3: add dynamic tracepoints for shutdown ioctl
        cifs: Remove cifs_aio_ctx
        smb: client: handle lack of FSCTL_GET_REPARSE_POINT support
      3f3f6d61
    • Linus Torvalds's avatar
      Merge tag 'media/v6.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media · 3c41df42
      Linus Torvalds authored
      Pull media fixes from Mauro Carvalho Chehab:
      
       - two Kconfig fixes
      
       - one fix for the UVC driver addressing probing time detection of a UVC
         custom controls
      
       - one fix related to PDF generation
      
      * tag 'media/v6.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
        media: v4l: Fix missing tabular column hint for Y14P format
        media: intel/ipu6: select AUXILIARY_BUS in Kconfig
        media: ipu-bridge: fix ipu6 Kconfig dependencies
        media: uvcvideo: Fix custom control mapping probing
      3c41df42
  5. 03 Aug, 2024 5 commits
  6. 02 Aug, 2024 6 commits
    • Linus Torvalds's avatar
      Merge tag 'io_uring-6.11-20240802' of git://git.kernel.dk/linux · 17712b7e
      Linus Torvalds authored
      Pull io_uring fixes from Jens Axboe:
       "Two minor tweaks for the NAPI handling, both from Olivier:
      
         - Kill two unused list definitions
      
         - Ensure that multishot NAPI doesn't age away"
      
      * tag 'io_uring-6.11-20240802' of git://git.kernel.dk/linux:
        io_uring: remove unused local list heads in NAPI functions
        io_uring: keep multishot request NAPI timeout current
      17712b7e
    • Linus Torvalds's avatar
      Merge tag 'thermal-6.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · d9ef02e5
      Linus Torvalds authored
      Pull thermal control fixes from Rafael Wysocki:
       "These fix a few issues related to the MSI IRQs management in the
        int340x thermal driver, fix a thermal core issue that may lead to
        missing trip point crossing events and update the thermal core
        documentation.
      
        Specifics:
      
         - Fix MSI error path cleanup in int340x, allow it to work with a
           subset of thermal MSI IRQs if some of them are not working and make
           it free all MSI IRQs on module exit (Srinivas Pandruvada)
      
         - Fix a thermal core issue that may lead to missing trip point
           crossing events in some cases when thermal_zone_set_trips() is used
           and update the thermal core documentation (Rafael Wysocki)"
      
      * tag 'thermal-6.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        thermal: core: Update thermal zone registration documentation
        thermal: trip: Avoid skipping trips in thermal_zone_set_trips()
        thermal: intel: int340x: Free MSI IRQ vectors on module exit
        thermal: intel: int340x: Allow limited thermal MSI support
        thermal: intel: int340x: Fix kernel warning during MSI cleanup
      d9ef02e5
    • Linus Torvalds's avatar
      Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux · 041b1061
      Linus Torvalds authored
      Pull arm64 fixes from Catalin Marinas:
      
       - Expand the speculative SSBS errata workaround to more CPUs
      
       - Ensure jump label changes are visible to all CPUs with a
         kick_all_cpus_sync() (and also enable jump label batching as part of
         the fix)
      
       - The shadow call stack sanitiser is currently incompatible with Rust,
         make CONFIG_RUST conditional on !CONFIG_SHADOW_CALL_STACK
      
      * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
        arm64: jump_label: Ensure patched jump_labels are visible to all CPUs
        rust: SHADOW_CALL_STACK is incompatible with Rust
        arm64: errata: Expand speculative SSBS workaround (again)
        arm64: cputype: Add Cortex-A725 definitions
        arm64: cputype: Add Cortex-X1C definitions
      041b1061
    • Linus Torvalds's avatar
      Merge tag 'ceph-for-6.11-rc2' of https://github.com/ceph/ceph-client · 1c424629
      Linus Torvalds authored
      Pull ceph fix from Ilya Dryomov:
       "A fix for a potential hang in the MDS when cap revocation races with
        the client releasing the caps in question, marked for stable"
      
      * tag 'ceph-for-6.11-rc2' of https://github.com/ceph/ceph-client:
        ceph: force sending a cap update msg back to MDS for revoke op
      1c424629
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm · 725d410f
      Linus Torvalds authored
      Pull kvm updates from Paolo Bonzini:
       "The bulk of the changes here is a largish change to guest_memfd,
        delaying the clearing and encryption of guest-private pages until they
        are actually added to guest page tables. This started as "let's make
        it impossible to misuse the API" for SEV-SNP; but then it ballooned a
        bit.
      
        The new logic is generally simpler and more ready for hugepage support
        in guest_memfd.
      
        Summary:
      
         - fix latent bug in how usage of large pages is determined for
           confidential VMs
      
         - fix "underline too short" in docs
      
         - eliminate log spam from limited APIC timer periods
      
         - disallow pre-faulting of memory before SEV-SNP VMs are initialized
      
         - delay clearing and encrypting private memory until it is added to
           guest page tables
      
         - this change also enables another small cleanup: the checks in
           SNP_LAUNCH_UPDATE that limit it to non-populated, private pages can
           now be moved in the common kvm_gmem_populate() function
      
         - fix compilation error that the RISC-V merge introduced in selftests"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
        KVM: x86/mmu: fix determination of max NPT mapping level for private pages
        KVM: riscv: selftests: Fix compile error
        KVM: guest_memfd: abstract how prepared folios are recorded
        KVM: guest_memfd: let kvm_gmem_populate() operate only on private gfns
        KVM: extend kvm_range_has_memory_attributes() to check subset of attributes
        KVM: cleanup and add shortcuts to kvm_range_has_memory_attributes()
        KVM: guest_memfd: move check for already-populated page to common code
        KVM: remove kvm_arch_gmem_prepare_needed()
        KVM: guest_memfd: make kvm_gmem_prepare_folio() operate on a single struct kvm
        KVM: guest_memfd: delay kvm_gmem_prepare_folio() until the memory is passed to the guest
        KVM: guest_memfd: return locked folio from __kvm_gmem_get_pfn
        KVM: rename CONFIG_HAVE_KVM_GMEM_* to CONFIG_HAVE_KVM_ARCH_GMEM_*
        KVM: guest_memfd: do not go through struct page
        KVM: guest_memfd: delay folio_mark_uptodate() until after successful preparation
        KVM: guest_memfd: return folio from __kvm_gmem_get_pfn()
        KVM: x86: disallow pre-fault for SNP VMs before initialization
        KVM: Documentation: Fix title underline too short warning
        KVM: x86: Eliminate log spam from limited APIC timer periods
      725d410f
    • Paolo Bonzini's avatar
      Merge branch 'kvm-fixes' into HEAD · 1773014a
      Paolo Bonzini authored
      * fix latent bug in how usage of large pages is determined for
        confidential VMs
      
      * fix "underline too short" in docs
      
      * eliminate log spam from limited APIC timer periods
      
      * disallow pre-faulting of memory before SEV-SNP VMs are initialized
      
      * delay clearing and encrypting private memory until it is added to
        guest page tables
      
      * this change also enables another small cleanup: the checks in
        SNP_LAUNCH_UPDATE that limit it to non-populated, private pages
        can now be moved in the common kvm_gmem_populate() function
      1773014a