1. 10 12月, 2020 4 次提交
  2. 09 12月, 2020 8 次提交
    • M
      lkdtm: don't move ctors to .rodata · 3f618ab3
      Mark Rutland 提交于
      When building with KASAN and LKDTM, clang may implictly generate an
      asan.module_ctor function in the LKDTM rodata object. The Makefile moves
      the lkdtm_rodata_do_nothing() function into .rodata by renaming the
      file's .text section to .rodata, and consequently also moves the ctor
      function into .rodata, leading to a boot time crash (splat below) when
      the ctor is invoked by do_ctors().
      
      Let's prevent this by marking the function as noinstr rather than
      notrace, and renaming the file's .noinstr.text to .rodata. Marking the
      function as noinstr will prevent tracing and kprobes, and will inhibit
      any undesireable compiler instrumentation.
      
      The ctor function (if any) will be placed in .text and will work
      correctly.
      
      Example splat before this patch is applied:
      
      [    0.916359] Unable to handle kernel execute from non-executable memory at virtual address ffffa0006b60f5ac
      [    0.922088] Mem abort info:
      [    0.922828]   ESR = 0x8600000e
      [    0.923635]   EC = 0x21: IABT (current EL), IL = 32 bits
      [    0.925036]   SET = 0, FnV = 0
      [    0.925838]   EA = 0, S1PTW = 0
      [    0.926714] swapper pgtable: 4k pages, 48-bit VAs, pgdp=00000000427b3000
      [    0.928489] [ffffa0006b60f5ac] pgd=000000023ffff003, p4d=000000023ffff003, pud=000000023fffe003, pmd=0068000042000f01
      [    0.931330] Internal error: Oops: 8600000e [#1] PREEMPT SMP
      [    0.932806] Modules linked in:
      [    0.933617] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.10.0-rc7 #2
      [    0.935620] Hardware name: linux,dummy-virt (DT)
      [    0.936924] pstate: 40400005 (nZcv daif +PAN -UAO -TCO BTYPE=--)
      [    0.938609] pc : asan.module_ctor+0x0/0x14
      [    0.939759] lr : do_basic_setup+0x4c/0x70
      [    0.940889] sp : ffff27b600177e30
      [    0.941815] x29: ffff27b600177e30 x28: 0000000000000000
      [    0.943306] x27: 0000000000000000 x26: 0000000000000000
      [    0.944803] x25: 0000000000000000 x24: 0000000000000000
      [    0.946289] x23: 0000000000000001 x22: 0000000000000000
      [    0.947777] x21: ffffa0006bf4a890 x20: ffffa0006befb6c0
      [    0.949271] x19: ffffa0006bef9358 x18: 0000000000000068
      [    0.950756] x17: fffffffffffffff8 x16: 0000000000000000
      [    0.952246] x15: 0000000000000000 x14: 0000000000000000
      [    0.953734] x13: 00000000838a16d5 x12: 0000000000000001
      [    0.955223] x11: ffff94000da74041 x10: dfffa00000000000
      [    0.956715] x9 : 0000000000000000 x8 : ffffa0006b60f5ac
      [    0.958199] x7 : f9f9f9f9f9f9f9f9 x6 : 000000000000003f
      [    0.959683] x5 : 0000000000000040 x4 : 0000000000000000
      [    0.961178] x3 : ffffa0006bdc15a0 x2 : 0000000000000005
      [    0.962662] x1 : 00000000000000f9 x0 : ffffa0006bef9350
      [    0.964155] Call trace:
      [    0.964844]  asan.module_ctor+0x0/0x14
      [    0.965895]  kernel_init_freeable+0x158/0x198
      [    0.967115]  kernel_init+0x14/0x19c
      [    0.968104]  ret_from_fork+0x10/0x30
      [    0.969110] Code: 00000003 00000000 00000000 00000000 (00000000)
      [    0.970815] ---[ end trace b5339784e20d015c ]---
      
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Kees Cook <keescook@chromium.org>
      Acked-by: NKees Cook <keescook@chromium.org>
      Signed-off-by: NMark Rutland <mark.rutland@arm.com>
      Link: https://lore.kernel.org/r/20201207170533.10738-1-mark.rutland@arm.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      3f618ab3
    • C
    • T
      binder: add flag to clear buffer on txn complete · 0f966cba
      Todd Kjos 提交于
      Add a per-transaction flag to indicate that the buffer
      must be cleared when the transaction is complete to
      prevent copies of sensitive data from being preserved
      in memory.
      Signed-off-by: NTodd Kjos <tkjos@google.com>
      Link: https://lore.kernel.org/r/20201120233743.3617529-1-tkjos@google.com
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      0f966cba
    • Y
      speakup: fix uninitialized flush_lock · d1b928ee
      Yang Yingliang 提交于
      The flush_lock is uninitialized, use DEFINE_SPINLOCK
      to define and initialize flush_lock.
      
      Fixes: c6e3fd22 ("Staging: add speakup to the staging directory")
      Reported-by: NHulk Robot <hulkci@huawei.com>
      Reviewed-by: NSamuel Thibault <samuel.thibault@ens-lyon.org>
      Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
      Link: https://lore.kernel.org/r/20201117012229.3395186-1-yangyingliang@huawei.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      d1b928ee
    • G
      Merge tag 'phy-for-5.11' of... · 54bf54c8
      Greg Kroah-Hartman 提交于
      Merge tag 'phy-for-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy into char-misc-next
      
      Vinod writes:
      
      phy-for-5.11
      
       - New phy drivers:
         - Mediatek MT7621 PCIe PHY (promoted from staging)
         - Ingenic USB phy driver supporting JZ4775 and X2000
         - Intel Keem Bay USB PHY driver
         - Marvell USB HSIC PHY driver supporting MMP3 SoC
         - AXG MIPI D-PHY driver
      
       - Updates:
         - Conversion to YAML binding for:
      	- Broadcom SATA PHY
      	- Cadence Sierra PHY bindings
      	- STM32 USBC Phy
         - Support for Exynos5433 PCIe PHY
         - Support for Qualcomm SM8250 PCIe QMP PHY
         - Support for Exynos5420 USB2 phy
         - devm_platform_ioremap_resource conversion for bunch of drivers
      
      * tag 'phy-for-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy: (72 commits)
        drm/mediatek: avoid dereferencing a null hdmi_phy on an error message
        phy: ingenic: depend on HAS_IOMEM
        phy: mediatek: statify mtk_hdmi_phy_driver
        dt-bindings: phy: Convert Broadcom SATA PHY to YAML
        devicetree: phy: rockchip-emmc add output-tapdelay-select
        phy: rockchip-emmc: output tap delay dt property
        PHY: Ingenic: Add USB PHY driver using generic PHY framework.
        dt-bindings: USB: Add bindings for Ingenic JZ4775 and X2000.
        USB: PHY: JZ4770: Remove unnecessary function calls.
        devicetree: phy: rockchip-emmc: pulldown property
        phy: rockchip: set pulldown for strobe line in dts
        phy: renesas: rcar-gen3-usb2: disable runtime pm in case of failure
        phy: mediatek: allow compile-testing the hdmi phy
        phy/rockchip: Make PHY_ROCKCHIP_INNO_HDMI depend on HAS_IOMEM to fix build error
        phy: samsung: Merge Kconfig for Exynos5420 and Exynos5250
        phy: ralink: phy-mt7621-pci: set correct name in MODULE_DEVICE_TABLE macro
        phy: ralink: phy-mt7621-pci: drop 'COMPILE_TEST' from Kconfig
        phy: mediatek: Make PHY_MTK_{XSPHY, TPHY} depend on HAS_IOMEM and OF_ADDRESS to fix build errors
        phy: tegra: xusb: Fix usb_phy device driver field
        phy: amlogic: replace devm_reset_control_array_get()
        ...
      54bf54c8
    • Q
      coresight: etm4x: Modify core-commit to avoid HiSilicon ETM overflow · e7255092
      Qi Liu 提交于
      The ETM device can't keep up with the core pipeline when cpu core
      is at full speed. This may cause overflow within core and its ETM.
      This is a common phenomenon on ETM devices.
      
      On HiSilicon Hip08 platform, a specific feature is added to set
      core pipeline. So commit rate can be reduced manually to avoid ETM
      overflow.
      Reviewed-by: NSuzuki K Poulose <suzuki.poulose@arm.com>
      Signed-off-by: NQi Liu <liuqi115@huawei.com>
      [Modified changelog title and Kconfig description]
      Signed-off-by: NMathieu Poirier <mathieu.poirier@linaro.org>
      Link: https://lore.kernel.org/r/20201208182651.1597945-4-mathieu.poirier@linaro.orgSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      e7255092
    • A
      coresight: remove broken __exit annotations · 45fe7bef
      Arnd Bergmann 提交于
      Functions that are annotated __exit are discarded for built-in drivers,
      but the .remove callback in a device driver must still be kept around
      to allow bind/unbind operations.
      
      There is now a linker warning for the discarded symbol references:
      
      `tmc_remove' referenced in section `.data' of drivers/hwtracing/coresight/coresight-tmc-core.o: defined in discarded section `.exit.text' of drivers/hwtracing/coresight/coresight-tmc-core.o
      `tpiu_remove' referenced in section `.data' of drivers/hwtracing/coresight/coresight-tpiu.o: defined in discarded section `.exit.text' of drivers/hwtracing/coresight/coresight-tpiu.o
      `etb_remove' referenced in section `.data' of drivers/hwtracing/coresight/coresight-etb10.o: defined in discarded section `.exit.text' of drivers/hwtracing/coresight/coresight-etb10.o
      `static_funnel_remove' referenced in section `.data' of drivers/hwtracing/coresight/coresight-funnel.o: defined in discarded section `.exit.text' of drivers/hwtracing/coresight/coresight-funnel.o
      `dynamic_funnel_remove' referenced in section `.data' of drivers/hwtracing/coresight/coresight-funnel.o: defined in discarded section `.exit.text' of drivers/hwtracing/coresight/coresight-funnel.o
      `static_replicator_remove' referenced in section `.data' of drivers/hwtracing/coresight/coresight-replicator.o: defined in discarded section `.exit.text' of drivers/hwtracing/coresight/coresight-replicator.o
      `dynamic_replicator_remove' referenced in section `.data' of drivers/hwtracing/coresight/coresight-replicator.o: defined in discarded section `.exit.text' of drivers/hwtracing/coresight/coresight-replicator.o
      `catu_remove' referenced in section `.data' of drivers/hwtracing/coresight/coresight-catu.o: defined in discarded section `.exit.text' of drivers/hwtracing/coresight/coresight-catu.o
      
      Remove all those annotations.
      
      Fixes: 8b0cf826 ("coresight: stm: Allow to build coresight-stm as a module")
      Reviewed-by: NStephen Boyd <swboyd@chromium.org>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NMathieu Poirier <mathieu.poirier@linaro.org>
      Link: https://lore.kernel.org/r/20201208182651.1597945-3-mathieu.poirier@linaro.orgSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      45fe7bef
    • S
      coresight: tmc-etr: Fix barrier packet insertion for perf buffer · 83be0b84
      Suzuki K Poulose 提交于
      When the ETR is used in perf mode with a larger buffer (configured
      via sysfs or the default size of 1M) than the perf aux buffer size,
      we end up inserting the barrier packet at the wrong offset, while
      moving the offset forward. i.e, instead of the "new moved offset",
      we insert it at the current hardware buffer offset. These packets
      will not be visible as they are never copied and could lead to
      corruption in the trace decoding side, as the decoder is not aware
      that it needs to reset the decoding.
      
      Fixes: ec13c78d ("coresight: tmc-etr: Add barrier packets when moving offset forward")
      Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
      Cc: stable@vger.kernel.org
      Reported-by: NAl Grant <al.grant@arm.com>
      Tested-by: NMike Leach <mike.leach@arm.com>
      Signed-off-by: NSuzuki K Poulose <suzuki.poulose@arm.com>
      Signed-off-by: NMathieu Poirier <mathieu.poirier@linaro.org>
      Link: https://lore.kernel.org/r/20201208182651.1597945-2-mathieu.poirier@linaro.orgSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      83be0b84
  3. 08 12月, 2020 2 次提交
  4. 07 12月, 2020 26 次提交