1. 20 11月, 2020 3 次提交
    • L
      Merge tag 'spi-fix-v5.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi · fee3c824
      Linus Torvalds 提交于
      Pull spi fixes from Mark Brown:
       "This is a relatively large set of fixes, the bulk of it being a series
        from Lukas Wunner which fixes confusion with the lifetime of driver
        data allocated along with the SPI controller structure that's been
        created as part of the conversion to devm APIs.
      
        The simplest fix, explained in detail in Lukas' commit message, is to
        move to a devm_ function for allocation of the controller and hence
        driver data in order to push the free of that after anything tries to
        reference the driver data in the remove path. This results in a
        relatively large diff due to the addition of a new function but isn't
        particularly complex.
      
        There's also a fix from Sven van Asbroeck which fixes yet more fallout
        from the conflicts between the various different places one can
        configure the polarity of GPIOs in modern systems.
      
        Otherwise everything is fairly small and driver specific"
      
      * tag 'spi-fix-v5.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi:
        spi: npcm-fiu: Don't leak SPI master in probe error path
        spi: dw: Set transfer handler before unmasking the IRQs
        spi: cadence-quadspi: Fix error return code in cqspi_probe
        spi: bcm2835aux: Restore err assignment in bcm2835aux_spi_probe
        spi: lpspi: Fix use-after-free on unbind
        spi: bcm-qspi: Fix use-after-free on unbind
        spi: bcm2835aux: Fix use-after-free on unbind
        spi: bcm2835: Fix use-after-free on unbind
        spi: Introduce device-managed SPI controller allocation
        spi: fsi: Fix transfer returning without finalizing message
        spi: fix client driver breakages when using GPIO descriptors
      fee3c824
    • L
      Merge tag 'regulator-fix-v5.10-rc4' of... · d748287a
      Linus Torvalds 提交于
      Merge tag 'regulator-fix-v5.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator
      
      Pull regulator fixes from Mark Brown:
       "Mostly core fixes here, one set from Michał Mirosław which cleans up
        some issues introduced as part of the coupled regulators work, one
        memory leak during probe and two due to regulators which have an input
        supply name and regulator name which are identical, which is very
        unusual.
      
        There's also a fix for our handling of the similarly unusual case
        where we can't determine if a regulator is enabled during boot"
      
      * tag 'regulator-fix-v5.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
        regulator: ti-abb: Fix array out of bound read access on the first transition
        regulator: workaround self-referent regulators
        regulator: avoid resolve_supply() infinite recursion
        regulator: fix memory leak with repeated set_machine_constraints()
        regulator: pfuze100: limit pfuze-support-disable-sw to pfuze{100,200}
        regulator: core: don't disable regulator if is_enabled return error.
      d748287a
    • L
      Merge tag 'thermal-v5.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux · 841d6e9e
      Linus Torvalds 提交于
      Pull thermal fix from Daniel Lezcano:
       "Disable the CPU PM notifier for OMAP4430 for suspend in order to
        prevent wrong temperature leading to a critical shutdown (Peter
        Ujfalusi)"
      
      * tag 'thermal-v5.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux:
        thermal: ti-soc-thermal: Disable the CPU PM notifier for OMAP4430
      841d6e9e
  2. 19 11月, 2020 4 次提交
  3. 18 11月, 2020 8 次提交
    • B
      gfs2: Fix regression in freeze_go_sync · 20b32912
      Bob Peterson 提交于
      Patch 541656d3 ("gfs2: freeze should work on read-only mounts") changed
      the check for glock state in function freeze_go_sync() from "gl->gl_state
      == LM_ST_SHARED" to "gl->gl_req == LM_ST_EXCLUSIVE".  That's wrong and it
      regressed gfs2's freeze/thaw mechanism because it caused only the freezing
      node (which requests the glock in EX) to queue freeze work.
      
      All nodes go through this go_sync code path during the freeze to drop their
      SHared hold on the freeze glock, allowing the freezing node to acquire it
      in EXclusive mode. But all the nodes must freeze access to the file system
      locally, so they ALL must queue freeze work. The freeze_work calls
      freeze_func, which makes a request to reacquire the freeze glock in SH,
      effectively blocking until the thaw from the EX holder. Once thawed, the
      freezing node drops its EX hold on the freeze glock, then the (blocked)
      freeze_func reacquires the freeze glock in SH again (on all nodes, including
      the freezer) so all nodes go back to a thawed state.
      
      This patch changes the check back to gl_state == LM_ST_SHARED like it was
      prior to 541656d3.
      
      Fixes: 541656d3 ("gfs2: freeze should work on read-only mounts")
      Cc: stable@vger.kernel.org # v5.8+
      Signed-off-by: NBob Peterson <rpeterso@redhat.com>
      Signed-off-by: NAndreas Gruenbacher <agruenba@redhat.com>
      20b32912
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input · 0fa8ee0d
      Linus Torvalds 提交于
      Pull input fixes from Dmitry Torokhov:
       "A fix for use-after-free in the Sun keyboard driver, a fix to firmware
        updates on newer ICs in the Elan touchpad diver, and a couple misc
        driver fixes"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
        Input: elan_i2c - fix firmware update on newer ICs
        Input: resistive-adc-touch - fix kconfig dependency on IIO_BUFFER
        Input: sunkbd - avoid use-after-free in teardown paths
        Input: i8042 - allow insmod to succeed on devices without an i8042 controller
        Input: adxl34x - clean up a data type in adxl34x_probe()
      0fa8ee0d
    • L
      Merge tag 's390-5.10-4' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux · 111e91a6
      Linus Torvalds 提交于
      Pull s390 fixes from Heiko Carstens:
      
       - fix system call exit path; avoid return to user space with any
         TIF/CIF/PIF set
      
       - fix file permission for cpum_sfb_size parameter
      
       - another small defconfig update
      
      * tag 's390-5.10-4' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
        s390/cpum_sf.c: fix file permission for cpum_sfb_size
        s390: update defconfigs
        s390: fix system call exit path
      111e91a6
    • L
      Merge tag 'mips_fixes_5.10_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux · ed129cd7
      Linus Torvalds 提交于
      Pull MIPS fixes from Thomas Bogendoerfer:
      
       - fix bug preventing booting on several platforms
      
       - fix for build error, when modules need has_transparent_hugepage
      
       - fix for memleak in alchemy clk setup
      
      * tag 'mips_fixes_5.10_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux:
        MIPS: Alchemy: Fix memleak in alchemy_clk_setup_cpu
        MIPS: kernel: Fix for_each_memblock conversion
        MIPS: export has_transparent_hugepage() for modules
      ed129cd7
    • L
      Merge tag 'perf-tools-fixes-for-v5.10-2020-11-17' of... · be1dd669
      Linus Torvalds 提交于
      Merge tag 'perf-tools-fixes-for-v5.10-2020-11-17' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux
      
      Pull perf tools fixes from Arnaldo Carvalho de Melo:
      
       - Fix file corruption due to event deletion in 'perf inject'.
      
       - Update arch/x86/lib/mem{cpy,set}_64.S copies used in 'perf bench mem
         memcpy', silencing perf build warning.
      
       - Avoid an msan warning in a copied stack in 'perf test'.
      
       - Correct tracepoint field name "flags" in ARM's CS-ETM hardware
         tracing 'perf test' entry.
      
       - Update branch sample pattern for cs-etm to cope with excluding guest
         in userspace counting.
      
       - Don't free "lock_seq_stat" if read_count isn't zero in 'perf lock'.
      
      * tag 'perf-tools-fixes-for-v5.10-2020-11-17' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux:
        perf test: Avoid an msan warning in a copied stack.
        perf inject: Fix file corruption due to event deletion
        perf test: Update branch sample pattern for cs-etm
        perf test: Fix a typo in cs-etm testing
        tools arch: Update arch/x86/lib/mem{cpy,set}_64.S copies used in 'perf bench mem memcpy'
        perf lock: Don't free "lock_seq_stat" if read_count isn't zero
        perf lock: Correct field name "flags"
      be1dd669
    • L
      Merge branch 'urgent-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu · 9dacf44c
      Linus Torvalds 提交于
      Pull RCU fix from Paul McKenney:
       "A single commit that fixes a bug that was introduced a couple of merge
        windows ago, but which rather more recently converged to an
        agreed-upon fix. The bug is that interrupts can be incorrectly enabled
        while holding an irq-disabled spinlock. This can of course result in
        self-deadlocks.
      
        The bug is a bit difficult to trigger. It requires that a preempted
        task be blocking a preemptible-RCU grace period long enough to trigger
        an RCU CPU stall warning. In addition, an interrupt must occur at just
        the right time, and that interrupt's handler must acquire that same
        irq-disabled spinlock. Still, a deadlock is a deadlock.
      
        Furthermore, we do now have a fix, and that fix survives kernel test
        robot, -next, and rcutorture testing. It has also been verified by
        Sebastian as fixing the bug. Therefore..."
      
      * 'urgent-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu:
        rcu: Don't invoke try_invoke_on_locked_down_task() with irqs disabled
      9dacf44c
    • L
      spi: npcm-fiu: Don't leak SPI master in probe error path · 04a9cd51
      Lukas Wunner 提交于
      If the calls to of_match_device(), of_alias_get_id(),
      devm_ioremap_resource(), devm_regmap_init_mmio() or devm_clk_get()
      fail on probe of the NPCM FIU SPI driver, the spi_controller struct is
      erroneously not freed.
      
      Fix by switching over to the new devm_spi_alloc_master() helper.
      
      Fixes: ace55c41 ("spi: npcm-fiu: add NPCM FIU controller driver")
      Signed-off-by: NLukas Wunner <lukas@wunner.de>
      Cc: <stable@vger.kernel.org> # v5.4+: 5e844cc3: spi: Introduce device-managed SPI controller allocation
      Cc: <stable@vger.kernel.org> # v5.4+
      Cc: Tomer Maimon <tmaimon77@gmail.com>
      Link: https://lore.kernel.org/r/a420c23a363a3bc9aa684c6e790c32a8af106d17.1605512876.git.lukas@wunner.deSigned-off-by: NMark Brown <broonie@kernel.org>
      04a9cd51
    • S
      spi: dw: Set transfer handler before unmasking the IRQs · a41b0ad0
      Serge Semin 提交于
      It turns out the IRQs most like can be unmasked before the controller is
      enabled with no problematic consequences. The manual doesn't explicitly
      state that, but the examples perform the controller initialization
      procedure in that order. So the commit da8f5890 ("spi: dw: Unmask IRQs
      after enabling the chip") hasn't been that required as I thought. But
      anyway setting the IRQs up after the chip enabling still worth adding
      since it has simplified the code a bit. The problem is that it has
      introduced a potential bug. The transfer handler pointer is now
      initialized after the IRQs are enabled. That may and eventually will cause
      an invalid or uninitialized callback invocation. Fix that just by
      performing the callback initialization before the IRQ unmask procedure.
      
      Fixes: da8f5890 ("spi: dw: Unmask IRQs after enabling the chip")
      Signed-off-by: NSerge Semin <Sergey.Semin@baikalelectronics.ru>
      Link: https://lore.kernel.org/r/20201117094054.4696-1-Sergey.Semin@baikalelectronics.ruSigned-off-by: NMark Brown <broonie@kernel.org>
      a41b0ad0
  4. 17 11月, 2020 10 次提交
    • Z
      MIPS: Alchemy: Fix memleak in alchemy_clk_setup_cpu · ac3b57ad
      Zhang Qilong 提交于
      If the clk_register fails, we should free h before
      function returns to prevent memleak.
      
      Fixes: 47440229 ("MIPS: Alchemy: clock framework integration of onchip clocks")
      Reported-by: NHulk Robot <hulkci@huawei.com>
      Signed-off-by: NZhang Qilong <zhangqilong3@huawei.com>
      Signed-off-by: NThomas Bogendoerfer <tsbogend@alpha.franken.de>
      ac3b57ad
    • T
      MIPS: kernel: Fix for_each_memblock conversion · 61a2f1ae
      Thomas Bogendoerfer 提交于
      The loop over all memblocks works with PFNs and not physical
      addresses, so we need for_each_mem_pfn_range().
      
      Fixes: b10d6bca ("arch, drivers: replace for_each_membock() with for_each_mem_range()")
      Signed-off-by: NThomas Bogendoerfer <tsbogend@alpha.franken.de>
      Reviewed-by: NMike Rapoport <rppt@linux.ibm.com>
      Reviewed-by: NSerge Semin <fancer.lancer@gmail.com>
      61a2f1ae
    • L
      Merge tag 'arm-soc-fixes-v5.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc · 9c87c9f4
      Linus Torvalds 提交于
      Pull ARM SoC fixes from Arnd Bergmann:
       "Around one third of the fixes this time are for dts files that list
        their ethernet controller as using 'phy-mode="rgmii"' but are changed
        to 'phy-mode="rgmii-id"' now, because the PHY drivers (realtek,
        ksz9031, dp83867, ...) now configure the internal delay based on that
        when they used to stay on the hardware default.
      
        The long story is archived at
      
          https://lore.kernel.org/netdev/CAMj1kXEEF_Un-4NTaD5iUN0NoZYaJQn-rPediX0S6oRiuVuW-A@mail.gmail.com/
      
        I was trying to hold off on the bugfixes until there was a solution
        that would avoid breaking all boards, but that does not seem to be
        happening any time soon, so I am now sending the correct version of
        the dts files to ensure that at least these machines can use their
        network devices again.
      
        The other changes this time are:
      
         - Updating the MAINTAINER lists for Allwinner and Samsung SoCs
      
         - Multiple i.MX8MN machines get updates for their CPU operating
           points to match the data sheet
      
         - A revert for a dts patch that caused a regression in USB support on
           Odroid U3
      
         - Two fixes for the AMD Tee driver, addressing a memory leak and
           missing locking
      
         - Mark the network subsystem on qoriq-fman3 as cache coherent for
           correctness as better performance.
      
         - Minor dts fixes elsewhere, addressing dtc warnings and similar
           problems"
      
      * tag 'arm-soc-fixes-v5.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (48 commits)
        ARM: dts: exynos: revert "add input clock to CMU in Exynos4412 Odroid"
        ARM: dts: imx50-evk: Fix the chip select 1 IOMUX
        arm64: dts: imx8mm: fix voltage for 1.6GHz CPU operating point
        ARM: dts: stm32: Keep VDDA LDO1 always on on DHCOM
        ARM: dts: stm32: Enable thermal sensor support on stm32mp15xx-dhcor
        ARM: dts: stm32: Define VIO regulator supply on DHCOM
        ARM: dts: stm32: Fix LED5 on STM32MP1 DHCOM PDK2
        ARM: dts: stm32: Fix TA3-GPIO-C key on STM32MP1 DHCOM PDK2
        arm64: dts: renesas: r8a774e1: Add missing audio_clk_b
        tee: amdtee: synchronize access to shm list
        tee: amdtee: fix memory leak due to reset of global shm list
        arm64: dts: agilex/stratix10: Fix qspi node compatible
        ARM: dts: imx6q-prti6q: fix PHY address
        ARM: dts: vf610-zii-dev-rev-b: Fix MDIO over clocking
        arm: dts: imx6qdl-udoo: fix rgmii phy-mode for ksz9031 phy
        arm64: dts imx8mn: Remove non-existent USB OTG2
        arm64: dts: imx8mm-beacon-som: Fix Choppy BT audio
        arm64: dts: fsl: DPAA FMan DMA operations are coherent
        arm64: dts: fsl: fix endianness issue of rcpm
        arm64: dts: imx8mn-evk: fix missing PMIC's interrupt line pull-up
        ...
      9c87c9f4
    • L
      Merge tag 'hyperv-fixes-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux · a5698b38
      Linus Torvalds 提交于
      Pull Hyper-V fix from Wei Liu:
       "One patch from Chris to fix kexec on Hyper-V"
      
      * tag 'hyperv-fixes-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux:
        Drivers: hv: vmbus: Allow cleanup of VMBUS_CONNECT_CPU if disconnected
      a5698b38
    • L
      Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost · a08f4523
      Linus Torvalds 提交于
      Pull vhost fixes from Michael Tsirkin:
       "Fixes all over the place, most notably vhost scsi IO error fixes"
      
      * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost:
        vhost scsi: Add support for LUN resets.
        vhost scsi: add lun parser helper
        vhost scsi: fix cmd completion race
        vhost scsi: alloc cmds per vq instead of session
        vhost: add helper to check if a vq has been setup
        vdpasim: fix "mac_pton" undefined error
        swiotlb: using SIZE_MAX needs limits.h included
      a08f4523
    • Z
      spi: cadence-quadspi: Fix error return code in cqspi_probe · ac9978fc
      Zhihao Cheng 提交于
      Fix to return the error code from
      devm_reset_control_get_optional_exclusive() instaed of 0
      in cqspi_probe().
      
      Fixes: 31fb632b ("spi: Move cadence-quadspi driver to drivers/spi/")
      Reported-by: NHulk Robot <hulkci@huawei.com>
      Signed-off-by: NZhihao Cheng <chengzhihao1@huawei.com>
      Reviewed-by: NPhilipp Zabel <p.zabel@pengutronix.de>
      Link: https://lore.kernel.org/r/20201116141836.2970579-1-chengzhihao1@huawei.comSigned-off-by: NMark Brown <broonie@kernel.org>
      ac9978fc
    • I
      perf test: Avoid an msan warning in a copied stack. · 568beb27
      Ian Rogers 提交于
      This fix is for a failure that occurred in the DWARF unwind perf test.
      
      Stack unwinders may probe memory when looking for frames.
      
      Memory sanitizer will poison and track uninitialized memory on the
      stack, and on the heap if the value is copied to the heap.
      
      This can lead to false memory sanitizer failures for the use of an
      uninitialized value.
      
      Avoid this problem by removing the poison on the copied stack.
      
      The full msan failure with track origins looks like:
      
      ==2168==WARNING: MemorySanitizer: use-of-uninitialized-value
          #0 0x559ceb10755b in handle_cfi elfutils/libdwfl/frame_unwind.c:648:8
          #1 0x559ceb105448 in __libdwfl_frame_unwind elfutils/libdwfl/frame_unwind.c:741:4
          #2 0x559ceb0ece90 in dwfl_thread_getframes elfutils/libdwfl/dwfl_frame.c:435:7
          #3 0x559ceb0ec6b7 in get_one_thread_frames_cb elfutils/libdwfl/dwfl_frame.c:379:10
          #4 0x559ceb0ec6b7 in get_one_thread_cb elfutils/libdwfl/dwfl_frame.c:308:17
          #5 0x559ceb0ec6b7 in dwfl_getthreads elfutils/libdwfl/dwfl_frame.c:283:17
          #6 0x559ceb0ec6b7 in getthread elfutils/libdwfl/dwfl_frame.c:354:14
          #7 0x559ceb0ec6b7 in dwfl_getthread_frames elfutils/libdwfl/dwfl_frame.c:388:10
          #8 0x559ceaff6ae6 in unwind__get_entries tools/perf/util/unwind-libdw.c:236:8
          #9 0x559ceabc9dbc in test_dwarf_unwind__thread tools/perf/tests/dwarf-unwind.c:111:8
          #10 0x559ceabca5cf in test_dwarf_unwind__compare tools/perf/tests/dwarf-unwind.c:138:26
          #11 0x7f812a6865b0 in bsearch (libc.so.6+0x4e5b0)
          #12 0x559ceabca871 in test_dwarf_unwind__krava_3 tools/perf/tests/dwarf-unwind.c:162:2
          #13 0x559ceabca926 in test_dwarf_unwind__krava_2 tools/perf/tests/dwarf-unwind.c:169:9
          #14 0x559ceabca946 in test_dwarf_unwind__krava_1 tools/perf/tests/dwarf-unwind.c:174:9
          #15 0x559ceabcae12 in test__dwarf_unwind tools/perf/tests/dwarf-unwind.c:211:8
          #16 0x559ceabbc4ab in run_test tools/perf/tests/builtin-test.c:418:9
          #17 0x559ceabbc4ab in test_and_print tools/perf/tests/builtin-test.c:448:9
          #18 0x559ceabbac70 in __cmd_test tools/perf/tests/builtin-test.c:669:4
          #19 0x559ceabbac70 in cmd_test tools/perf/tests/builtin-test.c:815:9
          #20 0x559cea960e30 in run_builtin tools/perf/perf.c:313:11
          #21 0x559cea95fbce in handle_internal_command tools/perf/perf.c:365:8
          #22 0x559cea95fbce in run_argv tools/perf/perf.c:409:2
          #23 0x559cea95fbce in main tools/perf/perf.c:539:3
      
        Uninitialized value was stored to memory at
          #0 0x559ceb106acf in __libdwfl_frame_reg_set elfutils/libdwfl/frame_unwind.c:77:22
          #1 0x559ceb106acf in handle_cfi elfutils/libdwfl/frame_unwind.c:627:13
          #2 0x559ceb105448 in __libdwfl_frame_unwind elfutils/libdwfl/frame_unwind.c:741:4
          #3 0x559ceb0ece90 in dwfl_thread_getframes elfutils/libdwfl/dwfl_frame.c:435:7
          #4 0x559ceb0ec6b7 in get_one_thread_frames_cb elfutils/libdwfl/dwfl_frame.c:379:10
          #5 0x559ceb0ec6b7 in get_one_thread_cb elfutils/libdwfl/dwfl_frame.c:308:17
          #6 0x559ceb0ec6b7 in dwfl_getthreads elfutils/libdwfl/dwfl_frame.c:283:17
          #7 0x559ceb0ec6b7 in getthread elfutils/libdwfl/dwfl_frame.c:354:14
          #8 0x559ceb0ec6b7 in dwfl_getthread_frames elfutils/libdwfl/dwfl_frame.c:388:10
          #9 0x559ceaff6ae6 in unwind__get_entries tools/perf/util/unwind-libdw.c:236:8
          #10 0x559ceabc9dbc in test_dwarf_unwind__thread tools/perf/tests/dwarf-unwind.c:111:8
          #11 0x559ceabca5cf in test_dwarf_unwind__compare tools/perf/tests/dwarf-unwind.c:138:26
          #12 0x7f812a6865b0 in bsearch (libc.so.6+0x4e5b0)
          #13 0x559ceabca871 in test_dwarf_unwind__krava_3 tools/perf/tests/dwarf-unwind.c:162:2
          #14 0x559ceabca926 in test_dwarf_unwind__krava_2 tools/perf/tests/dwarf-unwind.c:169:9
          #15 0x559ceabca946 in test_dwarf_unwind__krava_1 tools/perf/tests/dwarf-unwind.c:174:9
          #16 0x559ceabcae12 in test__dwarf_unwind tools/perf/tests/dwarf-unwind.c:211:8
          #17 0x559ceabbc4ab in run_test tools/perf/tests/builtin-test.c:418:9
          #18 0x559ceabbc4ab in test_and_print tools/perf/tests/builtin-test.c:448:9
          #19 0x559ceabbac70 in __cmd_test tools/perf/tests/builtin-test.c:669:4
          #20 0x559ceabbac70 in cmd_test tools/perf/tests/builtin-test.c:815:9
          #21 0x559cea960e30 in run_builtin tools/perf/perf.c:313:11
          #22 0x559cea95fbce in handle_internal_command tools/perf/perf.c:365:8
          #23 0x559cea95fbce in run_argv tools/perf/perf.c:409:2
          #24 0x559cea95fbce in main tools/perf/perf.c:539:3
      
        Uninitialized value was stored to memory at
          #0 0x559ceb106a54 in handle_cfi elfutils/libdwfl/frame_unwind.c:613:9
          #1 0x559ceb105448 in __libdwfl_frame_unwind elfutils/libdwfl/frame_unwind.c:741:4
          #2 0x559ceb0ece90 in dwfl_thread_getframes elfutils/libdwfl/dwfl_frame.c:435:7
          #3 0x559ceb0ec6b7 in get_one_thread_frames_cb elfutils/libdwfl/dwfl_frame.c:379:10
          #4 0x559ceb0ec6b7 in get_one_thread_cb elfutils/libdwfl/dwfl_frame.c:308:17
          #5 0x559ceb0ec6b7 in dwfl_getthreads elfutils/libdwfl/dwfl_frame.c:283:17
          #6 0x559ceb0ec6b7 in getthread elfutils/libdwfl/dwfl_frame.c:354:14
          #7 0x559ceb0ec6b7 in dwfl_getthread_frames elfutils/libdwfl/dwfl_frame.c:388:10
          #8 0x559ceaff6ae6 in unwind__get_entries tools/perf/util/unwind-libdw.c:236:8
          #9 0x559ceabc9dbc in test_dwarf_unwind__thread tools/perf/tests/dwarf-unwind.c:111:8
          #10 0x559ceabca5cf in test_dwarf_unwind__compare tools/perf/tests/dwarf-unwind.c:138:26
          #11 0x7f812a6865b0 in bsearch (libc.so.6+0x4e5b0)
          #12 0x559ceabca871 in test_dwarf_unwind__krava_3 tools/perf/tests/dwarf-unwind.c:162:2
          #13 0x559ceabca926 in test_dwarf_unwind__krava_2 tools/perf/tests/dwarf-unwind.c:169:9
          #14 0x559ceabca946 in test_dwarf_unwind__krava_1 tools/perf/tests/dwarf-unwind.c:174:9
          #15 0x559ceabcae12 in test__dwarf_unwind tools/perf/tests/dwarf-unwind.c:211:8
          #16 0x559ceabbc4ab in run_test tools/perf/tests/builtin-test.c:418:9
          #17 0x559ceabbc4ab in test_and_print tools/perf/tests/builtin-test.c:448:9
          #18 0x559ceabbac70 in __cmd_test tools/perf/tests/builtin-test.c:669:4
          #19 0x559ceabbac70 in cmd_test tools/perf/tests/builtin-test.c:815:9
          #20 0x559cea960e30 in run_builtin tools/perf/perf.c:313:11
          #21 0x559cea95fbce in handle_internal_command tools/perf/perf.c:365:8
          #22 0x559cea95fbce in run_argv tools/perf/perf.c:409:2
          #23 0x559cea95fbce in main tools/perf/perf.c:539:3
      
        Uninitialized value was stored to memory at
          #0 0x559ceaff8800 in memory_read tools/perf/util/unwind-libdw.c:156:10
          #1 0x559ceb10f053 in expr_eval elfutils/libdwfl/frame_unwind.c:501:13
          #2 0x559ceb1060cc in handle_cfi elfutils/libdwfl/frame_unwind.c:603:18
          #3 0x559ceb105448 in __libdwfl_frame_unwind elfutils/libdwfl/frame_unwind.c:741:4
          #4 0x559ceb0ece90 in dwfl_thread_getframes elfutils/libdwfl/dwfl_frame.c:435:7
          #5 0x559ceb0ec6b7 in get_one_thread_frames_cb elfutils/libdwfl/dwfl_frame.c:379:10
          #6 0x559ceb0ec6b7 in get_one_thread_cb elfutils/libdwfl/dwfl_frame.c:308:17
          #7 0x559ceb0ec6b7 in dwfl_getthreads elfutils/libdwfl/dwfl_frame.c:283:17
          #8 0x559ceb0ec6b7 in getthread elfutils/libdwfl/dwfl_frame.c:354:14
          #9 0x559ceb0ec6b7 in dwfl_getthread_frames elfutils/libdwfl/dwfl_frame.c:388:10
          #10 0x559ceaff6ae6 in unwind__get_entries tools/perf/util/unwind-libdw.c:236:8
          #11 0x559ceabc9dbc in test_dwarf_unwind__thread tools/perf/tests/dwarf-unwind.c:111:8
          #12 0x559ceabca5cf in test_dwarf_unwind__compare tools/perf/tests/dwarf-unwind.c:138:26
          #13 0x7f812a6865b0 in bsearch (libc.so.6+0x4e5b0)
          #14 0x559ceabca871 in test_dwarf_unwind__krava_3 tools/perf/tests/dwarf-unwind.c:162:2
          #15 0x559ceabca926 in test_dwarf_unwind__krava_2 tools/perf/tests/dwarf-unwind.c:169:9
          #16 0x559ceabca946 in test_dwarf_unwind__krava_1 tools/perf/tests/dwarf-unwind.c:174:9
          #17 0x559ceabcae12 in test__dwarf_unwind tools/perf/tests/dwarf-unwind.c:211:8
          #18 0x559ceabbc4ab in run_test tools/perf/tests/builtin-test.c:418:9
          #19 0x559ceabbc4ab in test_and_print tools/perf/tests/builtin-test.c:448:9
          #20 0x559ceabbac70 in __cmd_test tools/perf/tests/builtin-test.c:669:4
          #21 0x559ceabbac70 in cmd_test tools/perf/tests/builtin-test.c:815:9
          #22 0x559cea960e30 in run_builtin tools/perf/perf.c:313:11
          #23 0x559cea95fbce in handle_internal_command tools/perf/perf.c:365:8
          #24 0x559cea95fbce in run_argv tools/perf/perf.c:409:2
          #25 0x559cea95fbce in main tools/perf/perf.c:539:3
      
        Uninitialized value was stored to memory at
          #0 0x559cea9027d9 in __msan_memcpy llvm/llvm-project/compiler-rt/lib/msan/msan_interceptors.cpp:1558:3
          #1 0x559cea9d2185 in sample_ustack tools/perf/arch/x86/tests/dwarf-unwind.c:41:2
          #2 0x559cea9d202c in test__arch_unwind_sample tools/perf/arch/x86/tests/dwarf-unwind.c:72:9
          #3 0x559ceabc9cbd in test_dwarf_unwind__thread tools/perf/tests/dwarf-unwind.c:106:6
          #4 0x559ceabca5cf in test_dwarf_unwind__compare tools/perf/tests/dwarf-unwind.c:138:26
          #5 0x7f812a6865b0 in bsearch (libc.so.6+0x4e5b0)
          #6 0x559ceabca871 in test_dwarf_unwind__krava_3 tools/perf/tests/dwarf-unwind.c:162:2
          #7 0x559ceabca926 in test_dwarf_unwind__krava_2 tools/perf/tests/dwarf-unwind.c:169:9
          #8 0x559ceabca946 in test_dwarf_unwind__krava_1 tools/perf/tests/dwarf-unwind.c:174:9
          #9 0x559ceabcae12 in test__dwarf_unwind tools/perf/tests/dwarf-unwind.c:211:8
          #10 0x559ceabbc4ab in run_test tools/perf/tests/builtin-test.c:418:9
          #11 0x559ceabbc4ab in test_and_print tools/perf/tests/builtin-test.c:448:9
          #12 0x559ceabbac70 in __cmd_test tools/perf/tests/builtin-test.c:669:4
          #13 0x559ceabbac70 in cmd_test tools/perf/tests/builtin-test.c:815:9
          #14 0x559cea960e30 in run_builtin tools/perf/perf.c:313:11
          #15 0x559cea95fbce in handle_internal_command tools/perf/perf.c:365:8
          #16 0x559cea95fbce in run_argv tools/perf/perf.c:409:2
          #17 0x559cea95fbce in main tools/perf/perf.c:539:3
      
        Uninitialized value was created by an allocation of 'bf' in the stack frame of function 'perf_event__synthesize_mmap_events'
          #0 0x559ceafc5f60 in perf_event__synthesize_mmap_events tools/perf/util/synthetic-events.c:445
      
      SUMMARY: MemorySanitizer: use-of-uninitialized-value elfutils/libdwfl/frame_unwind.c:648:8 in handle_cfi
      Signed-off-by: NIan Rogers <irogers@google.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: clang-built-linux@googlegroups.com
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Sandeep Dasgupta <sdasgup@google.com>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lore.kernel.org/lkml/20201113182053.754625-1-irogers@google.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      568beb27
    • A
      perf inject: Fix file corruption due to event deletion · 1c756cd4
      Al Grant 提交于
      "perf inject" can create corrupt files when synthesizing sample events from AUX
      data. This happens when in the input file, the first event (for the AUX data)
      has a different sample_type from the second event (generally dummy).
      
      Specifically, they differ in the bits that indicate the standard fields
      appended to perf records in the mmap buffer. "perf inject" deletes the first
      event and moves up the second event to first position.
      
      The problem is with the synthetic PERF_RECORD_MMAP (etc.) events created
      by "perf record".
      
      Since these are synthetic versions of events which are normally produced
      by the kernel, they have to have the standard fields appended as
      described by sample_type.
      
      "perf record" fills these in with zeroes, including the IDENTIFIER
      field; perf readers interpret records with zero IDENTIFIER using the
      descriptor for the first event in the file.
      
      Since "perf inject" changes the first event, these synthetic records are
      then processed with the wrong value of sample_type, and the perf reader
      reads bad data, reports on incorrect length records etc.
      
      Mismatching sample_types are seen with "perf record -e cs_etm//", where the AUX
      event has TID|TIME|CPU|IDENTIFIER and the dummy event has TID|TIME|IDENTIFIER.
      
      Perhaps they could be the same, but it isn't normally a problem if they aren't
      - perf has no problems reading the file.
      
      The sample_types have to agree on the position of IDENTIFIER, because
      that's how perf finds the right event descriptor in the first place, but
      they don't normally have to agree on other fields, and perf doesn't
      check that they do.
      
      The problem is specific to the way "perf inject" reorganizes the events
      and the way synthetic MMAP events are recorded with a zero identifier. A
      simple solution is to stop "perf inject" deleting the tracing event.
      
      Committer testing
      
      Removed the now unused 'evsel' variable, update the comment about the
      evsel removal not being performed anymore, and apply the patch manually
      as it failed with this warning:
      
        warning: Patch sent with format=flowed; space at the end of lines might be lost.
      
      Testing it with:
      
        $ perf bench internals inject-build-id
        # Running 'internals/inject-build-id' benchmark:
          Average build-id injection took: 8.543 msec (+- 0.130 msec)
          Average time per event: 0.838 usec (+- 0.013 usec)
          Average memory usage: 12717 KB (+- 9 KB)
          Average build-id-all injection took: 5.710 msec (+- 0.058 msec)
          Average time per event: 0.560 usec (+- 0.006 usec)
          Average memory usage: 12079 KB (+- 7 KB)
        $
      Signed-off-by: NAl Grant <al.grant@arm.com>
      Acked-by: NAdrian Hunter <adrian.hunter@intel.com>
      Acked-by: NNamhyung Kim <namhyung@kernel.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      LPU-Reference: b9cf5611-daae-2390-3439-6617f8f0a34b@foss.arm.com
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      1c756cd4
    • A
      Merge tag 'imx-fixes-5.10-4' of... · cc05af8e
      Arnd Bergmann 提交于
      Merge tag 'imx-fixes-5.10-4' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/fixes
      
      i.MX fixes for 5.10, round 4:
      
      - Fix MDIO over clocking on vf610-zii-dev-rev-b board to get switch
        device work reliably.
      - Fix imx50-evk IOMUX for the chip select 1 to use GPIO4_13 instead of
        the native CSPI_SSI function.
      - Fix voltage for 1.6GHz CPU operating point on i.MX8MM to match
        hardware datasheet.
      - Fix phy-mode for KSZ9031 PHY on imx6qdl-udoo board.
      
      * tag 'imx-fixes-5.10-4' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux:
        ARM: dts: imx50-evk: Fix the chip select 1 IOMUX
        arm64: dts: imx8mm: fix voltage for 1.6GHz CPU operating point
        ARM: dts: vf610-zii-dev-rev-b: Fix MDIO over clocking
        arm: dts: imx6qdl-udoo: fix rgmii phy-mode for ksz9031 phy
      
      Link: https://lore.kernel.org/r/20201116090702.GM5849@dragonSigned-off-by: NArnd Bergmann <arnd@arndb.de>
      cc05af8e
    • A
      Merge tag 'renesas-fixes-for-v5.10-tag1' of... · 39c8d39c
      Arnd Bergmann 提交于
      Merge tag 'renesas-fixes-for-v5.10-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into arm/fixes
      
      Renesas fixes for v5.10
      
        - Add missing audio clock on RZ/G2H.
      
      * tag 'renesas-fixes-for-v5.10-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel:
        arm64: dts: renesas: r8a774e1: Add missing audio_clk_b
      
      Link: https://lore.kernel.org/r/20201113151229.3924165-1-geert+renesas@glider.beSigned-off-by: NArnd Bergmann <arnd@arndb.de>
      39c8d39c
  5. 16 11月, 2020 15 次提交