08 Oct, 2020

1 commit

  • * tag 'v5.4.70': (3051 commits)
    Linux 5.4.70
    netfilter: ctnetlink: add a range check for l3/l4 protonum
    ep_create_wakeup_source(): dentry name can change under you...
    ...

    Conflicts:
    arch/arm/mach-imx/pm-imx6.c
    arch/arm64/boot/dts/freescale/imx8mm-evk.dts
    arch/arm64/boot/dts/freescale/imx8mn-ddr4-evk.dts
    drivers/crypto/caam/caamalg.c
    drivers/gpu/drm/imx/dw_hdmi-imx.c
    drivers/gpu/drm/imx/imx-ldb.c
    drivers/gpu/drm/imx/ipuv3/ipuv3-crtc.c
    drivers/mmc/host/sdhci-esdhc-imx.c
    drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
    drivers/net/ethernet/freescale/enetc/enetc.c
    drivers/net/ethernet/freescale/enetc/enetc_pf.c
    drivers/thermal/imx_thermal.c
    drivers/usb/cdns3/ep0.c
    drivers/xen/swiotlb-xen.c
    sound/soc/fsl/fsl_esai.c
    sound/soc/fsl/fsl_sai.c

    Signed-off-by: Jason Liu

    Jason Liu
     

01 Oct, 2020

