13 Feb, 2021

8 commits

  • Pull cifs fixes from Steve French:
    "Four small smb3 fixes to the new mount API (including a particularly
    important one for DFS links).

    These were found in testing this week of additional DFS scenarios, and
    a user testing of an apache container problem"

    * tag '5.11-rc7-smb3-github' of git://github.com/smfrench/smb3-kernel:
    cifs: Set CIFS_MOUNT_USE_PREFIX_PATH flag on setting cifs_sb->prepath.
    cifs: In the new mount api we get the full devname as source=
    cifs: do not disable noperm if multiuser mount option is not provided
    cifs: fix dfs-links

    Linus Torvalds
     
  • Pull io_uring fix from Jens Axboe:
    "Revert of a patch from this release that caused a regression"

    * tag 'io_uring-5.11-2021-02-12' of git://git.kernel.dk/linux-block:
    Revert "io_uring: don't take fs for recvmsg/sendmsg"

    Linus Torvalds
     
  • Pull drm fixes from Dave Airlie:
    "Regular fixes for final, there is a ttm regression fix, dp-mst fix,
    one amdgpu revert, two i915 fixes, and some misc fixes for sun4i,
    xlnx, and vc4.

    All pretty quiet and don't think we have any known outstanding
    regressions.

    ttm:
    - page pool regression fix.

    dp_mst:
    - don't report un-attached ports as connected

    amdgpu:
    - blank screen fix

    i915:
    - ensure Type-C FIA is powered when initializing
    - fix overlay frontbuffer tracking

    sun4i:
    - tcon1 sync polarity fix
    - always set HDMI clock rate
    - fix H6 HDMI PHY config
    - fix H6 max frequency

    vc4:
    - fix buffer overflow

    xlnx:
    - fix memory leak"

    * tag 'drm-fixes-2021-02-12' of git://anongit.freedesktop.org/drm/drm:
    drm/ttm: make sure pool pages are cleared
    drm/sun4i: dw-hdmi: Fix max. frequency for H6
    drm/sun4i: Fix H6 HDMI PHY configuration
    drm/sun4i: dw-hdmi: always set clock rate
    drm/sun4i: tcon: set sync polarity for tcon1 channel
    drm/i915: Fix overlay frontbuffer tracking
    Revert "drm/amd/display: Update NV1x SR latency values"
    drm/i915/tgl+: Make sure TypeC FIA is powered up when initializing it
    drm/dp_mst: Don't report ports connected if nothing is attached to them
    drm/xlnx: fix kmemleak by sending vblank_event in atomic_disable
    drm/vc4: hvs: Fix buffer overflow with the dlist handling

    Linus Torvalds
     
  • Pull tracing fix from Steven Rostedt:
    "Fix buffer overflow in trace event filter.

    It was reported that if an trace event was larger than a page and was
    filtered, that it caused memory corruption. The reason is that
    filtered events first go into a buffer to test the filter before being
    written into the ring buffer. Unfortunately, this write did not check
    the size"

    * tag 'trace-v5.11-rc7-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
    tracing: Check length before giving out the filter buffer

    Linus Torvalds
     
  • Pull xen fix from Juergen Gross:
    "A single fix for an issue introduced this development cycle: when
    running as a Xen guest on Arm systems the kernel will hang during
    boot"

    * tag 'for-linus-5.11-rc8-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
    arm/xen: Don't probe xenbus as part of an early initcall

    Linus Torvalds
     
  • Pull RISC-V fix from Palmer Dabbelt:
    "A single fix this week: the removal of the GPIO reset method for the
    Ethernet phy on the HiFive Unleashed.

    This returns to relying on the bootloader's phy reset sequence, which
    we'll have to continue doing until we can sort out how to get the
    Linux phy driver to perform the special reset dance required for this
    phy"

    * tag 'riscv-for-linus-5.11-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
    Revert "dts: phy: add GPIO number and active state used for phy reset"

    Linus Torvalds
     
  • Pull arm64 fix from Catalin Marinas:
    "Fix PTRACE_PEEKMTETAGS access to an mmapped region before the first
    write"

    * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
    arm64: mte: Allow PTRACE_PEEKMTETAGS access to the zero page

    Linus Torvalds
     
  • The ptrace(PTRACE_PEEKMTETAGS) implementation checks whether the user
    page has valid tags (mapped with PROT_MTE) by testing the PG_mte_tagged
    page flag. If this bit is cleared, ptrace(PTRACE_PEEKMTETAGS) returns
    -EIO.

    A newly created (PROT_MTE) mapping points to the zero page which had its
    tags zeroed during cpu_enable_mte(). If there were no prior writes to
    this mapping, ptrace(PTRACE_PEEKMTETAGS) fails with -EIO since the zero
    page does not have the PG_mte_tagged flag set.

    Set PG_mte_tagged on the zero page when its tags are cleared during
    boot. In addition, to avoid ptrace(PTRACE_PEEKMTETAGS) succeeding on
    !PROT_MTE mappings pointing to the zero page, change the
    __access_remote_tags() check to (vm_flags & VM_MTE) instead of
    PG_mte_tagged.

    Signed-off-by: Catalin Marinas
    Fixes: 34bfeea4a9e9 ("arm64: mte: Clear the tags when a page is mapped in user-space with PROT_MTE")
    Cc: # 5.10.x
    Cc: Will Deacon
    Reported-by: Luis Machado
    Tested-by: Luis Machado
    Reviewed-by: Vincenzo Frascino
    Link: https://lore.kernel.org/r/20210210180316.23654-1-catalin.marinas@arm.com

    Catalin Marinas
     

