lkml.org 
[lkml]   [2018]   [Oct]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Date
    Subject[PATCH 3.16 314/366] drm: set FMODE_UNSIGNED_OFFSET for drm files
    3.16.60-rc1 review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Dave Airlie <airlied@redhat.com>

    commit 76ef6b28ea4f81c3d511866a9b31392caa833126 upstream.

    Since we have the ttm and gem vma managers using a subset
    of the file address space for objects, and these start at
    0x100000000 they will overflow the new mmap checks.

    I've checked all the mmap routines I could see for any
    bad behaviour but overall most people use GEM/TTM VMA
    managers even the legacy drivers have a hashtable.

    Reported-and-Tested-by: Arthur Marsh (amarsh04 on #radeon)
    Fixes: be83bbf8068 (mmap: introduce sane default mmap limits)
    Signed-off-by: Dave Airlie <airlied@redhat.com>
    [bwh: Backported to 3.16: adjust filename]
    Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
    ---
    drivers/gpu/drm/drm_fops.c | 1 +
    1 file changed, 1 insertion(+)

    --- a/drivers/gpu/drm/drm_fops.c
    +++ b/drivers/gpu/drm/drm_fops.c
    @@ -251,6 +251,7 @@ static int drm_open_helper(struct file *
    return -ENOMEM;

    filp->private_data = priv;
    + filp->f_mode |= FMODE_UNSIGNED_OFFSET;
    priv->filp = filp;
    priv->uid = current_euid();
    priv->pid = get_pid(task_pid(current));
    \
     
     \ /
      Last update: 2018-10-14 18:01    [W:4.046 / U:0.200 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site