2 commits

  • commit 19a508bd1ad8e444de86873bf2f2b2ab8edd6552 upstream.

    NULL pointer dereference is observed while exporting the dmabuf but
    failed to allocate the 'struct file' which results into the dropping of
    the allocated dentry corresponding to this file in the dmabuf fs, which
    is ending up in dma_buf_release() and accessing the uninitialzed
    dentry->d_fsdata.

    Call stack on 5.4 is below:
    dma_buf_release+0x2c/0x254 drivers/dma-buf/dma-buf.c:88
    __dentry_kill+0x294/0x31c fs/dcache.c:584
    dentry_kill fs/dcache.c:673 [inline]
    dput+0x250/0x380 fs/dcache.c:859
    path_put+0x24/0x40 fs/namei.c:485
    alloc_file_pseudo+0x1a4/0x200 fs/file_table.c:235
    dma_buf_getfile drivers/dma-buf/dma-buf.c:473 [inline]
    dma_buf_export+0x25c/0x3ec drivers/dma-buf/dma-buf.c:585

    Fix this by checking for the valid pointer in the dentry->d_fsdata.

    Fixes: 4ab59c3c638c ("dma-buf: Move dma_buf_release() from fops to dentry_ops")
    Cc: [5.7+]
    Signed-off-by: Charan Teja Reddy
    Reviewed-by: Christian König
    Link: https://patchwork.freedesktop.org/patch/391319/
    Signed-off-by: Christian König
    Signed-off-by: Greg Kroah-Hartman

    Charan Teja Reddy
     
  • [ Upstream commit 9c98f021e4e717ffd9948fa65340ea3ef12b7935 ]

    Make dma_fence_enable_sw_signaling() behave like its
    dma_fence_add_callback() and dma_fence_default_wait() counterparts and
    perform the test to enable signaling under the fence->lock, along with
    the action to do so. This ensure that should an implementation be trying
    to flush the cb_list (by signaling) on retirement before freeing the
    fence, it can do so in a race-free manner.

    See also 0fc89b6802ba ("dma-fence: Simply wrap dma_fence_signal_locked
    with dma_fence_signal").

    v2: Refactor all 3 enable_signaling paths to use a common function.
    v3: Don't argue, just keep the tracepoint in the existing spot.

    Signed-off-by: Chris Wilson
    Cc: Tvrtko Ursulin
    Reviewed-by: Tvrtko Ursulin
    Link: https://patchwork.freedesktop.org/patch/msgid/20191004101140.32713-1-chris@chris-wilson.co.uk
    Signed-off-by: Sasha Levin

    Chris Wilson
     

29 Jul, 2020

1 commit

  • [ Upstream commit 6348dd291e3653534a9e28e6917569bc9967b35b ]

    There exists a sleep-while-atomic bug while accessing the dmabuf->name
    under mutex in the dmabuffs_dname(). This is caused from the SELinux
    permissions checks on a process where it tries to validate the inherited
    files from fork() by traversing them through iterate_fd() (which
    traverse files under spin_lock) and call
    match_file(security/selinux/hooks.c) where the permission checks happen.
    This audit information is logged using dump_common_audit_data() where it
    calls d_path() to get the file path name. If the file check happen on
    the dmabuf's fd, then it ends up in ->dmabuffs_dname() and use mutex to
    access dmabuf->name. The flow will be like below:
    flush_unauthorized_files()
    iterate_fd()
    spin_lock() --> Start of the atomic section.
    match_file()
    file_has_perm()
    avc_has_perm()
    avc_audit()
    slow_avc_audit()
    common_lsm_audit()
    dump_common_audit_data()
    audit_log_d_path()
    d_path()
    dmabuffs_dname()
    mutex_lock()--> Sleep while atomic.

    Call trace captured (on 4.19 kernels) is below:
    ___might_sleep+0x204/0x208
    __might_sleep+0x50/0x88
    __mutex_lock_common+0x5c/0x1068
    __mutex_lock_common+0x5c/0x1068
    mutex_lock_nested+0x40/0x50
    dmabuffs_dname+0xa0/0x170
    d_path+0x84/0x290
    audit_log_d_path+0x74/0x130
    common_lsm_audit+0x334/0x6e8
    slow_avc_audit+0xb8/0xf8
    avc_has_perm+0x154/0x218
    file_has_perm+0x70/0x180
    match_file+0x60/0x78
    iterate_fd+0x128/0x168
    selinux_bprm_committing_creds+0x178/0x248
    security_bprm_committing_creds+0x30/0x48
    install_exec_creds+0x1c/0x68
    load_elf_binary+0x3a4/0x14e0
    search_binary_handler+0xb0/0x1e0

    So, use spinlock to access dmabuf->name to avoid sleep-while-atomic.

    Cc: [5.3+]
    Signed-off-by: Charan Teja Kalla
    Reviewed-by: Michael J. Ruhl
    Acked-by: Christian König
    [sumits: added comment to spinlock_t definition to avoid warning]
    Signed-off-by: Sumit Semwal
    Link: https://patchwork.freedesktop.org/patch/msgid/a83e7f0d-4e54-9848-4b58-e1acdbe06735@codeaurora.org
    Signed-off-by: Sasha Levin

    Charan Teja Kalla
     

09 Jul, 2020

1 commit

  • commit 4ab59c3c638c6c8952bf07739805d20eb6358a4d upstream.

    Charan Teja reported a 'use-after-free' in dmabuffs_dname [1], which
    happens if the dma_buf_release() is called while the userspace is
    accessing the dma_buf pseudo fs's dmabuffs_dname() in another process,
    and dma_buf_release() releases the dmabuf object when the last reference
    to the struct file goes away.

    I discussed with Arnd Bergmann, and he suggested that rather than tying
    the dma_buf_release() to the file_operations' release(), we can tie it to
    the dentry_operations' d_release(), which will be called when the last ref
    to the dentry is removed.

    The path exercised by __fput() calls f_op->release() first, and then calls
    dput, which eventually calls d_op->d_release().

    In the 'normal' case, when no userspace access is happening via dma_buf
    pseudo fs, there should be exactly one fd, file, dentry and inode, so
    closing the fd will kill of everything right away.

    In the presented case, the dentry's d_release() will be called only when
    the dentry's last ref is released.

    Therefore, lets move dma_buf_release() from fops->release() to
    d_ops->d_release()

    Many thanks to Arnd for his FS insights :)

    [1]: https://lore.kernel.org/patchwork/patch/1238278/

    Fixes: bb2bb9030425 ("dma-buf: add DMA_BUF_SET_NAME ioctls")
    Reported-by: syzbot+3643a18836bce555bff6@syzkaller.appspotmail.com
    Cc: [5.3+]
    Cc: Arnd Bergmann
    Reported-by: Charan Teja Reddy
    Reviewed-by: Arnd Bergmann
    Signed-off-by: Sumit Semwal
    Tested-by: Charan Teja Reddy
    Link: https://patchwork.freedesktop.org/patch/msgid/20200611114418.19852-1-sumit.semwal@linaro.org
    Signed-off-by: Greg Kroah-Hartman

    Sumit Semwal
     

