1. 23 1月, 2019 1 次提交
  2. 15 1月, 2019 2 次提交
  3. 14 1月, 2019 1 次提交
  4. 09 1月, 2019 1 次提交
    • Z
      drm/i915/gvt: Fix workload request allocation before request add · f0e99437
      Zhenyu Wang 提交于
      In commit 6bb2a2af ("drm/i915/gvt: Fix crash after request->hw_context change"),
      forgot to handle workload scan path in ELSP handler case which was to
      optimize scanning earlier instead of in gvt submission thread, so request
      alloc and add was splitting then which is against right process.
      
      This trys to do a partial revert of that commit which still has workload
      request alloc helper and make sure shadow state population is handled after
      request alloc for target state buffer.
      
      v3: Fix missed workload status setting in request alloc error path
      v2: Fix dispatch workload err path that should add request after alloc anyway.
      
      Fixes: 6bb2a2af ("drm/i915/gvt: Fix crash after request->hw_context change")
      Cc: Bin Yang <bin.yang@intel.com>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Tested-by: NBin Yang <bin.yang@intel.com>
      Reviewed-by: NXiaolin Zhang <xiaolin.zhang@intel.com>
      Signed-off-by: NZhenyu Wang <zhenyuw@linux.intel.com>
      f0e99437
  5. 05 1月, 2019 2 次提交
    • L
      make 'user_access_begin()' do 'access_ok()' · 594cc251
      Linus Torvalds 提交于
      Originally, the rule used to be that you'd have to do access_ok()
      separately, and then user_access_begin() before actually doing the
      direct (optimized) user access.
      
      But experience has shown that people then decide not to do access_ok()
      at all, and instead rely on it being implied by other operations or
      similar.  Which makes it very hard to verify that the access has
      actually been range-checked.
      
      If you use the unsafe direct user accesses, hardware features (either
      SMAP - Supervisor Mode Access Protection - on x86, or PAN - Privileged
      Access Never - on ARM) do force you to use user_access_begin().  But
      nothing really forces the range check.
      
      By putting the range check into user_access_begin(), we actually force
      people to do the right thing (tm), and the range check vill be visible
      near the actual accesses.  We have way too long a history of people
      trying to avoid them.
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      594cc251
    • L
      i915: fix missing user_access_end() in page fault exception case · 0b2c8f8b
      Linus Torvalds 提交于
      When commit fddcd00a ("drm/i915: Force the slow path after a
      user-write error") unified the error handling for various user access
      problems, it didn't do the user_access_end() that is needed for the
      unsafe_put_user() case.
      
      It's not a huge deal: a missed user_access_end() will only mean that
      SMAP protection isn't active afterwards, and for the error case we'll be
      returning to user mode soon enough anyway.  But it's wrong, and adding
      the proper user_access_end() is trivial enough (and doing it for the
      other error cases where it isn't needed doesn't hurt).
      
      I noticed it while doing the same prep-work for changing
      user_access_begin() that precipitated the access_ok() changes in commit
      96d4f267 ("Remove 'type' argument from access_ok() function").
      
      Fixes: fddcd00a ("drm/i915: Force the slow path after a user-write error")
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Cc: stable@kernel.org # v4.20
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      0b2c8f8b
  6. 04 1月, 2019 1 次提交
    • L
      Remove 'type' argument from access_ok() function · 96d4f267
      Linus Torvalds 提交于
      Nobody has actually used the type (VERIFY_READ vs VERIFY_WRITE) argument
      of the user address range verification function since we got rid of the
      old racy i386-only code to walk page tables by hand.
      
      It existed because the original 80386 would not honor the write protect
      bit when in kernel mode, so you had to do COW by hand before doing any
      user access.  But we haven't supported that in a long time, and these
      days the 'type' argument is a purely historical artifact.
      
      A discussion about extending 'user_access_begin()' to do the range
      checking resulted this patch, because there is no way we're going to
      move the old VERIFY_xyz interface to that model.  And it's best done at
      the end of the merge window when I've done most of my merges, so let's
      just get this done once and for all.
      
      This patch was mostly done with a sed-script, with manual fix-ups for
      the cases that weren't of the trivial 'access_ok(VERIFY_xyz' form.
      
      There were a couple of notable cases:
      
       - csky still had the old "verify_area()" name as an alias.
      
       - the iter_iov code had magical hardcoded knowledge of the actual
         values of VERIFY_{READ,WRITE} (not that they mattered, since nothing
         really used it)
      
       - microblaze used the type argument for a debug printout
      
      but other than those oddities this should be a total no-op patch.
      
      I tried to fix up all architectures, did fairly extensive grepping for
      access_ok() uses, and the changes are trivial, but I may have missed
      something.  Any missed conversion should be trivially fixable, though.
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      96d4f267
  7. 29 12月, 2018 2 次提交
  8. 21 12月, 2018 1 次提交
  9. 12 12月, 2018 3 次提交
  10. 07 12月, 2018 5 次提交
  11. 05 12月, 2018 5 次提交
  12. 04 12月, 2018 16 次提交