Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • L linux-coresight-backports
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • linux-arm
  • linux-coresight-backports
  • Repository
Switch branch/tag
  • linux-coresight-backports
  • drivers
  • gpu
  • drm
  • i915
  • i915_gem_gtt.c
Find file BlameHistoryPermalink
  • Matthew Auld's avatar
    drm/i915/userptr: fix size calculation · ecc4d2a5
    Matthew Auld authored Jan 17, 2020
    If we create a rather large userptr object(e.g 1ULL << 32) we might
    shift past the type-width of num_pages: (int)num_pages << PAGE_SHIFT,
    resulting in a totally bogus sg_table, which fortunately will eventually
    manifest as:
    
    gen8_ppgtt_insert_huge:463 GEM_BUG_ON(iter->sg->length < page_size)
    kernel BUG at drivers/gpu/drm/i915/gt/gen8_ppgtt.c:463!
    
    v2: more unsigned long
        prefer I915_GTT_PAGE_SIZE
    
    Fixes: 5cc9ed4b
    
     ("drm/i915: Introduce mapping of user pages into video memory (userptr) ioctl")
    Signed-off-by: default avatarMatthew Auld <matthew.auld@intel.com>
    Cc: Chris Wilson <chris@chris-wilson.co.uk>
    Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
    Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
    Link: https://patchwork.freedesktop.org/patch/msgid/20200117132413.1170563-2-matthew.auld@intel.com
    
    
    (cherry picked from commit 8e78871bc1e5efec22c950d3fd24ddb63d4ff28a)
    Signed-off-by: default avatarJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
    ecc4d2a5