usercopy: Handle vm_map_ram() areas
vmalloc does not allocate a vm_struct for vm_map_ram() areas. That causes us to deny usercopies from those areas. This affects XFS which uses vm_map_ram() for its directories. Fix this by calling find_vmap_area() instead of find_vm_area(). Fixes: 0aef499f ("mm/usercopy: Detect vmalloc overruns") Signed-off-by: NMatthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: NUladzislau Rezki (Sony) <urezki@gmail.com> Tested-by: NZorro Lang <zlang@redhat.com> Signed-off-by: NKees Cook <keescook@chromium.org> Link: https://lore.kernel.org/r/20220612213227.3881769-2-willy@infradead.org
Showing
想要评论请 注册 或 登录