1. 20 Nov, 2020 3 commits
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-2020-11-20-2' of git://anongit.freedesktop.org/drm/drm · 46cbc18e
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "Weekly fixes pull.
      
        This contains some fixes for sun4i/dw-hdmi probing, then amdgpu
        enables arcturus hw without experimental flag and two other fixes and
        a group of i915 fixes.
      
        It also has a backported from next fix for the warn on reported in
        ast/drm_gem_vram_helper code in the merge window. There's a separate
        report which initially looked to be the same problem, but I'm going to
        chase that up next week a bit more as I don't think the bisect landed
        anywhere useful.
      
        Summary:
      
        core:
         - vram helper TTM regression fix
      
        amdgpu:
         - Pageflip fix for navi1x with 5 or 6 displays
         - Remove experimental flag for Arcturus
         - Fix regression in atomic commit tail rework
      
        i915:
         - Fix tgl power gating issue
         - Memory leak fixes
         - Selftest fixes
         - Display bpc fix
         - Fix TGL MOCS for PTE tracking
      
        dw-hdmi:
         - probing fix
      
        sun4i:
         - probing fix"
      
      * tag 'drm-fixes-2020-11-20-2' of git://anongit.freedesktop.org/drm/drm:
        drm/i915/gt: Fixup tgl mocs for PTE tracking
        drm/vram-helper: Fix use of top-down placement
        drm/i915/gt: Remember to free the virtual breadcrumbs
        drm/i915: Handle max_bpc==16
        drm/amd/display: Always get CRTC updated constant values inside commit tail
        drm/sun4i: backend: Fix probe failure with multiple backends
        drm/sun4i: dw-hdmi: fix error return code in sun8i_dw_hdmi_bind()
        drm/i915/selftests: Fix wrong return value of perf_request_latency()
        drm/i915/selftests: Fix wrong return value of perf_series_engines()
        drm/i915: Avoid memory leak with more than 16 workarounds on a list
        drm/i915/tgl: Fix Media power gate sequence.
        drm/amdgpu: remove experimental flag from arcturus
        drm/amd/display: Add missing pflip irq for dcn2.0
        drm/i915/gvt: return error when failing to take the module reference
        drm: bridge: dw-hdmi: Avoid resetting force in the detect function
        drm/i915/gvt: Set ENHANCED_FRAME_CAP bit
        drm/i915/gvt: Temporarily disable vfio_edid for BXT/APL
      46cbc18e
    • Dave Airlie's avatar
      Merge tag 'drm-intel-fixes-2020-11-19' of... · 6600f9d5
      Dave Airlie authored
      Merge tag 'drm-intel-fixes-2020-11-19' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes
      
      - Fix tgl power gating issue (Rodrigo)
      - Memory leak fixes (Tvrtko, Chris)
      - Selftest fixes (Zhang)
      - Display bpc fix (Ville)
      - Fix TGL MOCS for PTE tracking (Chris)
      
      GVT Fixes: It temporarily disables VFIO edid
      feature on BXT/APL until its virtual display is really fixed to make
      it work properly. And fixes for DPCD 1.2 and error return in taking
      module reference.
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      
      From: Rodrigo Vivi <rodrigo.vivi@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20201119203417.GA1795798@intel.com
      6600f9d5
    • Dave Airlie's avatar
      Merge tag 'drm-misc-fixes-2020-11-19' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes · 9336127d
      Dave Airlie authored
      two patches to fix dw-hdmi bind and detection code, and one fix for
      sun4i shared with arm-soc
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      
      From: Maxime Ripard <maxime@cerno.tech>
      Link: https://patchwork.freedesktop.org/patch/msgid/20201119083939.ddj3saipyg5iwvb4@gilmour
      9336127d
  2. 19 Nov, 2020 37 commits
    • Linus Torvalds's avatar
      Merge tag 'net-5.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · 4d02da97
      Linus Torvalds authored
      Pull networking fixes from Jakub Kicinski:
       "Networking fixes for 5.10-rc5, including fixes from the WiFi
        (mac80211), can and bpf (including the strncpy_from_user fix).
      
        Current release - regressions:
      
         - mac80211: fix memory leak of filtered powersave frames
      
         - mac80211: free sta in sta_info_insert_finish() on errors to avoid
           sleeping in atomic context
      
         - netlabel: fix an uninitialized variable warning added in -rc4
      
        Previous release - regressions:
      
         - vsock: forward all packets to the host when no H2G is registered,
           un-breaking AWS Nitro Enclaves
      
         - net: Exempt multicast addresses from five-second neighbor lifetime
           requirement, decreasing the chances neighbor tables fill up
      
         - net/tls: fix corrupted data in recvmsg
      
         - qed: fix ILT configuration of SRC block
      
         - can: m_can: process interrupt only when not runtime suspended
      
        Previous release - always broken:
      
         - page_frag: Recover from memory pressure by not recycling pages
           allocating from the reserves
      
         - strncpy_from_user: Mask out bytes after NUL terminator
      
         - ip_tunnels: Set tunnel option flag only when tunnel metadata is
           present, always setting it confuses Open vSwitch
      
         - bpf, sockmap:
            - Fix partial copy_page_to_iter so progress can still be made
            - Fix socket memory accounting and obeying SO_RCVBUF
      
         - net: Have netpoll bring-up DSA management interface
      
         - net: bridge: add missing counters to ndo_get_stats64 callback
      
         - tcp: brr: only postpone PROBE_RTT if RTT is < current min_rtt
      
         - enetc: Workaround MDIO register access HW bug
      
         - net/ncsi: move netlink family registration to a subsystem init,
           instead of tying it to driver probe
      
         - net: ftgmac100: unregister NC-SI when removing driver to avoid
           crash
      
         - lan743x:
            - prevent interrupt storm on open
            - fix freeing skbs in the wrong context
      
         - net/mlx5e: Fix socket refcount leak on kTLS RX resync
      
         - net: dsa: mv88e6xxx: Avoid VLAN database corruption on 6097
      
         - fix 21 unset return codes and other mistakes on error paths, mostly
           detected by the Hulk Robot"
      
      * tag 'net-5.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (115 commits)
        fail_function: Remove a redundant mutex unlock
        selftest/bpf: Test bpf_probe_read_user_str() strips trailing bytes after NUL
        lib/strncpy_from_user.c: Mask out bytes after NUL terminator.
        net/smc: fix direct access to ib_gid_addr->ndev in smc_ib_determine_gid()
        net/smc: fix matching of existing link groups
        ipv6: Remove dependency of ipv6_frag_thdr_truncated on ipv6 module
        libbpf: Fix VERSIONED_SYM_COUNT number parsing
        net/mlx4_core: Fix init_hca fields offset
        atm: nicstar: Unmap DMA on send error
        page_frag: Recover from memory pressure
        net: dsa: mv88e6xxx: Wait for EEPROM done after HW reset
        mlxsw: core: Use variable timeout for EMAD retries
        mlxsw: Fix firmware flashing
        net: Have netpoll bring-up DSA management interface
        atl1e: fix error return code in atl1e_probe()
        atl1c: fix error return code in atl1c_probe()
        ah6: fix error return code in ah6_input()
        net: usb: qmi_wwan: Set DTR quirk for MR400
        can: m_can: process interrupt only when not runtime suspended
        can: flexcan: flexcan_chip_start(): fix erroneous flexcan_transceiver_enable() during bus-off recovery
        ...
      4d02da97
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma · 3be28e93
      Linus Torvalds authored
      Pull rdma fixes from Jason Gunthorpe:
       "The last two weeks have been quiet here, just the usual smattering of
        long standing bug fixes.
      
        A collection of error case bug fixes:
      
         - Improper nesting of spinlock types in cm
      
         - Missing error codes and kfree()
      
         - Ensure dma_virt_ops users have the right kconfig symbols to work
           properly
      
         - Compilation failure of tools/testing"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma:
        tools/testing/scatterlist: Fix test to compile and run
        IB/hfi1: Fix error return code in hfi1_init_dd()
        RMDA/sw: Don't allow drivers using dma_virt_ops on highmem configs
        RDMA/pvrdma: Fix missing kfree() in pvrdma_register_device()
        RDMA/cm: Make the local_id_table xarray non-irq
      3be28e93
    • Jakub Kicinski's avatar
      Merge https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf · e6ea60ba
      Jakub Kicinski authored
      Alexei Starovoitov says:
      
      ====================
      1) libbpf should not attempt to load unused subprogs, from Andrii.
      
      2) Make strncpy_from_user() mask out bytes after NUL terminator, from Daniel.
      
      3) Relax return code check for subprograms in the BPF verifier, from Dmitrii.
      
      4) Fix several sockmap issues, from John.
      
      * https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf:
        fail_function: Remove a redundant mutex unlock
        selftest/bpf: Test bpf_probe_read_user_str() strips trailing bytes after NUL
        lib/strncpy_from_user.c: Mask out bytes after NUL terminator.
        libbpf: Fix VERSIONED_SYM_COUNT number parsing
        bpf, sockmap: Avoid failures from skb_to_sgvec when skb has frag_list
        bpf, sockmap: Handle memory acct if skb_verdict prog redirects to self
        bpf, sockmap: Avoid returning unneeded EAGAIN when redirecting to self
        bpf, sockmap: Use truesize with sk_rmem_schedule()
        bpf, sockmap: Ensure SO_RCVBUF memory is observed on ingress redirect
        bpf, sockmap: Fix partial copy_page_to_iter so progress can still be made
        selftests/bpf: Fix error return code in run_getsockopt_test()
        bpf: Relax return code check for subprograms
        tools, bpftool: Add missing close before bpftool net attach exit
        MAINTAINERS/bpf: Update Andrii's entry.
        selftests/bpf: Fix unused attribute usage in subprogs_unused test
        bpf: Fix unsigned 'datasec_id' compared with zero in check_pseudo_btf_id
        bpf: Fix passing zero to PTR_ERR() in bpf_btf_printf_prepare
        libbpf: Don't attempt to load unused subprog as an entry-point BPF program
      ====================
      
      Link: https://lore.kernel.org/r/20201119200721.288-1-alexei.starovoitov@gmail.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      e6ea60ba
    • Chris Wilson's avatar
      drm/i915/gt: Fixup tgl mocs for PTE tracking · be33805c
      Chris Wilson authored
      Forcing mocs:1 [used for our winsys follows-pte mode] to be cached
      caused display glitches. Though it is documented as deprecated (and so
      likely behaves as uncached) use the follow-pte bit and force it out of
      L3 cache.
      
      Testcase: igt/kms_frontbuffer_tracking
      Testcase: igt/kms_big_fb
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Cc: Ayaz A Siddiqui <ayaz.siddiqui@intel.com>
      Cc: Lucas De Marchi <lucas.demarchi@intel.com>
      Cc: Matt Roper <matthew.d.roper@intel.com>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20201015122138.30161-4-chris@chris-wilson.co.uk
      (cherry picked from commit a04ac827)
      Fixes: 849c0fe9 ("drm/i915/gt: Initialize reserved and unspecified MOCS indices")
      Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      [Rodrigo: Updated Fixes tag]
      be33805c
    • Dave Airlie's avatar
      Merge tag 'amd-drm-fixes-5.10-2020-11-18' of... · f95dddc9
      Dave Airlie authored
      Merge tag 'amd-drm-fixes-5.10-2020-11-18' of git://people.freedesktop.org/~agd5f/linux into drm-fixes
      
      amd-drm-fixes-5.10-2020-11-18:
      
      amdgpu:
      - Pageflip fix for navi1x with 5 or 6 displays
      - Remove experimental flag for Arcturus
      - Fix regression in atomic commit tail rework
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      From: Alex Deucher <alexdeucher@gmail.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20201118213646.4015-1-alexander.deucher@amd.com
      f95dddc9
    • Luo Meng's avatar
      fail_function: Remove a redundant mutex unlock · 2801a5da
      Luo Meng authored
      Fix a mutex_unlock() issue where before copy_from_user() is
      not called mutex_locked.
      
      Fixes: 4b1a29a7 ("error-injection: Support fault injection framework")
      Reported-by: default avatarHulk Robot <hulkci@huawei.com>
      Signed-off-by: default avatarLuo Meng <luomeng12@huawei.com>
      Signed-off-by: default avatarMasami Hiramatsu <mhiramat@kernel.org>
      Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
      Acked-by: default avatarMasami Hiramatsu <mhiramat@kernel.org>
      Link: https://lore.kernel.org/bpf/160570737118.263807.8358435412898356284.stgit@devnote2
      2801a5da
    • Alexei Starovoitov's avatar
      Merge branch 'Fix bpf_probe_read_user_str() overcopying' · 14d6d86c
      Alexei Starovoitov authored
      Daniel Xu says:
      
      ====================
      
      6ae08ae3 ("bpf: Add probe_read_{user, kernel} and probe_read_{user,
      kernel}_str helpers") introduced a subtle bug where
      bpf_probe_read_user_str() would potentially copy a few extra bytes after
      the NUL terminator.
      
      This issue is particularly nefarious when strings are used as map keys,
      as seemingly identical strings can occupy multiple entries in a map.
      
      This patchset fixes the issue and introduces a selftest to prevent
      future regressions.
      
      v6 -> v7:
      * Add comments
      
      v5 -> v6:
      * zero-pad up to sizeof(unsigned long) after NUL
      
      v4 -> v5:
      * don't read potentially uninitialized memory
      
      v3 -> v4:
      * directly pass userspace pointer to prog
      * test more strings of different length
      
      v2 -> v3:
      * set pid filter before attaching prog in selftest
      * use long instead of int as bpf_probe_read_user_str() retval
      * style changes
      
      v1 -> v2:
      * add Fixes: tag
      * add selftest
      ====================
      Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
      14d6d86c
    • Daniel Xu's avatar
      selftest/bpf: Test bpf_probe_read_user_str() strips trailing bytes after NUL · c8a36aed
      Daniel Xu authored
      Previously, bpf_probe_read_user_str() could potentially overcopy the
      trailing bytes after the NUL due to how do_strncpy_from_user() does the
      copy in long-sized strides. The issue has been fixed in the previous
      commit.
      
      This commit adds a selftest that ensures we don't regress
      bpf_probe_read_user_str() again.
      Signed-off-by: default avatarDaniel Xu <dxu@dxuuu.xyz>
      Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
      Acked-by: default avatarSong Liu <songliubraving@fb.com>
      Acked-by: default avatarAndrii Nakryiko <andrii@kernel.org>
      Link: https://lore.kernel.org/bpf/4d977508fab4ec5b7b574b85bdf8b398868b6ee9.1605642949.git.dxu@dxuuu.xyz
      c8a36aed
    • Daniel Xu's avatar
      lib/strncpy_from_user.c: Mask out bytes after NUL terminator. · 6fa6d280
      Daniel Xu authored
      do_strncpy_from_user() may copy some extra bytes after the NUL
      terminator into the destination buffer. This usually does not matter for
      normal string operations. However, when BPF programs key BPF maps with
      strings, this matters a lot.
      
      A BPF program may read strings from user memory by calling the
      bpf_probe_read_user_str() helper which eventually calls
      do_strncpy_from_user(). The program can then key a map with the
      destination buffer. BPF map keys are fixed-width and string-agnostic,
      meaning that map keys are treated as a set of bytes.
      
      The issue is when do_strncpy_from_user() overcopies bytes after the NUL
      terminator, it can result in seemingly identical strings occupying
      multiple slots in a BPF map. This behavior is subtle and totally
      unexpected by the user.
      
      This commit masks out the bytes following the NUL while preserving
      long-sized stride in the fast path.
      
      Fixes: 6ae08ae3 ("bpf: Add probe_read_{user, kernel} and probe_read_{user, kernel}_str helpers")
      Signed-off-by: default avatarDaniel Xu <dxu@dxuuu.xyz>
      Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
      Link: https://lore.kernel.org/bpf/21efc982b3e9f2f7b0379eed642294caaa0c27a7.1605642949.git.dxu@dxuuu.xyz
      6fa6d280
    • Linus Torvalds's avatar
      Merge tag 'powerpc-cve-2020-4788' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux · dda3f425
      Linus Torvalds authored
      Pull powerpc fixes from Michael Ellerman:
       "Fixes for CVE-2020-4788.
      
        From Daniel's cover letter:
      
        IBM Power9 processors can speculatively operate on data in the L1
        cache before it has been completely validated, via a way-prediction
        mechanism. It is not possible for an attacker to determine the
        contents of impermissible memory using this method, since these
        systems implement a combination of hardware and software security
        measures to prevent scenarios where protected data could be leaked.
      
        However these measures don't address the scenario where an attacker
        induces the operating system to speculatively execute instructions
        using data that the attacker controls. This can be used for example to
        speculatively bypass "kernel user access prevention" techniques, as
        discovered by Anthony Steinhauser of Google's Safeside Project. This
        is not an attack by itself, but there is a possibility it could be
        used in conjunction with side-channels or other weaknesses in the
        privileged code to construct an attack.
      
        This issue can be mitigated by flushing the L1 cache between privilege
        boundaries of concern.
      
        This patch series flushes the L1 cache on kernel entry (patch 2) and
        after the kernel performs any user accesses (patch 3). It also adds a
        self-test and performs some related cleanups"
      
      * tag 'powerpc-cve-2020-4788' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
        powerpc/64s: rename pnv|pseries_setup_rfi_flush to _setup_security_mitigations
        selftests/powerpc: refactor entry and rfi_flush tests
        selftests/powerpc: entry flush test
        powerpc: Only include kup-radix.h for 64-bit Book3S
        powerpc/64s: flush L1D after user accesses
        powerpc/64s: flush L1D on kernel entry
        selftests/powerpc: rfi_flush: disable entry flush if present
      dda3f425
    • Linus Torvalds's avatar
      Merge tag 'xtensa-20201119' of git://github.com/jcmvbkbc/linux-xtensa · 3494d588
      Linus Torvalds authored
      Pull xtensa fixes from Max Filippov:
      
       - fix placement of cache alias remapping area
      
       - disable preemption around cache alias management calls
      
       - add missing __user annotation to strncpy_from_user argument
      
      * tag 'xtensa-20201119' of git://github.com/jcmvbkbc/linux-xtensa:
        xtensa: uaccess: Add missing __user to strncpy_from_user() prototype
        xtensa: disable preemption around cache alias management calls
        xtensa: fix TLBTEMP area placement
      3494d588
    • Thomas Zimmermann's avatar
      drm/vram-helper: Fix use of top-down placement · 01822dd1
      Thomas Zimmermann authored
      Commit 7053e0ea ("drm/vram-helper: stop using TTM placement flags")
      cleared the BO placement flags if top-down placement had been selected.
      Hence, BOs that were supposed to go into VRAM are now placed in a default
      location in system memory.
      
      Trying to scanout the incorrectly pinned BO results in displayed garbage
      and an error message.
      
      [  146.108127] ------------[ cut here ]------------
      [  146.1V08180] WARNING: CPU: 0 PID: 152 at drivers/gpu/drm/drm_gem_vram_helper.c:284 drm_gem_vram_offset+0x59/0x60 [drm_vram_helper]
      ...
      [  146.108591]  ast_cursor_page_flip+0x3e/0x150 [ast]
      [  146.108622]  ast_cursor_plane_helper_atomic_update+0x8a/0xc0 [ast]
      [  146.108654]  drm_atomic_helper_commit_planes+0x197/0x4c0
      [  146.108699]  drm_atomic_helper_commit_tail_rpm+0x59/0xa0
      [  146.108718]  commit_tail+0x103/0x1c0
      ...
      [  146.109302] ---[ end trace d901a1ba1d949036 ]---
      
      Fix the bug by keeping the placement flags. The top-down placement flag
      is stored in a separate variable.
      Signed-off-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
      Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
      Fixes: 7053e0ea ("drm/vram-helper: stop using TTM placement flags")
      Reported-by: Pu Wen <puwen@hygon.cn> [for 5.10-rc1]
      Tested-by: default avatarPu Wen <puwen@hygon.cn>
      Cc: Christian König <christian.koenig@amd.com>
      Cc: Dave Airlie <airlied@redhat.com>
      Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Cc: Maxime Ripard <mripard@kernel.org>
      Cc: Thomas Zimmermann <tzimmermann@suse.de>
      Cc: David Airlie <airlied@linux.ie>
      Cc: Daniel Vetter <daniel@ffwll.ch>
      Cc: dri-devel@lists.freedesktop.org
      Link: https://patchwork.freedesktop.org/patch/msgid/20200921142536.4392-1-tzimmermann@suse.de
      (cherry picked from commit b8f8dbf6)
      [pulled into fixes from drm-next]
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      01822dd1
    • Linus Torvalds's avatar
      Merge tag 'acpi-5.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 131ad0b6
      Linus Torvalds authored
      Pull ACPI fixes from Rafael Wysocki:
       "These fix recent regression in the APEI code and initialization issue
        in the ACPI fan driver.
      
        Specifics:
      
         - Make the APEI code avoid attempts to obtain logical addresses for
           registers located in the I/O address space to fix initialization
           issues (Aili Yao)
      
         - Fix sysfs attribute initialization in the ACPI fan driver (Guenter
           Roeck)"
      
      * tag 'acpi-5.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        ACPI, APEI, Fix error return value in apei_map_generic_address()
        ACPI: fan: Initialize performance state sysfs attribute
      131ad0b6
    • Linus Torvalds's avatar
      Merge tag 'pm-5.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 4ca35b4f
      Linus Torvalds authored
      Pull power management fixes from Rafael Wysocki:
       "These fix two issues in ARM cpufreq drivers and one cpuidle driver
        issue.
      
        Specifics:
      
         - Add missing RCU_NONIDLE() annotations to the Tegra cpuidle driver
           (Dmitry Osipenko)
      
         - Fix boot frequency computation in the tegra186 cpufreq driver (Jon
           Hunter)
      
         - Make the SCMI cpufreq driver register a dummy clock provider to
           avoid OPP addition failures (Sudeep Holla)"
      
      * tag 'pm-5.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        cpufreq: scmi: Fix OPP addition failure with a dummy clock provider
        cpufreq: tegra186: Fix get frequency callback
        cpuidle: tegra: Annotate tegra_pm_set_cpu_in_lp2() with RCU_NONIDLE
      4ca35b4f
    • Linus Torvalds's avatar
      Merge tag 'spi-fix-v5.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi · fee3c824
      Linus Torvalds authored
      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
    • Jakub Kicinski's avatar
      Merge branch 'net-smc-fixes-2020-11-18' · 90b49784
      Jakub Kicinski authored
      Karsten Graul says:
      
      ====================
      net/smc: fixes 2020-11-18
      
      Patch 1 fixes the matching of link groups because with SMC-Dv2 the vlanid
      should no longer be part of this matching. Patch 2 removes a sparse message.
      ====================
      
      Link: https://lore.kernel.org/r/20201118214038.24039-1-kgraul@linux.ibm.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      90b49784
    • Karsten Graul's avatar
      net/smc: fix direct access to ib_gid_addr->ndev in smc_ib_determine_gid() · 41a0be3f
      Karsten Graul authored
      Sparse complaints 3 times about:
      net/smc/smc_ib.c:203:52: warning: incorrect type in argument 1 (different address spaces)
      net/smc/smc_ib.c:203:52:    expected struct net_device const *dev
      net/smc/smc_ib.c:203:52:    got struct net_device [noderef] __rcu *const ndev
      
      Fix that by using the existing and validated ndev variable instead of
      accessing attr->ndev directly.
      
      Fixes: 5102eca9 ("net/smc: Use rdma_read_gid_l2_fields to L2 fields")
      Signed-off-by: default avatarKarsten Graul <kgraul@linux.ibm.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      41a0be3f
    • Karsten Graul's avatar
      net/smc: fix matching of existing link groups · 0530bd6e
      Karsten Graul authored
      With the multi-subnet support of SMC-Dv2 the match for existing link
      groups should not include the vlanid of the network device.
      Set ini->smcd_version accordingly before the call to smc_conn_create()
      and use this value in smc_conn_create() to skip the vlanid check.
      
      Fixes: 5c21c4cc ("net/smc: determine accepted ISM devices")
      Signed-off-by: default avatarKarsten Graul <kgraul@linux.ibm.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      0530bd6e
    • Linus Torvalds's avatar
      Merge tag 'regulator-fix-v5.10-rc4' of... · d748287a
      Linus Torvalds authored
      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
    • Georg Kohmann's avatar
      ipv6: Remove dependency of ipv6_frag_thdr_truncated on ipv6 module · 2d8f6481
      Georg Kohmann authored
      IPV6=m
      NF_DEFRAG_IPV6=y
      
      ld: net/ipv6/netfilter/nf_conntrack_reasm.o: in function
      `nf_ct_frag6_gather':
      net/ipv6/netfilter/nf_conntrack_reasm.c:462: undefined reference to
      `ipv6_frag_thdr_truncated'
      
      Netfilter is depending on ipv6 symbol ipv6_frag_thdr_truncated. This
      dependency is forcing IPV6=y.
      
      Remove this dependency by moving ipv6_frag_thdr_truncated out of ipv6. This
      is the same solution as used with a similar issues: Referring to
      commit 70b095c8 ("ipv6: remove dependency of nf_defrag_ipv6 on ipv6
      module")
      
      Fixes: 9d9e937b ("ipv6/netfilter: Discard first fragment not including all headers")
      Reported-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Reported-by: default avatarkernel test robot <lkp@intel.com>
      Signed-off-by: default avatarGeorg Kohmann <geokohma@cisco.com>
      Acked-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
      Acked-by: Randy Dunlap <rdunlap@infradead.org> # build-tested
      Link: https://lore.kernel.org/r/20201119095833.8409-1-geokohma@cisco.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      2d8f6481
    • Linus Torvalds's avatar
      Merge tag 'thermal-v5.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux · 841d6e9e
      Linus Torvalds authored
      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
    • Jiri Olsa's avatar
      libbpf: Fix VERSIONED_SYM_COUNT number parsing · 1fd6cee1
      Jiri Olsa authored
      We remove "other info" from "readelf -s --wide" output when
      parsing GLOBAL_SYM_COUNT variable, which was added in [1].
      But we don't do that for VERSIONED_SYM_COUNT and it's failing
      the check_abi target on powerpc Fedora 33.
      
      The extra "other info" wasn't problem for VERSIONED_SYM_COUNT
      parsing until commit [2] added awk in the pipe, which assumes
      that the last column is symbol, but it can be "other info".
      
      Adding "other info" removal for VERSIONED_SYM_COUNT the same
      way as we did for GLOBAL_SYM_COUNT parsing.
      
      [1] aa915931 ("libbpf: Fix readelf output parsing for Fedora")
      [2] 746f534a ("tools/libbpf: Avoid counting local symbols in ABI check")
      
      Fixes: 746f534a ("tools/libbpf: Avoid counting local symbols in ABI check")
      Signed-off-by: default avatarJiri Olsa <jolsa@kernel.org>
      Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
      Acked-by: default avatarAndrii Nakryiko <andrii@kernel.org>
      Link: https://lore.kernel.org/bpf/20201118211350.1493421-1-jolsa@kernel.org
      1fd6cee1
    • Rafael J. Wysocki's avatar
      Merge branch 'acpi-fan' · de15e20f
      Rafael J. Wysocki authored
      * acpi-fan:
        ACPI: fan: Initialize performance state sysfs attribute
      de15e20f
    • Rafael J. Wysocki's avatar
      Merge branch 'pm-cpuidle' · 3a8ac4d3
      Rafael J. Wysocki authored
      * pm-cpuidle:
        cpuidle: tegra: Annotate tegra_pm_set_cpu_in_lp2() with RCU_NONIDLE
      3a8ac4d3
    • Daniel Axtens's avatar
      powerpc/64s: rename pnv|pseries_setup_rfi_flush to _setup_security_mitigations · da631f7f
      Daniel Axtens authored
      pseries|pnv_setup_rfi_flush already does the count cache flush setup, and
      we just added entry and uaccess flushes. So the name is not very accurate
      any more. In both platforms we then also immediately setup the STF flush.
      
      Rename them to _setup_security_mitigations and fold the STF flush in.
      Signed-off-by: default avatarDaniel Axtens <dja@axtens.net>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      da631f7f
    • Daniel Axtens's avatar
      selftests/powerpc: refactor entry and rfi_flush tests · 0d239f3b
      Daniel Axtens authored
      For simplicity in backporting, the original entry_flush test contained
      a lot of duplicated code from the rfi_flush test. De-duplicate that code.
      Signed-off-by: default avatarDaniel Axtens <dja@axtens.net>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      0d239f3b
    • Daniel Axtens's avatar
      selftests/powerpc: entry flush test · 89a83a0c
      Daniel Axtens authored
      Add a test modelled on the RFI flush test which counts the number
      of L1D misses doing a simple syscall with the entry flush on and off.
      
      For simplicity of backporting, this test duplicates a lot of code from
      rfi_flush. We clean that up in the next patch.
      Signed-off-by: default avatarDaniel Axtens <dja@axtens.net>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      89a83a0c
    • Michael Ellerman's avatar
      powerpc: Only include kup-radix.h for 64-bit Book3S · 178d52c6
      Michael Ellerman authored
      In kup.h we currently include kup-radix.h for all 64-bit builds, which
      includes Book3S and Book3E. The latter doesn't make sense, Book3E
      never uses the Radix MMU.
      
      This has worked up until now, but almost by accident, and the recent
      uaccess flush changes introduced a build breakage on Book3E because of
      the bad structure of the code.
      
      So disentangle things so that we only use kup-radix.h for Book3S. This
      requires some more stubs in kup.h and fixing an include in
      syscall_64.c.
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      178d52c6
    • Nicholas Piggin's avatar
      powerpc/64s: flush L1D after user accesses · 9a32a7e7
      Nicholas Piggin authored
      IBM Power9 processors can speculatively operate on data in the L1 cache
      before it has been completely validated, via a way-prediction mechanism. It
      is not possible for an attacker to determine the contents of impermissible
      memory using this method, since these systems implement a combination of
      hardware and software security measures to prevent scenarios where
      protected data could be leaked.
      
      However these measures don't address the scenario where an attacker induces
      the operating system to speculatively execute instructions using data that
      the attacker controls. This can be used for example to speculatively bypass
      "kernel user access prevention" techniques, as discovered by Anthony
      Steinhauser of Google's Safeside Project. This is not an attack by itself,
      but there is a possibility it could be used in conjunction with
      side-channels or other weaknesses in the privileged code to construct an
      attack.
      
      This issue can be mitigated by flushing the L1 cache between privilege
      boundaries of concern. This patch flushes the L1 cache after user accesses.
      
      This is part of the fix for CVE-2020-4788.
      Signed-off-by: default avatarNicholas Piggin <npiggin@gmail.com>
      Signed-off-by: default avatarDaniel Axtens <dja@axtens.net>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      9a32a7e7
    • Nicholas Piggin's avatar
      powerpc/64s: flush L1D on kernel entry · f7964378
      Nicholas Piggin authored
      IBM Power9 processors can speculatively operate on data in the L1 cache
      before it has been completely validated, via a way-prediction mechanism. It
      is not possible for an attacker to determine the contents of impermissible
      memory using this method, since these systems implement a combination of
      hardware and software security measures to prevent scenarios where
      protected data could be leaked.
      
      However these measures don't address the scenario where an attacker induces
      the operating system to speculatively execute instructions using data that
      the attacker controls. This can be used for example to speculatively bypass
      "kernel user access prevention" techniques, as discovered by Anthony
      Steinhauser of Google's Safeside Project. This is not an attack by itself,
      but there is a possibility it could be used in conjunction with
      side-channels or other weaknesses in the privileged code to construct an
      attack.
      
      This issue can be mitigated by flushing the L1 cache between privilege
      boundaries of concern. This patch flushes the L1 cache on kernel entry.
      
      This is part of the fix for CVE-2020-4788.
      Signed-off-by: default avatarNicholas Piggin <npiggin@gmail.com>
      Signed-off-by: default avatarDaniel Axtens <dja@axtens.net>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      f7964378
    • Russell Currey's avatar
      selftests/powerpc: rfi_flush: disable entry flush if present · fcb48454
      Russell Currey authored
      We are about to add an entry flush. The rfi (exit) flush test measures
      the number of L1D flushes over a syscall with the RFI flush enabled and
      disabled. But if the entry flush is also enabled, the effect of enabling
      and disabling the RFI flush is masked.
      
      If there is a debugfs entry for the entry flush, disable it during the RFI
      flush and restore it later.
      Reported-by: default avatarSpoorthy S <spoorts2@in.ibm.com>
      Signed-off-by: default avatarRussell Currey <ruscur@russell.cc>
      Signed-off-by: default avatarDaniel Axtens <dja@axtens.net>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      fcb48454
    • Maxime Ripard's avatar
      Merge tag 'drm/sun4i-dma-fix-pull-request' of... · cdf117d6
      Maxime Ripard authored
      Merge tag 'drm/sun4i-dma-fix-pull-request' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/mripard/linux into drm-misc-fixes
      
      Fix for drm/sun4i shared with arm-soc
      
      This patch is a preliminary fix that will conflict with subsequent work merged
      through arm-soc.
      Signed-off-by: default avatarMaxime Ripard <maxime@cerno.tech>
      
      # gpg: Signature made Wed 18 Nov 2020 09:51:53 AM CET
      # gpg:                using EDDSA key 5C1337A45ECA9AEB89060E9EE3EF0D6F671851C5
      # gpg: Good signature from "Maxime Ripard <maxime.ripard@anandra.org>" [unknown]
      # gpg:                 aka "Maxime Ripard <mripard@kernel.org>" [unknown]
      # gpg:                 aka "Maxime Ripard (Work Address) <maxime.ripard@bootlin.com>" [unknown]
      # gpg:                 aka "Maxime Ripard (Work Address) <maxime@bootlin.com>" [unknown]
      # gpg: WARNING: This key is not certified with a trusted signature!
      # gpg:          There is no indication that the signature belongs to the owner.
      # Primary key fingerprint: BE56 75C3 7E81 8C8B 5764  241C 254B CFC5 6BF6 CE8D
      #      Subkey fingerprint: 5C13 37A4 5ECA 9AEB 8906  0E9E E3EF 0D6F 6718 51C5
      From: Maxime Ripard <maxime@cerno.tech>
      Link: https://patchwork.freedesktop.org/patch/msgid/20201118090455.sznrgpduuytlc22k@gilmour.lan
      cdf117d6
    • Rodrigo Vivi's avatar
      Merge tag 'gvt-fixes-2020-11-17' of https://github.com/intel/gvt-linux into drm-intel-fixes · 3ce8d49c
      Rodrigo Vivi authored
      gvt-fixes-2020-11-17
      
      - Temporarily disable VFIO edid on BXT/APL (Colin)
      - Fix emulated DPCD for version 1.2 (Tina)
      - Fix error return when failing to take module reference (Xiongfeng)
      Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      From: Zhenyu Wang <zhenyuw@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20201117023918.GB23899@zhen-hp.sh.intel.com
      3ce8d49c
    • Chris Wilson's avatar
      drm/i915/gt: Remember to free the virtual breadcrumbs · b4ca4354
      Chris Wilson authored
      Since we allocate some breadcrumbs for the virtual engine, and the
      virtual engine has a custom destructor, we also need to free the
      breadcrumbs after use.
      
      Fixes: b3786b29 ("drm/i915/gt: Distinguish the virtual breadcrumbs from the irq breadcrumbs")
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Reviewed-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20201118133839.1783-1-chris@chris-wilson.co.uk
      (cherry picked from commit 45e50f48)
      Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      b4ca4354
    • Ville Syrjälä's avatar
      drm/i915: Handle max_bpc==16 · d2e3fce9
      Ville Syrjälä authored
      EDID can declare the maximum supported bpc up to 16,
      and apparently there are displays that do so. Currently
      we assume 12 bpc is tha max. Fix the assumption and
      toss in a MISSING_CASE() for any other value we don't
      expect to see.
      
      This fixes modesets with a display with EDID max bpc > 12.
      Previously any modeset would just silently fail on platforms
      that didn't otherwise limit this via the max_bpc property.
      In particular we don't add the max_bpc property to HDMI
      ports on gmch platforms, and thus we would see the raw
      max_bpc coming from the EDID.
      
      I suppose we could already adjust this to also allow 16bpc,
      but seeing as no current platform supports that there is
      little point.
      
      Cc: stable@vger.kernel.org
      Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2632Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20201110210447.27454-1-ville.syrjala@linux.intel.comReviewed-by: default avatarJosé Roberto de Souza <jose.souza@intel.com>
      (cherry picked from commit 2ca5a7b8)
      Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      d2e3fce9
    • Jakub Kicinski's avatar
      Merge tag 'linux-can-fixes-for-5.10-20201118' of... · f0b0a2d8
      Jakub Kicinski authored
      Merge tag 'linux-can-fixes-for-5.10-20201118' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can
      
      Marc Kleine-Budde says:
      
      ====================
      pull-request: can 2020-11-18
      
      Jimmy Assarsson provides two patches for the kvaser_pciefd and kvaser_usb
      drivers, where the can_bittiming_const are fixed.
      
      The next patch is by me and fixes an erroneous flexcan_transceiver_enable()
      during bus-off recovery in the flexcan driver.
      
      Jarkko Nikula's patch for the m_can driver fixes the IRQ handler to only
      process the interrupts if the device is not suspended.
      
      * tag 'linux-can-fixes-for-5.10-20201118' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can:
        can: m_can: process interrupt only when not runtime suspended
        can: flexcan: flexcan_chip_start(): fix erroneous flexcan_transceiver_enable() during bus-off recovery
        can: kvaser_usb: kvaser_usb_hydra: Fix KCAN bittiming limits
        can: kvaser_pciefd: Fix KCAN bittiming limits
      ====================
      
      Link: https://lore.kernel.org/r/20201118160414.2731659-1-mkl@pengutronix.deSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      f0b0a2d8
    • Aya Levin's avatar
      net/mlx4_core: Fix init_hca fields offset · 6d9c8d15
      Aya Levin authored
      Slave function read the following capabilities from the wrong offset:
      1. log_mc_entry_sz
      2. fs_log_entry_sz
      3. log_mc_hash_sz
      
      Fix that by adjusting these capabilities offset to match firmware
      layout.
      
      Due to the wrong offset read, the following issues might occur:
      1+2. Negative value reported at max_mcast_qp_attach.
      3. Driver to init FW with multicast hash size of zero.
      
      Fixes: a40ded60 ("net/mlx4_core: Add masking for a few queries on HCA caps")
      Signed-off-by: default avatarAya Levin <ayal@nvidia.com>
      Reviewed-by: default avatarMoshe Shemesh <moshe@nvidia.com>
      Reviewed-by: default avatarEran Ben Elisha <eranbe@nvidia.com>
      Signed-off-by: default avatarTariq Toukan <tariqt@nvidia.com>
      Link: https://lore.kernel.org/r/20201118081922.553-1-tariqt@nvidia.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      6d9c8d15