• Daniel Vetter's avatar
    drm/fb: Stop leaking physical address · 6be8f3bd
    Daniel Vetter authored
    For buffer sharing, use dma-buf instead. We can't set smem_start to 0
    unconditionally since that's used by the fbdev mmap default
    implementation. And we have plenty of userspace which would like to
    keep that working.
    
    This might break legit userspace - if it does we need to look at a
    case-by-cases basis how to handle that. Worst case I expect overrides
    for only specific drivers, since anything remotely modern should be
    using dma-buf/prime now (which is about 7 years old now for DRM
    drivers).
    
    This issue was uncovered because Noralf's rework to implement a
    generic fb_probe also implements it's own fb_mmap callback. Which
    means smem_start didn't have to be set anymore, which blew up some
    blob in userspace rather badly.
    Acked-by: default avatarSean Paul <seanpaul@chromium.org>
    Cc: Gustavo Padovan <gustavo@padovan.org>
    Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
    Cc: Sean Paul <sean@poorly.run>
    Cc: David Airlie <airlied@linux.ie>
    Cc: John Stultz <john.stultz@linaro.org>
    Cc: Noralf Trønnes <noralf@tronnes.org>
    Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/20180822085405.10787-4-daniel.vetter@ffwll.ch
    6be8f3bd
drm_fb_helper.c 89.8 KB