1. 22 Mar, 2022 30 commits
    • 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
  2. 21 Mar, 2022 10 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
    • Linus Torvalds's avatar
      Merge tag 'for-5.18/io_uring-2022-03-18' of git://git.kernel.dk/linux-block · af472a9e
      Linus Torvalds authored
      Pull io_uring updates from Jens Axboe:
      
       - Fixes for current file position. Still doesn't have the f_pos_lock
         sorted, but it's a step in the right direction (Dylan)
      
       - Tracing updates (Dylan, Stefan)
      
       - Improvements to io-wq locking (Hao)
      
       - Improvements for provided buffers (me, Pavel)
      
       - Support for registered file descriptors (me, Xiaoguang)
      
       - Support for ring messages (me)
      
       - Poll improvements (me)
      
       - Fix for fixed buffers and non-iterator reads/writes (me)
      
       - Support for NAPI on sockets (Olivier)
      
       - Ring quiesce improvements (Usama)
      
       - Misc fixes (Olivier, Pavel)
      
      * tag 'for-5.18/io_uring-2022-03-18' of git://git.kernel.dk/linux-block: (42 commits)
        io_uring: terminate manual loop iterator loop correctly for non-vecs
        io_uring: don't check unrelated req->open.how in accept request
        io_uring: manage provided buffers strictly ordered
        io_uring: fold evfd signalling under a slower path
        io_uring: thin down io_commit_cqring()
        io_uring: shuffle io_eventfd_signal() bits around
        io_uring: remove extra barrier for non-sqpoll iopoll
        io_uring: fix provided buffer return on failure for kiocb_done()
        io_uring: extend provided buf return to fails
        io_uring: refactor timeout cancellation cqe posting
        io_uring: normilise naming for fill_cqe*
        io_uring: cache poll/double-poll state with a request flag
        io_uring: cache req->apoll->events in req->cflags
        io_uring: move req->poll_refs into previous struct hole
        io_uring: make tracing format consistent
        io_uring: recycle apoll_poll entries
        io_uring: remove duplicated member check for io_msg_ring_prep()
        io_uring: allow submissions to continue on error
        io_uring: recycle provided buffers if request goes async
        io_uring: ensure reads re-import for selected buffers
        ...
      af472a9e
    • Linus Torvalds's avatar
      Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 · 93e220a6
      Linus Torvalds authored
      Pull crypto updates from Herbert Xu:
       "API:
         - hwrng core now credits for low-quality RNG devices.
      
        Algorithms:
         - Optimisations for neon aes on arm/arm64.
         - Add accelerated crc32_be on arm64.
         - Add ffdheXYZ(dh) templates.
         - Disallow hmac keys < 112 bits in FIPS mode.
         - Add AVX assembly implementation for sm3 on x86.
      
        Drivers:
         - Add missing local_bh_disable calls for crypto_engine callback.
         - Ensure BH is disabled in crypto_engine callback path.
         - Fix zero length DMA mappings in ccree.
         - Add synchronization between mailbox accesses in octeontx2.
         - Add Xilinx SHA3 driver.
         - Add support for the TDES IP available on sama7g5 SoC in atmel"
      
      * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (137 commits)
        crypto: xilinx - Turn SHA into a tristate and allow COMPILE_TEST
        MAINTAINERS: update HPRE/SEC2/TRNG driver maintainers list
        crypto: dh - Remove the unused function dh_safe_prime_dh_alg()
        hwrng: nomadik - Change clk_disable to clk_disable_unprepare
        crypto: arm64 - cleanup comments
        crypto: qat - fix initialization of pfvf rts_map_msg structures
        crypto: qat - fix initialization of pfvf cap_msg structures
        crypto: qat - remove unneeded assignment
        crypto: qat - disable registration of algorithms
        crypto: hisilicon/qm - fix memset during queues clearing
        crypto: xilinx: prevent probing on non-xilinx hardware
        crypto: marvell/octeontx - Use swap() instead of open coding it
        crypto: ccree - Fix use after free in cc_cipher_exit()
        crypto: ccp - ccp_dmaengine_unregister release dma channels
        crypto: octeontx2 - fix missing unlock
        hwrng: cavium - fix NULL but dereferenced coccicheck error
        crypto: cavium/nitrox - don't cast parameter in bit operations
        crypto: vmx - add missing dependencies
        MAINTAINERS: Add maintainer for Xilinx ZynqMP SHA3 driver
        crypto: xilinx - Add Xilinx SHA3 driver
        ...
      93e220a6
    • Linus Torvalds's avatar
      Merge tag 'random-5.18-rc1-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/crng/random · 5628b8de
      Linus Torvalds authored
      Pull random number generator updates from Jason Donenfeld:
       "There have been a few important changes to the RNG's crypto, but the
        intent for 5.18 has been to shore up the existing design as much as
        possible with modern cryptographic functions and proven constructions,
        rather than actually changing up anything fundamental to the RNG's
        design.
      
        So it's still the same old RNG at its core as before: it still counts
        entropy bits, and collects from the various sources with the same
        heuristics as before, and so forth. However, the cryptographic
        algorithms that transform that entropic data into safe random numbers
        have been modernized.
      
        Just as important, if not more, is that the code has been cleaned up
        and re-documented. As one of the first drivers in Linux, going back to
        1.3.30, its general style and organization was showing its age and
        becoming both a maintenance burden and an auditability impediment.
      
        Hopefully this provides a more solid foundation to build on for the
        future. I encourage you to open up the file in full, and maybe you'll
        remark, "oh, that's what it's doing," and enjoy reading it. That, at
        least, is the eventual goal, which this pull begins working toward.
      
        Here's a summary of the various patches in this pull:
      
         - /dev/urandom and /dev/random now do the same thing, per the patch
           we discussed on the list. I think this is worth trying out. If it
           does appear problematic, I've made sure to keep it standalone and
           revertible without any conflicts.
      
         - Fixes and cleanups for numerous integer type problems, locking
           issues, and general code quality concerns.
      
         - The input pool's LFSR has been replaced with a cryptographically
           secure hash function, which has security and performance benefits
           alike, and consequently allows us to count entropy bits linearly.
      
         - The pre-init injection now uses a real hash function too, instead
           of an LFSR or vanilla xor.
      
         - The interrupt handler's fast_mix() function now uses one round of
           SipHash, rather than the fake crypto that was there before.
      
         - All additions of RDRAND and RDSEED now go through the input pool's
           hash function, in part to mitigate ridiculous hypothetical CPU
           backdoors, but more so to have a consistent interface for ingesting
           entropy that's easy to analyze, making everything happen one way,
           instead of a potpourri of different ways.
      
         - The crng now works on per-cpu data, while also being in accordance
           with the actual "fast key erasure RNG" design. This allows us to
           fix several boot-time race complications associated with the prior
           dynamically allocated model, eliminates much locking, and makes our
           backtrack protection more robust.
      
         - Batched entropy now erases doled out values so that it's backtrack
           resistant.
      
         - Working closely with Sebastian, the interrupt handler no longer
           needs to take any locks at all, as we punt the
           synchronized/expensive operations to a workqueue. This is
           especially nice for PREEMPT_RT, where taking spinlocks in irq
           context is problematic. It also makes the handler faster for the
           rest of us.
      
         - Also working with Sebastian, we now do the right thing on CPU
           hotplug, so that we don't use stale entropy or fail to accumulate
           new entropy when CPUs come back online.
      
         - We handle virtual machines that fork / clone / snapshot, using the
           "vmgenid" ACPI specification for retrieving a unique new RNG seed,
           which we can use to also make WireGuard (and in the future, other
           things) safe across VM forks.
      
         - Around boot time, we now try to reseed more often if enough entropy
           is available, before settling on the usual 5 minute schedule.
      
         - Last, but certainly not least, the documentation in the file has
           been updated considerably"
      
      * tag 'random-5.18-rc1-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/crng/random: (60 commits)
        random: check for signal and try earlier when generating entropy
        random: reseed more often immediately after booting
        random: make consistent usage of crng_ready()
        random: use SipHash as interrupt entropy accumulator
        wireguard: device: clear keys on VM fork
        random: provide notifier for VM fork
        random: replace custom notifier chain with standard one
        random: do not export add_vmfork_randomness() unless needed
        virt: vmgenid: notify RNG of VM fork and supply generation ID
        ACPI: allow longer device IDs
        random: add mechanism for VM forks to reinitialize crng
        random: don't let 644 read-only sysctls be written to
        random: give sysctl_random_min_urandom_seed a more sensible value
        random: block in /dev/urandom
        random: do crng pre-init loading in worker rather than irq
        random: unify cycles_t and jiffies usage and types
        random: cleanup UUID handling
        random: only wake up writers after zap if threshold was passed
        random: round-robin registers as ulong, not u32
        random: clear fast pool, crng, and batches in cpuhp bring up
        ...
      5628b8de
    • Linus Torvalds's avatar
      Merge tag 'pnp-5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · f400bea2
      Linus Torvalds authored
      Pull PnP update from Rafael Wysocki:
       "Replace acpi_bus_get_device() in the PNP code with
        acpi_fetch_acpi_dev() which is better"
      
      * tag 'pnp-5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        PNP: Replace acpi_bus_get_device()
      f400bea2
    • Linus Torvalds's avatar
      Merge tag 'thermal-5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · f648372d
      Linus Torvalds authored
      Pull thermal control updates from Rafael Wysocki:
       "As far as new functionality is concerned, there is a new thermal
        driver for the Intel Hardware Feedback Interface (HFI) along with some
        intel-speed-select utility changes to support it. There are also new
        DT compatible strings for a couple of platforms, and thermal zones on
        some platforms will be registered as HWmon sensors now.
      
        Apart from the above, some drivers are updated (fixes mostly) and
        there is a new piece of documentation for the Intel DPTF (Dynamic
        Power and Thermal Framework) sysfs interface.
      
        Specifics:
      
         - Add a new thermal driver for the Intel Hardware Feedback Interface
           (HFI) including the HFI initialization, HFI notification interrupt
           handling and sending CPU capabilities change messages to user space
           via the thermal netlink interface (Ricardo Neri, Srinivas
           Pandruvada, Nathan Chancellor, Randy Dunlap).
      
         - Extend the intel-speed-select utility to handle out-of-band CPU
           configuration changes and add support for the CPU capabilities
           change messages sent over the thermal netlink interface by the new
           HFI thermal driver to it (Srinivas Pandruvada).
      
         - Convert the DT bindings to yaml format for the Exynos platform and
           fix and update the MAINTAINERS file for this driver (Krzysztof
           Kozlowski).
      
         - Register the thermal zones as HWmon sensors for the QCom's Tsens
           driver and TI thermal platforms (Dmitry Baryshkov, Romain Naour).
      
         - Add the msm8953 compatible documentation in the bindings (Luca
           Weiss).
      
         - Add the sm8150 platform support to the QCom LMh driver's DT binding
           (Thara Gopinath).
      
         - Check the command result from the IPC command to the BPMP in the
           Tegra driver (Mikko Perttunen).
      
         - Silence the error for normal configuration where the interrupt is
           optionnal in the Broadcom thermal driver (Florian Fainelli).
      
         - Remove remaining dead code from the TI thermal driver (Yue
           Haibing).
      
         - Don't use bitmap_weight() in end_power_clamp() in the powerclamp
           driver (Yury Norov).
      
         - Update the OS policy capabilities handshake in the int340x thermal
           driver (Srinivas Pandruvada).
      
         - Increase the policies bitmap size in int340x (Srinivas Pandruvada).
      
         - Replace acpi_bus_get_device() with acpi_fetch_acpi_dev() in the
           int340x thermal driver (Rafael Wysocki).
      
         - Check for NULL after calling kmemdup() in int340x (Jiasheng Jiang).
      
         - Add Intel Dynamic Power and Thermal Framework (DPTF) kernel
           interface documentation (Srinivas Pandruvada).
      
         - Fix bullet list warning in the thermal documentation (Randy
           Dunlap)"
      
      * tag 'thermal-5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (30 commits)
        thermal: int340x: Update OS policy capability handshake
        thermal: int340x: Increase bitmap size
        Documentation: thermal: DPTF Documentation
        MAINTAINERS: thermal: samsung: update Krzysztof Kozlowski's email
        thermal/drivers/ti-soc-thermal: Remove unused function ti_thermal_get_temp()
        thermal/drivers/brcmstb_thermal: Interrupt is optional
        thermal: tegra-bpmp: Handle errors in BPMP response
        drivers/thermal/ti-soc-thermal: Add hwmon support
        dt-bindings: thermal: tsens: Add msm8953 compatible
        dt-bindings: thermal: Add sm8150 compatible string for LMh
        thermal/drivers/qcom/lmh: Add support for sm8150
        thermal/drivers/tsens: register thermal zones as hwmon sensors
        MAINTAINERS: thermal: samsung: Drop obsolete properties
        dt-bindings: thermal: samsung: Convert to dtschema
        tools/power/x86/intel-speed-select: v1.12 release
        tools/power/x86/intel-speed-select: HFI support
        tools/power/x86/intel-speed-select: OOB daemon mode
        thermal: intel: hfi: INTEL_HFI_THERMAL depends on NET
        thermal: netlink: Fix parameter type of thermal_genl_cpu_capability_event() stub
        thermal: Replace acpi_bus_get_device()
        ...
      f648372d
    • Linus Torvalds's avatar
      Merge tag 'pm-5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 02b82b02
      Linus Torvalds authored
      Pull power management updates from Rafael Wysocki:
       "These are mostly fixes and cleanups all over the code and a new piece
        of documentation for Intel uncore frequency scaling.
      
        Functionality-wise, the intel_idle driver will support Sapphire Rapids
        Xeons natively now (with some extra facilities for controlling
        C-states more precisely on those systems), virtual guests will take
        the ACPI S4 hardware signature into account by default, the
        intel_pstate driver will take the defualt EPP value from the firmware,
        cpupower utility will support the AMD P-state driver added in the
        previous cycle, and there is a new tracer utility for that driver.
      
        Specifics:
      
         - Allow device_pm_check_callbacks() to be called from interrupt
           context without issues (Dmitry Baryshkov).
      
         - Modify devm_pm_runtime_enable() to automatically handle
           pm_runtime_dont_use_autosuspend() at driver exit time (Douglas
           Anderson).
      
         - Make the schedutil cpufreq governor use to_gov_attr_set() instead
           of open coding it (Kevin Hao).
      
         - Replace acpi_bus_get_device() with acpi_fetch_acpi_dev() in the
           cpufreq longhaul driver (Rafael Wysocki).
      
         - Unify show() and store() naming in cpufreq and make it use
           __ATTR_XX (Lianjie Zhang).
      
         - Make the intel_pstate driver use the EPP value set by the firmware
           by default (Srinivas Pandruvada).
      
         - Re-order the init checks in the powernow-k8 cpufreq driver (Mario
           Limonciello).
      
         - Make the ACPI processor idle driver check for architectural support
           for LPI to avoid using it on x86 by mistake (Mario Limonciello).
      
         - Add Sapphire Rapids Xeon support to the intel_idle driver (Artem
           Bityutskiy).
      
         - Add 'preferred_cstates' module argument to the intel_idle driver to
           work around C1 and C1E handling issue on Sapphire Rapids (Artem
           Bityutskiy).
      
         - Add core C6 optimization on Sapphire Rapids to the intel_idle
           driver (Artem Bityutskiy).
      
         - Optimize the haltpoll cpuidle driver a bit (Li RongQing).
      
         - Remove leftover text from intel_idle() kerneldoc comment and fix up
           white space in intel_idle (Rafael Wysocki).
      
         - Fix load_image_and_restore() error path (Ye Bin).
      
         - Fix typos in comments in the system wakeup hadling code (Tom Rix).
      
         - Clean up non-kernel-doc comments in hibernation code (Jiapeng
           Chong).
      
         - Fix __setup handler error handling in system-wide suspend and
           hibernation core code (Randy Dunlap).
      
         - Add device name to suspend_report_result() (Youngjin Jang).
      
         - Make virtual guests honour ACPI S4 hardware signature by default
           (David Woodhouse).
      
         - Block power off of a parent PM domain unless child is in deepest
           state (Ulf Hansson).
      
         - Use dev_err_probe() to simplify error handling for generic PM
           domains (Ahmad Fatoum).
      
         - Fix sleep-in-atomic bug caused by genpd_debug_remove() (Shawn Guo).
      
         - Document Intel uncore frequency scaling (Srinivas Pandruvada).
      
         - Add DTPM hierarchy description (Daniel Lezcano).
      
         - Change the locking scheme in DTPM (Daniel Lezcano).
      
         - Fix dtpm_cpu cleanup at exit time and missing virtual DTPM pointer
           release (Daniel Lezcano).
      
         - Make dtpm_node_callback[] static (kernel test robot).
      
         - Fix spelling mistake "initialze" -> "initialize" in
           dtpm_create_hierarchy() (Colin Ian King).
      
         - Add tracer tool for the amd-pstate driver (Jinzhou Su).
      
         - Fix PC6 displaying in turbostat on some systems (Artem Bityutskiy).
      
         - Add AMD P-State support to the cpupower utility (Huang Rui)"
      
      * tag 'pm-5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (58 commits)
        cpufreq: powernow-k8: Re-order the init checks
        cpuidle: intel_idle: Drop redundant backslash at line end
        cpuidle: intel_idle: Update intel_idle() kerneldoc comment
        PM: hibernate: Honour ACPI hardware signature by default for virtual guests
        cpufreq: intel_pstate: Use firmware default EPP
        cpufreq: unify show() and store() naming and use __ATTR_XX
        PM: core: keep irq flags in device_pm_check_callbacks()
        cpuidle: haltpoll: Call cpuidle_poll_state_init() later
        Documentation: amd-pstate: add tracer tool introduction
        tools/power/x86/amd_pstate_tracer: Add tracer tool for AMD P-state
        tools/power/x86/intel_pstate_tracer: make tracer as a module
        cpufreq: amd-pstate: Add more tracepoint for AMD P-State module
        PM: sleep: Add device name to suspend_report_result()
        turbostat: fix PC6 displaying on some systems
        intel_idle: add core C6 optimization for SPR
        intel_idle: add 'preferred_cstates' module argument
        intel_idle: add SPR support
        PM: runtime: Have devm_pm_runtime_enable() handle pm_runtime_dont_use_autosuspend()
        ACPI: processor idle: Check for architectural support for LPI
        cpuidle: PSCI: Move the `has_lpi` check to the beginning of the function
        ...
      02b82b02
    • Linus Torvalds's avatar
      Merge tag 'acpi-5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 242ba665
      Linus Torvalds authored
      Pull ACPI updates from Rafael Wysocki:
       "From the new functionality perspective, the most significant items
        here are the new driver for the 'ARM Generic Diagnostic Dump and
        Reset' device, the extension of fine grain fan control in the ACPI fan
        driver, and the change making it possible to use CPPC information to
        obtain CPU capacity.
      
        There are also a few new quirks, a bunch of fixes, including the
        platform-level _OSC handling change to make it actually take the
        platform firmware response into account, some code and documentation
        cleanups, and a notable update of the ACPI device enumeration
        documentation.
      
        Specifics:
      
         - Use uintptr_t and offsetof() in the ACPICA code to avoid compiler
           warnings regarding NULL pointer arithmetic (Rafael Wysocki).
      
         - Fix possible NULL pointer dereference in acpi_ns_walk_namespace()
           when passed "acpi=off" in the command line (Rafael Wysocki).
      
         - Fix and clean up acpi_os_read/write_port() (Rafael Wysocki).
      
         - Introduce acpi_bus_for_each_dev() and use it for walking all ACPI
           device objects in the Type C code (Rafael Wysocki).
      
         - Fix the _OSC platform capabilities negotioation and prevent CPPC
           from being used if the platform firmware indicates that it not
           supported via _OSC (Rafael Wysocki).
      
         - Use ida_alloc() instead of ida_simple_get() for ACPI enumeration of
           devices (Rafael Wysocki).
      
         - Add AGDI and CEDT to the list of known ACPI table signatures (Ilkka
           Koskinen, Robert Kiraly).
      
         - Add power management debug messages related to suspend-to-idle in
           two places (Rafael Wysocki).
      
         - Fix __acpi_node_get_property_reference() return value and clean up
           that function (Andy Shevchenko, Sakari Ailus).
      
         - Fix return value of the __setup handler in the ACPI PM timer clock
           source driver (Randy Dunlap).
      
         - Clean up double words in two comments (Tom Rix).
      
         - Add "skip i2c clients" quirks for Lenovo Yoga Tablet 1050F/L and
           Nextbook Ares 8 (Hans de Goede).
      
         - Clean up frequency invariance handling on x86 in the ACPI CPPC
           library (Huang Rui).
      
         - Work around broken XSDT on the Advantech DAC-BJ01 board (Mark
           Cilissen).
      
         - Make wakeup events checks in the ACPI EC driver more
           straightforward and clean up acpi_ec_submit_event() (Rafael
           Wysocki).
      
         - Make it possible to obtain the CPU capacity with the help of CPPC
           information (Ionela Voinescu).
      
         - Improve fine grained fan control in the ACPI fan driver and
           document it (Srinivas Pandruvada).
      
         - Add device HID and quirk for Microsoft Surface Go 3 to the ACPI
           battery driver (Maximilian Luz).
      
         - Make the ACPI driver for Intel SoCs (LPSS) let the SPI driver know
           the exact type of the controller (Andy Shevchenko).
      
         - Force native backlight mode on Clevo NL5xRU and NL5xNU (Werner
           Sembach).
      
         - Fix return value of __setup handlers in the APEI code (Randy
           Dunlap).
      
         - Add Arm Generic Diagnostic Dump and Reset device driver (Ilkka
           Koskinen).
      
         - Limit printable size of BERT table data (Darren Hart).
      
         - Fix up HEST and GHES initialization (Shuai Xue).
      
         - Update the ACPI device enumeration documentation and unify the ASL
           style in GPIO-related examples (Andy Shevchenko)"
      
      * tag 'acpi-5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (52 commits)
        clocksource: acpi_pm: fix return value of __setup handler
        ACPI: bus: Avoid using CPPC if not supported by firmware
        Revert "ACPI: Pass the same capabilities to the _OSC regardless of the query flag"
        ACPI: video: Force backlight native for Clevo NL5xRU and NL5xNU
        arm64, topology: enable use of init_cpu_capacity_cppc()
        arch_topology: obtain cpu capacity using information from CPPC
        x86, ACPI: rename init_freq_invariance_cppc() to arch_init_invariance_cppc()
        ACPI: AGDI: Add driver for Arm Generic Diagnostic Dump and Reset device
        ACPI: tables: Add AGDI to the list of known table signatures
        ACPI/APEI: Limit printable size of BERT table data
        ACPI: docs: gpio-properties: Unify ASL style for GPIO examples
        ACPI / x86: Work around broken XSDT on Advantech DAC-BJ01 board
        ACPI: APEI: fix return value of __setup handlers
        x86/ACPI: CPPC: Move init_freq_invariance_cppc() into x86 CPPC
        x86: Expose init_freq_invariance() to topology header
        x86/ACPI: CPPC: Move AMD maximum frequency ratio setting function into x86 CPPC
        x86/ACPI: CPPC: Rename cppc_msr.c to cppc.c
        ACPI / x86: Add skip i2c clients quirk for Lenovo Yoga Tablet 1050F/L
        ACPI / x86: Add skip i2c clients quirk for Nextbook Ares 8
        ACPICA: Avoid walking the ACPI Namespace if it is not there
        ...
      242ba665
    • Linus Torvalds's avatar
      Merge tag 'docs-5.18' of git://git.lwn.net/linux · 346658a5
      Linus Torvalds authored
      Pull documentation updates from Jonathan Corbet:
       "It has been a moderately busy cycle for documentation; some of the
        highlights are:
      
         - Numerous PDF-generation improvements
      
         - Kees's new document with guidelines for researchers studying the
           development community.
      
         - The ongoing stream of Chinese translations
      
         - Thorsten's new document on regression handling
      
         - A major reworking of the internal documentation for the kernel-doc
           script.
      
        Plus the usual stream of typo fixes and such"
      
      * tag 'docs-5.18' of git://git.lwn.net/linux: (80 commits)
        docs/kernel-parameters: update description of mem=
        docs/zh_CN: Add sched-nice-design Chinese translation
        docs: scheduler: Convert schedutil.txt to ReST
        Docs: ktap: add code-block type
        docs: serial: fix a reference file name in driver.rst
        docs: UML: Mention telnetd for port channel
        docs/zh_CN: add damon reclaim translation
        docs/zh_CN: add damon usage translation
        docs/zh_CN: add admin-guide damon start translation
        docs/zh_CN: add admin-guide damon index translation
        docs/zh_CN: Refactoring the admin-guide directory index
        zh_CN: Add translation for admin-guide/mm/index.rst
        zh_CN: Add translations for admin-guide/mm/ksm.rst
        Add Chinese translation for vm/ksm.rst
        docs/zh_CN: Add sched-stats Chinese translation
        docs/zh_CN: add devicetree of_unittest translation
        docs/zh_CN: add devicetree usage-model translation
        docs/zh_CN: add devicetree index translation
        Documentation: describe how to apply incremental stable patches
        docs/zh_CN: add peci subsystem translation
        ...
      346658a5