msm: kgsl: Change device-type memory mapping to Normal-NC
Device type memory mapping enforces certain restrictions on unaligned address accesses. If userspace in an IOCTL incorrectly sends an unaligned address at the boundary of device type memory mapping to kernel, there will be a fault because kernel goes ahead and reads the device type memory with unaligned access. To overcome such issues, change device-type memory mapping to Normal-noncached wherever it is possible. Change-Id: I34e8268a0defe335ca9d360e910655c2891cd572 Signed-off-by: Rajesh Kemisetti <rajeshk@codeaurora.org>
This commit is contained in:
parent
166af733db
commit
fa92140f90
1 changed files with 1 additions and 1 deletions
|
@ -3837,7 +3837,7 @@ kgsl_mmap_memstore(struct kgsl_device *device, struct vm_area_struct *vma)
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
|
||||
vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot);
|
||||
|
||||
result = remap_pfn_range(vma, vma->vm_start,
|
||||
device->memstore.physaddr >> PAGE_SHIFT,
|
||||
|
|
Loading…
Add table
Reference in a new issue