1. 24 Mar, 2022 4 commits
    • Arnaldo Carvalho de Melo's avatar
      tools headers cpufeatures: Sync with the kernel sources · d16d30f4
      Arnaldo Carvalho de Melo authored
      To pick the changes from:
      
        fa31a4d6 ("x86/cpufeatures: Put the AMX macros in the word 18 block")
        7b8f40b3 ("x86/cpu: Add definitions for the Intel Hardware Feedback Interface")
      
      This only causes these perf files to be rebuilt:
      
        CC       /tmp/build/perf/bench/mem-memcpy-x86-64-asm.o
        CC       /tmp/build/perf/bench/mem-memset-x86-64-asm.o
      
      And addresses this perf build warning:
      
        Warning: Kernel ABI header at 'tools/arch/x86/include/asm/cpufeatures.h' differs from latest version at 'arch/x86/include/asm/cpufeatures.h'
        diff -u tools/arch/x86/include/asm/cpufeatures.h arch/x86/include/asm/cpufeatures.h
      
      Cc: Borislav Petkov <bp@suse.de>
      Cc: Jim Mattson <jmattson@google.com>
      Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
      Cc: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
      Link: https://lore.kernel.org/lkml/YjzZPxdyLjf76gM+@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      d16d30f4
    • Arnaldo Carvalho de Melo's avatar
      tools headers cpufeatures: Sync with the kernel sources · 1efe4cbd
      Arnaldo Carvalho de Melo authored
      To pick the changes in:
      
        7c1ef591 ("x86/cpufeatures: Re-enable ENQCMD")
      
      That causes only these 'perf bench' objects to rebuild:
      
        CC       /tmp/build/perf/bench/mem-memcpy-x86-64-asm.o
        CC       /tmp/build/perf/bench/mem-memset-x86-64-asm.o
      
      And addresses these perf build warnings:
      
        Warning: Kernel ABI header at 'tools/arch/x86/include/asm/disabled-features.h' differs from latest version at 'arch/x86/include/asm/disabled-features.h'
        diff -u tools/arch/x86/include/asm/disabled-features.h arch/x86/include/asm/disabled-features.h
      
      Cc: Borislav Petkov <bp@suse.de>
      Cc: Fenghua Yu <fenghua.yu@intel.com>
      Link: https://lore.kernel.org/lkml/YjzX+PknzGoKaGMX@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      1efe4cbd
    • Thomas Richter's avatar
      perf stat: Fix forked applications enablement of counters · d0a0a511
      Thomas Richter authored
      I have run into the following issue:
      
       # perf stat -a -e new_pmu/INSTRUCTION_7/ --  mytest -c1 7
      
       Performance counter stats for 'system wide':
      
                       0      new_pmu/INSTRUCTION_7/
      
             0.000366428 seconds time elapsed
       #
      
      The new PMU for s390 counts the execution of certain CPU instructions.
      The root cause is the extremely small run time of the mytest program. It
      just executes some assembly instructions and then exits.
      
      In above invocation the instruction is executed exactly one time (-c1
      option). The PMU is expected to report this one time execution by a
      counter value of one, but fails to do so in some cases, not all.
      
      Debugging reveals the invocation of the child process is done
      *before* the counter events are installed and enabled.
      
      Tracing reveals that sometimes the child process starts and exits before
      the event is installed on all CPUs. The more CPUs the machine has, the
      more often this miscount happens.
      
      Fix this by reversing the start of the work load after the events have
      been installed on the specified CPUs. Now the comment also matches the
      code.
      
      Output after:
      
       # perf stat -a -e new_pmu/INSTRUCTION_7/ --  mytest -c1 7
      
       Performance counter stats for 'system wide':
      
                       1      new_pmu/INSTRUCTION_7/
      
             0.000366428 seconds time elapsed
       #
      
      Now the correct result is reported rock solid all the time regardless
      how many CPUs are online.
      
      Reviewers notes:
      
      Jiri:
      
      Right, without -a the event has enable_on_exec so the race does not
      matter, but it's a problem for system wide with fork.
      
      Namhyung:
      
      Agreed. Also we may move the enable_counters() and the clock code out of
      the if block to be shared with the else block.
      
      Fixes: acf28922 ("perf stat: Use perf_evlist__prepare/start_workload()")
      Signed-off-by: default avatarThomas Richter <tmricht@linux.ibm.com>
      Acked-by: default avatarJiri Olsa <jolsa@kernel.org>
      Acked-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Acked-by: default avatarSumanth Korikkar <sumanthk@linux.ibm.com>
      Cc: Heiko Carstens <hca@linux.ibm.com>
      Cc: Sven Schnelle <svens@linux.ibm.com>
      Cc: Vasily Gorbik <gor@linux.ibm.com>
      Link: https://lore.kernel.org/r/20220317155346.577384-1-tmricht@linux.ibm.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      d0a0a511
    • Arnaldo Carvalho de Melo's avatar
      tools arch x86: Sync the msr-index.h copy with the kernel sources · 61726144
      Arnaldo Carvalho de Melo authored
      To pick up the changes from these csets:
      
        7b8f40b3 ("x86/cpu: Add definitions for the Intel Hardware Feedback Interface")
      
      That cause no changes to tooling:
      
        $ tools/perf/trace/beauty/tracepoints/x86_msr.sh > before
        $ cp arch/x86/include/asm/msr-index.h tools/arch/x86/include/asm/msr-index.h
        $ tools/perf/trace/beauty/tracepoints/x86_msr.sh > after
        $ diff -u before after
        $
      
      Just silences this perf build warning:
      
        Warning: Kernel ABI header at 'tools/arch/x86/include/asm/msr-index.h' differs from latest version at 'arch/x86/include/asm/msr-index.h'
        diff -u tools/arch/x86/include/asm/msr-index.h arch/x86/include/asm/msr-index.h
      
      Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
      Cc: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
      Link: https://lore.kernel.org/lkml/YjzVt8CjAORAsTCo@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      61726144
  2. 22 Mar, 2022 34 commits
    • Kim Phillips's avatar
      perf evsel: Make evsel__env() always return a valid env · 7b830875
      Kim Phillips authored
      It's possible to have an evsel and evsel->evlist populated without
      an evsel->evlist->env, when, e.g., cmd_record is in its error path.
      
      Future patches will add support for evsel__open_strerror to be able
      to customize error messaging based on perf_env__{arch,cpuid}, so
      let's have evsel__env return &perf_env instead of NULL in that case.
      Reviewed-by: default avatarKajol Jain <kjain@linux.ibm.com>
      Signed-off-by: default avatarKim Phillips <kim.phillips@amd.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Joao Martins <joao.m.martins@oracle.com>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Michael Petlan <mpetlan@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Robert Richter <robert.richter@amd.com>
      Cc: Stephane Eranian <eranian@google.com>
      Link: https://lore.kernel.org/r/20211004214114.188477-1-kim.phillips@amd.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      7b830875
    • Colin Ian King's avatar
      perf build-id: Fix spelling mistake "Cant" -> "Can't" · 011899cc
      Colin Ian King authored
      There is a spelling mistake in a pr_err message. Fix it.
      Signed-off-by: default avatarColin Ian King <colin.i.king@gmail.com>
      Acked-by: default avatarIan Rogers <irogers@google.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: kernel-janitors@vger.kernel.org
      Link: https://lore.kernel.org/r/20220316232452.53062-1-colin.i.king@gmail.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      011899cc
    • Colin Ian King's avatar
      perf header: Fix spelling mistake "could't" -> "couldn't" · ccbc9df9
      Colin Ian King authored
      There is a spelling mistake in a pr_debug2 message. Fix it.
      Signed-off-by: default avatarColin Ian King <colin.i.king@gmail.com>
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: kernel-janitors@vger.kernel.org
      Link: https://lore.kernel.org/r/20220316232212.52820-1-colin.i.king@gmail.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      ccbc9df9
    • Kan Liang's avatar
      perf script: Add 'brstackinsnlen' for branch stacks · 6f680c6a
      Kan Liang authored
      When analyzing with 'perf script', it's useful to understand the
      captured instruction and the next sequential instruction.
      
      To calculate the address of the next sequential instruction, the length
      of the captured instruction is required.
      
      For example, you can’t know the next sequential instruction after an
      unconditional branch unless you calculate that based on its length.
      
      For branch stacks, 'perf script' only prints the instruction bytes with
      'brstackinsn', but lacks the instruction length.
      
      Add 'brstackinsnlen' to print the instruction length.
      
        $ perf script -F ip,brstackinsn,brstackinsnlen --xed
           7fa555be8f75
              _start:
              00007fa555be8090    mov %rsp, %rdi              ilen: 3
              00007fa555be8093    callq  0x7fa555be8ea0       ilen: 5 # PRED 102 cycles [102] 0.02 IPC
              _dl_start+38:
              00007fa555be8ec6    movq  %rdx,0x227853(%rip)   ilen: 7
              00007fa555be8ecd    leaq  0x227f94(%rip),%rdx   ilen: 7
      Signed-off-by: default avatarKan Liang <kan.liang@linux.intel.com>
      Cc: Ahmad Yasin <ahmad.yasin@intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com>
      Link: https://lore.kernel.org/r/1647871212-184070-1-git-send-email-kan.liang@linux.intel.com
      [ Added the new field to tools/perf/Documentation/perf-script.txt ]
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      6f680c6a
    • Ian Rogers's avatar
      perf parse-events: Move slots only with topdown · bc355822
      Ian Rogers authored
      If slots isn't with a topdown event then moving it is unnecessary. For
      example {instructions, slots} is re-ordered:
      
        $ perf stat -e '{instructions,slots}' -a sleep 1
      
         Performance counter stats for 'system wide':
      
               936,600,825      slots
               144,440,968      instructions
      
               1.006061423 seconds time elapsed
      
      Which can break tools expecting the command line order to match the
      printed order. It is necessary to move the slots event first when it
      appears with topdown events. Add extra checking so that the slots event
      is only moved in the case of there being a topdown event like:
      
        $ perf stat -e '{instructions,slots,topdown-fe-bound}' -a sleep 1
      
         Performance counter stats for 'system wide':
      
                2427568570      slots
                 300927614      instructions
                 551021649      topdown-fe-bound
      
               1.001771803 seconds time elapsed
      
      Fixes: 94dbfd67 ("perf parse-events: Architecture specific leader override")
      Reported-by: default avatarKan Liang <kan.liang@linux.intel.com>
      Signed-off-by: default avatarIan Rogers <irogers@google.com>
      Tested-by: default avatarKan Liang <kan.liang@linux.intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Alexandre Torgue <alexandre.torgue@foss.st.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: James Clark <james.clark@arm.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: John Garry <john.garry@huawei.com>
      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: Stephane Eranian <eranian@google.com>
      Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com>
      Link: https://lore.kernel.org/r/20220321223344.1034479-1-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      bc355822
    • Arnaldo Carvalho de Melo's avatar
      Merge remote-tracking branch 'torvalds/master' into perf/core · 34fe4ccb
      Arnaldo Carvalho de Melo authored
      To pick up fixes that went thru perf/urgent and now are fixed by an
      upcoming patch.
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      34fe4ccb
    • Namhyung Kim's avatar
      perf ftrace latency: Update documentation · feff0839
      Namhyung Kim authored
      Add description of 'perf ftrace latency' subcommand.
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Changbin Du <changbin.du@gmail.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: https://lore.kernel.org/r/20220321234609.90455-2-namhyung@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      feff0839
    • Namhyung Kim's avatar
      perf ftrace latency: Add -n/--use-nsec option · 84005bb6
      Namhyung Kim authored
      Sometimes we want to see nano-second granularity.
      
        $ sudo perf ftrace latency -T dput -a sleep 1
        #   DURATION     |      COUNT | GRAPH                          |
             0 - 1    us |    2098375 | #############################  |
             1 - 2    us |         61 |                                |
             2 - 4    us |         33 |                                |
             4 - 8    us |         13 |                                |
             8 - 16   us |        124 |                                |
            16 - 32   us |        123 |                                |
            32 - 64   us |          1 |                                |
            64 - 128  us |          0 |                                |
           128 - 256  us |          1 |                                |
           256 - 512  us |          0 |                                |
           512 - 1024 us |          0 |                                |
             1 - 2    ms |          0 |                                |
             2 - 4    ms |          0 |                                |
             4 - 8    ms |          0 |                                |
             8 - 16   ms |          0 |                                |
            16 - 32   ms |          0 |                                |
            32 - 64   ms |          0 |                                |
            64 - 128  ms |          0 |                                |
           128 - 256  ms |          0 |                                |
           256 - 512  ms |          0 |                                |
           512 - 1024 ms |          0 |                                |
             1 - ...   s |          0 |                                |
      
        $ sudo perf ftrace latency -T dput -a -n sleep 1
        #   DURATION     |      COUNT | GRAPH                          |
             0 - 1    us |          0 |                                |
             1 - 2    ns |          0 |                                |
             2 - 4    ns |          0 |                                |
             4 - 8    ns |          0 |                                |
             8 - 16   ns |          0 |                                |
            16 - 32   ns |          0 |                                |
            32 - 64   ns |          0 |                                |
            64 - 128  ns |    1163434 | ##############                 |
           128 - 256  ns |     914102 | #############                  |
           256 - 512  ns |        884 |                                |
           512 - 1024 ns |        613 |                                |
             1 - 2    us |         31 |                                |
             2 - 4    us |         17 |                                |
             4 - 8    us |          7 |                                |
             8 - 16   us |        123 |                                |
            16 - 32   us |         83 |                                |
            32 - 64   us |          0 |                                |
            64 - 128  us |          0 |                                |
           128 - 256  us |          0 |                                |
           256 - 512  us |          0 |                                |
           512 - 1024 us |          0 |                                |
             1 - ...  ms |          0 |                                |
      
      Committer testing:
      
      Testing it with BPF:
      
        # perf ftrace latency -b -n -T dput -a sleep 1
        #   DURATION     |      COUNT | GRAPH                                          |
             0 - 1    us |          0 |                                                |
             1 - 2    ns |          0 |                                                |
             2 - 4    ns |          0 |                                                |
             4 - 8    ns |          0 |                                                |
             8 - 16   ns |          0 |                                                |
            16 - 32   ns |          0 |                                                |
            32 - 64   ns |          0 |                                                |
            64 - 128  ns |          0 |                                                |
           128 - 256  ns |     823489 | #############################################  |
           256 - 512  ns |       3232 |                                                |
           512 - 1024 ns |         51 |                                                |
             1 - 2    us |        172 |                                                |
             2 - 4    us |          9 |                                                |
             4 - 8    us |          0 |                                                |
             8 - 16   us |          2 |                                                |
            16 - 32   us |          0 |                                                |
            32 - 64   us |          0 |                                                |
            64 - 128  us |          0 |                                                |
           128 - 256  us |          0 |                                                |
           256 - 512  us |          0 |                                                |
           512 - 1024 us |          0 |                                                |
             1 - ...  ms |          0 |                                                |
        [root@quaco ~]# strace -e bpf perf ftrace latency -b -n -T dput -a sleep 1
        bpf(BPF_PROG_LOAD, {prog_type=BPF_PROG_TYPE_SOCKET_FILTER, insn_cnt=2, insns=0x7ffe2bd574f0, license="GPL", log_level=0, log_size=0, log_buf=NULL, kern_version=KERNEL_VERSION(0, 0, 0), prog_flags=0, prog_name="", prog_ifindex=0, expected_attach_type=BPF_CGROUP_INET_INGRESS, prog_btf_fd=0, func_info_rec_size=0, func_info=NULL, func_info_cnt=0, line_info_rec_size=0, line_info=NULL, line_info_cnt=0, attach_btf_id=0, attach_prog_fd=0, fd_array=NULL}, 144) = 3
        bpf(BPF_BTF_LOAD, {btf="\237\353\1\0\30\0\0\0\0\0\0\0\20\0\0\0\20\0\0\0\5\0\0\0\1\0\0\0\0\0\0\1"..., btf_log_buf=NULL, btf_size=45, btf_log_size=0, btf_log_level=0}, 28) = 3
        bpf(BPF_BTF_LOAD, {btf="\237\353\1\0\30\0\0\0\0\0\0\0000\0\0\0000\0\0\0\t\0\0\0\1\0\0\0\0\0\0\1"..., btf_log_buf=NULL, btf_size=81, btf_log_size=0, btf_log_level=0}, 28) = 3
        bpf(BPF_BTF_LOAD, {btf="\237\353\1\0\30\0\0\0\0\0\0\08\0\0\08\0\0\0\t\0\0\0\0\0\0\0\0\0\0\1"..., btf_log_buf=NULL, btf_size=89, btf_log_size=0, btf_log_level=0}, 28) = 3
        bpf(BPF_BTF_LOAD, {btf="\237\353\1\0\30\0\0\0\0\0\0\0\f\0\0\0\f\0\0\0\7\0\0\0\1\0\0\0\0\0\0\20"..., btf_log_buf=NULL, btf_size=43, btf_log_size=0, btf_log_level=0}, 28) = 3
        bpf(BPF_BTF_LOAD, {btf="\237\353\1\0\30\0\0\0\0\0\0\0000\0\0\0000\0\0\0\t\0\0\0\1\0\0\0\0\0\0\1"..., btf_log_buf=NULL, btf_size=81, btf_log_size=0, btf_log_level=0}, 28) = 3
        bpf(BPF_BTF_LOAD, {btf="\237\353\1\0\30\0\0\0\0\0\0\0000\0\0\0000\0\0\0\5\0\0\0\0\0\0\0\0\0\0\1"..., btf_log_buf=NULL, btf_size=77, btf_log_size=0, btf_log_level=0}, 28) = 3
        bpf(BPF_BTF_LOAD, {btf="\237\353\1\0\30\0\0\0\0\0\0\0(\0\0\0(\0\0\0\5\0\0\0\0\0\0\0\0\0\0\1"..., btf_log_buf=NULL, btf_size=69, btf_log_size=0, btf_log_level=0}, 28) = -1 EINVAL (Invalid argument)
        bpf(BPF_BTF_LOAD, {btf="\237\353\1\0\30\0\0\0\0\0\0\0<\3\0\0<\3\0\0\362\3\0\0\0\0\0\0\0\0\0\2"..., btf_log_buf=NULL, btf_size=1862, btf_log_size=0, btf_log_level=0}, 28) = 3
        bpf(BPF_MAP_CREATE, {map_type=BPF_MAP_TYPE_ARRAY, key_size=4, value_size=4, max_entries=1, map_flags=BPF_F_MMAPABLE, inner_map_fd=0, map_name="", map_ifindex=0, btf_fd=0, btf_key_type_id=0, btf_value_type_id=0, btf_vmlinux_value_type_id=0, map_extra=0}, 72) = 4
        bpf(BPF_PROG_LOAD, {prog_type=BPF_PROG_TYPE_SOCKET_FILTER, insn_cnt=2, insns=0x7ffe2bd571c0, license="GPL", log_level=0, log_size=0, log_buf=NULL, kern_version=KERNEL_VERSION(0, 0, 0), prog_flags=0, prog_name="test", prog_ifindex=0, expected_attach_type=BPF_CGROUP_INET_INGRESS, prog_btf_fd=0, func_info_rec_size=0, func_info=NULL, func_info_cnt=0, line_info_rec_size=0, line_info=NULL, line_info_cnt=0, attach_btf_id=0, attach_prog_fd=0, fd_array=NULL}, 144) = 4
        bpf(BPF_MAP_CREATE, {map_type=BPF_MAP_TYPE_HASH, key_size=8, value_size=8, max_entries=10000, map_flags=0, inner_map_fd=0, map_name="functime", map_ifindex=0, btf_fd=3, btf_key_type_id=0, btf_value_type_id=0, btf_vmlinux_value_type_id=0, map_extra=0}, 72) = 4
        bpf(BPF_MAP_CREATE, {map_type=BPF_MAP_TYPE_HASH, key_size=4, value_size=1, max_entries=1, map_flags=0, inner_map_fd=0, map_name="cpu_filter", map_ifindex=0, btf_fd=3, btf_key_type_id=0, btf_value_type_id=0, btf_vmlinux_value_type_id=0, map_extra=0}, 72) = 5
        bpf(BPF_MAP_CREATE, {map_type=BPF_MAP_TYPE_HASH, key_size=4, value_size=1, max_entries=1, map_flags=0, inner_map_fd=0, map_name="task_filter", map_ifindex=0, btf_fd=3, btf_key_type_id=0, btf_value_type_id=0, btf_vmlinux_value_type_id=0, map_extra=0}, 72) = 7
        bpf(BPF_MAP_CREATE, {map_type=BPF_MAP_TYPE_PERCPU_ARRAY, key_size=4, value_size=8, max_entries=22, map_flags=0, inner_map_fd=0, map_name="latency", map_ifindex=0, btf_fd=3, btf_key_type_id=0, btf_value_type_id=0, btf_vmlinux_value_type_id=0, map_extra=0}, 72) = 8
        bpf(BPF_MAP_CREATE, {map_type=BPF_MAP_TYPE_ARRAY, key_size=4, value_size=32, max_entries=1, map_flags=0, inner_map_fd=0, map_name="", map_ifindex=0, btf_fd=0, btf_key_type_id=0, btf_value_type_id=0, btf_vmlinux_value_type_id=0, map_extra=0}, 72) = 9
        bpf(BPF_PROG_LOAD, {prog_type=BPF_PROG_TYPE_SOCKET_FILTER, insn_cnt=5, insns=0x7ffe2bd57220, license="GPL", log_level=0, log_size=0, log_buf=NULL, kern_version=KERNEL_VERSION(0, 0, 0), prog_flags=0, prog_name="", prog_ifindex=0, expected_attach_type=BPF_CGROUP_INET_INGRESS, prog_btf_fd=0, func_info_rec_size=0, func_info=NULL, func_info_cnt=0, line_info_rec_size=0, line_info=NULL, line_info_cnt=0, attach_btf_id=0, attach_prog_fd=0, fd_array=NULL}, 144) = 10
        bpf(BPF_MAP_CREATE, {map_type=BPF_MAP_TYPE_ARRAY, key_size=4, value_size=16, max_entries=1, map_flags=BPF_F_MMAPABLE, inner_map_fd=0, map_name="func_lat.bss", map_ifindex=0, btf_fd=3, btf_key_type_id=0, btf_value_type_id=33, btf_vmlinux_value_type_id=0, map_extra=0}, 72) = 9
        bpf(BPF_MAP_UPDATE_ELEM, {map_fd=9, key=0x7ffe2bd57330, value=0x7f9a5fc39000, flags=BPF_ANY}, 144) = 0
        bpf(BPF_PROG_LOAD, {prog_type=BPF_PROG_TYPE_KPROBE, insn_cnt=42, insns=0x113daf0, license="", log_level=0, log_size=0, log_buf=NULL, kern_version=KERNEL_VERSION(5, 16, 13), prog_flags=0, prog_name="func_begin", prog_ifindex=0, expected_attach_type=BPF_CGROUP_INET_INGRESS, prog_btf_fd=3, func_info_rec_size=8, func_info=0x113fb70, func_info_cnt=1, line_info_rec_size=16, line_info=0x113fb90, line_info_cnt=21, attach_btf_id=0, attach_prog_fd=0, fd_array=NULL}, 144) = 10
        bpf(BPF_PROG_LOAD, {prog_type=BPF_PROG_TYPE_KPROBE, insn_cnt=124, insns=0x113d360, license="", log_level=0, log_size=0, log_buf=NULL, kern_version=KERNEL_VERSION(5, 16, 13), prog_flags=0, prog_name="func_end", prog_ifindex=0, expected_attach_type=BPF_CGROUP_INET_INGRESS, prog_btf_fd=3, func_info_rec_size=8, func_info=0x113fcf0, func_info_cnt=1, line_info_rec_size=16, line_info=0x1139770, line_info_cnt=60, attach_btf_id=0, attach_prog_fd=0, fd_array=NULL}, 144) = 11
        bpf(BPF_PROG_LOAD, {prog_type=BPF_PROG_TYPE_TRACEPOINT, insn_cnt=2, insns=0x7ffe2bd57150, license="GPL", log_level=0, log_size=0, log_buf=NULL, kern_version=KERNEL_VERSION(0, 0, 0), prog_flags=0, prog_name="", prog_ifindex=0, expected_attach_type=BPF_CGROUP_INET_INGRESS, prog_btf_fd=0, func_info_rec_size=0, func_info=NULL, func_info_cnt=0, line_info_rec_size=0, line_info=NULL, line_info_cnt=0, attach_btf_id=0, attach_prog_fd=0, fd_array=NULL}, 144) = 13
        bpf(BPF_LINK_CREATE, {link_create={prog_fd=13, target_fd=-1, attach_type=BPF_PERF_EVENT, flags=0}}, 144) = -1 EBADF (Bad file descriptor)
        bpf(BPF_LINK_CREATE, {link_create={prog_fd=10, target_fd=12, attach_type=BPF_PERF_EVENT, flags=0}}, 144) = 13
        bpf(BPF_LINK_CREATE, {link_create={prog_fd=11, target_fd=14, attach_type=BPF_PERF_EVENT, flags=0}}, 144) = 15
        --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=130075, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
        bpf(BPF_MAP_LOOKUP_ELEM, {map_fd=8, key=0x7ffe2bd57624, value=0x113fdd0, flags=BPF_ANY}, 144) = 0
        bpf(BPF_MAP_LOOKUP_ELEM, {map_fd=8, key=0x7ffe2bd57624, value=0x113fdd0, flags=BPF_ANY}, 144) = 0
        bpf(BPF_MAP_LOOKUP_ELEM, {map_fd=8, key=0x7ffe2bd57624, value=0x113fdd0, flags=BPF_ANY}, 144) = 0
        bpf(BPF_MAP_LOOKUP_ELEM, {map_fd=8, key=0x7ffe2bd57624, value=0x113fdd0, flags=BPF_ANY}, 144) = 0
        bpf(BPF_MAP_LOOKUP_ELEM, {map_fd=8, key=0x7ffe2bd57624, value=0x113fdd0, flags=BPF_ANY}, 144) = 0
        bpf(BPF_MAP_LOOKUP_ELEM, {map_fd=8, key=0x7ffe2bd57624, value=0x113fdd0, flags=BPF_ANY}, 144) = 0
        bpf(BPF_MAP_LOOKUP_ELEM, {map_fd=8, key=0x7ffe2bd57624, value=0x113fdd0, flags=BPF_ANY}, 144) = 0
        bpf(BPF_MAP_LOOKUP_ELEM, {map_fd=8, key=0x7ffe2bd57624, value=0x113fdd0, flags=BPF_ANY}, 144) = 0
        bpf(BPF_MAP_LOOKUP_ELEM, {map_fd=8, key=0x7ffe2bd57624, value=0x113fdd0, flags=BPF_ANY}, 144) = 0
        bpf(BPF_MAP_LOOKUP_ELEM, {map_fd=8, key=0x7ffe2bd57624, value=0x113fdd0, flags=BPF_ANY}, 144) = 0
        bpf(BPF_MAP_LOOKUP_ELEM, {map_fd=8, key=0x7ffe2bd57624, value=0x113fdd0, flags=BPF_ANY}, 144) = 0
        bpf(BPF_MAP_LOOKUP_ELEM, {map_fd=8, key=0x7ffe2bd57624, value=0x113fdd0, flags=BPF_ANY}, 144) = 0
        bpf(BPF_MAP_LOOKUP_ELEM, {map_fd=8, key=0x7ffe2bd57624, value=0x113fdd0, flags=BPF_ANY}, 144) = 0
        bpf(BPF_MAP_LOOKUP_ELEM, {map_fd=8, key=0x7ffe2bd57624, value=0x113fdd0, flags=BPF_ANY}, 144) = 0
        bpf(BPF_MAP_LOOKUP_ELEM, {map_fd=8, key=0x7ffe2bd57624, value=0x113fdd0, flags=BPF_ANY}, 144) = 0
        bpf(BPF_MAP_LOOKUP_ELEM, {map_fd=8, key=0x7ffe2bd57624, value=0x113fdd0, flags=BPF_ANY}, 144) = 0
        bpf(BPF_MAP_LOOKUP_ELEM, {map_fd=8, key=0x7ffe2bd57624, value=0x113fdd0, flags=BPF_ANY}, 144) = 0
        bpf(BPF_MAP_LOOKUP_ELEM, {map_fd=8, key=0x7ffe2bd57624, value=0x113fdd0, flags=BPF_ANY}, 144) = 0
        bpf(BPF_MAP_LOOKUP_ELEM, {map_fd=8, key=0x7ffe2bd57624, value=0x113fdd0, flags=BPF_ANY}, 144) = 0
        bpf(BPF_MAP_LOOKUP_ELEM, {map_fd=8, key=0x7ffe2bd57624, value=0x113fdd0, flags=BPF_ANY}, 144) = 0
        bpf(BPF_MAP_LOOKUP_ELEM, {map_fd=8, key=0x7ffe2bd57624, value=0x113fdd0, flags=BPF_ANY}, 144) = 0
        bpf(BPF_MAP_LOOKUP_ELEM, {map_fd=8, key=0x7ffe2bd57624, value=0x113fdd0, flags=BPF_ANY}, 144) = 0
        #   DURATION     |      COUNT | GRAPH                                          |
             0 - 1    us |          0 |                                                |
             1 - 2    ns |          0 |                                                |
             2 - 4    ns |          0 |                                                |
             4 - 8    ns |          0 |                                                |
             8 - 16   ns |          0 |                                                |
            16 - 32   ns |          0 |                                                |
            32 - 64   ns |          0 |                                                |
            64 - 128  ns |          0 |                                                |
           128 - 256  ns |      42519 | ###########################################    |
           256 - 512  ns |       2140 | ##                                             |
           512 - 1024 ns |         54 |                                                |
             1 - 2    us |         16 |                                                |
             2 - 4    us |         10 |                                                |
             4 - 8    us |          0 |                                                |
             8 - 16   us |          0 |                                                |
            16 - 32   us |          0 |                                                |
            32 - 64   us |          0 |                                                |
            64 - 128  us |          0 |                                                |
           128 - 256  us |          0 |                                                |
           256 - 512  us |          0 |                                                |
           512 - 1024 us |          0 |                                                |
             1 - ...  ms |          0 |                                                |
        +++ exited with 0 +++
        #
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Changbin Du <changbin.du@gmail.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: https://lore.kernel.org/r/20220321234609.90455-1-namhyung@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      84005bb6
    • John Garry's avatar
      perf tools: Fix version kernel tag · 7572733b
      John Garry authored
      Generating the version kernel tag relies on "git describe" command to
      get the latest Linus kernel tag.
      
      However, when working from clones of Linus' git we may not have the latest
      tag. For example, when working on Arnaldo's acme.git, we can have this:
      
        $ git branch
        perf/core
        $ head -n 5 ../../Makefile  | tail -n 4
        VERSION = 5
        PATCHLEVEL = 17
        SUBLEVEL = 0
        EXTRAVERSION = -rc3
        $ git describe --abbrev=0 --match "v[0-9].[0-9]*"
        v4.13-rc5
      
      Indeed using tags is a problem as it relies on tags being pulled from
      Linus' git (and pushed to the clone).
      
      In commit a4147f0f ("perf tools: Fix perf version generation")
      Robert introduced a change to use the kernelversion rule to generate the
      kernel tag when no git tags are available.
      
      However, as mentioned above, the tag we generate may be incorrect, so
      just always use kernelversion to get the tag (apart from building perf
      out of tree).
      Signed-off-by: default avatarJohn Garry <john.garry@huawei.com>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@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: Robert Richter <rric@kernel.org>
      Link: https://lore.kernel.org/r/1645449409-158238-3-git-send-email-john.garry@huawei.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      7572733b
    • Linus Torvalds's avatar
      Merge tag 'for-5.18-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux · 51912904
      Linus Torvalds authored
      Pull btrfs updates from David Sterba:
       "This contains feature updates, performance improvements, preparatory
        and core work and some related VFS updates:
      
        Features:
      
         - encoded read/write ioctls, allows user space to read or write raw
           data directly to extents (now compressed, encrypted in the future),
           will be used by send/receive v2 where it saves processing time
      
         - zoned mode now works with metadata DUP (the mkfs.btrfs default)
      
         - error message header updates:
            - print error state: transaction abort, other error, log tree
              errors
            - print transient filesystem state: remount, device replace,
              ignored checksum verifications
      
         - tree-checker: verify the transaction id of the to-be-written dirty
           extent buffer
      
        Performance improvements for fsync:
      
         - directory logging speedups (up to -90% run time)
      
         - avoid logging all directory changes during renames (up to -60% run
           time)
      
         - avoid inode logging during rename and link when possible (up to
           -60% run time)
      
         - prepare extents to be logged before locking a log tree path
           (throughput +7%)
      
         - stop copying old file extents when doing a full fsync()
      
         - improved logging of old extents after truncate
      
        Core, fixes:
      
         - improved stale device identification by dev_t and not just path
           (for devices that are behind other layers like device mapper)
      
         - continued extent tree v2 preparatory work
            - disable features that won't work yet
            - add wrappers and abstractions for new tree roots
      
         - improved error handling
      
         - add super block write annotations around background block group
           reclaim
      
         - fix device scanning messages potentially accessing stale pointer
      
         - cleanups and refactoring
      
        VFS:
      
         - allow reflinks/deduplication from two different mounts of the same
           filesystem
      
         - export and add helpers for read/write range verification, for the
           encoded ioctls"
      
      * tag 'for-5.18-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: (98 commits)
        btrfs: zoned: put block group after final usage
        btrfs: don't access possibly stale fs_info data in device_list_add
        btrfs: add lockdep_assert_held to need_preemptive_reclaim
        btrfs: verify the tranisd of the to-be-written dirty extent buffer
        btrfs: unify the error handling of btrfs_read_buffer()
        btrfs: unify the error handling pattern for read_tree_block()
        btrfs: factor out do_free_extent_accounting helper
        btrfs: remove last_ref from the extent freeing code
        btrfs: add a alloc_reserved_extent helper
        btrfs: remove BUG_ON(ret) in alloc_reserved_tree_block
        btrfs: add and use helper for unlinking inode during log replay
        btrfs: extend locking to all space_info members accesses
        btrfs: zoned: mark relocation as writing
        fs: allow cross-vfsmount reflink/dedupe
        btrfs: remove the cross file system checks from remap
        btrfs: pass btrfs_fs_info to btrfs_recover_relocation
        btrfs: pass btrfs_fs_info for deleting snapshots and cleaner
        btrfs: add filesystems state details to error messages
        btrfs: deal with unexpected extent type during reflinking
        btrfs: fix unexpected error path when reflinking an inline extent
        ...
      51912904
    • Linus Torvalds's avatar
      Merge tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 · 9b03992f
      Linus Torvalds authored
      Pull ext4 updates from Ted Ts'o:
       "Fix some bugs in converting ext4 to use the new mount API, as well as
        more bug fixes and clean ups in the ext4 fast_commit feature (most
        notably, in the tracepoints).
      
        In the jbd2 layer, the t_handle_lock spinlock has been removed, with
        the last place where it was actually needed replaced with an atomic
        cmpxchg"
      
      * tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: (35 commits)
        ext4: fix kernel doc warnings
        ext4: fix remaining two trace events to use same printk convention
        ext4: add commit tid info in ext4_fc_commit_start/stop trace events
        ext4: add commit_tid info in jbd debug log
        ext4: add transaction tid info in fc_track events
        ext4: add new trace event in ext4_fc_cleanup
        ext4: return early for non-eligible fast_commit track events
        ext4: do not call FC trace event in ext4_fc_commit() if FS does not support FC
        ext4: convert ext4_fc_track_dentry type events to use event class
        ext4: fix ext4_fc_stats trace point
        ext4: remove unused enum EXT4_FC_COMMIT_FAILED
        ext4: warn when dirtying page w/o buffers in data=journal mode
        doc: fixed a typo in ext4 documentation
        ext4: make mb_optimize_scan performance mount option work with extents
        ext4: make mb_optimize_scan option work with set/unset mount cmd
        ext4: don't BUG if someone dirty pages without asking ext4 first
        ext4: remove redundant assignment to variable split_flag1
        ext4: fix underflow in ext4_max_bitmap_size()
        ext4: fix ext4_mb_clear_bb() kernel-doc comment
        ext4: fix fs corruption when tring to remove a non-empty directory with IO error
        ...
      9b03992f
    • Linus Torvalds's avatar
      Merge tag 'nfsd-5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux · 14705fda
      Linus Torvalds authored
      Pull nfsd updates from Chuck Lever:
       "New features:
      
         - NFSv3 support in NFSD is now always built
      
         - Added NFSD support for the NFSv4 birth-time file attribute
      
         - Added support for storing and displaying sockaddrs in trace points
      
         - NFSD now recognizes RPC_AUTH_TLS probes
      
        Performance improvements:
      
         - Optimized the svc transport enqueuing mechanism
      
         - Added micro-optimizations for the duplicate reply cache
      
        Notable bug fixes:
      
         - Allocation of the NFSD file cache hash table is more reliable"
      
      * tag 'nfsd-5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux: (30 commits)
        nfsd: fix using the correct variable for sizeof()
        nfsd: use correct format characters
        NFSD: prevent integer overflow on 32 bit systems
        NFSD: prevent underflow in nfssvc_decode_writeargs()
        fs/lock: documentation cleanup. Replace inode->i_lock with flc_lock.
        NFSD: Fix nfsd_breaker_owns_lease() return values
        NFSD: Clean up _lm_ operation names
        arch: Remove references to CONFIG_NFSD_V3 in the default configs
        NFSD: Remove CONFIG_NFSD_V3
        nfsd: more robust allocation failure handling in nfsd_file_cache_init
        SUNRPC: Teach server to recognize RPC_AUTH_TLS
        NFSD: Move svc_serv_ops::svo_function into struct svc_serv
        NFSD: Remove svc_serv_ops::svo_module
        SUNRPC: Remove svc_shutdown_net()
        SUNRPC: Rename svc_close_xprt()
        SUNRPC: Rename svc_create_xprt()
        SUNRPC: Remove svo_shutdown method
        SUNRPC: Merge svc_do_enqueue_xprt() into svc_enqueue_xprt()
        SUNRPC: Remove the .svo_enqueue_xprt method
        SUNRPC: Record endpoint information in trace log
        ...
      14705fda
    • Linus Torvalds's avatar
      Merge tag '5.18-smb3-fixes-part1' of git://git.samba.org/sfrench/cifs-2.6 · 105b6c05
      Linus Torvalds authored
      Pull cfis updates from Steve French:
       "Handlecache,  unmount, fiemap and two reconnect fixes"
      
      * tag '5.18-smb3-fixes-part1' of git://git.samba.org/sfrench/cifs-2.6:
        cifs: use a different reconnect helper for non-cifsd threads
        cifs: we do not need a spinlock around the tree access during umount
        Adjust cifssb maximum read size
        cifs: truncate the inode and mapping when we simulate fcollapse
        cifs: fix handlecache and multiuser
      105b6c05
    • Linus Torvalds's avatar
      Merge tag 'f2fs-for-5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs · ef510682
      Linus Torvalds authored
      Pull f2fs updates from Jaegeuk Kim:
       "In this cycle, f2fs has some performance improvements for Android
        workloads such as using read-unfair rwsems and adding some sysfs
        entries to control GCs and discard commands in more details. In
        addtiion, it has some tunings to improve the recovery speed after
        sudden power-cut.
      
        Enhancement:
         - add reader-unfair rwsems with F2FS_UNFAIR_RWSEM: will replace with
           generic API support
         - adjust to make the readahead/recovery flow more efficiently
         - sysfs entries to control issue speeds of GCs and Discard commands
         - enable idmapped mounts
      
        Bug fix:
         - correct wrong error handling routines
         - fix missing conditions in quota
         - fix a potential deadlock between writeback and block plug routines
         - fix a deadlock btween freezefs and evict_inode
      
        We've added some boundary checks to avoid kernel panics on corrupted
        images, and several minor code clean-ups"
      
      * tag 'f2fs-for-5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs: (27 commits)
        f2fs: fix to do sanity check on .cp_pack_total_block_count
        f2fs: make gc_urgent and gc_segment_mode sysfs node readable
        f2fs: use aggressive GC policy during f2fs_disable_checkpoint()
        f2fs: fix compressed file start atomic write may cause data corruption
        f2fs: initialize sbi->gc_mode explicitly
        f2fs: introduce gc_urgent_mid mode
        f2fs: compress: fix to print raw data size in error path of lz4 decompression
        f2fs: remove redundant parameter judgment
        f2fs: use spin_lock to avoid hang
        f2fs: don't get FREEZE lock in f2fs_evict_inode in frozen fs
        f2fs: remove unnecessary read for F2FS_FITS_IN_INODE
        f2fs: introduce F2FS_UNFAIR_RWSEM to support unfair rwsem
        f2fs: avoid an infinite loop in f2fs_sync_dirty_inodes
        f2fs: fix to do sanity check on curseg->alloc_type
        f2fs: fix to avoid potential deadlock
        f2fs: quota: fix loop condition at f2fs_quota_sync()
        f2fs: Restore rwsem lockdep support
        f2fs: fix missing free nid in f2fs_handle_failed_inode
        f2fs: support idmapped mounts
        f2fs: add a way to limit roll forward recovery time
        ...
      ef510682
    • Linus Torvalds's avatar
      Merge tag 'erofs-for-5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs · aab4ed58
      Linus Torvalds authored
      Pull erofs updates from Gao Xiang:
       "In this cycle, we continue converting to use meta buffers for all
        remaining uncompressed paths to prepare for the upcoming subpage,
        folio and fscache features.
      
        We also fixed a double-free issue when sysfs initialization fails,
        which was reported by syzbot.
      
        Besides, in order for the userspace to control per-file timestamp
        easier, we now switch to record mtime instead of ctime with a
        compatible feature marked. And there are also some code cleanups and
        documentation update as usual.
      
        Summary:
      
         - Avoid using page structure directly for all uncompressed paths
      
         - Fix a double-free issue when sysfs initialization fails
      
         - Complete DAX description for erofs
      
         - Use mtime instead since there's no (easy) way for users to control
           ctime
      
         - Several code cleanups"
      
      * tag 'erofs-for-5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs:
        erofs: rename ctime to mtime
        erofs: use meta buffers for inode lookup
        erofs: use meta buffers for reading directories
        fs: erofs: add sanity check for kobject in erofs_unregister_sysfs
        erofs: refine managed inode stuffs
        erofs: clean up z_erofs_extent_lookback
        erofs: silence warnings related to impossible m_plen
        Documentation/filesystem/dax: update DAX description on erofs
        erofs: clean up preload_compressed_pages()
        erofs: get rid of `struct z_erofs_collector'
        erofs: use meta buffers for erofs_read_superblock()
      aab4ed58
    • Linus Torvalds's avatar
      Merge tag 'fscrypt-for-linus' of git://git.kernel.org/pub/scm/fs/fscrypt/fscrypt · 881b5687
      Linus Torvalds authored
      Pull fscrypt updates from Eric Biggers:
       "Add support for direct I/O on encrypted files when blk-crypto (inline
        encryption) is being used for file contents encryption"
      
      * tag 'fscrypt-for-linus' of git://git.kernel.org/pub/scm/fs/fscrypt/fscrypt:
        fscrypt: update documentation for direct I/O support
        f2fs: support direct I/O with fscrypt using blk-crypto
        ext4: support direct I/O with fscrypt using blk-crypto
        iomap: support direct I/O with fscrypt using blk-crypto
        fscrypt: add functions for direct I/O support
      881b5687
    • Linus Torvalds's avatar
      Revert "random: block in /dev/urandom" · 0313bc27
      Linus Torvalds authored
      This reverts commit 6f98a4bf.
      
      It turns out we still can't do this.  Way too many platforms that don't
      have any real source of randomness at boot and no jitter entropy because
      they don't even have a cycle counter.
      
      As reported by Guenter Roeck:
      
       "This causes a large number of qemu boot test failures for various
        architectures (arm, m68k, microblaze, sparc32, xtensa are the ones I
        observed).
      
        Common denominator is that boot hangs at 'Saving random seed:'"
      
      This isn't hugely unexpected - we tried it, it failed, so now we'll
      revert it.
      
      Link: https://lore.kernel.org/all/20220322155820.GA1745955@roeck-us.net/Reported-and-bisected-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Cc: Jason Donenfeld <Jason@zx2c4.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      0313bc27
    • John Garry's avatar
      perf tools: Fix dependency for version file creation · 4e666cdb
      John Garry authored
      The version generated by perf may not be correct by just changing the
      head commit, like this:
      
        $ git log --pretty=format:"%H" -n 1
        b5d9d4708a24ac1889a30e9aedf8af8d73102139
        $ perf -v
        perf version 5.16.gb5d9d4708a24
        $ git reset --hard HEAD^
        HEAD is now at 629f520b265f
        $ make
        ...
        $ ./perf -v
        perf version 5.16.gb5d9d4708a24
      
      The dependency to building PERF-VERSION-FILE should also include ORIG_HEAD,
      as this changes when changing the head commit (while HEAD does not).
      Signed-off-by: default avatarJohn Garry <john.garry@huawei.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Ian Rogers <irogers@google.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: Robert Richter <rric@kernel.org>
      Link: https://lore.kernel.org/r/1645449409-158238-2-git-send-email-john.garry@huawei.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      4e666cdb
    • Linus Torvalds's avatar
      Merge tag 'audit-pr-20220321' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit · b47d5a4f
      Linus Torvalds authored
      Pull audit update from Paul Moore:
       "Just one audit patch queued for v5.18:
      
         - Change the AUDIT_TIME_* record generation so that they are
           generated at syscall exit time and subject to all of the normal
           syscall exit filtering.
      
           This should help reduce noise and ensure those records which are
           most relevant to the admin's audit configuration are recorded in
           the audit log"
      
      * tag 'audit-pr-20220321' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit:
        audit: log AUDIT_TIME_* records only from rules
      b47d5a4f
    • Linus Torvalds's avatar
      Merge tag 'selinux-pr-20220321' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux · c269497d
      Linus Torvalds authored
      Pull selinux updates from Paul Moore:
       "We've got a number of SELinux patches queued up, the highlights are:
      
         - Fixup the security_fs_context_parse_param() LSM hook so it executes
           all of the LSM hook implementations unless a serious error occurs.
      
           We also correct the SELinux hook implementation so that it returns
           zero on success.
      
         - In addition to a few SELinux mount option parsing fixes, we
           simplified the parsing by moving it earlier in the process.
      
           The logic was that it was unlikely an admin/user would use the new
           mount API and not have the policy loaded before passing the SELinux
           options.
      
         - Properly fixed the LSM/SELinux/SCTP hooks with the addition of the
           security_sctp_assoc_established() hook.
      
           This work was done in conjunction with the netdev folks and should
           complete the move of the SCTP labeling from the endpoints to the
           associations.
      
         - Fixed a variety of sparse warnings caused by changes in the "__rcu"
           markings of some core kernel structures.
      
         - Ensure we access the superblock's LSM security blob using the
           stacking-safe accessors.
      
         - Added the ability for the kernel to always allow FIOCLEX and
           FIONCLEX if the "ioctl_skip_cloexec" policy capability is
           specified.
      
         - Various constifications improvements, type casting improvements,
           additional return value checks, and dead code/parameter removal.
      
         - Documentation fixes"
      
      * tag 'selinux-pr-20220321' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux: (23 commits)
        selinux: shorten the policy capability enum names
        docs: fix 'make htmldocs' warning in SCTP.rst
        selinux: allow FIOCLEX and FIONCLEX with policy capability
        selinux: use correct type for context length
        selinux: drop return statement at end of void functions
        security: implement sctp_assoc_established hook in selinux
        security: add sctp_assoc_established hook
        selinux: parse contexts for mount options early
        selinux: various sparse fixes
        selinux: try to use preparsed sid before calling parse_sid()
        selinux: Fix selinux_sb_mnt_opts_compat()
        LSM: general protection fault in legacy_parse_param
        selinux: fix a type cast problem in cred_init_security()
        selinux: drop unused macro
        selinux: simplify cred_init_security
        selinux: do not discard const qualifier in cast
        selinux: drop unused parameter of avtab_insert_node
        selinux: drop cast to same type
        selinux: enclose macro arguments in parenthesis
        selinux: declare name parameter of hash_eval const
        ...
      c269497d
    • Linus Torvalds's avatar
      Merge tag 'integrity-v5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity · 7f313ff0
      Linus Torvalds authored
      Pull integrity subsystem updates from Mimi Zohar:
       "Except for extending the 'encrypted' key type to support user provided
        data, the rest is code cleanup, __setup() usage bug fix, and a trivial
        change"
      
      * tag 'integrity-v5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity:
        MAINTAINERS: add missing security/integrity/platform_certs
        EVM: fix the evm= __setup handler return value
        KEYS: encrypted: Instantiate key with user-provided decrypted data
        ima: define ima_max_digest_data struct without a flexible array variable
        ima: rename IMA_ACTION_FLAGS to IMA_NONACTION_FLAGS
        ima: Return error code obtained from securityfs functions
        MAINTAINERS: add missing "security/integrity" directory
        ima: Fix trivial typos in the comments
      7f313ff0
    • Linus Torvalds's avatar
      Merge tag 'Smack-for-5.18' of https://github.com/cschaufler/smack-next · 2c5a5358
      Linus Torvalds authored
      Pull smack update from Casey Schaufler:
       "A single fix to repair an incorrect use of ntohs() in IPv6 audit code.
        It's very minor and went unnoticed until lkp found it.
      
        It's been in next and passes all tests"
      
      * tag 'Smack-for-5.18' of https://github.com/cschaufler/smack-next:
        Fix incorrect type in assignment of ipv6 port for audit
      2c5a5358
    • Linus Torvalds's avatar
      Merge branch 'keys-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs · 6ca014cd
      Linus Torvalds authored
      Pull watch_queue fixes from David Howells:
       "Here are fixes for a couple more watch_queue bugs, both found by syzbot:
      
         - Fix error cleanup in watch_queue_set_size() where it tries to clean
           up all the pointers in the page list, even if they've not been
           allocated yet[1]. Unfortunately, __free_page() doesn't treat a NULL
           pointer as being "do nothing".
      
           A second report[2] looks like it's probably the same bug, but on
           arm64 rather than x86_64, but there's no reproducer.
      
         - Fix a missing kfree in free_watch() to actually free the watch[3]"
      
      Link: https://lore.kernel.org/r/000000000000b1807c05daad8f98@google.com/ [1]
      Link: https://lore.kernel.org/r/000000000000035b9c05daae8a5e@google.com/ [2]
      Link: https://lore.kernel.org/r/000000000000bc8eaf05dab91c63@google.com/ [3]
      
      * 'keys-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs:
        watch_queue: Actually free the watch
        watch_queue: Fix NULL dereference in error cleanup
      6ca014cd
    • Linus Torvalds's avatar
      Merge tag 'bounds-fixes-v5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux · 8565d644
      Linus Torvalds authored
      Pull bounds fixes from Kees Cook:
       "These are a handful of buffer and array bounds fixes that I've been
        carrying in preparation for the coming memcpy improvements and the
        enabling of '-Warray-bounds' globally.
      
        There are additional similar fixes in other maintainer's trees, but
        these ended up getting carried by me. :)"
      
      * tag 'bounds-fixes-v5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
        media: omap3isp: Use struct_group() for memcpy() region
        tpm: vtpm_proxy: Check length to avoid compiler warning
        alpha: Silence -Warray-bounds warnings
        m68k: cmpxchg: Dereference matching size
        intel_th: msu: Use memset_startat() for clearing hw header
        KVM: x86: Replace memset() "optimization" with normal per-field writes
      8565d644
    • Linus Torvalds's avatar
      Merge tag 'overflow-v5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux · d0858cbd
      Linus Torvalds authored
      Pull overflow updates from Kees Cook:
       "These changes come in roughly two halves: support of Gustavo A. R.
        Silva's struct_size() work via additional helpers for catching
        overflow allocation size calculations, and conversions of selftests to
        KUnit (which includes some tweaks for UML + Clang):
      
         - Convert overflow selftest to KUnit
      
         - Convert stackinit selftest to KUnit
      
         - Implement size_t saturating arithmetic helpers
      
         - Allow struct_size() to be used in initializers"
      
      * tag 'overflow-v5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
        lib: stackinit: Convert to KUnit
        um: Allow builds with Clang
        lib: overflow: Convert to Kunit
        overflow: Provide constant expression struct_size
        overflow: Implement size_t saturating arithmetic helpers
        test_overflow: Regularize test reporting output
      d0858cbd
    • Linus Torvalds's avatar
      Merge tag 'hardening-v5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux · 2142b7f0
      Linus Torvalds authored
      Pull kernel hardening updates from Kees Cook:
      
       - Add arm64 Shadow Call Stack support for GCC 12 (Dan Li)
      
       - Avoid memset with stack offset randomization under Clang (Marco
         Elver)
      
       - Clean up stackleak plugin to play nice with .noinstr (Kees Cook)
      
       - Check stack depth for greater usercopy hardening coverage (Kees Cook)
      
      * tag 'hardening-v5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
        arm64: Add gcc Shadow Call Stack support
        m68k: Implement "current_stack_pointer"
        xtensa: Implement "current_stack_pointer"
        usercopy: Check valid lifetime via stack depth
        stack: Constrain and fix stack offset randomization with Clang builds
        stack: Introduce CONFIG_RANDOMIZE_KSTACK_OFFSET
        gcc-plugins/stackleak: Ignore .noinstr.text and .entry.text
        gcc-plugins/stackleak: Exactly match strings instead of prefixes
        gcc-plugins/stackleak: Provide verbose mode
      2142b7f0
    • Linus Torvalds's avatar
      Merge tag 'pstore-v5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux · fd2d7a4a
      Linus Torvalds authored
      Pull pstore updates from Kees Cook:
      
       - Don't use semaphores in always-atomic-context code (Jann Horn)
      
       - Add "ECC:" prefix to ECC messages (Vincent Whitchurch)
      
      * tag 'pstore-v5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
        pstore: Don't use semaphores in always-atomic-context code
        pstore: Add prefix to ECC messages
      fd2d7a4a
    • Linus Torvalds's avatar
      Merge tag 'execve-v5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux · b7a801f3
      Linus Torvalds authored
      Pull execve updates from Kees Cook:
       "Execve and binfmt updates.
      
        Eric and I have stepped up to be the active maintainers of this area,
        so here's our first collection. The bulk of the work was in coredump
        handling fixes; additional details are noted below:
      
         - Handle unusual AT_PHDR offsets (Akira Kawata)
      
         - Fix initial mapping size when PT_LOADs are not ordered (Alexey
           Dobriyan)
      
         - Move more code under CONFIG_COREDUMP (Alexey Dobriyan)
      
         - Fix missing mmap_lock in file_files_note (Eric W. Biederman)
      
         - Remove a.out support for alpha and m68k (Eric W. Biederman)
      
         - Include first pages of non-exec ELF libraries in coredump (Jann
           Horn)
      
         - Don't write past end of notes for regset gap in coredump (Rick
           Edgecombe)
      
         - Comment clean-ups (Tom Rix)
      
         - Force single empty string when argv is empty (Kees Cook)
      
         - Add NULL argv selftest (Kees Cook)
      
         - Properly redefine PT_GNU_* in terms of PT_LOOS (Kees Cook)
      
         - MAINTAINERS: Update execve entry with tree (Kees Cook)
      
         - Introduce initial KUnit testing for binfmt_elf (Kees Cook)"
      
      * tag 'execve-v5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
        binfmt_elf: Don't write past end of notes for regset gap
        a.out: Stop building a.out/osf1 support on alpha and m68k
        coredump: Don't compile flat_core_dump when coredumps are disabled
        coredump: Use the vma snapshot in fill_files_note
        coredump/elf: Pass coredump_params into fill_note_info
        coredump: Remove the WARN_ON in dump_vma_snapshot
        coredump: Snapshot the vmas in do_coredump
        coredump: Move definition of struct coredump_params into coredump.h
        binfmt_elf: Introduce KUnit test
        ELF: Properly redefine PT_GNU_* in terms of PT_LOOS
        MAINTAINERS: Update execve entry with more details
        exec: cleanup comments
        fs/binfmt_elf: Refactor load_elf_binary function
        fs/binfmt_elf: Fix AT_PHDR for unusual ELF files
        binfmt: move more stuff undef CONFIG_COREDUMP
        selftests/exec: Test for empty string on NULL argv
        exec: Force single empty string when argv is empty
        coredump: Also dump first pages of non-executable ELF libraries
        ELF: fix overflow in total mapping size calculation
      b7a801f3
    • Linus Torvalds's avatar
      Merge tag 'spi-v5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi · ad9c6ee6
      Linus Torvalds authored
      Pull spi updates from Mark Brown:
       "The overwhelming bulk of this pull request is a change from Uwe
        Kleine-König which changes the return type of the remove() function to
        void as part of some wider work he's doing to do this for all bus
        types, causing updates to most SPI device drivers. The branch with
        that on has been cross merged with a couple of other trees which added
        new SPI drivers this cycle, I'm not expecting any build issues
        resulting from the change.
      
        Otherwise it's been a relatively quiet release with some new device
        support, a few minor features and the welcome completion of the
        conversion of the subsystem to use GPIO descriptors rather than
        numbers:
      
         - Change return type of remove() to void.
      
         - Completion of the conversion of SPI controller drivers to use GPIO
           descriptors rather than numbers.
      
         - Quite a few DT schema conversions.
      
         - Support for multiple SPI devices on a bus in ACPI systems.
      
         - Big overhaul of the PXA2xx SPI driver.
      
         - Support for AMD AMDI0062, Intel Raptor Lake, Mediatek MT7986 and
           MT8186, nVidia Tegra210 and Tegra234, Renesas RZ/V2L, Tesla FSD and
           Sunplus SP7021"
      
      [ And this is obviously where that spi change that snuck into the
        regulator tree _should_ have been :^]
      
      * tag 'spi-v5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: (124 commits)
        spi: fsi: Implement a timeout for polling status
        spi: Fix erroneous sgs value with min_t()
        spi: tegra20: Use of_device_get_match_data()
        spi: mediatek: add ipm design support for MT7986
        spi: Add compatible for MT7986
        spi: sun4i: fix typos in comments
        spi: mediatek: support tick_delay without enhance_timing
        spi: Update clock-names property for arm pl022
        spi: rockchip-sfc: fix platform_get_irq.cocci warning
        spi: s3c64xx: Add spi port configuration for Tesla FSD SoC
        spi: dt-bindings: samsung: Add fsd spi compatible
        spi: topcliff-pch: Prevent usage of potentially stale DMA device
        spi: tegra210-quad: combined sequence mode
        spi: tegra210-quad: add acpi support
        spi: npcm-fiu: Fix typo ("npxm")
        spi: Fix Tegra QSPI example
        spi: qup: replace spin_lock_irqsave by spin_lock in hard IRQ
        spi: cadence: fix platform_get_irq.cocci warning
        spi: Update NXP Flexspi maintainer details
        dt-bindings: mfd: maxim,max77802: Convert to dtschema
        ...
      ad9c6ee6
    • Linus Torvalds's avatar
      Merge tag 'regulator-v5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator · d6ccf451
      Linus Torvalds authored
      Pull regulator updates from Mark Brown:
       "Quite a quiet release for the regulator API, mainly a few new drivers
        plus a lot of fixes for the Raspberry Pi panel driver.
      
        There's also a SPI commit in here which I managed to apply to the
        wrong tree and then didn't notice until there were too many commits on
        top of it, sorry about that.
      
         - Make it easier to use the virtual consumer test driver with DT
           systems.
      
         - Substantial overhaul providing various fixes and robustness
           improvements for the Raspberry Pi panel driver.
      
         - Support for Qualcomm PMX65 and SDX65, Richtek RT5190A, and Texas
           Instruments TPS62864x"
      
      * tag 'regulator-v5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (26 commits)
        regulator: qcom-rpmh: Add support for SDX65
        regulator: dt-bindings: Add PMX65 compatibles
        regulator: vctrl: Use min() instead of doing it manually
        regulator: rt5190a: Add support for Richtek RT5190A PMIC
        regulator: Add bindings for Richtek RT5190A PMIC
        regulator: Convert TPS62360 binding to json-schema
        regulator: cleanup comments
        regulator: virtual: add devicetree support
        regulator: virtual: warn against production use
        regulator: virtual: use dev_err_probe()
        regulator: tps62864: Fix bindings for SW property
        regulator: Add support for TPS6286x
        regulator: Add bindings for TPS62864x
        regulator/rpi-panel-attiny: Use two transactions for I2C read
        regulator/rpi-panel-attiny: Use the regmap cache
        regulator: rpi-panel: Remove get_brightness hook
        regulator: rpi-panel: Add GPIO control for panel and touch resets
        regulator: rpi-panel: Convert to drive lines directly
        regulator: rpi-panel: Ensure the backlight is off during probe.
        regulator: rpi-panel: Serialise operations.
        ...
      d6ccf451
    • Linus Torvalds's avatar
      Merge tag 'regmap-v5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap · a50a8c38
      Linus Torvalds authored
      Pull regmap updates from Mark Brown:
       "A couple of small fixes, plus some new features that enable us to
        handle devices that reformat register addresses depending on the bus
        used to handle the control interface more gracefully"
      
      * tag 'regmap-v5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap:
        regmap: allow a defined reg_base to be added to every address
        regmap: add configurable downshift for addresses
        regmap: irq: cleanup comments
        regmap-irq: Fix typo in comment
      a50a8c38
    • Linus Torvalds's avatar
      Merge tag 'hwmon-for-v5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging · fd276877
      Linus Torvalds authored
      Pull hwmon updates from Guenter Roeck:
       "New drivers:
      
         - Texas Instruments TMP464 and TMP468 driver
      
         - Vicor PLI1209BC Digital Supervisor driver
      
         - ASUS EC driver
      
        Improvements to existing drivers:
      
         - adt7x10:
             - Convert to use regmap
             - convert to use with_info API
             - use hwmon_notify_event
             - other cleanup
      
         - aquacomputer_d5next:
             - Add support for Aquacomputer Farbwerk 360
      
         - asus_wmi_sensors:
             - Add ASUS ROG STRIX B450-F GAMING II
      
         - asus_wmi_ec_sensors:
             - Support T_Sensor on Prime X570-Pro
             - Deprecate driver (replaced by new driver)
      
         - axi-fan-control:
             - Use hwmon_notify_event
      
         - dell-smm:
             - Clean up CONFIG_I8K
             - disable fan type support for Inspiron 3505
             - various other cleanup
      
         - hwmon core:
             - Report attribute name with udev events
             - Add "label" attribute to ABI,
             - Add support for pwm auto channels attribute
      
         - max6639:
             - Add regulator support
      
         - lm70:
             - Add support for TI TMP125
      
         - lm83:
             - Cleanup, convert to use with_info API
      
         - mlxreg-fan:
             - Use pwm attribute for setting fan speed low limit
      
         - nct6775:
             - Add board ID's for ASUS ROG STRIX Z390/Z490/X570-* / PRIME
               X570-P, PRIME B550-PLUS, ASUS Pro B550M-C/PRIME B550M-A
             - Add support for TSI temperature registers
      
         - occ:
             - Add various new sysfs attributes
      
         - pmbus core:
             - Handle VIN unit off status
             - Add regulator supply into macro
             - Add get_error_flags support to regulator ops
      
         - pmbus/adm1275:
             - Allow setting sample averaging
      
         - pmbus/lm25066:
             - Add regulator support
      
         - pmbus/xdpe12284:
             - Add support for xdpe11280
             - register as regulator
      
         - powr1220:
             - Convert to with_info API
             - Add support for Lattice's POWR1014 power manager IC
      
         - sch56xx:
             - Cleanup and minor improvements
      
         - sch5627:
             - Add pwmX_auto_channels_temp support
      
         - tc654:
             - Add thermal_cooling device support"
      
      * tag 'hwmon-for-v5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: (86 commits)
        hwmon: (dell-smm) Add Inspiron 3505 to fan type blacklist
        hwmon: (pmbus) Add Vin unit off handling
        hwmon: (scpi-hwmon): Use of_device_get_match_data()
        hwmon: (axi-fan-control) Use hwmon_notify_event
        hwmon: (vexpress-hwmon) Use of_device_get_match_data()
        hwmon: Add driver for Texas Instruments TMP464 and TMP468
        dt-bindings: hwmon: add tmp464.yaml
        dt-bindings: hwmon: Add sample averaging properties for ADM1275
        hwmon: (adm1275) Allow setting sample averaging
        hwmon: (xdpe12284) Add regulator support
        hwmon: (xdpe12284) Add support for xdpe11280
        dt-bindings: trivial-devices: Add xdpe11280
        hwmon: (aquacomputer_d5next) Add support for Aquacomputer Farbwerk 360
        hwmon: (sch5627) Add pwmX_auto_channels_temp support
        hwmon: (core) Add support for pwm auto channels attribute
        hwmon: (lm70) Add ti,tmp125 support
        dt-bindings: Add ti,tmp125 temperature sensor binding
        hwmon: (pmbus/pli1209bc) Add regulator support
        hwmon: (pmbus) Add support for pli1209bc
        dt-bindings:trivial-devices: Add pli1209bc
        ...
      fd276877
    • Linus Torvalds's avatar
      Merge tag 'for-5.18/alloc-cleanups-2022-03-18' of git://git.kernel.dk/linux-block · d347ee54
      Linus Torvalds authored
      Pull bio_alloc() cleanups from Jens Axboe:
       "Filesystem cleanups to pass the bio op to bio_alloc() instead of
        setting it just before bio submission".
      
      * tag 'for-5.18/alloc-cleanups-2022-03-18' of git://git.kernel.dk/linux-block:
        f2fs: pass the bio operation to bio_alloc_bioset
        f2fs: don't pass a bio to f2fs_target_device
        nilfs2: pass the operation to bio_alloc
        ext4: pass the operation to bio_alloc
        mpage: pass the operation to bio_alloc
      d347ee54
    • Linus Torvalds's avatar
      Merge tag 'for-5.18/drivers-2022-03-18' of git://git.kernel.dk/linux-block · 69d1dea8
      Linus Torvalds authored
      Pull block driver updates from Jens Axboe:
      
       - NVMe updates via Christoph:
            - add vectored-io support for user-passthrough (Kanchan Joshi)
            - add verbose error logging (Alan Adamson)
            - support buffered I/O on block devices in nvmet (Chaitanya
              Kulkarni)
            - central discovery controller support (Martin Belanger)
            - fix and extended the globally unique idenfier validation
              (Christoph)
            - move away from the deprecated IDA APIs (Sagi Grimberg)
            - misc code cleanup (Keith Busch, Max Gurtovoy, Qinghua Jin,
              Chaitanya Kulkarni)
            - add lockdep annotations for in-kernel sockets (Chris Leech)
            - use vmalloc for ANA log buffer (Hannes Reinecke)
            - kerneldoc fixes (Chaitanya Kulkarni)
            - cleanups (Guoqing Jiang, Chaitanya Kulkarni, Christoph)
            - warn about shared namespaces without multipathing (Christoph)
      
       - MD updates via Song with a set of cleanups (Christoph, Mariusz, Paul,
         Erik, Dirk)
      
       - loop cleanups and queue depth configuration (Chaitanya)
      
       - null_blk cleanups and fixes (Chaitanya)
      
       - Use descriptive init/exit names in virtio_blk (Randy)
      
       - Use bvec_kmap_local() in drivers (Christoph)
      
       - bcache fixes (Mingzhe)
      
       - xen blk-front persistent grant speedups (Juergen)
      
       - rnbd fix and cleanup (Gioh)
      
       - Misc fixes (Christophe, Colin)
      
      * tag 'for-5.18/drivers-2022-03-18' of git://git.kernel.dk/linux-block: (76 commits)
        virtio_blk: eliminate anonymous module_init & module_exit
        nvme: warn about shared namespaces without CONFIG_NVME_MULTIPATH
        nvme: remove nvme_alloc_request and nvme_alloc_request_qid
        nvme: cleanup how disk->disk_name is assigned
        nvmet: move the call to nvmet_ns_changed out of nvmet_ns_revalidate
        nvmet: use snprintf() with PAGE_SIZE in configfs
        nvmet: don't fold lines
        nvmet-rdma: fix kernel-doc warning for nvmet_rdma_device_removal
        nvmet-fc: fix kernel-doc warning for nvmet_fc_unregister_targetport
        nvmet-fc: fix kernel-doc warning for nvmet_fc_register_targetport
        nvme-tcp: lockdep: annotate in-kernel sockets
        nvme-tcp: don't fold the line
        nvme-tcp: don't initialize ret variable
        nvme-multipath: call bio_io_error in nvme_ns_head_submit_bio
        nvme-multipath: use vmalloc for ANA log buffer
        xen/blkfront: speed up purge_persistent_grants()
        raid5: initialize the stripe_head embeeded bios as needed
        raid5-cache: statically allocate the recovery ra bio
        raid5-cache: fully initialize flush_bio when needed
        raid5-ppl: fully initialize the bio in ppl_new_iounit
        ...
      69d1dea8
  3. 21 Mar, 2022 2 commits
    • Linus Torvalds's avatar
      Merge tag 'for-5.18/block-2022-03-18' of git://git.kernel.dk/linux-block · 616355cc
      Linus Torvalds authored
      Pull block updates from Jens Axboe:
      
       - BFQ cleanups and fixes (Yu, Zhang, Yahu, Paolo)
      
       - blk-rq-qos completion fix (Tejun)
      
       - blk-cgroup merge fix (Tejun)
      
       - Add offline error return value to distinguish it from an IO error on
         the device (Song)
      
       - IO stats fixes (Zhang, Christoph)
      
       - blkcg refcount fixes (Ming, Yu)
      
       - Fix for indefinite dispatch loop softlockup (Shin'ichiro)
      
       - blk-mq hardware queue management improvements (Ming)
      
       - sbitmap dead code removal (Ming, John)
      
       - Plugging merge improvements (me)
      
       - Show blk-crypto capabilities in sysfs (Eric)
      
       - Multiple delayed queue run improvement (David)
      
       - Block throttling fixes (Ming)
      
       - Start deprecating auto module loading based on dev_t (Christoph)
      
       - bio allocation improvements (Christoph, Chaitanya)
      
       - Get rid of bio_devname (Christoph)
      
       - bio clone improvements (Christoph)
      
       - Block plugging improvements (Christoph)
      
       - Get rid of genhd.h header (Christoph)
      
       - Ensure drivers use appropriate flush helpers (Christoph)
      
       - Refcounting improvements (Christoph)
      
       - Queue initialization and teardown improvements (Ming, Christoph)
      
       - Misc fixes/improvements (Barry, Chaitanya, Colin, Dan, Jiapeng,
         Lukas, Nian, Yang, Eric, Chengming)
      
      * tag 'for-5.18/block-2022-03-18' of git://git.kernel.dk/linux-block: (127 commits)
        block: cancel all throttled bios in del_gendisk()
        block: let blkcg_gq grab request queue's refcnt
        block: avoid use-after-free on throttle data
        block: limit request dispatch loop duration
        block/bfq-iosched: Fix spelling mistake "tenative" -> "tentative"
        sr: simplify the local variable initialization in sr_block_open()
        block: don't merge across cgroup boundaries if blkcg is enabled
        block: fix rq-qos breakage from skipping rq_qos_done_bio()
        block: flush plug based on hardware and software queue order
        block: ensure plug merging checks the correct queue at least once
        block: move rq_qos_exit() into disk_release()
        block: do more work in elevator_exit
        block: move blk_exit_queue into disk_release
        block: move q_usage_counter release into blk_queue_release
        block: don't remove hctx debugfs dir from blk_mq_exit_queue
        block: move blkcg initialization/destroy into disk allocation/release handler
        sr: implement ->free_disk to simplify refcounting
        sd: implement ->free_disk to simplify refcounting
        sd: delay calling free_opal_dev
        sd: call sd_zbc_release_disk before releasing the scsi_device reference
        ...
      616355cc
    • Linus Torvalds's avatar
      Merge tag 'for-5.18/io_uring-statx-2022-03-18' of git://git.kernel.dk/linux-block · b080cee7
      Linus Torvalds authored
      Pull io_uring statx fixes from Jens Axboe:
       "On top of the main io_uring branch, this is to ensure that the
        filename component of statx is stable after submit.
      
        That requires a few VFS related changes"
      
      * tag 'for-5.18/io_uring-statx-2022-03-18' of git://git.kernel.dk/linux-block:
        io-uring: Make statx API stable
      b080cee7