OSDN Git Service

ion: use %pK instead of %p which respects kptr_restrict sysctl
authorSatyajit Desai <sadesai@codeaurora.org>
Fri, 2 Sep 2016 21:18:13 +0000 (14:18 -0700)
committerSatyajit Desai <sadesai@codeaurora.org>
Mon, 3 Oct 2016 18:42:20 +0000 (11:42 -0700)
commit0f327e4cccdb536e3b106cea68c062fbe816f64f
tree54b70fb0ef6048617dea61b65467bbe068908163
parentab26d098793adbf90b77d414663e34ac0c7315f6
ion: use %pK instead of %p which respects kptr_restrict sysctl

Hide kernel pointers from unprivileged users by using %pk format-specifier
instead of %p. This respects the kptr_restrict sysctl setting which is by
default on. So by default %pk will print zeroes as address. echo 1 to
kptr_restrict to print proper kernel address.

Change-Id: Ia300e3e38b8662afac15edda28959564b05c9367
Signed-off-by: Satyajit Desai <sadesai@codeaurora.org>
drivers/staging/android/ion/ion.c
drivers/staging/android/ion/ion_cma_heap.c
drivers/staging/android/ion/ion_cma_secure_heap.c
drivers/staging/android/ion/msm/msm_ion.c