1. 17 Sep, 2020 2 commits
    • Linus Torvalds's avatar
      Merge tag 'mips_fixes_5.9_2' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux · 4cbffc46
      Linus Torvalds authored
      Pull MIPS fixes from Thomas Bogendoerfer:
       "Two small fixes for SNI machines"
      
      * tag 'mips_fixes_5.9_2' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux:
        MIPS: SNI: Fix spurious interrupts
        MIPS: SNI: Fix MIPS_L1_CACHE_SHIFT
      4cbffc46
    • Linus Torvalds's avatar
      mm: allow a controlled amount of unfairness in the page lock · 5ef64cc8
      Linus Torvalds authored
      Commit 2a9127fc ("mm: rewrite wait_on_page_bit_common() logic") made
      the page locking entirely fair, in that if a waiter came in while the
      lock was held, the lock would be transferred to the lockers strictly in
      order.
      
      That was intended to finally get rid of the long-reported watchdog
      failures that involved the page lock under extreme load, where a process
      could end up waiting essentially forever, as other page lockers stole
      the lock from under it.
      
      It also improved some benchmarks, but it ended up causing huge
      performance regressions on others, simply because fair lock behavior
      doesn't end up giving out the lock as aggressively, causing better
      worst-case latency, but potentially much worse average latencies and
      throughput.
      
      Instead of reverting that change entirely, this introduces a controlled
      amount of unfairness, with a sysctl knob to tune it if somebody needs
      to.  But the default value should hopefully be good for any normal load,
      allowing a few rounds of lock stealing, but enforcing the strict
      ordering before the lock has been stolen too many times.
      
      There is also a hint from Matthieu Baerts that the fair page coloring
      may end up exposing an ABBA deadlock that is hidden by the usual
      optimistic lock stealing, and while the unfairness doesn't fix the
      fundamental issue (and I'm still looking at that), it avoids it in
      practice.
      
      The amount of unfairness can be modified by writing a new value to the
      'sysctl_page_lock_unfairness' variable (default value of 5, exposed
      through /proc/sys/vm/page_lock_unfairness), but that is hopefully
      something we'd use mainly for debugging rather than being necessary for
      any deep system tuning.
      
      This whole issue has exposed just how critical the page lock can be, and
      how contended it gets under certain locks.  And the main contention
      doesn't really seem to be anything related to IO (which was the origin
      of this lock), but for things like just verifying that the page file
      mapping is stable while faulting in the page into a page table.
      
      Link: https://lore.kernel.org/linux-fsdevel/ed8442fd-6f54-dd84-cd4a-941e8b7ee603@MichaelLarabel.com/
      Link: https://www.phoronix.com/scan.php?page=article&item=linux-50-59&num=1
      Link: https://lore.kernel.org/linux-fsdevel/c560a38d-8313-51fb-b1ec-e904bd8836bc@tessares.net/Reported-and-tested-by: default avatarMichael Larabel <Michael@michaellarabel.com>
      Tested-by: default avatarMatthieu Baerts <matthieu.baerts@tessares.net>
      Cc: Dave Chinner <david@fromorbit.com>
      Cc: Matthew Wilcox <willy@infradead.org>
      Cc: Chris Mason <clm@fb.com>
      Cc: Jan Kara <jack@suse.cz>
      Cc: Amir Goldstein <amir73il@gmail.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      5ef64cc8
  2. 16 Sep, 2020 5 commits
    • Thomas Bogendoerfer's avatar
      MIPS: SNI: Fix spurious interrupts · b959b978
      Thomas Bogendoerfer authored
      On A20R machines the interrupt pending bits in cause register need to be
      updated by requesting the chipset to do it. This needs to be done to
      find the interrupt cause and after interrupt service. In
      commit 0b888c7f ("MIPS: SNI: Convert to new irq_chip functions") the
      function to do after service update got lost, which caused spurious
      interrupts.
      
      Fixes: 0b888c7f ("MIPS: SNI: Convert to new irq_chip functions")
      Signed-off-by: default avatarThomas Bogendoerfer <tsbogend@alpha.franken.de>
      b959b978
    • Linus Torvalds's avatar
      Merge tag 'perf-tools-fixes-for-v5.9-2020-09-16' of... · 5925fa68
      Linus Torvalds authored
      Merge tag 'perf-tools-fixes-for-v5.9-2020-09-16' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux
      
      Pull perf tools fixes from Arnaldo Carvalho de Melo:
      
       - Set PERF_SAMPLE_PERIOD if attr->freq is set.
      
       - Remove trailing commas from AMD JSON vendor event files.
      
       - Don't clear event's period if set by a event definition term.
      
       - Leader sampling shouldn't clear sample period in 'perf test'.
      
       - Fix the "signal" test inline assembly when built with DEBUG=1.
      
       - Fix memory leaks detected by ASAN, some in normal paths, some in
         error paths.
      
       - Fix 2 memory sanitizer warnings in 'perf bench'.
      
       - Fix the ratio comments of miss-events in 'perf stat'.
      
       - Prevent override of attr->sample_period for libpfm4 events.
      
       - Sync kvm.h and in.h headers with the kernel sources.
      
      * tag 'perf-tools-fixes-for-v5.9-2020-09-16' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux:
        perf stat: Fix the ratio comments of miss-events
        perf test: Free formats for perf pmu parse test
        perf metric: Do not free metric when failed to resolve
        perf metric: Free metric when it failed to resolve
        perf metric: Release expr_parse_ctx after testing
        perf test: Fix memory leaks in parse-metric test
        perf parse-event: Fix memory leak in evsel->unit
        perf evlist: Fix cpu/thread map leak
        perf metric: Fix some memory leaks - part 2
        perf metric: Fix some memory leaks
        perf test: Free aliases for PMU event map aliases test
        perf vendor events amd: Remove trailing commas
        perf test: Leader sampling shouldn't clear sample period
        perf record: Don't clear event's period if set by a term
        tools headers UAPI: update linux/in.h copy
        tools headers UAPI: Sync kvm.h headers with the kernel sources
        perf record: Prevent override of attr->sample_period for libpfm4 events
        perf record: Set PERF_RECORD_PERIOD if attr->freq is set.
        perf bench: Fix 2 memory sanitizer warnings
        perf test: Fix the "signal" test inline assembly
      5925fa68
    • Linus Torvalds's avatar
      Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux · 05da40eb
      Linus Torvalds authored
      Pull clk driver fixes from Stephen Boyd:
       "A handful of clk driver fixes. Mostly they're for error paths or
        improper memory allocations sizes. Nothing as exciting as a wildfire"
      
      * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux:
        clk: qcom: lpass: Correct goto target in lpass_core_sc7180_probe()
        clk: versatile: Add of_node_put() before return statement
        clk: bcm: dvp: Select the reset framework
        clk: rockchip: Fix initialization of mux_pll_src_4plls_p
        clk: davinci: Use the correct size when allocating memory
      05da40eb
    • Leon Romanovsky's avatar
      MAINTAINERS: Fix Max's and Shravan's emails · 6279e774
      Leon Romanovsky authored
      Max's and Shravan's usernames were changed while @mellanox.com emails
      were transferred to be @nvidia.com.
      
      Fixes: f6da70d9 ("MAINTAINERS: Update Mellanox and Cumulus Network addresses to new domain")
      Signed-off-by: default avatarLeon Romanovsky <leonro@nvidia.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      6279e774
    • Qi Liu's avatar
      perf stat: Fix the ratio comments of miss-events · ce9c13f3
      Qi Liu authored
      'perf stat' displays miss ratio of L1-dcache, L1-icache, dTLB cache,
      iTLB cache and LL-cache. Take L1-dcache for example, miss ratio is
      caculated as "L1-dcache-load-misses/L1-dcache-loads". So "of all
      L1-dcache hits" is unsuitable to describe it, and "of all L1-dcache
      accesses" seems better.
      
      The comments of L1-icache, dTLB cache, iTLB cache and LL-cache are
      fixed in the same way.
      Signed-off-by: default avatarQi Liu <liuqi115@huawei.com>
      Reviewed-by: default avatarAndi Kleen <ak@linux.intel.com>
      Cc: linuxarm@huawei.com
      Link: http://lore.kernel.org/lkml/1600253331-10535-1-git-send-email-liuqi115@huawei.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      ce9c13f3
  3. 15 Sep, 2020 15 commits
    • Linus Torvalds's avatar
      Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · 9803ab17
      Linus Torvalds authored
      Pull SCSI fix from James Bottomley:
       "Just one fix in libsas for a resource leak in an error path"
      
      * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        scsi: libsas: Fix error path in sas_notify_lldd_dev_found()
      9803ab17
    • Linus Torvalds's avatar
      Merge tag 'fixes-v5.9a' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security · 1e484d38
      Linus Torvalds authored
      Pull security layer fix from James  Morris:
       "A device_cgroup RCU warning fix from Amol Grover"
      
      * tag 'fixes-v5.9a' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security:
        device_cgroup: Fix RCU list debugging warning
      1e484d38
    • Linus Torvalds's avatar
      Merge tag 'hyperv-fixes-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux · 00acc505
      Linus Torvalds authored
      Pull hyperv fixes from Wei Liu:
       "Two patches from Michael and Dexuan to fix vmbus hanging issues"
      
      * tag 'hyperv-fixes-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux:
        Drivers: hv: vmbus: Add timeout to vmbus_wait_for_unload
        Drivers: hv: vmbus: hibernation: do not hang forever in vmbus_bus_resume()
      00acc505
    • Namhyung Kim's avatar
      perf test: Free formats for perf pmu parse test · d26383dc
      Namhyung Kim authored
      The following leaks were detected by ASAN:
      
        Indirect leak of 360 byte(s) in 9 object(s) allocated from:
          #0 0x7fecc305180e in calloc (/lib/x86_64-linux-gnu/libasan.so.5+0x10780e)
          #1 0x560578f6dce5 in perf_pmu__new_format util/pmu.c:1333
          #2 0x560578f752fc in perf_pmu_parse util/pmu.y:59
          #3 0x560578f6a8b7 in perf_pmu__format_parse util/pmu.c:73
          #4 0x560578e07045 in test__pmu tests/pmu.c:155
          #5 0x560578de109b in run_test tests/builtin-test.c:410
          #6 0x560578de109b in test_and_print tests/builtin-test.c:440
          #7 0x560578de401a in __cmd_test tests/builtin-test.c:661
          #8 0x560578de401a in cmd_test tests/builtin-test.c:807
          #9 0x560578e49354 in run_builtin /home/namhyung/project/linux/tools/perf/perf.c:312
          #10 0x560578ce71a8 in handle_internal_command /home/namhyung/project/linux/tools/perf/perf.c:364
          #11 0x560578ce71a8 in run_argv /home/namhyung/project/linux/tools/perf/perf.c:408
          #12 0x560578ce71a8 in main /home/namhyung/project/linux/tools/perf/perf.c:538
          #13 0x7fecc2b7acc9 in __libc_start_main ../csu/libc-start.c:308
      
      Fixes: cff7f956 ("perf tests: Move pmu tests into separate object")
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Acked-by: default avatarJiri Olsa <jolsa@redhat.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lore.kernel.org/lkml/20200915031819.386559-12-namhyung@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      d26383dc
    • Namhyung Kim's avatar
      perf metric: Do not free metric when failed to resolve · 6f47ed6c
      Namhyung Kim authored
      It's dangerous to free the original metric when it's called from
      resolve_metric() as it's already in the metric_list and might have other
      resources too.  Instead, it'd better let them bail out and be released
      properly at the later stage.
      
      So add a check when it's called from metricgroup__add_metric() and
      release it.  Also make sure that mp is set properly.
      
      Fixes: 83de0b7d ("perf metric: Collect referenced metrics in struct metric_ref_node")
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Acked-by: default avatarJiri Olsa <jolsa@redhat.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lore.kernel.org/lkml/20200915031819.386559-10-namhyung@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      6f47ed6c
    • Namhyung Kim's avatar
      perf metric: Free metric when it failed to resolve · 27adafcd
      Namhyung Kim authored
      The metricgroup__add_metric() can find multiple match for a metric group
      and it's possible to fail.  Also it can fail in the middle like in
      resolve_metric() even for single metric.
      
      In those cases, the intermediate list and ids will be leaked like:
      
        Direct leak of 3 byte(s) in 1 object(s) allocated from:
          #0 0x7f4c938f40b5 in strdup (/lib/x86_64-linux-gnu/libasan.so.5+0x920b5)
          #1 0x55f7e71c1bef in __add_metric util/metricgroup.c:683
          #2 0x55f7e71c31d0 in add_metric util/metricgroup.c:906
          #3 0x55f7e71c3844 in metricgroup__add_metric util/metricgroup.c:940
          #4 0x55f7e71c488d in metricgroup__add_metric_list util/metricgroup.c:993
          #5 0x55f7e71c488d in parse_groups util/metricgroup.c:1045
          #6 0x55f7e71c60a4 in metricgroup__parse_groups_test util/metricgroup.c:1087
          #7 0x55f7e71235ae in __compute_metric tests/parse-metric.c:164
          #8 0x55f7e7124650 in compute_metric tests/parse-metric.c:196
          #9 0x55f7e7124650 in test_recursion_fail tests/parse-metric.c:318
          #10 0x55f7e7124650 in test__parse_metric tests/parse-metric.c:356
          #11 0x55f7e70be09b in run_test tests/builtin-test.c:410
          #12 0x55f7e70be09b in test_and_print tests/builtin-test.c:440
          #13 0x55f7e70c101a in __cmd_test tests/builtin-test.c:661
          #14 0x55f7e70c101a in cmd_test tests/builtin-test.c:807
          #15 0x55f7e7126214 in run_builtin /home/namhyung/project/linux/tools/perf/perf.c:312
          #16 0x55f7e6fc41a8 in handle_internal_command /home/namhyung/project/linux/tools/perf/perf.c:364
          #17 0x55f7e6fc41a8 in run_argv /home/namhyung/project/linux/tools/perf/perf.c:408
          #18 0x55f7e6fc41a8 in main /home/namhyung/project/linux/tools/perf/perf.c:538
          #19 0x7f4c93492cc9 in __libc_start_main ../csu/libc-start.c:308
      
      Fixes: 83de0b7d ("perf metric: Collect referenced metrics in struct metric_ref_node")
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Acked-by: default avatarJiri Olsa <jolsa@redhat.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lore.kernel.org/lkml/20200915031819.386559-9-namhyung@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      27adafcd
    • Namhyung Kim's avatar
      perf metric: Release expr_parse_ctx after testing · 437822bf
      Namhyung Kim authored
      The test_generic_metric() missed to release entries in the pctx.  Asan
      reported following leak (and more):
      
        Direct leak of 128 byte(s) in 1 object(s) allocated from:
          #0 0x7f4c9396980e in calloc (/lib/x86_64-linux-gnu/libasan.so.5+0x10780e)
          #1 0x55f7e748cc14 in hashmap_grow (/home/namhyung/project/linux/tools/perf/perf+0x90cc14)
          #2 0x55f7e748d497 in hashmap__insert (/home/namhyung/project/linux/tools/perf/perf+0x90d497)
          #3 0x55f7e7341667 in hashmap__set /home/namhyung/project/linux/tools/perf/util/hashmap.h:111
          #4 0x55f7e7341667 in expr__add_ref util/expr.c:120
          #5 0x55f7e7292436 in prepare_metric util/stat-shadow.c:783
          #6 0x55f7e729556d in test_generic_metric util/stat-shadow.c:858
          #7 0x55f7e712390b in compute_single tests/parse-metric.c:128
          #8 0x55f7e712390b in __compute_metric tests/parse-metric.c:180
          #9 0x55f7e712446d in compute_metric tests/parse-metric.c:196
          #10 0x55f7e712446d in test_dcache_l2 tests/parse-metric.c:295
          #11 0x55f7e712446d in test__parse_metric tests/parse-metric.c:355
          #12 0x55f7e70be09b in run_test tests/builtin-test.c:410
          #13 0x55f7e70be09b in test_and_print tests/builtin-test.c:440
          #14 0x55f7e70c101a in __cmd_test tests/builtin-test.c:661
          #15 0x55f7e70c101a in cmd_test tests/builtin-test.c:807
          #16 0x55f7e7126214 in run_builtin /home/namhyung/project/linux/tools/perf/perf.c:312
          #17 0x55f7e6fc41a8 in handle_internal_command /home/namhyung/project/linux/tools/perf/perf.c:364
          #18 0x55f7e6fc41a8 in run_argv /home/namhyung/project/linux/tools/perf/perf.c:408
          #19 0x55f7e6fc41a8 in main /home/namhyung/project/linux/tools/perf/perf.c:538
          #20 0x7f4c93492cc9 in __libc_start_main ../csu/libc-start.c:308
      
      Fixes: 6d432c4c ("perf tools: Add test_generic_metric function")
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Acked-by: default avatarJiri Olsa <jolsa@redhat.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lore.kernel.org/lkml/20200915031819.386559-8-namhyung@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      437822bf
    • Namhyung Kim's avatar
      perf test: Fix memory leaks in parse-metric test · f5a56570
      Namhyung Kim authored
      It didn't release resources when there's an error so the
      test_recursion_fail() will leak some memory.
      
      Fixes: 0a507af9 ("perf tests: Add parse metric test for ipc metric")
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Acked-by: default avatarJiri Olsa <jolsa@redhat.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lore.kernel.org/lkml/20200915031819.386559-7-namhyung@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      f5a56570
    • Namhyung Kim's avatar
      perf parse-event: Fix memory leak in evsel->unit · b12eea5a
      Namhyung Kim authored
      The evsel->unit borrows a pointer of pmu event or alias instead of
      owns a string.  But tool event (duration_time) passes a result of
      strdup() caused a leak.
      
      It was found by ASAN during metric test:
      
        Direct leak of 210 byte(s) in 70 object(s) allocated from:
          #0 0x7fe366fca0b5 in strdup (/lib/x86_64-linux-gnu/libasan.so.5+0x920b5)
          #1 0x559fbbcc6ea3 in add_event_tool util/parse-events.c:414
          #2 0x559fbbcc6ea3 in parse_events_add_tool util/parse-events.c:1414
          #3 0x559fbbd8474d in parse_events_parse util/parse-events.y:439
          #4 0x559fbbcc95da in parse_events__scanner util/parse-events.c:2096
          #5 0x559fbbcc95da in __parse_events util/parse-events.c:2141
          #6 0x559fbbc28555 in check_parse_id tests/pmu-events.c:406
          #7 0x559fbbc28555 in check_parse_id tests/pmu-events.c:393
          #8 0x559fbbc28555 in check_parse_cpu tests/pmu-events.c:415
          #9 0x559fbbc28555 in test_parsing tests/pmu-events.c:498
          #10 0x559fbbc0109b in run_test tests/builtin-test.c:410
          #11 0x559fbbc0109b in test_and_print tests/builtin-test.c:440
          #12 0x559fbbc03e69 in __cmd_test tests/builtin-test.c:695
          #13 0x559fbbc03e69 in cmd_test tests/builtin-test.c:807
          #14 0x559fbbc691f4 in run_builtin /home/namhyung/project/linux/tools/perf/perf.c:312
          #15 0x559fbbb071a8 in handle_internal_command /home/namhyung/project/linux/tools/perf/perf.c:364
          #16 0x559fbbb071a8 in run_argv /home/namhyung/project/linux/tools/perf/perf.c:408
          #17 0x559fbbb071a8 in main /home/namhyung/project/linux/tools/perf/perf.c:538
          #18 0x7fe366b68cc9 in __libc_start_main ../csu/libc-start.c:308
      
      Fixes: f0fbb114 ("perf stat: Implement duration_time as a proper event")
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Acked-by: default avatarJiri Olsa <jolsa@redhat.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lore.kernel.org/lkml/20200915031819.386559-6-namhyung@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      b12eea5a
    • Namhyung Kim's avatar
      perf evlist: Fix cpu/thread map leak · bfd1b83d
      Namhyung Kim authored
      Asan reported leak of cpu and thread maps as they have one more refcount
      than released.  I found that after setting evlist maps it should release
      it's refcount.
      
      It seems to be broken from the beginning so I chose the original commit
      as the culprit.  But not sure how it's applied to stable trees since
      there are many changes in the code after that.
      
      Fixes: 7e2ed097 ("perf evlist: Store pointer to the cpu and thread maps")
      Fixes: 4112eb18 ("perf evlist: Default to syswide target when no thread/cpu maps set")
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Acked-by: default avatarJiri Olsa <jolsa@redhat.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lore.kernel.org/lkml/20200915031819.386559-4-namhyung@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      bfd1b83d
    • Namhyung Kim's avatar
      perf metric: Fix some memory leaks - part 2 · b033ab11
      Namhyung Kim authored
      The metric_event_delete() missed to free expr->metric_events and it
      should free an expr when metric_refs allocation failed.
      
      Fixes: 4ea28967 ("perf metric: Collect referenced metrics in struct metric_expr")
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Acked-by: default avatarJiri Olsa <jolsa@redhat.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: John Garry <john.garry@huawei.com>
      Cc: Kajol Jain <kjain@linux.ibm.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lore.kernel.org/lkml/20200915031819.386559-3-namhyung@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      b033ab11
    • Namhyung Kim's avatar
      perf metric: Fix some memory leaks · 4f57a1ed
      Namhyung Kim authored
      I found some memory leaks while reading the metric code.  Some are real
      and others only occur in the error path.  When it failed during metric
      or event parsing, it should release all resources properly.
      
      Fixes: b18f3e36 ("perf stat: Support JSON metrics in perf stat")
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Acked-by: default avatarJiri Olsa <jolsa@redhat.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: John Garry <john.garry@huawei.com>
      Cc: Kajol Jain <kjain@linux.ibm.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lore.kernel.org/lkml/20200915031819.386559-2-namhyung@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      4f57a1ed
    • Namhyung Kim's avatar
      perf test: Free aliases for PMU event map aliases test · 22fe5a25
      Namhyung Kim authored
      The aliases were never released causing the following leaks:
      
        Indirect leak of 1224 byte(s) in 9 object(s) allocated from:
          #0 0x7feefb830628 in malloc (/lib/x86_64-linux-gnu/libasan.so.5+0x107628)
          #1 0x56332c8f1b62 in __perf_pmu__new_alias util/pmu.c:322
          #2 0x56332c8f401f in pmu_add_cpu_aliases_map util/pmu.c:778
          #3 0x56332c792ce9 in __test__pmu_event_aliases tests/pmu-events.c:295
          #4 0x56332c792ce9 in test_aliases tests/pmu-events.c:367
          #5 0x56332c76a09b in run_test tests/builtin-test.c:410
          #6 0x56332c76a09b in test_and_print tests/builtin-test.c:440
          #7 0x56332c76ce69 in __cmd_test tests/builtin-test.c:695
          #8 0x56332c76ce69 in cmd_test tests/builtin-test.c:807
          #9 0x56332c7d2214 in run_builtin /home/namhyung/project/linux/tools/perf/perf.c:312
          #10 0x56332c6701a8 in handle_internal_command /home/namhyung/project/linux/tools/perf/perf.c:364
          #11 0x56332c6701a8 in run_argv /home/namhyung/project/linux/tools/perf/perf.c:408
          #12 0x56332c6701a8 in main /home/namhyung/project/linux/tools/perf/perf.c:538
          #13 0x7feefb359cc9 in __libc_start_main ../csu/libc-start.c:308
      
      Fixes: 956a7835 ("perf test: Test pmu-events aliases")
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Reviewed-by: default avatarJohn Garry <john.garry@huawei.com>
      Acked-by: default avatarJiri Olsa <jolsa@redhat.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lore.kernel.org/lkml/20200915031819.386559-11-namhyung@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      22fe5a25
    • Henry Burns's avatar
      perf vendor events amd: Remove trailing commas · 56f3a1cd
      Henry Burns authored
      The amdzen2/core.json and amdzen/core.json vendor events files have the
      occasional trailing comma. Since that goes against the JSON standard,
      lets remove it.
      Signed-off-by: default avatarHenry Burns <henrywolfeburns@gmail.com>
      Acked-by: default avatarKim Phillips <kim.phillips@amd.com>
      Acked-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Vijay Thakkar <vijaythakkar@me.com>
      Link: http://lore.kernel.org/lkml/20200915004125.971-1-henrywolfeburns@gmail.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      56f3a1cd
    • Thomas Bogendoerfer's avatar
      MIPS: SNI: Fix MIPS_L1_CACHE_SHIFT · 564c836f
      Thomas Bogendoerfer authored
      Commit 930beb5a ("MIPS: introduce MIPS_L1_CACHE_SHIFT_<N>") forgot
      to select the correct MIPS_L1_CACHE_SHIFT for SNI RM. This breaks non
      coherent DMA because of a wrong allocation alignment.
      
      Fixes: 930beb5a ("MIPS: introduce MIPS_L1_CACHE_SHIFT_<N>")
      Signed-off-by: default avatarThomas Bogendoerfer <tsbogend@alpha.franken.de>
      564c836f
  4. 14 Sep, 2020 14 commits
    • Linus Torvalds's avatar
      Merge tag 'for-5.9-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux · fc4f28bb
      Linus Torvalds authored
      Pull btrfs fix from David Sterba:
       "One of the recent lockdep fixes introduced a bug that breaks the
        search ioctl, which is used by some applications (bees, compsize). The
        patch made it to stable trees so we need this fixup to make it work
        again"
      
      * tag 'for-5.9-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
        btrfs: fix wrong address when faulting in pages in the search ioctl
      fc4f28bb
    • Ian Rogers's avatar
      perf test: Leader sampling shouldn't clear sample period · 880a7843
      Ian Rogers authored
      Add test that a sibling with leader sampling doesn't have its period
      cleared.
      Signed-off-by: default avatarIan Rogers <irogers@google.com>
      Acked-by: default avatarJiri Olsa <jolsa@redhat.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Alexei Starovoitov <ast@kernel.org>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Andrii Nakryiko <andriin@fb.com>
      Cc: Athira Jajeev <atrajeev@linux.vnet.ibm.com>
      Cc: Daniel Borkmann <daniel@iogearbox.net>
      Cc: John Fastabend <john.fastabend@gmail.com>
      Cc: KP Singh <kpsingh@chromium.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Martin KaFai Lau <kafai@fb.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Song Liu <songliubraving@fb.com>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Yonghong Song <yhs@fb.com>
      Cc: bpf@vger.kernel.org
      Cc: netdev@vger.kernel.org
      Link: http://lore.kernel.org/lkml/20200912025655.1337192-5-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      880a7843
    • Ian Rogers's avatar
      perf record: Don't clear event's period if set by a term · 3b0a18c1
      Ian Rogers authored
      If events in a group explicitly set a frequency or period with leader
      sampling, don't disable the samples on those events.
      
      Prior to 5.8:
      
        perf record -e '{cycles/period=12345000/,instructions/period=6789000/}:S'
      
      would clear the attributes then apply the config terms. In commit
      5f342788 leader sampling configuration was moved to after applying the
      config terms, in the example, making the instructions' event have its period
      cleared.
      
      This change makes it so that sampling is only disabled if configuration
      terms aren't present.
      
      Committer testing:
      
      Before:
      
        # perf record -e '{cycles/period=1/,instructions/period=2/}:S' sleep 1
        [ perf record: Woken up 1 times to write data ]
        [ perf record: Captured and wrote 0.051 MB perf.data (6 samples) ]
        #
        # perf evlist -v
        cycles/period=1/: size: 120, { sample_period, sample_freq }: 1, sample_type: IP|TID|TIME|READ|ID, read_format: ID|GROUP, disabled: 1, mmap: 1, comm: 1, enable_on_exec: 1, task: 1, sample_id_all: 1, exclude_guest: 1, mmap2: 1, comm_exec: 1, ksymbol: 1, bpf_event: 1
        instructions/period=2/: size: 120, config: 0x1, sample_type: IP|TID|TIME|READ|ID, read_format: ID|GROUP, sample_id_all: 1, exclude_guest: 1
        #
      
      After:
      
        # perf record -e '{cycles/period=1/,instructions/period=2/}:S' sleep 0.0001
        [ perf record: Woken up 1 times to write data ]
        [ perf record: Captured and wrote 0.052 MB perf.data (4 samples) ]
        # perf evlist -v
        cycles/period=1/: size: 120, { sample_period, sample_freq }: 1, sample_type: IP|TID|TIME|READ|ID, read_format: ID|GROUP, disabled: 1, mmap: 1, comm: 1, enable_on_exec: 1, task: 1, sample_id_all: 1, exclude_guest: 1, mmap2: 1, comm_exec: 1, ksymbol: 1, bpf_event: 1
        instructions/period=2/: size: 120, config: 0x1, { sample_period, sample_freq }: 2, sample_type: IP|TID|TIME|READ|ID, read_format: ID|GROUP, sample_id_all: 1, exclude_guest: 1
        #
      
      Fixes: 5f342788 ("perf evlist: Move leader-sampling configuration")
      Signed-off-by: default avatarIan Rogers <irogers@google.com>
      Acked-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Acked-by: default avatarJiri Olsa <jolsa@redhat.com>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Alexei Starovoitov <ast@kernel.org>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Andrii Nakryiko <andriin@fb.com>
      Cc: Athira Jajeev <atrajeev@linux.vnet.ibm.com>
      Cc: Daniel Borkmann <daniel@iogearbox.net>
      Cc: John Fastabend <john.fastabend@gmail.com>
      Cc: KP Singh <kpsingh@chromium.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Martin KaFai Lau <kafai@fb.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Song Liu <songliubraving@fb.com>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Yonghong Song <yhs@fb.com>
      Link: http://lore.kernel.org/lkml/20200912025655.1337192-4-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      3b0a18c1
    • Arnaldo Carvalho de Melo's avatar
      tools headers UAPI: update linux/in.h copy · 2fa3fc95
      Arnaldo Carvalho de Melo authored
      To get the changes from:
      
        645f0897 ("net: Fix some comments")
      
      That don't cause any changes in tooling, its just a typo fix.
      
      This silences this tools/perf build warning:
      
        Warning: Kernel ABI header at 'tools/include/uapi/linux/in.h' differs from latest version at 'include/uapi/linux/in.h'
        diff -u tools/include/uapi/linux/in.h include/uapi/linux/in.h
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Miaohe Lin <linmiaohe@huawei.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      2fa3fc95
    • Arnaldo Carvalho de Melo's avatar
      tools headers UAPI: Sync kvm.h headers with the kernel sources · 8d761d2c
      Arnaldo Carvalho de Melo authored
      To pick the changes in:
      
        15e9e35c ("KVM: MIPS: Change the definition of kvm type")
        004a0124 ("arm64/x86: KVM: Introduce steal-time cap")
      
      That do not result in any change in tooling, as the additions are not
      being used in any table generator.
      
      This silences these perf build warning:
      
        Warning: Kernel ABI header at 'tools/include/uapi/linux/kvm.h' differs from latest version at 'include/uapi/linux/kvm.h'
        diff -u tools/include/uapi/linux/kvm.h include/uapi/linux/kvm.h
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Andrew Jones <drjones@redhat.com>
      Cc: Huacai Chen <chenhc@lemote.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Marc Zyngier <maz@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      8d761d2c
    • Stephane Eranian's avatar
      perf record: Prevent override of attr->sample_period for libpfm4 events · ae5dcc8a
      Stephane Eranian authored
      Before:
      
        $ perf record -c 10000 --pfm-events=cycles:period=77777
      
      Would yield a cycles event with period=10000, instead of 77777.
      
      the event string and perf record initializing the event.
      This was due to an ordering issue between libpfm4 parsing
      
      events with attr->sample_period != 0 by the time
      intent of the author.
      perf_evsel__config() is invoked. This seems to have been the
      This patch fixes the problem by preventing override for
      Signed-off-by: default avatarStephane Eranian <eranian@google.com>
      Reviewed-by: default avatarIan Rogers <irogers@google.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Alexei Starovoitov <ast@kernel.org>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Andrii Nakryiko <andriin@fb.com>
      Cc: Athira Jajeev <atrajeev@linux.vnet.ibm.com>
      Cc: Daniel Borkmann <daniel@iogearbox.net>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: John Fastabend <john.fastabend@gmail.com>
      Cc: KP Singh <kpsingh@chromium.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Martin KaFai Lau <kafai@fb.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Song Liu <songliubraving@fb.com>
      Cc: Yonghong Song <yhs@fb.com>
      Link: http://lore.kernel.org/lkml/20200912025655.1337192-3-irogers@google.comSigned-off-by: default avatarIan Rogers <irogers@google.com>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      ae5dcc8a
    • David Sharp's avatar
      perf record: Set PERF_RECORD_PERIOD if attr->freq is set. · ce4326d2
      David Sharp authored
      evsel__config() would only set PERF_RECORD_PERIOD if it set attr->freq
      from perf record options. When it is set by libpfm events, it would not
      get set. This changes evsel__config to see if attr->freq is set outside
      of whether or not it changes attr->freq itself.
      Signed-off-by: default avatarDavid Sharp <dhsharp@google.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Alexei Starovoitov <ast@kernel.org>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Andrii Nakryiko <andriin@fb.com>
      Cc: Athira Jajeev <atrajeev@linux.vnet.ibm.com>
      Cc: Daniel Borkmann <daniel@iogearbox.net>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: John Fastabend <john.fastabend@gmail.com>
      Cc: KP Singh <kpsingh@chromium.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Martin KaFai Lau <kafai@fb.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Song Liu <songliubraving@fb.com>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Yonghong Song <yhs@fb.com>
      Cc: david sharp <dhsharp@google.com>
      Link: http://lore.kernel.org/lkml/20200912025655.1337192-2-irogers@google.comSigned-off-by: default avatarIan Rogers <irogers@google.com>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      ce4326d2
    • Ian Rogers's avatar
      perf bench: Fix 2 memory sanitizer warnings · d2c73501
      Ian Rogers authored
      Memory sanitizer warns if a write is performed where the memory being
      read for the write is uninitialized. Avoid this warning by initializing
      the memory.
      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/20200912053725.1405857-1-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      d2c73501
    • Jiri Olsa's avatar
      perf test: Fix the "signal" test inline assembly · 8a39e8c4
      Jiri Olsa authored
      When compiling with DEBUG=1 on Fedora 32 I'm getting crash for 'perf
      test signal':
      
        Program received signal SIGSEGV, Segmentation fault.
        0x0000000000c68548 in __test_function ()
        (gdb) bt
        #0  0x0000000000c68548 in __test_function ()
        #1  0x00000000004d62e9 in test_function () at tests/bp_signal.c:61
        #2  0x00000000004d689a in test__bp_signal (test=0xa8e280 <generic_ ...
        #3  0x00000000004b7d49 in run_test (test=0xa8e280 <generic_tests+1 ...
        #4  0x00000000004b7e7f in test_and_print (t=0xa8e280 <generic_test ...
        #5  0x00000000004b8927 in __cmd_test (argc=1, argv=0x7fffffffdce0, ...
        ...
      
      It's caused by the symbol __test_function being in the ".bss" section:
      
        $ readelf -a ./perf | less
          [Nr] Name              Type             Address           Offset
               Size              EntSize          Flags  Link  Info  Align
          ...
          [28] .bss              NOBITS           0000000000c356a0  008346a0
               00000000000511f8  0000000000000000  WA       0     0     32
      
        $ nm perf | grep __test_function
        0000000000c68548 B __test_function
      
      I guess most of the time we're just lucky the inline asm ended up in the
      ".text" section, so making it specific explicit with push and pop
      section clauses.
      
        $ readelf -a ./perf | less
          [Nr] Name              Type             Address           Offset
               Size              EntSize          Flags  Link  Info  Align
          ...
          [13] .text             PROGBITS         0000000000431240  00031240
               0000000000306faa  0000000000000000  AX       0     0     16
      
        $ nm perf | grep __test_function
        00000000004d62c8 T __test_function
      
      Committer testing:
      
        $ readelf -wi ~/bin/perf | grep producer -m1
          <c>   DW_AT_producer    : (indirect string, offset: 0x254a): GNU C99 10.2.1 20200723 (Red Hat 10.2.1-1) -mtune=generic -march=x86-64 -ggdb3 -std=gnu99 -fno-omit-frame-pointer -funwind-tables -fstack-protector-all
                                                                                                                                               ^^^^^
                                                                                                                                               ^^^^^
                                                                                                                                               ^^^^^
        $
      
      Before:
      
        $ perf test signal
        20: Breakpoint overflow signal handler                    : FAILED!
        $
      
      After:
      
        $ perf test signal
        20: Breakpoint overflow signal handler                    : Ok
        $
      
      Fixes: 8fd34e1c ("perf test: Improve bp_signal")
      Signed-off-by: default avatarJiri Olsa <jolsa@kernel.org>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Michael Petlan <mpetlan@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Wang Nan <wangnan0@huawei.com>
      Link: http://lore.kernel.org/lkml/20200911130005.1842138-1-jolsa@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      8a39e8c4
    • Linus Torvalds's avatar
      vgacon: remove software scrollback support · 973c096f
      Linus Torvalds authored
      Yunhai Zhang recently fixed a VGA software scrollback bug in commit
      ebfdfeea ("vgacon: Fix for missing check in scrollback handling"),
      but that then made people look more closely at some of this code, and
      there were more problems on the vgacon side, but also the fbcon software
      scrollback.
      
      We don't really have anybody who maintains this code - probably because
      nobody actually _uses_ it any more.  Sure, people still use both VGA and
      the framebuffer consoles, but they are no longer the main user
      interfaces to the kernel, and haven't been for decades, so these kinds
      of extra features end up bitrotting and not really being used.
      
      So rather than try to maintain a likely unused set of code, I'll just
      aggressively remove it, and see if anybody even notices.  Maybe there
      are people who haven't jumped on the whole GUI badnwagon yet, and think
      it's just a fad.  And maybe those people use the scrollback code.
      
      If that turns out to be the case, we can resurrect this again, once
      we've found the sucker^Wmaintainer for it who actually uses it.
      Reported-by: default avatarNopNop Nop <nopitydays@gmail.com>
      Tested-by: default avatarWilly Tarreau <w@1wt.eu>
      Cc: 张云海 <zhangyunhai@nsfocus.com>
      Acked-by: default avatarAndy Lutomirski <luto@amacapital.net>
      Acked-by: default avatarWilly Tarreau <w@1wt.eu>
      Reviewed-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      973c096f
    • Linus Torvalds's avatar
      fbcon: remove now unusued 'softback_lines' cursor() argument · 06a0df4d
      Linus Torvalds authored
      Since the softscroll code got removed, this argument is always zero and
      makes no sense any more.
      Tested-by: default avatarYuan Ming <yuanmingbuaa@gmail.com>
      Tested-by: default avatarWilly Tarreau <w@1wt.eu>
      Reviewed-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      06a0df4d
    • Linus Torvalds's avatar
      fbcon: remove soft scrollback code · 50145474
      Linus Torvalds authored
      This (and the VGA soft scrollback) turns out to have various nasty small
      special cases that nobody really is willing to fight.  The soft
      scrollback code was really useful a few decades ago when you typically
      used the console interactively as the main way to interact with the
      machine, but that just isn't the case any more.
      
      So it's not worth dragging along.
      Tested-by: default avatarYuan Ming <yuanmingbuaa@gmail.com>
      Tested-by: default avatarWilly Tarreau <w@1wt.eu>
      Acked-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      Acked-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Reviewed-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      50145474
    • Filipe Manana's avatar
      btrfs: fix wrong address when faulting in pages in the search ioctl · 1c78544e
      Filipe Manana authored
      When faulting in the pages for the user supplied buffer for the search
      ioctl, we are passing only the base address of the buffer to the function
      fault_in_pages_writeable(). This means that after the first iteration of
      the while loop that searches for leaves, when we have a non-zero offset,
      stored in 'sk_offset', we try to fault in a wrong page range.
      
      So fix this by adding the offset in 'sk_offset' to the base address of the
      user supplied buffer when calling fault_in_pages_writeable().
      
      Several users have reported that the applications compsize and bees have
      started to operate incorrectly since commit a48b73ec ("btrfs: fix
      potential deadlock in the search ioctl") was added to stable trees, and
      these applications make heavy use of the search ioctls. This fixes their
      issues.
      
      Link: https://lore.kernel.org/linux-btrfs/632b888d-a3c3-b085-cdf5-f9bb61017d92@lechevalier.se/
      Link: https://github.com/kilobyte/compsize/issues/34
      Fixes: a48b73ec ("btrfs: fix potential deadlock in the search ioctl")
      CC: stable@vger.kernel.org # 4.4+
      Tested-by: default avatarA L <mail@lechevalier.se>
      Reviewed-by: default avatarJosef Bacik <josef@toxicpanda.com>
      Signed-off-by: default avatarFilipe Manana <fdmanana@suse.com>
      Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
      Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
      1c78544e
    • Michael Kelley's avatar
      Drivers: hv: vmbus: Add timeout to vmbus_wait_for_unload · 911e1987
      Michael Kelley authored
      vmbus_wait_for_unload() looks for a CHANNELMSG_UNLOAD_RESPONSE message
      coming from Hyper-V.  But if the message isn't found for some reason,
      the panic path gets hung forever.  Add a timeout of 10 seconds to prevent
      this.
      
      Fixes: 41571916 ("Drivers: hv: vmbus: avoid scheduling in interrupt context in vmbus_initiate_unload()")
      Signed-off-by: default avatarMichael Kelley <mikelley@microsoft.com>
      Reviewed-by: default avatarDexuan Cui <decui@microsoft.com>
      Reviewed-by: default avatarVitaly Kuznetsov <vkuznets@redhat.com>
      Link: https://lore.kernel.org/r/1600026449-23651-1-git-send-email-mikelley@microsoft.comSigned-off-by: default avatarWei Liu <wei.liu@kernel.org>
      911e1987
  5. 13 Sep, 2020 4 commits
    • Linus Torvalds's avatar
      Linux 5.9-rc5 · 856deb86
      Linus Torvalds authored
      856deb86
    • Linus Torvalds's avatar
      Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc · 5712c3ed
      Linus Torvalds authored
      Pull ARM SoC fixes from Olof Johansson:
       "A collection of fixes I've been accruing over the last few weeks, none
        of them have been severe enough to warrant flushing the queue but it's
        been long enough now that it's a good idea to send them in.
      
        A handful of them are fixups for QSPI DT/bindings/compatibles, some
        smaller fixes for system DMA clock control and TMU interrupts on i.MX,
        a handful of fixes for OMAP, including a fix for DSI (display) on
        omap5"
      
      * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (27 commits)
        arm64: dts: ns2: Fixed QSPI compatible string
        ARM: dts: BCM5301X: Fixed QSPI compatible string
        ARM: dts: NSP: Fixed QSPI compatible string
        ARM: dts: bcm: HR2: Fixed QSPI compatible string
        dt-bindings: spi: Fix spi-bcm-qspi compatible ordering
        ARM: dts: imx6sx: fix the pad QSPI1B_SCLK mux mode for uart3
        arm64: dts: imx8mp: correct sdma1 clk setting
        arm64: dts: imx8mq: Fix TMU interrupt property
        ARM: dts: imx7d-zii-rmu2: fix rgmii phy-mode for ksz9031 phy
        ARM: dts: vfxxx: Add syscon compatible with OCOTP
        ARM: dts: imx6q-logicpd: Fix broken PWM
        arm64: dts: imx: Add missing imx8mm-beacon-kit.dtb to build
        ARM: dts: imx6q-prtwd2: Remove unneeded i2c unit name
        ARM: dts: imx6qdl-gw51xx: Remove unneeded #address-cells/#size-cells
        ARM: dts: imx7ulp: Correct gpio ranges
        ARM: dts: ls1021a: fix QuadSPI-memory reg range
        arm64: defconfig: Enable ptn5150 extcon driver
        arm64: defconfig: Enable USB gadget with configfs
        ARM: configs: Update Integrator defconfig
        ARM: dts: omap5: Fix DSI base address and clocks
        ...
      5712c3ed
    • Linus Torvalds's avatar
      Merge tag 'usb-5.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · e4c26faa
      Linus Torvalds authored
      Pull USB/Thunderbolt fixes from Greg KH:
       "Here are some small USB and Thunderbolt driver fixes for 5.9-rc5.
      
        Nothing huge, just a number of bugfixes and new device ids for
        problems reported:
      
         - new USB serial driver ids
      
         - bug fixes for syzbot reported problems
      
         - typec driver fixes
      
         - thunderbolt driver fixes
      
         - revert of reported broken commit
      
        All of these have been in linux-next with no reported issues"
      
      * tag 'usb-5.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
        usb: typec: intel_pmc_mux: Do not configure SBU and HSL Orientation in Alternate modes
        usb: typec: intel_pmc_mux: Do not configure Altmode HPD High
        usb: core: fix slab-out-of-bounds Read in read_descriptors
        Revert "usb: dwc3: meson-g12a: fix shared reset control use"
        usb: typec: ucsi: acpi: Check the _DEP dependencies
        usb: typec: intel_pmc_mux: Un-register the USB role switch
        usb: Fix out of sync data toggle if a configured device is reconfigured
        USB: serial: option: support dynamic Quectel USB compositions
        USB: serial: option: add support for SIM7070/SIM7080/SIM7090 modules
        thunderbolt: Use maximum USB3 link rate when reclaiming if link is not up
        thunderbolt: Disable ports that are not implemented
        USB: serial: ftdi_sio: add IDs for Xsens Mti USB converter
      e4c26faa
    • Linus Torvalds's avatar
      Merge tag 'staging-5.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging · 6c7247f6
      Linus Torvalds authored
      Pull staging/IIO driver fixes from Greg KH:
       "Here are a number of staging and IIO driver fixes for 5.9-rc5.
      
        The majority of these are IIO driver fixes, to resolve a timestamp
        issue that was recently found to affect a bunch of IIO drivers.
      
        The other fixes in here are:
      
         - small IIO driver fixes
      
         - greybus driver fix
      
         - counter driver fix (came in through the IIO fixes tree)
      
        All of these have been in linux-next for a while with no reported
        issues"
      
      * tag 'staging-5.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (23 commits)
        iio: adc: mcp3422: fix locking on error path
        iio: adc: mcp3422: fix locking scope
        iio: adc: meson-saradc: Use the parent device to look up the calib data
        iio:adc:max1118 Fix alignment of timestamp and data leak issues
        iio:adc:ina2xx Fix timestamp alignment issue.
        iio:adc:ti-adc084s021 Fix alignment and data leak issues.
        iio:adc:ti-adc081c Fix alignment and data leak issues
        iio:magnetometer:ak8975 Fix alignment and data leak issues.
        iio:light:ltr501 Fix timestamp alignment issue.
        iio:light:max44000 Fix timestamp alignment and prevent data leak.
        iio:chemical:ccs811: Fix timestamp alignment and prevent data leak.
        iio:proximity:mb1232: Fix timestamp alignment and prevent data leak.
        iio:accel:mma7455: Fix timestamp alignment and prevent data leak.
        iio:accel:bmc150-accel: Fix timestamp alignment and prevent data leak.
        iio:accel:mma8452: Fix timestamp alignment and prevent data leak.
        iio: accel: kxsd9: Fix alignment of local buffer.
        iio: adc: rockchip_saradc: select IIO_TRIGGERED_BUFFER
        iio: adc: ti-ads1015: fix conversion when CONFIG_PM is not set
        counter: microchip-tcb-capture: check the correct variable
        iio: cros_ec: Set Gyroscope default frequency to 25Hz
        ...
      6c7247f6