Security fix. Zero pages before they are handed to user space.
TTM pages were not cleared when allocated and handed to user space. Sensitive information may leak.main
parent
72b5d1507a
commit
3b8e6ccd25
|
@ -259,6 +259,8 @@ struct page *drm_vm_ttm_nopage(struct vm_area_struct *vma,
|
|||
}
|
||||
++bm->cur_pages;
|
||||
SetPageLocked(page);
|
||||
clear_page(kmap(page));
|
||||
kunmap(page);
|
||||
}
|
||||
|
||||
get_page(page);
|
||||
|
|
|
@ -235,6 +235,8 @@ static int drm_ttm_populate(drm_ttm_t * ttm)
|
|||
#else
|
||||
SetPageReserved(page);
|
||||
#endif
|
||||
clear_page(kmap(page));
|
||||
kunmap(page);
|
||||
ttm->pages[i] = page;
|
||||
++bm->cur_pages;
|
||||
}
|
||||
|
|
|
@ -220,6 +220,8 @@ struct page *drm_vm_ttm_fault(struct vm_area_struct *vma,
|
|||
#else
|
||||
SetPageReserved(page);
|
||||
#endif
|
||||
clear_page(kmap(page));
|
||||
kunmap(page);
|
||||
}
|
||||
|
||||
if (ttm->page_flags & DRM_TTM_PAGE_UNCACHED) {
|
||||
|
|
Loading…
Reference in New Issue