Skip to content
  1. Jul 06, 2020
    • Adrian Hunter's avatar
      perf intel-pt: Fix recording PEBS-via-PT with registers · 75bcb877
      Adrian Hunter authored
      When recording PEBS-via-PT, the kernel will not accept the intel_pt
      event with register sampling e.g.
      
       # perf record --kcore -c 10000 -e '{intel_pt/branch=0/,branch-loads/aux-output/ppp}' -I -- ls -l
       Error:
       intel_pt/branch=0/: PMU Hardware doesn't support sampling/overflow-interrupts. Try 'perf stat'
      
      Fix by suppressing register sampling on the intel_pt evsel.
      
      Committer notes:
      
      Adrian informed that this is only available from Tremont onwards, so on
      older processors the error continues the same as before.
      
      Fixes: 9e64cefe
      
       ("perf intel-pt: Process options for PEBS event synthesis")
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Luwei Kang <luwei.kang@intel.com>
      Link: http://lore.kernel.org/lkml/20200630133935.11150-2-adrian.hunter@intel.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      75bcb877
    • Wei Li's avatar
      perf report TUI: Fix segmentation fault in perf_evsel__hists_browse() · d61cbb85
      Wei Li authored
      The segmentation fault can be reproduced as following steps:
      
      1) Executing perf report in tui.
      
      2) Typing '/xxxxx' to filter the symbol to get nothing matched.
      
      3) Pressing enter with no entry selected.
      
      Then it will report a segmentation fault.
      
      It is caused by the lack of check of browser->he_selection when
      accessing it's member res_samples in perf_evsel__hists_browse().
      
      These processes are meaningful for specified samples, so we can skip
      these when nothing is selected.
      
      Fixes: 4968ac8f
      
       ("perf report: Implement browsing of individual samples")
      Signed-off-by: default avatarWei Li <liwei391@huawei.com>
      Acked-by: default avatarJiri Olsa <jolsa@redhat.com>
      Acked-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Hanjun Guo <guohanjun@huawei.com>
      Cc: Jin Yao <yao.jin@linux.intel.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Link: http://lore.kernel.org/lkml/20200612094322.39565-1-liwei391@huawei.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      d61cbb85
  2. Jul 03, 2020
    • Tom Zanussi's avatar
      tools lib traceevent: Add proper KBUFFER_TYPE_TIME_STAMP handling · 2160d6c8
      Tom Zanussi authored
      Kernel commit dc4e2801
      
       (ring-buffer: Redefine the unimplemented
      RINGBUF_TYPE_TIME_STAMP) changed the way the ring buffer timestamps work
      - after that commit the previously unimplemented RINGBUF_TYPE_TIME_STAMP
      type causes the time delta to be used as a timestamp rather than a delta
      to be added to the timestamp.
      
      The trace-cmd code didn't get updated to handle this, so misinterprets
      the event data for this case, which causes a cascade of errors,
      including trace-report not being able to identify synthetic (or any
      other) events generated by the histogram code (which uses TIME_STAMP
      mode).  For example, the following triggers along with the trace-cmd
      shown cause an UNKNOWN_EVENT error and trace-cmd report crash:
      
        # echo 'wakeup_latency  u64 lat pid_t pid char comm[16]' > /sys/kernel/debug/tracing/synthetic_events
      
        # echo 'hist:keys=pid:ts0=common_timestamp.usecs if comm=="ping"' > /sys/kernel/debug/tracing/events/sched/sched_wakeup/trigger
        # echo 'hist:keys=next_pid:wakeup_lat=common_timestamp.usecs-$ts0:onmatch(sched.sched_wakeup).trace(wakeup_latency,$wakeup_lat,next_pid,next_comm) if next_comm=="ping"' > /sys/kernel/debug/tracing/events/sched/sched_switch/trigger
        # echo 'hist:keys=comm,pid,lat:wakeup_lat=lat:sort=lat' > /sys/kernel/debug/tracing/events/synthetic/wakeup_latency/trigger
      
        # trace-cmd record -e wakeup_latency -e sched_wakeup -f comm==\"ping\" ping localhost -c 5
      
        # trace-cmd report
        CPU 0 is empty
        CPU 1 is empty
        CPU 2 is empty
        CPU 3 is empty
        CPU 5 is empty
        CPU 6 is empty
        CPU 7 is empty
        cpus=8
          ug! no event found for type 0
        [UNKNOWN TYPE 0]
          ug! no event found for type 11520
        Segmentation fault (core dumped)
      
      After this patch we get the correct interpretation and the events are
      shown properly:
      
        # trace-cmd report
        CPU 0 is empty
        CPU 1 is empty
        CPU 2 is empty
        CPU 3 is empty
        CPU 5 is empty
        CPU 6 is empty
        CPU 7 is empty
        cpus=8
                <idle>-0     [004] 23284.341392: sched_wakeup:         ping:12031 [120] success=1 CPU:004
                <idle>-0     [004] 23284.341464: wakeup_latency:       lat=58, pid=12031, comm=ping
                <idle>-0     [004] 23285.365303: sched_wakeup:         ping:12031 [120] success=1 CPU:004
                <idle>-0     [004] 23285.365382: wakeup_latency:       lat=64, pid=12031, comm=ping
                <idle>-0     [004] 23286.389290: sched_wakeup:         ping:12031 [120] success=1 CPU:004
                <idle>-0     [004] 23286.389378: wakeup_latency:       lat=72, pid=12031, comm=ping
                <idle>-0     [004] 23287.413213: sched_wakeup:         ping:12031 [120] success=1 CPU:004
                <idle>-0     [004] 23287.413291: wakeup_latency:       lat=64, pid=12031, comm=ping
      
      Link: http://lkml.kernel.org/r/1567628224.13841.4.camel@kernel.org
      Link: http://lore.kernel.org/linux-trace-devel/20200625100516.365338-3-tz.stoyanov@gmail.com
      
      Signed-off-by: default avatarTom Zanussi <zanussi@kernel.org>
      [ Ported from trace-cmd.git ]
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: linux-trace-devel@vger.kernel.org
      Link: http://lore.kernel.org/lkml/20200702185703.785094515@goodmis.org
      Signed-off-by: default avatarTzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com>
      Signed-off-by: default avatarSteven Rostedt (VMware) <rostedt@goodmis.org>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      2160d6c8
    • Steven Rostedt (Red Hat)'s avatar
      tools lib traceevent: Add API to read time information from kbuffer · 374855c5
      Steven Rostedt (Red Hat) authored
      
      
      Add the functions kbuffer_subbuf_timestamp() and kbuffer_ptr_delta() to
      get the timing data stored in the ring buffer that is used to produced
      the time stamps of the records.
      
      This is useful for tools like trace-cmd to be able to display the
      content of the read data to understand why the records show the time
      stamps that they do.
      
      Link: http://lore.kernel.org/linux-trace-devel/20200625100516.365338-2-tz.stoyanov@gmail.com
      
      Signed-off-by: default avatarSteven Rostedt (VMware) <rostedt@goodmis.org>
      [ Ported from trace-cmd.git ]
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: linux-trace-devel@vger.kernel.org
      Link: http://lore.kernel.org/lkml/20200702185703.619656282@goodmis.org
      Signed-off-by: default avatarTzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      374855c5
    • Adrian Hunter's avatar
      perf scripts python: exported-sql-viewer.py: Fix time chart call tree · f18d5cf8
      Adrian Hunter authored
      Using Python version 3.8.2 and PySide2 version 5.14.0, time chart call tree
      would not expand the tree to the result. Fix by using setExpanded().
      
      Example:
      
        $ perf record -e intel_pt//u uname
        Linux
        [ perf record: Woken up 1 times to write data ]
        [ perf record: Captured and wrote 0.034 MB perf.data ]
        $ perf script --itrace=bep -s ~/libexec/perf-core/scripts/python/export-to-sqlite.py perf.data.db branches calls
        2020-06-26 15:32:14.928997 Creating database ...
        2020-06-26 15:32:14.933971 Writing records...
        2020-06-26 15:32:15.535251 Adding indexes
        2020-06-26 15:32:15.542993 Dropping unused tables
        2020-06-26 15:32:15.549716 Done
        $ python3 ~/libexec/perf-core/scripts/python/exported-sql-viewer.py perf.data.db
      
        Select: Charts -> Time chart by CPU
        Move mouse over middle of chart
        Right-click and select Show Call Tree
      
      Before: displays Call Tree but not expanded to selected time
      After: displays Call Tree expanded to selected time
      
      Fixes: e69d5df7
      
       ("perf scripts python: exported-sql-viewer.py: Add ability for Call tree to open at a specified task and time")
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: stable@vger.kernel.org
      Link: http://lore.kernel.org/lkml/20200629091955.17090-7-adrian.hunter@intel.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      f18d5cf8
    • Adrian Hunter's avatar
      perf scripts python: exported-sql-viewer.py: Fix zero id in call tree 'Find' result · 031c8d5e
      Adrian Hunter authored
      Using ctrl-F ('Find') would not find 'unknown' because it matches id
      zero.  Fix by excluding id zero from selection.
      
      Example:
      
         $ perf record -e intel_pt//u uname
         Linux
         [ perf record: Woken up 1 times to write data ]
         [ perf record: Captured and wrote 0.034 MB perf.data ]
         $ perf script --itrace=bep -s ~/libexec/perf-core/scripts/python/export-to-sqlite.py perf.data.db branches calls
         2020-06-26 15:32:14.928997 Creating database ...
         2020-06-26 15:32:14.933971 Writing records...
         2020-06-26 15:32:15.535251 Adding indexes
         2020-06-26 15:32:15.542993 Dropping unused tables
         2020-06-26 15:32:15.549716 Done
         $ python3 ~/libexec/perf-core/scripts/python/exported-sql-viewer.py perf.data.db
      
         Select: Reports -> Call Tree
         Press: Ctrl-F
         Enter: unknown
         Press: Enter
      
      Before: displays 'unknown' not found
      After: tree is expanded to line showing 'unknown'
      
      Fixes: ae8b887c
      
       ("perf scripts python: exported-sql-viewer.py: Add call tree")
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: stable@vger.kernel.org
      Link: http://lore.kernel.org/lkml/20200629091955.17090-6-adrian.hunter@intel.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      031c8d5e
    • Adrian Hunter's avatar
      perf scripts python: exported-sql-viewer.py: Fix zero id in call graph 'Find' result · 7ff520b0
      Adrian Hunter authored
      Using ctrl-F ('Find') would not find 'unknown' because it matches id zero.
      Fix by excluding id zero from selection.
      
      Example:
      
        $ perf record -e intel_pt//u uname
        Linux
        [ perf record: Woken up 1 times to write data ]
        [ perf record: Captured and wrote 0.034 MB perf.data ]
        $ perf script --itrace=bep -s ~/libexec/perf-core/scripts/python/export-to-sqlite.py perf.data.db branches calls
        2020-06-26 15:32:14.928997 Creating database ...
        2020-06-26 15:32:14.933971 Writing records...
        2020-06-26 15:32:15.535251 Adding indexes
        2020-06-26 15:32:15.542993 Dropping unused tables
        2020-06-26 15:32:15.549716 Done
        $ python3 ~/libexec/perf-core/scripts/python/exported-sql-viewer.py perf.data.db
      
        Select: Reports -> Context-Sensitive Call Graph
        Press: Ctrl-F
        Enter: unknown
        Press: Enter
      
      Before: gets stuck
      After: tree is expanded to line showing 'unknown'
      
      Fixes: 254c0d82
      
       ("perf scripts python: exported-sql-viewer.py: Factor out CallGraphModelBase")
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: stable@vger.kernel.org
      Link: http://lore.kernel.org/lkml/20200629091955.17090-5-adrian.hunter@intel.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      7ff520b0
    • Adrian Hunter's avatar
      perf scripts python: exported-sql-viewer.py: Fix unexpanded 'Find' result · 3a3cf7c5
      Adrian Hunter authored
      Using Python version 3.8.2 and PySide2 version 5.14.0, ctrl-F ('Find')
      would not expand the tree to the result. Fix by using setExpanded().
      
      Example:
      
        $ perf record -e intel_pt//u uname
        Linux
        [ perf record: Woken up 1 times to write data ]
        [ perf record: Captured and wrote 0.034 MB perf.data ]
        $ perf script --itrace=bep -s ~/libexec/perf-core/scripts/python/export-to-sqlite.py perf.data.db branches calls
        2020-06-26 15:32:14.928997 Creating database ...
        2020-06-26 15:32:14.933971 Writing records...
        2020-06-26 15:32:15.535251 Adding indexes
        2020-06-26 15:32:15.542993 Dropping unused tables
        2020-06-26 15:32:15.549716 Done
        $ python3 ~/libexec/perf-core/scripts/python/exported-sql-viewer.py perf.data.db
      
        Select: Reports -> Context-Sensitive Call Graph    or     Reports -> Call Tree
        Press: Ctrl-F
        Enter: main
        Press: Enter
      
      Before: line showing 'main' does not display
      
      After: tree is expanded to line showing 'main'
      
      Fixes: ebd70c7d
      
       ("perf scripts python: exported-sql-viewer.py: Add ability to find symbols in the call-graph")
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: stable@vger.kernel.org
      Link: http://lore.kernel.org/lkml/20200629091955.17090-4-adrian.hunter@intel.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      3a3cf7c5
    • Adrian Hunter's avatar
      perf record: Fix duplicated sideband events with Intel PT system wide tracing · 442ad225
      Adrian Hunter authored
      Commit 0a892c1c
      
       ("perf record: Add dummy event during system wide
      synthesis") reveals an issue with Intel PT system wide tracing.
      Specifically that Intel PT already adds a dummy tracking event, and it
      is not the first event.  Adding another dummy tracking event causes
      duplicated sideband events.  Fix by checking for an existing dummy
      tracking event first.
      
      Example showing duplicated switch events:
      
       Before:
      
         # perf record -a -e intel_pt//u uname
         Linux
         [ perf record: Woken up 1 times to write data ]
         [ perf record: Captured and wrote 0.895 MB perf.data ]
         # perf script --no-itrace --show-switch-events | head
                  swapper     0 [007]  6390.516222: PERF_RECORD_SWITCH_CPU_WIDE OUT preempt  next pid/tid:    11/11
                  swapper     0 [007]  6390.516222: PERF_RECORD_SWITCH_CPU_WIDE OUT preempt  next pid/tid:    11/11
                rcu_sched    11 [007]  6390.516223: PERF_RECORD_SWITCH_CPU_WIDE IN           prev pid/tid:     0/0
                rcu_sched    11 [007]  6390.516224: PERF_RECORD_SWITCH_CPU_WIDE IN           prev pid/tid:     0/0
                rcu_sched    11 [007]  6390.516227: PERF_RECORD_SWITCH_CPU_WIDE OUT          next pid/tid:     0/0
                rcu_sched    11 [007]  6390.516227: PERF_RECORD_SWITCH_CPU_WIDE OUT          next pid/tid:     0/0
                  swapper     0 [007]  6390.516228: PERF_RECORD_SWITCH_CPU_WIDE IN           prev pid/tid:    11/11
                  swapper     0 [007]  6390.516228: PERF_RECORD_SWITCH_CPU_WIDE IN           prev pid/tid:    11/11
                  swapper     0 [002]  6390.516415: PERF_RECORD_SWITCH_CPU_WIDE OUT preempt  next pid/tid:  5556/5559
                  swapper     0 [002]  6390.516416: PERF_RECORD_SWITCH_CPU_WIDE OUT preempt  next pid/tid:  5556/5559
      
       After:
      
         # perf record -a -e intel_pt//u uname
         Linux
         [ perf record: Woken up 1 times to write data ]
         [ perf record: Captured and wrote 0.868 MB perf.data ]
         #  perf script --no-itrace --show-switch-events | head
                  swapper     0 [005]  6450.567013: PERF_RECORD_SWITCH_CPU_WIDE OUT preempt  next pid/tid:  7179/7181
                     perf  7181 [005]  6450.567014: PERF_RECORD_SWITCH_CPU_WIDE IN           prev pid/tid:     0/0
                     perf  7181 [005]  6450.567028: PERF_RECORD_SWITCH_CPU_WIDE OUT          next pid/tid:     0/0
                  swapper     0 [005]  6450.567029: PERF_RECORD_SWITCH_CPU_WIDE IN           prev pid/tid:  7179/7181
                  swapper     0 [005]  6450.571699: PERF_RECORD_SWITCH_CPU_WIDE OUT preempt  next pid/tid:    11/11
                rcu_sched    11 [005]  6450.571700: PERF_RECORD_SWITCH_CPU_WIDE IN           prev pid/tid:     0/0
                rcu_sched    11 [005]  6450.571702: PERF_RECORD_SWITCH_CPU_WIDE OUT          next pid/tid:     0/0
                  swapper     0 [005]  6450.571703: PERF_RECORD_SWITCH_CPU_WIDE IN           prev pid/tid:    11/11
                  swapper     0 [005]  6450.579703: PERF_RECORD_SWITCH_CPU_WIDE OUT preempt  next pid/tid:    11/11
                rcu_sched    11 [005]  6450.579704: PERF_RECORD_SWITCH_CPU_WIDE IN           prev pid/tid:     0/0
      
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Link: http://lore.kernel.org/lkml/20200629091955.17090-3-adrian.hunter@intel.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      442ad225
    • Adrian Hunter's avatar
      perf scripts python: export-to-postgresql.py: Fix struct.pack() int argument · 640432e6
      Adrian Hunter authored
      Python 3.8 is requiring that arguments being packed as integers are also
      integers.  Add int() accordingly.
      
       Before:
      
         $ perf record -e intel_pt//u uname
         $ perf script --itrace=bep -s ~/libexec/perf-core/scripts/python/export-to-postgresql.py perf_data_db branches calls
         2020-06-25 16:09:10.547256 Creating database...
         2020-06-25 16:09:10.733185 Writing to intermediate files...
         Traceback (most recent call last):
           File "/home/ahunter/libexec/perf-core/scripts/python/export-to-postgresql.py", line 1106, in synth_data
             cbr(id, raw_buf)
           File "/home/ahunter/libexec/perf-core/scripts/python/export-to-postgresql.py", line 1058, in cbr
             value = struct.pack("!hiqiiiiii", 4, 8, id, 4, cbr, 4, MHz, 4, percent)
         struct.error: required argument is not an integer
         Fatal Python error: problem in Python trace event handler
         Python runtime state: initialized
      
         Current thread 0x00007f35d3695780 (most recent call first):
         <no Python frame>
         Aborted (core dumped)
      
       After:
      
         $ dropdb perf_data_db
         $ rm -rf perf_data_db-perf-data
         $ perf script --itrace=bep -s ~/libexec/perf-core/scripts/python/export-to-postgresql.py perf_data_db branches calls
         2020-06-25 16:09:40.990267 Creating database...
         2020-06-25 16:09:41.207009 Writing to intermediate files...
         2020-06-25 16:09:41.270915 Copying to database...
         2020-06-25 16:09:41.382030 Removing intermediate files...
         2020-06-25 16:09:41.384630 Adding primary keys
         2020-06-25 16:09:41.541894 Adding foreign keys
         2020-06-25 16:09:41.677044 Dropping unused tables
         2020-06-25 16:09:41.703761 Done
      
      Fixes: aba44287
      
       ("perf scripts python: export-to-postgresql.py: Export Intel PT power and ptwrite events")
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: stable@vger.kernel.org
      Link: http://lore.kernel.org/lkml/20200629091955.17090-2-adrian.hunter@intel.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      640432e6
    • Arnaldo Carvalho de Melo's avatar
      tools arch: Update arch/x86/lib/memcpy_64.S copy used in 'perf bench mem memcpy' · eb25de27
      Arnaldo Carvalho de Melo authored
      To bring in the change made in this cset:
      
        e3a9e681
      
       ("x86/entry: Fixup bad_iret vs noinstr")
      
      This doesn't cause any functional changes to tooling, just a rebuild.
      
      Addresses this perf build warning:
      
        Warning: Kernel ABI header at 'tools/arch/x86/lib/memcpy_64.S' differs from latest version at 'arch/x86/lib/memcpy_64.S'
        diff -u tools/arch/x86/lib/memcpy_64.S arch/x86/lib/memcpy_64.S
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      eb25de27
    • Arnaldo Carvalho de Melo's avatar
      Merge remote-tracking branch 'torvalds/master' into perf/urgent · 9434628f
      Arnaldo Carvalho de Melo authored
      
      
      To synchronize UAPI headers.
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      9434628f
    • Linus Torvalds's avatar
      Merge tag 'm68knommu-for-v5.8-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu · cdd3bb54
      Linus Torvalds authored
      Pull m68knommu mm fixes from Greg Ungerer:
       "Two critical mm related fixes that affect booting of m68k/ColdFire
        devices.
      
        Both fix problems caused by recent system init memblock changes"
      
      * tag 'm68knommu-for-v5.8-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu:
        m68k: mm: fix node memblock init
        m68k: nommu: register start of the memory with memblock
      cdd3bb54
    • Linus Torvalds's avatar
      Merge tag 'devicetree-fixes-for-5.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux · 684c8ccc
      Linus Torvalds authored
      Pull devicetree fixes from Rob Herring:
      
       - Sync dtc to upstream to pick up fixes for I2C bus checks and quiet
         warnings
      
       - Various fixes for DT binding check warnings
      
       - A couple of build fixes/improvements for binding checks
      
       - ReST formatting improvements for writing-schema.rst
      
       - Document reference fixes
      
      * tag 'devicetree-fixes-for-5.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
        dt-bindings: clock: imx: Fix e-mail address
        dt-bindings: thermal: k3: Fix the reg property
        dt-bindings: thermal: Remove soc unit address
        dt-bindings: display: arm: versatile: Pass the sysreg unit name
        dt-bindings: usb: aspeed: Remove the leading zeroes
        dt-bindings: copy process-schema-examples.yaml to process-schema.yaml
        dt-bindings: do not build processed-schema.yaml for 'make dt_binding_check'
        dt-bindings: fix error in 'make clean' after 'make dt_binding_check'
        dt-bindings: mailbox: zynqmp_ipi: fix unit address
        dt-bindings: bus: uniphier-system-bus: fix warning in example
        scripts/dtc: Update to upstream version v1.6.0-11-g9d7888cbf19c
        doc: devicetree: bindings: fix spelling mistake
        docs: dt: minor adjustments at writing-schema.rst
        dt: fix reference to olpc,xo1.75-ec.txt
        dt: Fix broken references to renamed docs
        dt: fix broken links due to txt->yaml renames
        dt: update a reference for reneases pcar file renamed to yaml
      684c8ccc
    • Linus Torvalds's avatar
      Merge tag 'for-linus-2020-07-02' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux · 45564bcd
      Linus Torvalds authored
      Pull data race annotation from Christian Brauner:
       "This contains an annotation patch for a data race in copy_process()
        reported by KCSAN when reading and writing nr_threads.
      
        The data race is intentional and benign. This is obvious from the
        comment above the relevant code and based on general consensus when
        discussing this issue. So simply using data_race() to annotate this as
        an intentional race seems the best option"
      
      * tag 'for-linus-2020-07-02' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux:
        fork: annotate data race in copy_process()
      45564bcd
    • Linus Torvalds's avatar
      Merge tag 'tpmdd-next-v5.8-rc4' of git://git.infradead.org/users/jjs/linux-tpmdd · 0c7415c3
      Linus Torvalds authored
      Pull tpm fixes from Jarkko Sakkinen:
       "These are just fixes for bugs found lately.
      
        All of them are small scale things here and there, and all of them are
        for previous kernel releases (the oldest appeared in v2.6.17)"
      
      * tag 'tpmdd-next-v5.8-rc4' of git://git.infradead.org/users/jjs/linux-tpmdd:
        tpm_tis: Remove the HID IFX0102
        tpm_tis_spi: Prefer async probe
        tpm: ibmvtpm: Wait for ready buffer before probing for TPM2 attributes
        tpm/st33zp24: fix spelling mistake "drescription" -> "description"
        tpm_tis: extra chip->ops check on error path in tpm_tis_core_init
        tpm_tis_spi: Don't send anything during flow control
        tpm: Fix TIS locality timeout problems
      0c7415c3
    • Linus Torvalds's avatar
      Merge tag 'linux-kselftest-fixes-5.8-rc4' of... · 0dce8845
      Linus Torvalds authored
      Merge tag 'linux-kselftest-fixes-5.8-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
      
      Pull kselftest fixes from Shuah Khan:
       "tpm test fixes from Jarkko Sakkinen"
      
      * tag 'linux-kselftest-fixes-5.8-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest:
        selftests: tpm: Use /bin/sh instead of /bin/bash
        selftests: tpm: Use 'test -e' instead of 'test -f'
        Revert "tpm: selftest: cleanup after unseal with wrong auth/policy test"
      0dce8845
    • Linus Torvalds's avatar
      Merge tag 'linux-kselftest-kunit-fixes-5.8-rc4' of... · 55844741
      Linus Torvalds authored
      Merge tag 'linux-kselftest-kunit-fixes-5.8-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
      
      Pull kunit fixes from Shuah Khan
       "Fixes for build and run-times failures.
      
        Also includes troubleshooting tips updates to kunit user
        documentation"
      
      * tag 'linux-kselftest-kunit-fixes-5.8-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest:
        Documentation: kunit: Add some troubleshooting tips to the FAQ
        kunit: kunit_tool: Fix invalid result when build fails
        kunit: show error if kunit results are not present
        kunit: kunit_config: Fix parsing of CONFIG options with space
      55844741
    • Linus Torvalds's avatar
      Merge tag 'nfsd-5.8-1' of git://linux-nfs.org/~bfields/linux · 083176c8
      Linus Torvalds authored
      Pull nfsd fixes from Bruce Fields:
       "Fixes for a umask bug on exported filesystems lacking ACL support, a
        leak and a module unloading bug in the /proc/fs/nfsd/clients/ code,
        and a compile warning"
      
      * tag 'nfsd-5.8-1' of git://linux-nfs.org/~bfields/linux:
        SUNRPC: Add missing definition of ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE
        nfsd: fix nfsdfs inode reference count leak
        nfsd4: fix nfsdfs reference count loop
        nfsd: apply umask on fs without ACL support
      083176c8
    • Linus Torvalds's avatar
      Merge tag 'block-5.8-2020-07-01' of git://git.kernel.dk/linux-block · 7cc2a8ea
      Linus Torvalds authored
      Pull block fixes from Jens Axboe:
      
       - Use kvfree_sensitive() for the block keyslot free (Eric)
      
       - Sync blk-mq debugfs flags (Hou)
      
       - Memory leak fix in virtio-blk error path (Hou)
      
      * tag 'block-5.8-2020-07-01' of git://git.kernel.dk/linux-block:
        virtio-blk: free vblk-vqs in error path of virtblk_probe()
        block/keyslot-manager: use kvfree_sensitive()
        blk-mq-debugfs: update blk_queue_flag_name[] accordingly for new flags
      7cc2a8ea
    • Linus Torvalds's avatar
      Merge tag 'io_uring-5.8-2020-07-01' of git://git.kernel.dk/linux-block · c93493b7
      Linus Torvalds authored
      Pull io_uring fixes from Jens Axboe:
       "One fix in here, for a regression in 5.7 where a task is waiting in
        the kernel for a condition, but that condition won't become true until
        task_work is run. And the task_work can't be run exactly because the
        task is waiting in the kernel, so we'll never make any progress.
      
        One example of that is registering an eventfd and queueing io_uring
        work, and then the task goes and waits in eventfd read with the
        expectation that it'll get woken (and read an event) when the io_uring
        request completes. The io_uring request is finished through task_work,
        which won't get run while the task is looping in eventfd read"
      
      * tag 'io_uring-5.8-2020-07-01' of git://git.kernel.dk/linux-block:
        io_uring: use signal based task_work running
        task_work: teach task_work_add() to do signal_wake_up()
      c93493b7
  3. Jul 02, 2020
  4. Jul 01, 2020
    • Hou Tao's avatar
      virtio-blk: free vblk-vqs in error path of virtblk_probe() · e7eea44e
      Hou Tao authored
      Else there will be memory leak if alloc_disk() fails.
      
      Fixes: 6a27b656
      
       ("block: virtio-blk: support multi virt queues per virtio-blk device")
      Signed-off-by: default avatarHou Tao <houtao1@huawei.com>
      Reviewed-by: default avatarStefano Garzarella <sgarzare@redhat.com>
      Reviewed-by: default avatarMing Lei <ming.lei@redhat.com>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      e7eea44e
    • Linus Torvalds's avatar
      Merge tag 'exfat-for-5.8-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/exfat · edb543cf
      Linus Torvalds authored
      Pull exfat fixes from Namjae Jeon:
      
       - Zero out unused characters of FileName field to avoid a complaint
         from some fsck tool.
      
       - Fix memory leak on error paths.
      
       - Fix unnecessary VOL_DIRTY set when calling rmdir on non-empty
         directory.
      
       - Call sync_filesystem() for read-only remount (Fix generic/452 test in
         xfstests)
      
       - Add own fsync() to flush dirty metadata.
      
      * tag 'exfat-for-5.8-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/exfat:
        exfat: flush dirty metadata in fsync
        exfat: move setting VOL_DIRTY over exfat_remove_entries()
        exfat: call sync_filesystem for read-only remount
        exfat: add missing brelse() calls on error paths
        exfat: Set the unused characters of FileName field to the value 0000h
      edb543cf
    • Linus Torvalds's avatar
      Merge tag 'fixes-v5.8-rc3-a' of... · 615bc218
      Linus Torvalds authored
      Merge tag 'fixes-v5.8-rc3-a' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security
      
      Pull security subsystem fixes from James Morris:
       "Two simple fixes for v5.8:
      
         - Fix hook iteration and default value for inode_copy_up_xattr
           (KP Singh)
      
         - Fix the key_permission LSM hook function type (Sami Tolvanen)"
      
      * tag 'fixes-v5.8-rc3-a' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security:
        security: Fix hook iteration and default value for inode_copy_up_xattr
        security: fix the key_permission LSM hook function type
      615bc218
    • Linus Torvalds's avatar
      Merge tag 'integrity-v5.8-fix-2' of... · b13f40bc
      Linus Torvalds authored
      Merge tag 'integrity-v5.8-fix-2' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity
      
      Pull integrity updates from Mimi Zohar:
       "Include PCRs 8 & 9 in per TPM 2.0 bank boot_aggregate calculation.
      
        Prior to Linux 5.8 the SHA1 "boot_aggregate" value was padded with 0's
        and extended into the other TPM 2.0 banks.
      
        Included in the Linux 5.8 open window, TPM 2.0 PCR bank specific
        "boot_aggregate" values (PCRs 0  - 7) are calculated and extended into the TPM banks.
      
        Distro releases are now shipping grub2 with TPM support, which extend
        PCRs 8 & 9. I'd like for PCRs 8 & 9 to be included in the new
        "boot_aggregate" calculations.
      
        For backwards compatibility, if the hash is SHA1, these new PCRs are
        not included in the boot aggregate"
      
      * tag 'integrity-v5.8-fix-2' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity:
        ima: extend boot_aggregate with kernel measurements
      b13f40bc
    • Jens Axboe's avatar
      io_uring: use signal based task_work running · ce593a6c
      Jens Axboe authored
      
      
      Since 5.7, we've been using task_work to trigger async running of
      requests in the context of the original task. This generally works
      great, but there's a case where if the task is currently blocked
      in the kernel waiting on a condition to become true, it won't process
      task_work. Even though the task is woken, it just checks whatever
      condition it's waiting on, and goes back to sleep if it's still false.
      
      This is a problem if that very condition only becomes true when that
      task_work is run. An example of that is the task registering an eventfd
      with io_uring, and it's now blocked waiting on an eventfd read. That
      read could depend on a completion event, and that completion event
      won't get trigged until task_work has been run.
      
      Use the TWA_SIGNAL notification for task_work, so that we ensure that
      the task always runs the work when queued.
      
      Cc: stable@vger.kernel.org # v5.7
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      ce593a6c
    • Oleg Nesterov's avatar
      task_work: teach task_work_add() to do signal_wake_up() · e91b4816
      Oleg Nesterov authored
      
      
      So that the target task will exit the wait_event_interruptible-like
      loop and call task_work_run() asap.
      
      The patch turns "bool notify" into 0,TWA_RESUME,TWA_SIGNAL enum, the
      new TWA_SIGNAL flag implies signal_wake_up().  However, it needs to
      avoid the race with recalc_sigpending(), so the patch also adds the
      new JOBCTL_TASK_WORK bit included in JOBCTL_PENDING_MASK.
      
      TODO: once this patch is merged we need to change all current users
      of task_work_add(notify = true) to use TWA_RESUME.
      
      Cc: stable@vger.kernel.org # v5.7
      Acked-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Signed-off-by: default avatarOleg Nesterov <oleg@redhat.com>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      e91b4816
  5. Jun 30, 2020