19 Jun, 2020

1 commit

  • * tag 'v5.4.47': (2193 commits)
    Linux 5.4.47
    KVM: arm64: Save the host's PtrAuth keys in non-preemptible context
    KVM: arm64: Synchronize sysreg state on injecting an AArch32 exception
    ...

    Conflicts:
    arch/arm/boot/dts/imx6qdl.dtsi
    arch/arm/mach-imx/Kconfig
    arch/arm/mach-imx/common.h
    arch/arm/mach-imx/suspend-imx6.S
    arch/arm64/boot/dts/freescale/imx8qxp-mek.dts
    arch/powerpc/include/asm/cacheflush.h
    drivers/cpufreq/imx6q-cpufreq.c
    drivers/dma/imx-sdma.c
    drivers/edac/synopsys_edac.c
    drivers/firmware/imx/imx-scu.c
    drivers/net/ethernet/freescale/fec.h
    drivers/net/ethernet/freescale/fec_main.c
    drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
    drivers/net/phy/phy_device.c
    drivers/perf/fsl_imx8_ddr_perf.c
    drivers/usb/cdns3/gadget.c
    drivers/usb/dwc3/gadget.c
    include/uapi/linux/dma-buf.h

    Signed-off-by: Jason Liu

    Jason Liu
     

06 May, 2020

1 commit

  • commit a5bff92eaac45bdf6221badf9505c26792fdf99e upstream.

    The uapi is the same on 32 and 64 bit, but the number isn't. Everyone
    who botched this please re-read:

    https://www.kernel.org/doc/html/v5.4-preprc-cpu/ioctl/botching-up-ioctls.html

    Also, the type argument for the ioctl macros is for the type the void
    __user *arg pointer points at, which in this case would be the
    variable-sized char[] of a 0 terminated string. So this was botched in
    more than just the usual ways.

    Cc: Sumit Semwal
    Cc: Chenbo Feng
    Cc: Greg Hackmann
    Cc: Daniel Vetter
    Cc: linux-media@vger.kernel.org
    Cc: linaro-mm-sig@lists.linaro.org
    Cc: minchan@kernel.org
    Cc: surenb@google.com
    Cc: jenhaochen@google.com
    Cc: Martin Liu
    Signed-off-by: Daniel Vetter
    Tested-by: Martin Liu
    Reviewed-by: Martin Liu
    Signed-off-by: Sumit Semwal
    [sumits: updated some checkpatch fixes, corrected author email]
    Link: https://patchwork.freedesktop.org/patch/msgid/20200407133002.3486387-1-daniel.vetter@ffwll.ch
    Signed-off-by: Greg Kroah-Hartman

    Daniel Vetter
     

12 Mar, 2020

1 commit

  • commit d1f37226431f5d9657aa144a40f2383adbcf27e1 upstream.

    dma-buf name can be set via DMA_BUF_SET_NAME ioctl, but once set
    it never gets freed.

    Free it in dma_buf_release().

    Fixes: bb2bb9030425 ("dma-buf: add DMA_BUF_SET_NAME ioctls")
    Reported-by: syzbot+b2098bc44728a4efb3e9@syzkaller.appspotmail.com
    Cc: Greg Hackmann
    Cc: Chenbo Feng
    Cc: Sumit Semwal
    Signed-off-by: Cong Wang
    Acked-by: Chenbo Feng
    Signed-off-by: Sumit Semwal
    Link: https://patchwork.freedesktop.org/patch/msgid/20191227063204.5813-1-xiyou.wangcong@gmail.com
    Signed-off-by: Greg Kroah-Hartman

    Cong Wang
     

08 Mar, 2020

