EpicAOSP/android_kernel_samsung_smdk4210_new — pull request #2 by BinaryMn (2012-12-19 20:49:50+00:00)
Title: exynos-mem: Fix major security hole

This fixes the exynos-mem device security hole. The driver allowed any user
to access all of the device's lowmem through the provided mmap functionality.

We create a small little framework collecting the actual CMA memory blocks
that exist on the device; they are the root cause of the existence of this device
driver. We white-list only the CMA memory spaces as parameters to the mmap
function and deny access to any other memory space requests.

We furthermore just allow access to the "s3c-fimc" memory block as this is
seemingly the only space which upon access denial actually breaks functionality.

This patch was modified to be suitable for Exynos 4210 by
Andrew Dodd from Andrei's original Exynos 4412 patch.

Change-Id: Ie5335c1ca81293dc071e919c00524f1e6765e70e
Signed-off-by: Andrew Dodd