1. 16 Feb, 2021 5 commits
    • Arnaldo Carvalho de Melo's avatar
      37b3fa0e
    • Arnaldo Carvalho de Melo's avatar
      Merge branch 'perf/urgent' into perf/core · c1bd8a2b
      Arnaldo Carvalho de Melo authored
      To get some fixes that didn't made into 5.11.
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      c1bd8a2b
    • Leo Yan's avatar
      perf arm-spe: Set sample's data source field · a89dbc9b
      Leo Yan authored
      The sample structure contains the field 'data_src' which is used to
      tell the data operation attributions, e.g. operation type is loading or
      storing, cache level, it's snooping or remote accessing, etc.  At the
      end, the 'data_src' will be parsed by perf mem/c2c tools to display
      human readable strings.
      
      This patch is to fill the 'data_src' field in the synthesized samples
      base on different types.  Currently perf tool can display statistics for
      L1/L2/L3 caches but it doesn't support the 'last level cache'.  To fit
      to current implementation, 'data_src' field uses L3 cache for last level
      cache.
      
      Before this commit, perf mem report looks like this:
        # Samples: 75K of event 'l1d-miss'
        # Total weight : 75951
        # Sort order   : local_weight,mem,sym,dso,symbol_daddr,dso_daddr,snoop,tlb,locked
        #
        # Overhead  Samples  Local Weight  Memory access  Symbol                  Shared Object  Data Symbol             Data Object  Snoop  TLB access
        # ........  .......  ............  .............  ......................  .............  ......................  ...........  .....  ..........
        #
            81.56%    61945  0             N/A            [.] 0x00000000000009d8  serial_c       [.] 0000000000000000    [unknown]    N/A    N/A
            18.44%    14003  0             N/A            [.] 0x0000000000000828  serial_c       [.] 0000000000000000    [unknown]    N/A    N/A
      
      Now on a system with Arm SPE, addresses and access types are displayed:
      
        # Samples: 75K of event 'l1d-miss'
        # Total weight : 75951
        # Sort order   : local_weight,mem,sym,dso,symbol_daddr,dso_daddr,snoop,tlb,locked
        #
        # Overhead  Samples  Local Weight  Memory access  Symbol                  Shared Object  Data Symbol             Data Object  Snoop  TLB access
        # ........  .......  ............  .............  ......................  .............  ......................  ...........  .....  ..........
        #
             0.43%      324  0             L1 miss        [.] 0x00000000000009d8  serial_c       [.] 0x0000ffff80794e00  anon         N/A    Walker hit
             0.42%      322  0             L1 miss        [.] 0x00000000000009d8  serial_c       [.] 0x0000ffff80794580  anon         N/A    Walker hit
      Signed-off-by: default avatarLeo Yan <leo.yan@linaro.org>
      Reviewed-by: default avatarJames Clark <james.clark@arm.com>
      Tested-by: default avatarJames Clark <james.clark@arm.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Al Grant <al.grant@arm.com>
      Cc: Andre Przywara <andre.przywara@arm.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: John Garry <john.garry@huawei.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Wei Li <liwei391@huawei.com>
      Cc: Will Deacon <will@kernel.org>
      Signed-off-by: default avatarJames Clark <james.clark@arm.com>
      Link: https://lore.kernel.org/r/20210211133856.2137-6-james.clark@arm.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      a89dbc9b
    • Leo Yan's avatar
      perf arm-spe: Synthesize memory event · e55ed342
      Leo Yan authored
      The memory event can deliver two benefits:
      
      - The first benefit is the memory event can give out global view for
        memory accessing, rather than organizing events with scatter mode
        (e.g. uses separate event for L1 cache, last level cache, etc) which
        which can only display a event for single memory type, memory events
        include all memory accessing so it can display the data accessing
        cross memory levels in the same view;
      
      - The second benefit is the sample generation might introduce a big
        overhead and need to wait for long time for Perf reporting, we can
        specify itrace option '--itrace=M' to filter out other events and only
        output memory events, this can significantly reduce the overhead
        caused by generating samples.
      
      This patch is to enable memory event for Arm SPE.
      Signed-off-by: default avatarLeo Yan <leo.yan@linaro.org>
      Reviewed-by: default avatarJames Clark <james.clark@arm.com>
      Tested-by: default avatarJames Clark <james.clark@arm.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Al Grant <al.grant@arm.com>
      Cc: Andre Przywara <andre.przywara@arm.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: John Garry <john.garry@huawei.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Wei Li <liwei391@huawei.com>
      Cc: Will Deacon <will@kernel.org>
      Signed-off-by: default avatarJames Clark <james.clark@arm.com>
      Link: https://lore.kernel.org/r/20210211133856.2137-5-james.clark@arm.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      e55ed342
    • Leo Yan's avatar
      perf arm-spe: Fill address info for samples · 54f7815e
      Leo Yan authored
      To properly handle memory and branch samples, this patch divides into
      two functions for generating samples: arm_spe__synth_mem_sample() is for
      synthesizing memory and TLB samples; arm_spe__synth_branch_sample() is
      to synthesize branch samples.
      
      Arm SPE backend decoder has passed virtual and physical address through
      packets, the address info is stored into the synthesize samples in the
      function arm_spe__synth_mem_sample().
      
      Committer notes:
      
      Fixed this:
      
        36    46.77 fedora:27                     : FAIL clang version 5.0.2 (tags/RELEASE_502/final)
      
          util/arm-spe.c:269:34: error: missing field 'pid' initializer [-Werror,-Wmissing-field-initializers]
                  struct perf_sample sample = { 0 };
                                                  ^
          util/arm-spe.c:288:34: error: missing field 'pid' initializer [-Werror,-Wmissing-field-initializers]
                  struct perf_sample sample = { 0 };
      
      By using = { .ip = 0, };
      Signed-off-by: default avatarLeo Yan <leo.yan@linaro.org>
      Reviewed-by: default avatarJames Clark <james.clark@arm.com>
      Tested-by: default avatarJames Clark <james.clark@arm.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Al Grant <al.grant@arm.com>
      Cc: Andre Przywara <andre.przywara@arm.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: John Garry <john.garry@huawei.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Wei Li <liwei391@huawei.com>
      Cc: Will Deacon <will@kernel.org>
      Signed-off-by: default avatarJames Clark <james.clark@arm.com>
      Link: https://lore.kernel.org/r/20210211133856.2137-4-james.clark@arm.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      54f7815e
  2. 14 Feb, 2021 7 commits
  3. 13 Feb, 2021 12 commits
  4. 12 Feb, 2021 16 commits
    • Linus Torvalds's avatar
      Merge tag '5.11-rc7-smb3-github' of git://github.com/smfrench/smb3-kernel · 7989807d
      Linus Torvalds authored
      Pull cifs fixes from Steve French:
       "Four small smb3 fixes to the new mount API (including a particularly
        important one for DFS links).
      
        These were found in testing this week of additional DFS scenarios, and
        a user testing of an apache container problem"
      
      * tag '5.11-rc7-smb3-github' of git://github.com/smfrench/smb3-kernel:
        cifs: Set CIFS_MOUNT_USE_PREFIX_PATH flag on setting cifs_sb->prepath.
        cifs: In the new mount api we get the full devname as source=
        cifs: do not disable noperm if multiuser mount option is not provided
        cifs: fix dfs-links
      7989807d
    • Jianlin Lv's avatar
      perf probe: Fix kretprobe issue caused by GCC bug · 105f75eb
      Jianlin Lv authored
      Perf failed to add a kretprobe event with debuginfo of vmlinux which is
      compiled by gcc with -fpatchable-function-entry option enabled.  The
      same issue with kernel module.
      
      Issue:
      
        # perf probe  -v 'kernel_clone%return $retval'
        ......
        Writing event: r:probe/kernel_clone__return _text+599624 $retval
        Failed to write event: Invalid argument
          Error: Failed to add events. Reason: Invalid argument (Code: -22)
      
        # cat /sys/kernel/debug/tracing/error_log
        [156.75] trace_kprobe: error: Retprobe address must be an function entry
        Command: r:probe/kernel_clone__return _text+599624 $retval
                                              ^
      
        # llvm-dwarfdump  vmlinux |grep  -A 10  -w 0x00df2c2b
        0x00df2c2b:   DW_TAG_subprogram
                      DW_AT_external  (true)
                      DW_AT_name      ("kernel_clone")
                      DW_AT_decl_file ("/home/code/linux-next/kernel/fork.c")
                      DW_AT_decl_line (2423)
                      DW_AT_decl_column       (0x07)
                      DW_AT_prototyped        (true)
                      DW_AT_type      (0x00dcd492 "pid_t")
                      DW_AT_low_pc    (0xffff800010092648)
                      DW_AT_high_pc   (0xffff800010092b9c)
                      DW_AT_frame_base        (DW_OP_call_frame_cfa)
      
        # cat /proc/kallsyms |grep kernel_clone
        ffff800010092640 T kernel_clone
        # readelf -s vmlinux |grep -i kernel_clone
        183173: ffff800010092640  1372 FUNC    GLOBAL DEFAULT    2 kernel_clone
      
        # objdump -d vmlinux |grep -A 10  -w \<kernel_clone\>:
        ffff800010092640 <kernel_clone>:
        ffff800010092640:       d503201f        nop
        ffff800010092644:       d503201f        nop
        ffff800010092648:       d503233f        paciasp
        ffff80001009264c:       a9b87bfd        stp     x29, x30, [sp, #-128]!
        ffff800010092650:       910003fd        mov     x29, sp
        ffff800010092654:       a90153f3        stp     x19, x20, [sp, #16]
      
      The entry address of kernel_clone converted by debuginfo is _text+599624
      (0x92648), which is consistent with the value of DW_AT_low_pc attribute.
      But the symbolic address of kernel_clone from /proc/kallsyms is
      ffff800010092640.
      
      This issue is found on arm64, -fpatchable-function-entry=2 is enabled when
      CONFIG_DYNAMIC_FTRACE_WITH_REGS=y;
      Just as objdump displayed the assembler contents of kernel_clone,
      GCC generate 2 NOPs  at the beginning of each function.
      
      kprobe_on_func_entry detects that (_text+599624) is not the entry address
      of the function, which leads to the failure of adding kretprobe event.
      
        kprobe_on_func_entry
        ->_kprobe_addr
        ->kallsyms_lookup_size_offset
        ->arch_kprobe_on_func_entry		// FALSE
      
      The cause of the issue is that the first instruction in the compile unit
      indicated by DW_AT_low_pc does not include NOPs.
      This issue exists in all gcc versions that support
      -fpatchable-function-entry option.
      
      I have reported it to the GCC community:
      https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98776
      
      Currently arm64 and PA-RISC may enable fpatchable-function-entry option.
      The kernel compiled with clang does not have this issue.
      
      FIX:
      
      This GCC issue only cause the registration failure of the kretprobe event
      which doesn't need debuginfo. So, stop using debuginfo for retprobe.
      map will be used to query the probe function address.
      Signed-off-by: default avatarJianlin Lv <Jianlin.Lv@arm.com>
      Acked-by: default avatarMasami Hiramatsu <mhiramat@kernel.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: clang-built-linux@googlegroups.com
      Cc: Frank Ch. Eigler <fche@redhat.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Nathan Chancellor <nathan@kernel.org>
      Cc: Nick Desaulniers <ndesaulniers@google.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Sumanth Korikkar <sumanthk@linux.ibm.com>
      Link: http://lore.kernel.org/lkml/20210210062646.2377995-1-Jianlin.Lv@arm.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      105f75eb
    • Nicholas Fraser's avatar
      perf symbols: Fix return value when loading PE DSO · 77771a97
      Nicholas Fraser authored
      The first time dso__load() was called on a PE file it always returned -1
      error. This caused the first call to map__find_symbol() to always fail
      on a PE file so the first sample from each PE file always had symbol
      <unknown>. Subsequent samples succeed however because the DSO is already
      loaded.
      
      This fixes dso__load() to return 0 when successfully loading a DSO with
      libbfd.
      
      Fixes: eac9a434 ("perf symbols: Try reading the symbol table with libbfd")
      Signed-off-by: default avatarNicholas Fraser <nfraser@codeweavers.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Frank Ch. Eigler <fche@redhat.com>
      Cc: Huw Davies <huw@codeweavers.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Kim Phillips <kim.phillips@amd.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Remi Bernon <rbernon@codeweavers.com>
      Cc: Song Liu <songliubraving@fb.com>
      Cc: Tommi Rantala <tommi.t.rantala@nokia.com>
      Cc: Ulrich Czekalla <uczekalla@codeweavers.com>
      Link: http://lore.kernel.org/lkml/1671b43b-09c3-1911-dbf8-7f030242fbf7@codeweavers.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      77771a97
    • Nicholas Fraser's avatar
      perf symbols: Make dso__load_bfd_symbols() load PE files from debug cache only · 00a34234
      Nicholas Fraser authored
      dso__load_bfd_symbols() attempts to load a DSO at its original path,
      then closes it and loads the file in the debug cache. This is incorrect.
      It should ignore the original file and work with only the debug cache.
      
      The original file may have changed or may not even exist, for example if
      the debug cache has been transferred to another machine via "perf
      archive".
      
      This fix makes it only load the file in the debug cache.
      
      Further notes from Nicholas:
      
      dso__load_bfd_symbols() is called in a loop from dso__load() for a variety
      of paths. These are generated by the various DSO_BINARY_TYPEs in the
      binary_type_symtab list at the top of util/symbol.c. In each case the
      debugfile passed to dso__load_bfd_symbols() is the path to try.
      
      One of those iterations (the first one I believe) passes the original path
      as the debugfile. If the file still exists at the original path, this is
      the one that ends up being used in case the debugcache was deleted or the
      PE file doesn't have a build-id.
      
      A later iteration (BUILD_ID_CACHE) passes debugfile as the file in the
      debugcache if it has a build-id. Even if the file was previously loaded at
      its original path, (if I understand correctly) this load will override it
      so the debugcache file ends up being used.
      
      Committer notes:
      
      So if it fails to find in the cache, it will eventually hope for the
      best and look at the path in the local filesystem, which in many cases
      is enough.
      
      At some point we need to switch from this "hope for the best" approach
      to one that warns the user that there is no guarantee, if no buildid is
      present, that just by looking at the pathname the symbolisation will
      work.
      Signed-off-by: default avatarNicholas Fraser <nfraser@codeweavers.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Frank Ch. Eigler <fche@redhat.com>
      Cc: Huw Davies <huw@codeweavers.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Kim Phillips <kim.phillips@amd.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Remi Bernon <rbernon@codeweavers.com>
      Cc: Song Liu <songliubraving@fb.com>
      Cc: Tommi Rantala <tommi.t.rantala@nokia.com>
      Cc: Ulrich Czekalla <uczekalla@codeweavers.com>
      Link: http://lore.kernel.org/lkml/e58e1237-94ab-e1c9-a7b9-473531906954@codeweavers.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      00a34234
    • Leo Yan's avatar
      perf arm-spe: Store operation type in packet · 97ae666a
      Leo Yan authored
      This patch is to store operation type in packet structure.
      Signed-off-by: default avatarLeo Yan <leo.yan@linaro.org>
      Reviewed-by: default avatarJames Clark <james.clark@arm.com>
      Tested-by: default avatarJames Clark <james.clark@arm.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Al Grant <al.grant@arm.com>
      Cc: Andre Przywara <andre.przywara@arm.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: John Garry <john.garry@huawei.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Wei Li <liwei391@huawei.com>
      Cc: Will Deacon <will@kernel.org>
      Signed-off-by: default avatarJames Clark <james.clark@arm.com>
      Link: https://lore.kernel.org/r/20210211133856.2137-3-james.clark@arm.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      97ae666a
    • Leo Yan's avatar
      perf arm-spe: Store memory address in packet · 265cfb95
      Leo Yan authored
      This patch is to store virtual and physical memory addresses in packet,
      which will be used for memory samples.
      Signed-off-by: default avatarLeo Yan <leo.yan@linaro.org>
      Reviewed-by: default avatarJames Clark <james.clark@arm.com>
      Tested-by: default avatarJames Clark <james.clark@arm.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Al Grant <al.grant@arm.com>
      Cc: Andre Przywara <andre.przywara@arm.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: John Garry <john.garry@huawei.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Wei Li <liwei391@huawei.com>
      Cc: Will Deacon <will@kernel.org>
      Link: https://lore.kernel.org/r/20210211133856.2137-2-james.clark@arm.comSigned-off-by: default avatarJames Clark <james.clark@arm.com>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      265cfb95
    • Leo Yan's avatar
      perf arm-spe: Enable sample type PERF_SAMPLE_DATA_SRC · 845d3a65
      Leo Yan authored
      This patch is to enable sample type PERF_SAMPLE_DATA_SRC for Arm SPE in
      the perf data, when output the tracing data, it tells tools that it
      contains data source in the memory event.
      Signed-off-by: default avatarLeo Yan <leo.yan@linaro.org>
      Reviewed-by: default avatarJames Clark <james.clark@arm.com>
      Tested-by: default avatarJames Clark <james.clark@arm.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Al Grant <al.grant@arm.com>
      Cc: Andre Przywara <andre.przywara@arm.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: John Garry <john.garry@huawei.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Wei Li <liwei391@huawei.com>
      Cc: Will Deacon <will@kernel.org>
      Link: https://lore.kernel.org/r/20210211133856.2137-1-james.clark@arm.comSigned-off-by: default avatarJames Clark <james.clark@arm.com>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      845d3a65
    • Ian Rogers's avatar
      perf env: Remove unneeded internal/cpumap inclusions · e73b0d58
      Ian Rogers authored
      Minor cleanup.
      Signed-off-by: default avatarIan Rogers <irogers@google.com>
      Acked-by: default avatarJiri Olsa <jolsa@redhat.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lore.kernel.org/lkml/20210211183914.4093187-1-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      e73b0d58
    • Ian Rogers's avatar
      perf tools: Remove unused xyarray.c as it was moved to tools/lib/perf · b1cdc7d3
      Ian Rogers authored
      Migrated to libperf in:
      
        4b247fa7 ("libperf: Adopt xyarray class from perf")
      Signed-off-by: default avatarIan Rogers <irogers@google.com>
      Acked-by: default avatarJiri Olsa <jolsa@redhat.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lore.kernel.org/lkml/20210212043803.365993-1-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      b1cdc7d3
    • Linus Torvalds's avatar
      Merge tag 'io_uring-5.11-2021-02-12' of git://git.kernel.dk/linux-block · c6d8570e
      Linus Torvalds authored
      Pull io_uring fix from Jens Axboe:
       "Revert of a patch from this release that caused a regression"
      
      * tag 'io_uring-5.11-2021-02-12' of git://git.kernel.dk/linux-block:
        Revert "io_uring: don't take fs for recvmsg/sendmsg"
      c6d8570e
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-2021-02-12' of git://anongit.freedesktop.org/drm/drm · a81bfdf8
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "Regular fixes for final, there is a ttm regression fix, dp-mst fix,
        one amdgpu revert, two i915 fixes, and some misc fixes for sun4i,
        xlnx, and vc4.
      
        All pretty quiet and don't think we have any known outstanding
        regressions.
      
        ttm:
         - page pool regression fix.
      
        dp_mst:
         - don't report un-attached ports as connected
      
        amdgpu:
         - blank screen fix
      
        i915:
         - ensure Type-C FIA is powered when initializing
         - fix overlay frontbuffer tracking
      
        sun4i:
         - tcon1 sync polarity fix
         - always set HDMI clock rate
         - fix H6 HDMI PHY config
         - fix H6 max frequency
      
        vc4:
         - fix buffer overflow
      
        xlnx:
         - fix memory leak"
      
      * tag 'drm-fixes-2021-02-12' of git://anongit.freedesktop.org/drm/drm:
        drm/ttm: make sure pool pages are cleared
        drm/sun4i: dw-hdmi: Fix max. frequency for H6
        drm/sun4i: Fix H6 HDMI PHY configuration
        drm/sun4i: dw-hdmi: always set clock rate
        drm/sun4i: tcon: set sync polarity for tcon1 channel
        drm/i915: Fix overlay frontbuffer tracking
        Revert "drm/amd/display: Update NV1x SR latency values"
        drm/i915/tgl+: Make sure TypeC FIA is powered up when initializing it
        drm/dp_mst: Don't report ports connected if nothing is attached to them
        drm/xlnx: fix kmemleak by sending vblank_event in atomic_disable
        drm/vc4: hvs: Fix buffer overflow with the dlist handling
      a81bfdf8
    • Linus Torvalds's avatar
      Merge tag 'trace-v5.11-rc7-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace · e77a6817
      Linus Torvalds authored
      Pull tracing fix from Steven Rostedt:
       "Fix buffer overflow in trace event filter.
      
        It was reported that if an trace event was larger than a page and was
        filtered, that it caused memory corruption. The reason is that
        filtered events first go into a buffer to test the filter before being
        written into the ring buffer. Unfortunately, this write did not check
        the size"
      
      * tag 'trace-v5.11-rc7-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
        tracing: Check length before giving out the filter buffer
      e77a6817
    • Linus Torvalds's avatar
      Merge tag 'for-linus-5.11-rc8-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip · 2dbbaae5
      Linus Torvalds authored
      Pull xen fix from Juergen Gross:
       "A single fix for an issue introduced this development cycle: when
        running as a Xen guest on Arm systems the kernel will hang during
        boot"
      
      * tag 'for-linus-5.11-rc8-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
        arm/xen: Don't probe xenbus as part of an early initcall
      2dbbaae5
    • Linus Torvalds's avatar
      Merge tag 'riscv-for-linus-5.11-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux · f9516259
      Linus Torvalds authored
      Pull RISC-V fix from Palmer Dabbelt:
       "A single fix this week: the removal of the GPIO reset method for the
        Ethernet phy on the HiFive Unleashed.
      
        This returns to relying on the bootloader's phy reset sequence, which
        we'll have to continue doing until we can sort out how to get the
        Linux phy driver to perform the special reset dance required for this
        phy"
      
      * tag 'riscv-for-linus-5.11-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
        Revert "dts: phy: add GPIO number and active state used for phy reset"
      f9516259
    • Linus Torvalds's avatar
      Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux · 93908500
      Linus Torvalds authored
      Pull arm64 fix from Catalin Marinas:
       "Fix PTRACE_PEEKMTETAGS access to an mmapped region before the first
        write"
      
      * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
        arm64: mte: Allow PTRACE_PEEKMTETAGS access to the zero page
      93908500
    • Catalin Marinas's avatar
      arm64: mte: Allow PTRACE_PEEKMTETAGS access to the zero page · 68d54cee
      Catalin Marinas authored
      The ptrace(PTRACE_PEEKMTETAGS) implementation checks whether the user
      page has valid tags (mapped with PROT_MTE) by testing the PG_mte_tagged
      page flag. If this bit is cleared, ptrace(PTRACE_PEEKMTETAGS) returns
      -EIO.
      
      A newly created (PROT_MTE) mapping points to the zero page which had its
      tags zeroed during cpu_enable_mte(). If there were no prior writes to
      this mapping, ptrace(PTRACE_PEEKMTETAGS) fails with -EIO since the zero
      page does not have the PG_mte_tagged flag set.
      
      Set PG_mte_tagged on the zero page when its tags are cleared during
      boot. In addition, to avoid ptrace(PTRACE_PEEKMTETAGS) succeeding on
      !PROT_MTE mappings pointing to the zero page, change the
      __access_remote_tags() check to (vm_flags & VM_MTE) instead of
      PG_mte_tagged.
      Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      Fixes: 34bfeea4 ("arm64: mte: Clear the tags when a page is mapped in user-space with PROT_MTE")
      Cc: <stable@vger.kernel.org> # 5.10.x
      Cc: Will Deacon <will@kernel.org>
      Reported-by: default avatarLuis Machado <luis.machado@linaro.org>
      Tested-by: default avatarLuis Machado <luis.machado@linaro.org>
      Reviewed-by: default avatarVincenzo Frascino <vincenzo.frascino@arm.com>
      Link: https://lore.kernel.org/r/20210210180316.23654-1-catalin.marinas@arm.com
      68d54cee