1 commit

  • Merge Linux stable release v5.4.24 into imx_5.4.y

    * tag 'v5.4.24': (3306 commits)
    Linux 5.4.24
    blktrace: Protect q->blk_trace with RCU
    kvm: nVMX: VMWRITE checks unsupported field before read-only field
    ...

    Signed-off-by: Jason Liu

    Conflicts:
    arch/arm/boot/dts/imx6sll-evk.dts
    arch/arm/boot/dts/imx7ulp.dtsi
    arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi
    drivers/clk/imx/clk-composite-8m.c
    drivers/gpio/gpio-mxc.c
    drivers/irqchip/Kconfig
    drivers/mmc/host/sdhci-of-esdhc.c
    drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c
    drivers/net/can/flexcan.c
    drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
    drivers/net/ethernet/mscc/ocelot.c
    drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
    drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
    drivers/net/phy/realtek.c
    drivers/pci/controller/mobiveil/pcie-mobiveil-host.c
    drivers/perf/fsl_imx8_ddr_perf.c
    drivers/tee/optee/shm_pool.c
    drivers/usb/cdns3/gadget.c
    kernel/sched/cpufreq.c
    net/core/xdp.c
    sound/soc/fsl/fsl_esai.c
    sound/soc/fsl/fsl_sai.c
    sound/soc/sof/core.c
    sound/soc/sof/imx/Kconfig
    sound/soc/sof/loader.c

    Jason Liu
     

21 Dec, 2019

1 commit

  • commit 6645d42d79d33e8a9fe262660a75d5f4556bbea9 upstream.

    In the implementation of sync_file_merge() the allocated sync_file is
    leaked if number of fences overflows. Release sync_file by goto err.

    Fixes: a02b9dc90d84 ("dma-buf/sync_file: refactor fence storage in struct sync_file")
    Signed-off-by: Navid Emamdoost
    Cc: stable@vger.kernel.org
    Signed-off-by: Daniel Vetter
    Link: https://patchwork.freedesktop.org/patch/msgid/20191122220957.30427-1-navid.emamdoost@gmail.com
    Signed-off-by: Greg Kroah-Hartman

    Navid Emamdoost
     

25 Nov, 2019