12 Feb, 2021

8 commits

  • (I've pulled from a non-tag to get the ttm regression fix)
    drm-misc-fixes-2021-02-10:
    * dp_mst: Don't report un-attached ports as connected
    * sun4i: tcon1 sync polarity fix; Always set HDMI clock rate; Fix
    H6 HDMI PHY config; Fix H6 max frequency
    * vc4: Fix buffer overflow
    * xlnx: Fix memory leak
    * ttm: page pool regression fix.

    Signed-off-by: Dave Airlie
    From: Thomas Zimmermann
    Link: https://patchwork.freedesktop.org/patch/msgid/YCPo6g3gDxD3P//h@linux-uq9g

    Dave Airlie
     
  • drm/i915 fixes for v5.11 final:
    - Ensure Type-C FIA is powered when initializing
    - Fix overlay frontbuffer tracking

    Signed-off-by: Dave Airlie
    From: Jani Nikula
    Link: https://patchwork.freedesktop.org/patch/msgid/87r1lnc78t.fsf@intel.com

    Dave Airlie
     
  • …f/linux into drm-fixes

    amd-drm-fixes-5.11-2021-02-10:

    amdgpu:
    - Blank screen fix

    Signed-off-by: Dave Airlie <airlied@redhat.com>
    From: Alex Deucher <alexdeucher@gmail.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/20210210223508.4428-1-alexander.deucher@amd.com

    Dave Airlie
     
  • Pull powerpc fix from Michael Ellerman:
    "One fix for a regression seen in io_uring, introduced by our support
    for KUAP (Kernel User Access Prevention) with the Hash MMU.

    Thanks to Aneesh Kumar K.V, and Zorro Lang"

    * tag 'powerpc-5.11-8' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
    powerpc/kuap: Allow kernel thread to access userspace after kthread_use_mm

    Linus Torvalds
     
  • When filters are used by trace events, a page is allocated on each CPU and
    used to copy the trace event fields to this page before writing to the ring
    buffer. The reason to use the filter and not write directly into the ring
    buffer is because a filter may discard the event and there's more overhead
    on discarding from the ring buffer than the extra copy.

    The problem here is that there is no check against the size being allocated
    when using this page. If an event asks for more than a page size while being
    filtered, it will get only a page, leading to the caller writing more that
    what was allocated.

    Check the length of the request, and if it is more than PAGE_SIZE minus the
    header default back to allocating from the ring buffer directly. The ring
    buffer may reject the event if its too big anyway, but it wont overflow.

    Link: https://lore.kernel.org/ath10k/1612839593-2308-1-git-send-email-wgong@codeaurora.org/

    Cc: stable@vger.kernel.org
    Fixes: 0fc1b09ff1ff4 ("tracing: Use temp buffer when filtering events")
    Reported-by: Wen Gong
    Signed-off-by: Steven Rostedt (VMware)

    Steven Rostedt (VMware)
     
  • Pull gpio fixes from Bartosz Golaszewski:
    "This is hopefully the last batch of fixes for this release cycle. We
    have a minor fix for a Kconfig regression as well as fixes for older
    bugs in gpio-ep93xx:

    - don't build gpio-mxs unconditionally with COMPILE_TEST enabled

    - fix two problems with interrupt handling in gpio-ep93xx"

    * tag 'gpio-fixes-for-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux:
    gpio: ep93xx: Fix single irqchip with multi gpiochips
    gpio: ep93xx: fix BUG_ON port F usage
    gpio: mxs: GPIO_MXS should not default to y unconditionally

    Linus Torvalds
     
  • While debugging another issue today, Steve and I noticed that if a
    subdir for a file share is already mounted on the client, any new
    mount of any other subdir (or the file share root) of the same share
    results in sharing the cifs superblock, which e.g. can result in
    incorrect device name.

    While setting prefix path for the root of a cifs_sb,
    CIFS_MOUNT_USE_PREFIX_PATH flag should also be set.
    Without it, prepath is not even considered in some places,
    and output of "mount" and various /proc/<>/*mount* related
    options can be missing part of the device name.

    Signed-off-by: Shyam Prasad N
    Reviewed-by: Aurelien Aptel
    Signed-off-by: Steve French

    Shyam Prasad N
     
  • so we no longer need to handle or parse the UNC= and prefixpath=
    options that mount.cifs are generating.

    This also fixes a bug in the mount command option where the devname
    would be truncated into just //server/share because we were looking
    at the truncated UNC value and not the full path.

    I.e. in the mount command output the devive //server/share/path
    would show up as just //server/share

    Signed-off-by: Ronnie Sahlberg
    Reviewed-by: Shyam Prasad N
    Signed-off-by: Steve French

    Ronnie Sahlberg
     

11 Feb, 2021

11 commits

  • The old implementation wasn't consistend on this.

    But it looks like we depend on this so better bring it back.

    Signed-off-by: Christian König
    Reported-and-tested-by: Mike Galbraith
    Fixes: d099fc8f540a ("drm/ttm: new TT backend allocation pool v3")
    Reviewed-by: Daniel Vetter
    Link: https://patchwork.freedesktop.org/patch/msgid/20210210160549.1462-1-christian.koenig@amd.com

    Christian König
     
  • After Commit 3499ba8198cad ("xen: Fix event channel callback via
    INTX/GSI"), xenbus_probe() will be called too early on Arm. This will
    recent to a guest hang during boot.

    If the hang wasn't there, we would have ended up to call
    xenbus_probe() twice (the second time is in xenbus_probe_initcall()).

    We don't need to initialize xenbus_probe() early for Arm guest.
    Therefore, the call in xen_guest_init() is now removed.

    After this change, there is no more external caller for xenbus_probe().
    So the function is turned to a static one. Interestingly there were two
    prototypes for it.

    Cc: stable@vger.kernel.org
    Fixes: 3499ba8198cad ("xen: Fix event channel callback via INTX/GSI")
    Reported-by: Ian Jackson
    Signed-off-by: Julien Grall
    Reviewed-by: David Woodhouse
    Reviewed-by: Stefano Stabellini
    Link: https://lore.kernel.org/r/20210210170654.5377-1-julien@xen.org
    Signed-off-by: Juergen Gross

    Julien Grall
     
  • VSC8541 phys need a special reset sequence, which the driver doesn't
    currentlny support. As a result enabling the reset via GPIO essentially
    guarnteees that the device won't work correctly. We've been relying on
    bootloaders to reset the device for years, with this revert we'll go
    back to doing so until we can sort out how to get the reset sequence
    into the kernel.

    This reverts commit a0fa9d727043da2238432471e85de0bdb8a8df65.

    Fixes: a0fa9d727043 ("dts: phy: add GPIO number and active state used for phy reset")
    Cc: stable@vger.kernel.org
    Signed-off-by: Palmer Dabbelt

    Palmer Dabbelt
     
  • Pull power management fixes from Rafael Wysocki:
    "Address a performance regression related to scale-invariance on x86
    that may prevent turbo CPU frequencies from being used in certain
    workloads on systems using acpi-cpufreq as the CPU performance scaling
    driver and schedutil as the scaling governor"

    * tag 'pm-5.11-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
    cpufreq: ACPI: Update arch scale-invariance max perf ratio if CPPC is not there
    cpufreq: ACPI: Extend frequency tables to cover boost frequencies

    Linus Torvalds
     
  • Pull ACPI fix from Rafael Wysocki:
    "Revert a problematic ACPICA commit that changed the code to attempt to
    update memory regions which may be read-only on some systems (Ard
    Biesheuvel)"

    * tag 'acpi-5.11-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
    Revert "ACPICA: Interpreter: fix memory leak by using existing buffer"

    Linus Torvalds
     
  • Pull dmaengine fixes from Vinod Koul:
    "Some late fixes for dmaengine:

    Core:
    - fix channel device_node deletion

    Driver fixes:
    - dw: revert of runtime pm enabling
    - idxd: device state fix, interrupt completion and list corruption
    - ti: resource leak

    * tag 'dmaengine-fix2-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine:
    dmaengine dw: Revert "dmaengine: dw: Enable runtime PM"
    dmaengine: idxd: check device state before issue command
    dmaengine: ti: k3-udma: Fix a resource leak in an error handling path
    dmaengine: move channel device_node deletion to driver
    dmaengine: idxd: fix misc interrupt completion
    dmaengine: idxd: Fix list corruption in description completion

    Linus Torvalds
     
  • This reverts commit 10cad2c40dcb04bb46b2bf399e00ca5ea93d36b0.

    Petr reports that with this commit in place, io_uring fails the chroot
    test (CVE-202-29373). We do need to retain ->fs for send/recvmsg, so
    revert this commit.

    Reported-by: Petr Vorel
    Signed-off-by: Jens Axboe

    Jens Axboe
     
  • Pull networking fixes from David Miller:
    "Another pile of networing fixes:

    1) ath9k build error fix from Arnd Bergmann

    2) dma memory leak fix in mediatec driver from Lorenzo Bianconi.

    3) bpf int3 kprobe fix from Alexei Starovoitov.

    4) bpf stackmap integer overflow fix from Bui Quang Minh.

    5) Add usb device ids for Cinterion MV31 to qmi_qwwan driver, from
    Christoph Schemmel.

    6) Don't update deleted entry in xt_recent netfilter module, from
    Jazsef Kadlecsik.

    7) Use after free in nftables, fix from Pablo Neira Ayuso.

    8) Header checksum fix in flowtable from Sven Auhagen.

    9) Validate user controlled length in qrtr code, from Sabyrzhan
    Tasbolatov.

    10) Fix race in xen/netback, from Juergen Gross,

    11) New device ID in cxgb4, from Raju Rangoju.

    12) Fix ring locking in rxrpc release call, from David Howells.

    13) Don't return LAPB error codes from x25_open(), from Xie He.

    14) Missing error returns in gsi_channel_setup() from Alex Elder.

    15) Get skb_copy_and_csum_datagram working properly with odd segment
    sizes, from Willem de Bruijn.

    16) Missing RFS/RSS table init in enetc driver, from Vladimir Oltean.

    17) Do teardown on probe failure in DSA, from Vladimir Oltean.

    18) Fix compilation failures of txtimestamp selftest, from Vadim
    Fedorenko.

    19) Limit rx per-napi gro queue size to fix latency regression, from
    Eric Dumazet.

    20) dpaa_eth xdp fixes from Camelia Groza.

    21) Missing txq mode update when switching CBS off, in stmmac driver,
    from Mohammad Athari Bin Ismail.

    22) Failover pending logic fix in ibmvnic driver, from Sukadev
    Bhattiprolu.

    23) Null deref fix in vmw_vsock, from Norbert Slusarek.

    24) Missing verdict update in xdp paths of ena driver, from Shay
    Agroskin.

    25) seq_file iteration fix in sctp from Neil Brown.

    26) bpf 32-bit src register truncation fix on div/mod, from Daniel
    Borkmann.

    27) Fix jmp32 pruning in bpf verifier, from Daniel Borkmann.

    28) Fix locking in vsock_shutdown(), from Stefano Garzarella.

    29) Various missing index bound checks in hns3 driver, from Yufeng Mo.

    30) Flush ports on .phylink_mac_link_down() in dsa felix driver, from
    Vladimir Oltean.

    31) Don't mix up stp and mrp port states in bridge layer, from Horatiu
    Vultur.

    32) Fix locking during netif_tx_disable(), from Edwin Peer"

    * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (45 commits)
    bpf: Fix 32 bit src register truncation on div/mod
    bpf: Fix verifier jmp32 pruning decision logic
    bpf: Fix verifier jsgt branch analysis on max bound
    vsock: fix locking in vsock_shutdown()
    net: hns3: add a check for index in hclge_get_rss_key()
    net: hns3: add a check for tqp_index in hclge_get_ring_chain_from_mbx()
    net: hns3: add a check for queue_id in hclge_reset_vf_queue()
    net: dsa: felix: implement port flushing on .phylink_mac_link_down
    switchdev: mrp: Remove SWITCHDEV_ATTR_ID_MRP_PORT_STAT
    bridge: mrp: Fix the usage of br_mrp_port_switchdev_set_state
    net: watchdog: hold device global xmit lock during tx disable
    netfilter: nftables: relax check for stateful expressions in set definition
    netfilter: conntrack: skip identical origin tuple in same zone only
    vsock/virtio: update credit only if socket is not closed
    net: fix iteration for sctp transport seq_files
    net: ena: Update XDP verdict upon failure
    net/vmw_vsock: improve locking in vsock_connect_timeout()
    net/vmw_vsock: fix NULL pointer dereference
    ibmvnic: Clear failover_pending if unable to schedule
    net: stmmac: set TxQ mode back to DCB after disabling CBS
    ...

    Linus Torvalds
     
  • Merge misc fixes from Andrew Morton:
    "14 patches.

    Subsystems affected by this patch series: mm (kasan, mremap, tmpfs,
    selftests, memcg, and slub), MAINTAINERS, squashfs, nilfs2, and
    firmware"

    * emailed patches from Andrew Morton :
    nilfs2: make splice write available again
    mm, slub: better heuristic for number of cpus when calculating slab order
    Revert "mm: memcontrol: avoid workload stalls when lowering memory.high"
    MAINTAINERS: update Andrey Ryabinin's email address
    selftests/vm: rename file run_vmtests to run_vmtests.sh
    tmpfs: disallow CONFIG_TMPFS_INODE64 on alpha
    tmpfs: disallow CONFIG_TMPFS_INODE64 on s390
    mm/mremap: fix BUILD_BUG_ON() error in get_extent
    firmware_loader: align .builtin_fw to 8
    kasan: fix stack traces dependency for HW_TAGS
    squashfs: add more sanity checks in xattr id lookup
    squashfs: add more sanity checks in inode lookup
    squashfs: add more sanity checks in id lookup
    squashfs: avoid out of bounds writes in decompressors

    Linus Torvalds
     
  • Since 5.10, splice() or sendfile() to NILFS2 return EINVAL. This was
    caused by commit 36e2c7421f02 ("fs: don't allow splice read/write
    without explicit ops").

    This patch initializes the splice_write field in file_operations, like
    most file systems do, to restore the functionality.

    Link: https://lkml.kernel.org/r/1612784101-14353-1-git-send-email-konishi.ryusuke@gmail.com
    Signed-off-by: Joachim Henke
    Signed-off-by: Ryusuke Konishi
    Tested-by: Ryusuke Konishi
    Cc: [5.10+]
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joachim Henke
     
  • When creating a new kmem cache, SLUB determines how large the slab pages
    will based on number of inputs, including the number of CPUs in the
    system. Larger slab pages mean that more objects can be allocated/free
    from per-cpu slabs before accessing shared structures, but also
    potentially more memory can be wasted due to low slab usage and
    fragmentation. The rough idea of using number of CPUs is that larger
    systems will be more likely to benefit from reduced contention, and also
    should have enough memory to spare.

    Number of CPUs used to be determined as nr_cpu_ids, which is number of
    possible cpus, but on some systems many will never be onlined, thus
    commit 045ab8c9487b ("mm/slub: let number of online CPUs determine the
    slub page order") changed it to nr_online_cpus(). However, for kmem
    caches created early before CPUs are onlined, this may lead to
    permamently low slab page sizes.

    Vincent reports a regression [1] of hackbench on arm64 systems:

    "I'm facing significant performances regression on a large arm64
    server system (224 CPUs). Regressions is also present on small arm64
    system (8 CPUs) but in a far smaller order of magnitude

    On 224 CPUs system : 9 iterations of hackbench -l 16000 -g 16
    v5.11-rc4 : 9.135sec (+/- 0.45%)
    v5.11-rc4 + revert this patch: 3.173sec (+/- 0.48%)
    v5.10: 3.136sec (+/- 0.40%)"

    Mel reports a regression [2] of hackbench on x86_64, with lockstat suggesting
    page allocator contention:

    "i.e. the patch incurs a 7% to 32% performance penalty. This bisected
    cleanly yesterday when I was looking for the regression and then
    found the thread.

    Numerous caches change size. For example, kmalloc-512 goes from
    order-0 (vanilla) to order-2 with the revert.

    So mostly this is down to the number of times SLUB calls into the
    page allocator which only caches order-0 pages on a per-cpu basis"

    Clearly num_online_cpus() doesn't work too early in bootup. We could
    change the order dynamically in a memory hotplug callback, but runtime
    order changing for existing kmem caches has been already shown as
    dangerous, and removed in 32a6f409b693 ("mm, slub: remove runtime
    allocation order changes").

    It could be resurrected in a safe manner with some effort, but to fix
    the regression we need something simpler.

    We could use num_present_cpus() that should be the number of physically
    present CPUs even before they are onlined. That would work for PowerPC
    [3], which triggered the original commit, but that still doesn't work on
    arm64 [4] as explained in [5].

    So this patch tries to determine the best available value without
    specific arch knowledge.

    - num_present_cpus() if the number is larger than 1, as that means the
    arch is likely setting it properly

    - nr_cpu_ids otherwise

    This should fix the reported regressions while also keeping the effect
    of 045ab8c9487b for PowerPC systems. It's possible there are
    configurations where num_present_cpus() is 1 during boot while
    nr_cpu_ids is at the same time bloated, so these (if they exist) would
    keep the large orders based on nr_cpu_ids as was before 045ab8c9487b.

    [1] https://lore.kernel.org/linux-mm/CAKfTPtA_JgMf_+zdFbcb_V9rM7JBWNPjAz9irgwFj7Rou=xzZg@mail.gmail.com/
    [2] https://lore.kernel.org/linux-mm/20210128134512.GF3592@techsingularity.net/
    [3] https://lore.kernel.org/linux-mm/20210123051607.GC2587010@in.ibm.com/
    [4] https://lore.kernel.org/linux-mm/CAKfTPtAjyVmS5VYvU6DBxg4-JEo5bdmWbngf-03YsY18cmWv_g@mail.gmail.com/
    [5] https://lore.kernel.org/linux-mm/20210126230305.GD30941@willie-the-truck/

    Link: https://lkml.kernel.org/r/20210208134108.22286-1-vbabka@suse.cz
    Fixes: 045ab8c9487b ("mm/slub: let number of online CPUs determine the slub page order")
    Signed-off-by: Vlastimil Babka
    Reported-by: Vincent Guittot
    Reported-by: Mel Gorman
    Tested-by: Mel Gorman
    Tested-by: Vincent Guittot
    Cc: Catalin Marinas
    Cc: Aneesh Kumar K.V
    Cc: Bharata B Rao
    Cc: Christoph Lameter
    Cc: Roman Gushchin
    Cc: Johannes Weiner
    Cc: Joonsoo Kim
    Cc: Jann Horn
    Cc: Michal Hocko
    Cc: David Rientjes
    Cc: Shakeel Butt
    Cc: Will Deacon
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Vlastimil Babka
     

10 Feb, 2021

13 commits

  • Fixes the following warnings which results in interrupts disabled on
    port B/F:

    gpio gpiochip1: (B): detected irqchip that is shared with multiple gpiochips: please fix the driver.
    gpio gpiochip5: (F): detected irqchip that is shared with multiple gpiochips: please fix the driver.

    - added separate irqchip for each interrupt capable gpiochip
    - provided unique names for each irqchip

    Fixes: d2b091961510 ("gpio: ep93xx: Pass irqchip when adding gpiochip")
    Cc:
    Signed-off-by: Nikita Shubin
    Tested-by: Alexander Sverdlin
    Signed-off-by: Bartosz Golaszewski

    Nikita Shubin
     
  • Two index spaces and ep93xx_gpio_port are confusing.

    Instead add a separate struct to store necessary data and remove
    ep93xx_gpio_port.

    - add struct to store IRQ related data for each IRQ capable chip
    - replace offset array with defined offsets
    - add IRQ registers offset for each IRQ capable chip into
    ep93xx_gpio_banks

    ------------[ cut here ]------------
    kernel BUG at drivers/gpio/gpio-ep93xx.c:64!
    ---[ end trace 3f6544e133e9f5ae ]---

    Fixes: fd935fc421e74 ("gpio: ep93xx: Do not pingpong irq numbers")
    Cc:
    Reviewed-by: Alexander Sverdlin
    Tested-by: Alexander Sverdlin
    Signed-off-by: Nikita Shubin
    Signed-off-by: Bartosz Golaszewski

    Nikita Shubin
     
  • Merely enabling CONFIG_COMPILE_TEST should not enable additional code.
    To fix this, restrict the automatic enabling of GPIO_MXS to ARCH_MXS,
    and ask the user in case of compile-testing.

    Fixes: 6876ca311bfca5d7 ("gpio: mxs: add COMPILE_TEST support for GPIO_MXS")
    Cc:
    Signed-off-by: Geert Uytterhoeven
    Signed-off-by: Bartosz Golaszewski

    Geert Uytterhoeven
     
  • It turns out that reasoning for lowering max. supported frequency is
    wrong. Scrambling works just fine. Several now fixed bugs prevented
    proper functioning, even with rates lower than 340 MHz. Issues were just
    more pronounced with higher frequencies.

    Fix that by allowing max. supported frequency in HW and fix the comment.

    Fixes: cd9063757a22 ("drm/sun4i: DW HDMI: Lower max. supported rate for H6")
    Reviewed-by: Chen-Yu Tsai
    Tested-by: Andre Heider
    Signed-off-by: Jernej Skrabec
    Signed-off-by: Maxime Ripard
    Link: https://patchwork.freedesktop.org/patch/msgid/20210209175900.7092-6-jernej.skrabec@siol.net

    Jernej Skrabec
     
  • As it turns out, vendor HDMI PHY driver for H6 has a pretty big table
    of predefined values for various pixel clocks. However, most of them are
    not useful/tested because they come from reference driver code. Vendor
    PHY driver is concerned with only few of those, namely 27 MHz, 74.25
    MHz, 148.5 MHz, 297 MHz and 594 MHz. These are all frequencies for
    standard CEA modes.

    Fix sun50i_h6_cur_ctr and sun50i_h6_phy_config with the values only for
    aforementioned frequencies.

    Table sun50i_h6_mpll_cfg doesn't need to be changed because values are
    actually frequency dependent and not so much SoC dependent. See i.MX6
    documentation for explanation of those values for similar PHY.

    Fixes: c71c9b2fee17 ("drm/sun4i: Add support for Synopsys HDMI PHY")
    Tested-by: Andre Heider
    Signed-off-by: Jernej Skrabec
    Signed-off-by: Maxime Ripard
    Link: https://patchwork.freedesktop.org/patch/msgid/20210209175900.7092-5-jernej.skrabec@siol.net

    Jernej Skrabec
     
  • As expected, HDMI controller clock should always match pixel clock. In
    the past, changing HDMI controller rate would seemingly worsen
    situation. However, that was the result of other bugs which are now
    fixed.

    Fix that by removing set_rate quirk and always set clock rate.

    Fixes: 40bb9d3147b2 ("drm/sun4i: Add support for H6 DW HDMI controller")
    Reviewed-by: Chen-Yu Tsai
    Tested-by: Andre Heider
    Signed-off-by: Jernej Skrabec
    Signed-off-by: Maxime Ripard
    Link: https://patchwork.freedesktop.org/patch/msgid/20210209175900.7092-4-jernej.skrabec@siol.net

    Jernej Skrabec
     
  • Channel 1 has polarity bits for vsync and hsync signals but driver never
    sets them. It turns out that with pre-HDMI2 controllers seemingly there
    is no issue if polarity is not set. However, with HDMI2 controllers
    (H6) there often comes to de-synchronization due to phase shift. This
    causes flickering screen. It's safe to assume that similar issues might
    happen also with pre-HDMI2 controllers.

    Solve issue with setting vsync and hsync polarity. Note that display
    stacks with tcon top have polarity bits actually in tcon0 polarity
    register.

    Fixes: 9026e0d122ac ("drm: Add Allwinner A10 Display Engine support")
    Reviewed-by: Chen-Yu Tsai
    Tested-by: Andre Heider
    Signed-off-by: Jernej Skrabec
    Signed-off-by: Maxime Ripard
    Link: https://patchwork.freedesktop.org/patch/msgid/20210209175900.7092-3-jernej.skrabec@siol.net

    Jernej Skrabec
     
  • We don't have a persistent fb holding a reference to the frontbuffer
    object, so every time we do the get+put we throw the frontbuffer object
    immediately away. And so the next time around we get a pristine
    frontbuffer object with bits==0 even for the old vma. This confuses
    the frontbuffer tracking code which understandably expects the old
    frontbuffer to have the overlay's bit set.

    Fix this by hanging on to the frontbuffer reference until the next
    flip. And just to make this a bit more clear let's track the frontbuffer
    explicitly instead of just grabbing it via the old vma.

    Cc: stable@vger.kernel.org
    Cc: Chris Wilson
    Cc: Joonas Lahtinen
    Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/1136
    Signed-off-by: Ville Syrjälä
    Link: https://patchwork.freedesktop.org/patch/msgid/20210209021918.16234-2-ville.syrjala@linux.intel.com
    Fixes: 8e7cb1799b4f ("drm/i915: Extract intel_frontbuffer active tracking")
    Reviewed-by: Chris Wilson
    (cherry picked from commit 553c23bdb4775130f333f07a51b047276bc53f79)
    Signed-off-by: Jani Nikula

    Ville Syrjälä
     
  • This reverts commit 4a3dea8932d3b1199680d2056dd91d31d94d70b7.

    This causes blank screens for some users.

    Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1482
    Cc: Alvin Lee
    Cc: Jun Lei
    Cc: Rodrigo Siqueira
    Reviewed-by: Rodrigo Siqueira
    Signed-off-by: Alex Deucher
    Cc: stable@vger.kernel.org

    Alex Deucher
     
  • Daniel Borkmann says:

    ====================
    pull-request: bpf 2021-02-10

    The following pull-request contains BPF updates for your *net* tree.

    We've added 5 non-merge commits during the last 8 day(s) which contain
    a total of 3 files changed, 22 insertions(+), 21 deletions(-).

    The main changes are:

    1) Fix missed execution of kprobes BPF progs when kprobe is firing via
    int3, from Alexei Starovoitov.

    2) Fix potential integer overflow in map max_entries for stackmap on
    32 bit archs, from Bui Quang Minh.

    3) Fix a verifier pruning and a insn rewrite issue related to 32 bit ops,
    from Daniel Borkmann.
    ====================

    Signed-off-by: David S. Miller
    c# Please enter a commit message to explain why this merge is necessary,

    David S. Miller
     
  • Fixes small regression in implementation of new mount API.

    Signed-off-by: Ronnie Sahlberg
    Reported-by: Hyunchul Lee
    Tested-by: Hyunchul Lee
    Signed-off-by: Steve French

    Ronnie Sahlberg
     
  • This reverts commit 536d3bf261a2fc3b05b3e91e7eef7383443015cf, as it can
    cause writers to memory.high to get stuck in the kernel forever,
    performing page reclaim and consuming excessive amounts of CPU cycles.

    Before the patch, a write to memory.high would first put the new limit
    in place for the workload, and then reclaim the requested delta. After
    the patch, the kernel tries to reclaim the delta before putting the new
    limit into place, in order to not overwhelm the workload with a sudden,
    large excess over the limit. However, if reclaim is actively racing
    with new allocations from the uncurbed workload, it can keep the write()
    working inside the kernel indefinitely.

    This is causing problems in Facebook production. A privileged
    system-level daemon that adjusts memory.high for various workloads
    running on a host can get unexpectedly stuck in the kernel and
    essentially turn into a sort of involuntary kswapd for one of the
    workloads. We've observed that daemon busy-spin in a write() for
    minutes at a time, neglecting its other duties on the system, and
    expending privileged system resources on behalf of a workload.

    To remedy this, we have first considered changing the reclaim logic to
    break out after a couple of loops - whether the workload has converged
    to the new limit or not - and bound the write() call this way. However,
    the root cause that inspired the sequence change in the first place has
    been fixed through other means, and so a revert back to the proven
    limit-setting sequence, also used by memory.max, is preferable.

    The sequence was changed to avoid extreme latencies in the workload when
    the limit was lowered: the sudden, large excess created by the limit
    lowering would erroneously trigger the penalty sleeping code that is
    meant to throttle excessive growth from below. Allocating threads could
    end up sleeping long after the write() had already reclaimed the delta
    for which they were being punished.

    However, erroneous throttling also caused problems in other scenarios at
    around the same time. This resulted in commit b3ff92916af3 ("mm, memcg:
    reclaim more aggressively before high allocator throttling"), included
    in the same release as the offending commit. When allocating threads
    now encounter large excess caused by a racing write() to memory.high,
    instead of entering punitive sleeps, they will simply be tasked with
    helping reclaim down the excess, and will be held no longer than it
    takes to accomplish that. This is in line with regular limit
    enforcement - i.e. if the workload allocates up against or over an
    otherwise unchanged limit from below.

    With the patch breaking userspace, and the root cause addressed by other
    means already, revert it again.

    Link: https://lkml.kernel.org/r/20210122184341.292461-1-hannes@cmpxchg.org
    Fixes: 536d3bf261a2 ("mm: memcontrol: avoid workload stalls when lowering memory.high")
    Signed-off-by: Johannes Weiner
    Reported-by: Tejun Heo
    Acked-by: Chris Down
    Acked-by: Michal Hocko
    Cc: Roman Gushchin
    Cc: Shakeel Butt
    Cc: Michal Koutný
    Cc: [5.8+]
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Johannes Weiner
     
  • Update my email, @virtuozzo.com will stop working shortly.

    Link: https://lkml.kernel.org/r/20210204223904.3824-1-ryabinin.a.a@gmail.com
    Signed-off-by: Andrey Ryabinin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrey Ryabinin