1. 25 6月, 2020 1 次提交
  2. 14 6月, 2020 1 次提交
    • M
      treewide: replace '---help---' in Kconfig files with 'help' · a7f7f624
      Masahiro Yamada 提交于
      Since commit 84af7a61 ("checkpatch: kconfig: prefer 'help' over
      '---help---'"), the number of '---help---' has been gradually
      decreasing, but there are still more than 2400 instances.
      
      This commit finishes the conversion. While I touched the lines,
      I also fixed the indentation.
      
      There are a variety of indentation styles found.
      
        a) 4 spaces + '---help---'
        b) 7 spaces + '---help---'
        c) 8 spaces + '---help---'
        d) 1 space + 1 tab + '---help---'
        e) 1 tab + '---help---'    (correct indentation)
        f) 1 tab + 1 space + '---help---'
        g) 1 tab + 2 spaces + '---help---'
      
      In order to convert all of them to 1 tab + 'help', I ran the
      following commend:
      
        $ find . -name 'Kconfig*' | xargs sed -i 's/^[[:space:]]*---help---/\thelp/'
      Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
      a7f7f624
  3. 10 6月, 2020 1 次提交
  4. 13 5月, 2020 1 次提交
  5. 30 4月, 2020 1 次提交
  6. 27 4月, 2020 1 次提交
  7. 10 4月, 2020 3 次提交
  8. 01 4月, 2020 1 次提交
  9. 26 3月, 2020 1 次提交
  10. 27 2月, 2020 4 次提交
  11. 17 2月, 2020 1 次提交
  12. 18 12月, 2019 5 次提交
  13. 11 12月, 2019 4 次提交
  14. 05 12月, 2019 4 次提交
  15. 26 11月, 2019 2 次提交
  16. 25 11月, 2019 1 次提交
  17. 21 11月, 2019 1 次提交
    • D
      dma-resv: Also prime acquire ctx for lockdep · fedf7a44
      Daniel Vetter 提交于
      Semnatically it really doesn't matter where we grab the ticket. But
      since the ticket is a fake lockdep lock, it matters for lockdep
      validation purposes.
      
      This means stuff like grabbing a ticket and then doing
      copy_from/to_user isn't allowed anymore. This is a changed compared to
      the current ttm fault handler, which doesn't bother with having a full
      reservation. Since I'm looking into fixing the TODO entry in
      ttm_mem_evict_wait_busy() I think that'll have to change sooner or
      later anyway, better get started. A bit more context on why I'm
      looking into this: For backwards compat with existing i915 gem code I
      think we'll have to do full slowpath locking in the i915 equivalent of
      the eviction code. And with dynamic dma-buf that will leak across
      drivers, so another thing we need to standardize and make sure it's
      done the same way everyway.
      
      Unfortunately this means another full audit of all drivers:
      
      - gem helpers: acquire_init is done right before taking locks, so no
        problem. Same for acquire_fini and unlocking, which means nothing
        that's not already covered by the dma_resv_lock rules will be caught
        with this extension here to the acquire_ctx.
      
      - etnaviv: An absolute massive amount of code is run between the
        acquire_init and the first lock acquisition in submit_lock_objects.
        But nothing that would touch user memory and could cause a fault.
        Furthermore nothing that uses the ticket, so even if I missed
        something, it would be easy to fix by pushing the acquire_init right
        before the first use. Similar on the unlock/acquire_fini side.
      
      - i915: Right now (and this will likely change a lot rsn) the acquire
        ctx and actual locks are right next to each another. No problem.
      
      - msm has a problem: submit_create calls acquire_init, but then
        submit_lookup_objects() has a bunch of copy_from_user to do the
        object lookups. That's the only thing before submit_lock_objects
        call dma_resv_lock(). Despite all the copypasta to etnaviv, etnaviv
        does not have this issue since it copies all the userspace structs
        earlier. submit_cleanup does not have any such issues.
      
        With the prep patch to pull out the acquire_ctx and reorder it msm
        is going to be safe too.
      
      - nouveau: acquire_init is right next to ttm_bo_reserve, so all good.
        Similar on the acquire_fini/ttm_bo_unreserve side.
      
      - ttm execbuf utils: acquire context and locking are even in the same
        functions here (one function to reserve everything, the other to
        unreserve), so all good.
      
      - vc4: Another case where acquire context and locking are handled in
        the same functions (one function to lock everything, the other to
        unlock).
      
      Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Christian König <christian.koenig@amd.com>
      Cc: Sumit Semwal <sumit.semwal@linaro.org>
      Cc: linux-media@vger.kernel.org
      Cc: linaro-mm-sig@lists.linaro.org
      Cc: Huang Rui <ray.huang@amd.com>
      Cc: Eric Anholt <eric@anholt.net>
      Cc: Ben Skeggs <bskeggs@redhat.com>
      Cc: Alex Deucher <alexander.deucher@amd.com>
      Cc: Rob Herring <robh@kernel.org>
      Cc: Lucas Stach <l.stach@pengutronix.de>
      Cc: Russell King <linux+etnaviv@armlinux.org.uk>
      Cc: Christian Gmeiner <christian.gmeiner@gmail.com>
      Cc: Rob Clark <robdclark@gmail.com>
      Cc: Sean Paul <sean@poorly.run>
      Acked-by: NChristian König <christian.koenig@amd.com>
      Reviewed-by: NMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20191119210844.16947-3-daniel.vetter@ffwll.ch
      fedf7a44
  18. 20 11月, 2019 1 次提交
  19. 06 11月, 2019 1 次提交
    • D
      dma_resv: prime lockdep annotations · b2a8116e
      Daniel Vetter 提交于
      Full audit of everyone:
      
      - i915, radeon, amdgpu should be clean per their maintainers.
      
      - vram helpers should be fine, they don't do command submission, so
        really no business holding struct_mutex while doing copy_*_user. But
        I haven't checked them all.
      
      - panfrost seems to dma_resv_lock only in panfrost_job_push, which
        looks clean.
      
      - v3d holds dma_resv locks in the tail of its v3d_submit_cl_ioctl(),
        copying from/to userspace happens all in v3d_lookup_bos which is
        outside of the critical section.
      
      - vmwgfx has a bunch of ioctls that do their own copy_*_user:
        - vmw_execbuf_process: First this does some copies in
          vmw_execbuf_cmdbuf() and also in the vmw_execbuf_process() itself.
          Then comes the usual ttm reserve/validate sequence, then actual
          submission/fencing, then unreserving, and finally some more
          copy_to_user in vmw_execbuf_copy_fence_user. Glossing over tons of
          details, but looks all safe.
        - vmw_fence_event_ioctl: No ttm_reserve/dma_resv_lock anywhere to be
          seen, seems to only create a fence and copy it out.
        - a pile of smaller ioctl in vmwgfx_ioctl.c, no reservations to be
          found there.
        Summary: vmwgfx seems to be fine too.
      
      - virtio: There's virtio_gpu_execbuffer_ioctl, which does all the
        copying from userspace before even looking up objects through their
        handles, so safe. Plus the getparam/getcaps ioctl, also both safe.
      
      - qxl only has qxl_execbuffer_ioctl, which calls into
        qxl_process_single_command. There's a lovely comment before the
        __copy_from_user_inatomic that the slowpath should be copied from
        i915, but I guess that never happened. Try not to be unlucky and get
        your CS data evicted between when it's written and the kernel tries
        to read it. The only other copy_from_user is for relocs, but those
        are done before qxl_release_reserve_list(), which seems to be the
        only thing reserving buffers (in the ttm/dma_resv sense) in that
        code. So looks safe.
      
      - A debugfs file in nouveau_debugfs_pstate_set() and the usif ioctl in
        usif_ioctl() look safe. nouveau_gem_ioctl_pushbuf() otoh breaks this
        everywhere and needs to be fixed up.
      
      v2: Thomas pointed at that vmwgfx calls dma_resv_init while it holds a
      dma_resv lock of a different object already. Christian mentioned that
      ttm core does this too for ghost objects. intel-gfx-ci highlighted
      that i915 has similar issues.
      
      Unfortunately we can't do this in the usual module init functions,
      because kernel threads don't have an ->mm - we have to wait around for
      some user thread to do this.
      
      Solution is to spawn a worker (but only once). It's horrible, but it
      works.
      
      v3: We can allocate mm! (Chris). Horrible worker hack out, clean
      initcall solution in.
      
      v4: Annotate with __init (Rob Herring)
      
      Cc: Rob Herring <robh@kernel.org>
      Cc: Alex Deucher <alexander.deucher@amd.com>
      Cc: Christian König <christian.koenig@amd.com>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Thomas Zimmermann <tzimmermann@suse.de>
      Cc: Rob Herring <robh@kernel.org>
      Cc: Tomeu Vizoso <tomeu.vizoso@collabora.com>
      Cc: Eric Anholt <eric@anholt.net>
      Cc: Dave Airlie <airlied@redhat.com>
      Cc: Gerd Hoffmann <kraxel@redhat.com>
      Cc: Ben Skeggs <bskeggs@redhat.com>
      Cc: "VMware Graphics" <linux-graphics-maintainer@vmware.com>
      Cc: Thomas Hellstrom <thellstrom@vmware.com>
      Reviewed-by: NThomas Hellstrom <thellstrom@vmware.com>
      Reviewed-by: NChristian König <christian.koenig@amd.com>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Tested-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20191104173801.2972-1-daniel.vetter@ffwll.ch
      b2a8116e
  20. 31 10月, 2019 4 次提交
  21. 25 10月, 2019 1 次提交