1 commit

  • Add structure dma_buf_phys to store physical address.
    Add DMA_BUF_IOCTL_PHYS to export physical address.

    Change-Id: Ib2f24b33462d603f2cbeef975689aaf82447d088
    Signed-off-by: ivan.liu
    [ Aisheng: update ioctl NR to 2 due to the original 1 is used in upstream ]
    [ Aisheng: update ioctl NR to 10 according to GPU team's request ]
    Signed-off-by: Dong Aisheng

    ivan.liu
     

10 Oct, 2019

1 commit

  • This causes kernel crash when testing lima driver.

    Cc: Christian König
    Fixes: b8c036dfc66f ("dma-buf: simplify reservation_object_get_fences_rcu a bit")
    Signed-off-by: Qiang Yu
    Reviewed-by: Chris Wilson
    Signed-off-by: Chris Wilson
    Link: https://patchwork.freedesktop.org/patch/msgid/20190922074900.853-1-yuq825@gmail.com
    Signed-off-by: Christian König

    Qiang Yu
     

20 Aug, 2019

4 commits

  • The dma-fence selftest uses an on-stack timer that requires explicit
    annotation for debugobjects.

    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111442
    Signed-off-by: Chris Wilson
    Cc: Daniel Vetter
    Acked-by: Daniel Vetter
    Link: https://patchwork.freedesktop.org/patch/msgid/20190820122118.13698-1-chris@chris-wilson.co.uk

    Chris Wilson
     
  • Use the %zu format specifier for a size_t returned by sizeof.

    Reported-by: kbuild-all@01.org
    Signed-off-by: Chris Wilson
    Reviewed-by: Daniel Vetter
    Link: https://patchwork.freedesktop.org/patch/msgid/20190819195740.27608-1-chris@chris-wilson.co.uk

    Chris Wilson
     
  • Exercise the dma-fence API exported to drivers.

    Signed-off-by: Chris Wilson
    Cc: Daniel Vetter
    Acked-by: Daniel Vetter
    Link: https://patchwork.freedesktop.org/patch/msgid/20190819095928.32091-2-chris@chris-wilson.co.uk

    Chris Wilson
     
  • In light of recent review slip ups, the absence of a suite of tests for
    dma-buf became apparent. Given the current plethora of testing
    frameworks, opt for one already in use by Intel's CI and so allow easy
    hook up into igt.

    We introduce a new module that when loaded will execute the list of
    selftests and their subtest. The names of the selftests are put into the
    modinfo as parameters so that igt can identify each, and run them
    independently, principally for ease of error reporting.

    Signed-off-by: Chris Wilson
    Cc: Daniel Vetter
    Cc: Tomi Sarvela
    Acked-by: Daniel Vetter
    Link: https://patchwork.freedesktop.org/patch/msgid/20190819095928.32091-1-chris@chris-wilson.co.uk

    Chris Wilson
     

18 Aug, 2019

3 commits

  • The timestamp and the cb_list are mutually exclusive, the cb_list can
    only be added to prior to being signaled (and once signaled we drain),
    while the timestamp is only valid upon being signaled. Both the
    timestamp and the cb_list are only valid while the fence is alive, and
    as soon as no references are held can be replaced by the rcu_head.

    By reusing the union for the timestamp, we squeeze the base dma_fence
    struct to 64 bytes on x86-64.

    v2: Sort the union chronologically

    Suggested-by: Christian König
    Signed-off-by: Chris Wilson
    Cc: Christian König
    Acked-by: Christian König .
    Link: https://patchwork.freedesktop.org/patch/msgid/20190817153022.5749-1-chris@chris-wilson.co.uk

    Chris Wilson
     
  • Currently dma_fence_signal() tries to avoid the spinlock and only takes
    it if absolutely required to walk the callback list. However, to allow
    for some users to surreptitiously insert lazy signal callbacks that
    do not depend on enabling the signaling mechanism around every fence,
    we always need to notify the callbacks on signaling. As such, we will
    always need to take the spinlock and dma_fence_signal() effectively
    becomes a clone of dma_fence_signal_locked().

    v2: Update the test_and_set_bit() before entering the spinlock.
    v3: Drop the test_[and_set]_bit() before the spinlock, it's a caller
    error so expected to be very unlikely.

    Signed-off-by: Chris Wilson
    Cc: Christian König
    Cc: Daniel Vetter
    Reviewed-by: Christian König
    Link: https://patchwork.freedesktop.org/patch/msgid/20190817152300.5370-1-chris@chris-wilson.co.uk

    Chris Wilson
     
  • Before we notify the fence signal callback, we remove the cb from the
    list. However, since we are processing the entire list from underneath
    the spinlock, we do not need to individual delete each element, but can
    simply reset the link and the entire list.

    Signed-off-by: Chris Wilson
    Cc: Daniel Vetter
    Cc: Christian König
    Reviewed-by: Christian König
    Link: https://patchwork.freedesktop.org/patch/msgid/20190817144736.7826-4-chris@chris-wilson.co.uk

    Chris Wilson
     

16 Aug, 2019

1 commit

  • This reverts
    67c97fb79a7f ("dma-buf: add reservation_object_fences helper")
    dd7a7d1ff2f1 ("drm/i915: use new reservation_object_fences helper")
    0e1d8083bddb ("dma-buf: further relax reservation_object_add_shared_fence")
    5d344f58da76 ("dma-buf: nuke reservation_object seq number")

    The scenario that defeats simply grabbing a set of shared/exclusive
    fences and using them blissfully under RCU is that any of those fences
    may be reallocated by a SLAB_TYPESAFE_BY_RCU fence slab cache. In this
    scenario, while keeping the rcu_read_lock we need to establish that no
    fence was changed in the dma_resv after a read (or full) memory barrier.

    Signed-off-by: Chris Wilson
    Cc: Chris Wilson
    Cc: Daniel Vetter
    Acked-by: Christian König
    Link: https://patchwork.freedesktop.org/patch/msgid/20190814182401.25009-1-chris@chris-wilson.co.uk

    Chris Wilson
     

13 Aug, 2019

3 commits

  • Be more consistent with the naming of the other DMA-buf objects.

    Signed-off-by: Christian König
    Reviewed-by: Chris Wilson
    Link: https://patchwork.freedesktop.org/patch/323401/

    Christian König
     
  • The only remaining use for this is to protect against setting a new exclusive
    fence while we grab both exclusive and shared. That can also be archived by
    looking if the exclusive fence has changed or not after completing the
    operation.

    v2: switch setting excl fence to rcu_assign_pointer

    Signed-off-by: Christian König
    Reviewed-by: Chris Wilson
    Link: https://patchwork.freedesktop.org/patch/322380/

    Christian König
     
  • During release of the syncpt, we remove it from the list of syncpt and
    the tree, but only if it is not already been removed. However, during
    signaling, we first remove the syncpt from the list. So, if we
    concurrently free and signal the syncpt, the free may decide that it is
    not part of the tree and immediately free itself -- meanwhile the
    signaler goes on to use the now freed datastructure.

    In particular, we get struck by commit 0e2f733addbf ("dma-buf: make
    dma_fence structure a bit smaller v2") as the cb_list is immediately
    clobbered by the kfree_rcu.

    v2: Avoid calling into timeline_fence_release() from under the spinlock

    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111381
    Fixes: d3862e44daa7 ("dma-buf/sw-sync: Fix locking around sync_timeline lists")
    References: 0e2f733addbf ("dma-buf: make dma_fence structure a bit smaller v2")
    Signed-off-by: Chris Wilson
    Cc: Sumit Semwal
    Cc: Sean Paul
    Cc: Gustavo Padovan
    Cc: Christian König
    Cc: # v4.14+
    Acked-by: Christian König
    Link: https://patchwork.freedesktop.org/patch/msgid/20190812154247.20508-1-chris@chris-wilson.co.uk

    Chris Wilson
     

12 Aug, 2019

2 commits

  • Same as for the individual fences, we want to report the actual status
    of the fence when queried.

    Reported-by: Petri Latvala
    Signed-off-by: Chris Wilson
    Cc: Sumit Semwal
    Cc: Gustavo Padovan
    Cc: Petri Latvala
    Reviewed-by: Matthew Auld
    Link: https://patchwork.freedesktop.org/patch/msgid/20190812091203.29871-1-chris@chris-wilson.co.uk

    Chris Wilson
     
  • When one of the array of fences is signaled, propagate its errors to the
    parent fence-array (keeping the first error to be raised).

    v2: Opencode cmpxchg_local to avoid compiler freakout.
    v3: Be careful not to flag an error if we race against signal-on-any.
    v4: Same applies to installing the signal cb.
    v5: Use cmpxchg to only set the error once before using a nifty idea by
    Christian to avoid changing the status after emitting the signal.

    Signed-off-by: Chris Wilson
    Cc: Sumit Semwal
    Cc: Gustavo Padovan
    Cc: Christian König
    Reviewed-by: Christian König
    Link: https://patchwork.freedesktop.org/patch/msgid/20190811210902.22112-1-chris@chris-wilson.co.uk

    Chris Wilson
     

10 Aug, 2019

2 commits


07 Aug, 2019

3 commits


05 Aug, 2019

1 commit


23 Jul, 2019

1 commit


20 Jul, 2019

1 commit

  • Pull vfs mount updates from Al Viro:
    "The first part of mount updates.

    Convert filesystems to use the new mount API"

    * 'work.mount0' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (63 commits)
    mnt_init(): call shmem_init() unconditionally
    constify ksys_mount() string arguments
    don't bother with registering rootfs
    init_rootfs(): don't bother with init_ramfs_fs()
    vfs: Convert smackfs to use the new mount API
    vfs: Convert selinuxfs to use the new mount API
    vfs: Convert securityfs to use the new mount API
    vfs: Convert apparmorfs to use the new mount API
    vfs: Convert openpromfs to use the new mount API
    vfs: Convert xenfs to use the new mount API
    vfs: Convert gadgetfs to use the new mount API
    vfs: Convert oprofilefs to use the new mount API
    vfs: Convert ibmasmfs to use the new mount API
    vfs: Convert qib_fs/ipathfs to use the new mount API
    vfs: Convert efivarfs to use the new mount API
    vfs: Convert configfs to use the new mount API
    vfs: Convert binfmt_misc to use the new mount API
    convenience helper: get_tree_single()
    convenience helper get_tree_nodev()
    vfs: Kill sget_userns()
    ...

    Linus Torvalds
     

17 Jul, 2019

2 commits

  • As the set of shared fences is not being changed during reallocation of
    the reservation list, we can skip updating the write_seqlock.

    Signed-off-by: Chris Wilson
    Cc: Daniel Vetter
    Cc: Christian König
    Reviewed-by: Daniel Vetter
    Link: https://patchwork.freedesktop.org/patch/msgid/20190712080314.21018-2-chris@chris-wilson.co.uk

    Chris Wilson
     
  • Pull rst conversion of docs from Mauro Carvalho Chehab:
    "As agreed with Jon, I'm sending this big series directly to you, c/c
    him, as this series required a special care, in order to avoid
    conflicts with other trees"

    * tag 'docs/v5.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (77 commits)
    docs: kbuild: fix build with pdf and fix some minor issues
    docs: block: fix pdf output
    docs: arm: fix a breakage with pdf output
    docs: don't use nested tables
    docs: gpio: add sysfs interface to the admin-guide
    docs: locking: add it to the main index
    docs: add some directories to the main documentation index
    docs: add SPDX tags to new index files
    docs: add a memory-devices subdir to driver-api
    docs: phy: place documentation under driver-api
    docs: serial: move it to the driver-api
    docs: driver-api: add remaining converted dirs to it
    docs: driver-api: add xilinx driver API documentation
    docs: driver-api: add a series of orphaned documents
    docs: admin-guide: add a series of orphaned documents
    docs: cgroup-v1: add it to the admin-guide book
    docs: aoe: add it to the driver-api book
    docs: add some documentation dirs to the driver-api book
    docs: driver-model: move it to the driver-api book
    docs: lp855x-driver.rst: add it to the driver-api book
    ...

    Linus Torvalds
     

16 Jul, 2019

1 commit

  • Pull drm updates from Dave Airlie:
    "The biggest thing in this is the AMD Navi GPU support, this again
    contains a bunch of header files that are large. These are the new AMD
    RX5700 GPUs that just recently became available.

    New drivers:
    - ST-Ericsson MCDE driver
    - Ingenic JZ47xx SoC

    UAPI change:
    - HDR source metadata property

    Core:
    - HDR inforframes and EDID parsing
    - drm hdmi infoframe unpacking
    - remove prime sg_table caching into dma-buf
    - New gem vram helpers to reduce driver code
    - Lots of drmP.h removal
    - reservation fencing fix
    - documentation updates
    - drm_fb_helper_connector removed
    - mode name command handler rewrite

    fbcon:
    - Remove the fbcon notifiers

    ttm:
    - forward progress fixes

    dma-buf:
    - make mmap call optional
    - debugfs refcount fixes
    - dma-fence free with pending signals fix
    - each dma-buf gets an inode

    Panels:
    - Lots of additional panel bindings

    amdgpu:
    - initial navi10 support
    - avoid hw reset
    - HDR metadata support
    - new thermal sensors for vega asics
    - RAS fixes
    - use HMM rather than MMU notifier
    - xgmi topology via kfd
    - SR-IOV fixes
    - driver reload fixes
    - DC use a core bpc attribute
    - Aux fixes for DC
    - Bandwidth calc updates for DC
    - Clock handling refactor
    - kfd VEGAM support

    vmwgfx:
    - Coherent memory support changes

    i915:
    - HDR Support
    - HDMI i2c link
    - Icelake multi-segmented gamma support
    - GuC firmware update
    - Mule Creek Canyon PCH support for EHL
    - EHL platform updtes
    - move i915.alpha_support to i915.force_probe
    - runtime PM refactoring
    - VBT parsing refactoring
    - DSI fixes
    - struct mutex dependency reduction
    - GEM code reorg

    mali-dp:
    - Komeda driver features

    msm:
    - dsi vs EPROBE_DEFER fixes
    - msm8998 snapdragon 835 support
    - a540 gpu support
    - mdp5 and dpu interconnect support

    exynos:
    - drmP.h removal

    tegra:
    - misc fixes

    tda998x:
    - audio support improvements
    - pixel repeated mode support
    - quantisation range handling corrections
    - HDMI vendor info fix

    armada:
    - interlace support fix
    - overlay/video plane register handling refactor
    - add gamma support

    rockchip:
    - RX3328 support

    panfrost:
    - expose perf counters via hidden ioctls

    vkms:
    - enumerate CRC sources list

    ast:
    - rework BO handling

    mgag200:
    - rework BO handling

    dw-hdmi:
    - suspend/resume support

    rcar-du:
    - R8A774A1 Soc Support
    - LVDS dual-link mode support
    - Additional formats
    - Misc fixes

    omapdrm:
    - DSI command mode display support

    stm
    - fb modifier support
    - runtime PM support

    sun4i:
    - use vmap ops

    vc4:
    - binner bo binding rework

    v3d:
    - compute shader support
    - resync/sync fixes
    - job management refactoring

    lima:
    - NULL pointer in irq handler fix
    - scheduler default timeout

    virtio:
    - fence seqno support
    - trace events

    bochs:
    - misc fixes

    tc458767:
    - IRQ/HDP handling

    sii902x:
    - HDMI audio support

    atmel-hlcdc:
    - misc fixes

    meson:
    - zpos support"

    * tag 'drm-next-2019-07-16' of git://anongit.freedesktop.org/drm/drm: (1815 commits)
    Revert "Merge branch 'vmwgfx-next' of git://people.freedesktop.org/~thomash/linux into drm-next"
    Revert "mm: adjust apply_to_pfn_range interface for dropped token."
    mm: adjust apply_to_pfn_range interface for dropped token.
    drm/amdgpu/navi10: add uclk activity sensor
    drm/amdgpu: properly guard the generic discovery code
    drm/amdgpu: add missing documentation on new module parameters
    drm/amdgpu: don't invalidate caches in RELEASE_MEM, only do the writeback
    drm/amd/display: avoid 64-bit division
    drm/amdgpu/psp11: simplify the ucode register logic
    drm/amdgpu: properly guard DC support in navi code
    drm/amd/powerplay: vega20: fix uninitialized variable use
    drm/amd/display: dcn20: include linux/delay.h
    amdgpu: make pmu support optional
    drm/amd/powerplay: Zero initialize current_rpm in vega20_get_fan_speed_percent
    drm/amd/powerplay: Zero initialize freq in smu_v11_0_get_current_clk_freq
    drm/amd/powerplay: Use memset to initialize metrics structs
    drm/amdgpu/mes10.1: Fix header guard
    drm/amd/powerplay: add temperature sensor support for navi10
    drm/amdgpu: fix scheduler timeout calc
    drm/amdgpu: Prepare for hmm_range_register API change (v2)
    ...

    Linus Torvalds
     

15 Jul, 2019

2 commits

  • There are lots of documents under Documentation/*.txt and a few other
    orphan documents elsehwere that belong to the driver-API book.

    Move them to their right place.

    Reviewed-by: Cornelia Huck # vfio-related parts
    Acked-by: Logan Gunthorpe # switchtec
    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     
  • Since kmalloc() will round up the allocation to the next slab size or
    page, it will normally return a pointer to a memory block bigger than we
    asked for. We can query for the actual size of the allocated block using
    ksize() and expand our variable size reservation_list to take advantage
    of that extra space.

    Signed-off-by: Chris Wilson
    Cc: Christian König
    Cc: Michel Dänzer
    Reviewed-by: Michel Dänzer
    Reviewed-by: Christian König
    Link: https://patchwork.freedesktop.org/patch/msgid/20190712080314.21018-1-chris@chris-wilson.co.uk

    Chris Wilson
     

28 Jun, 2019

1 commit


19 Jun, 2019

1 commit

  • Based on 1 normalized pattern(s):

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license version 2 as
    published by the free software foundation this program is
    distributed in the hope that it will be useful but without any
    warranty without even the implied warranty of merchantability or
    fitness for a particular purpose see the gnu general public license
    for more details you should have received a copy of the gnu general
    public license along with this program if not see http www gnu org
    licenses

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-only

    has been chosen to replace the boilerplate/reference in 503 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Alexios Zavras
    Reviewed-by: Allison Randal
    Reviewed-by: Enrico Weigelt
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190602204653.811534538@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner