Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ce566451 authored by Tharun Kumar Merugu's avatar Tharun Kumar Merugu
Browse files

msm: adsprpc: Avoid leak info of pointers addresses to dmesg



To avoid leak info of pointers addresses to dmesg,
use %pK instead of %p to print virtual addresses.

Change-Id: I7d8e900d7cd62e9ad3fb9ea3ba9865d6911bdfcb
Acked-by: default avatarChenna Kesava Raju <chennak@qti.qualcomm.com>
Signed-off-by: default avatarTharun Kumar Merugu <mtharu@codeaurora.org>
parent 05e7d36b
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -2102,7 +2102,7 @@ static ssize_t fastrpc_debugfs_read(struct file *filp, char __user *buffer,
		spin_lock(&fl->hlock);
		hlist_for_each_entry_safe(buf, n, &fl->bufs, hn) {
			len += scnprintf(fileinfo + len, DEBUGFS_SIZE - len,
						"%s %p %s %p %s %llx\n", "buf:",
					"%s %pK %s %pK %s %llx\n", "buf:",
					buf, "buf->virt:", buf->virt,
					"buf->phys:", buf->phys);
		}
@@ -2111,7 +2111,7 @@ static ssize_t fastrpc_debugfs_read(struct file *filp, char __user *buffer,
					"LIST OF MAPS:");
		hlist_for_each_entry_safe(map, n, &fl->maps, hn) {
			len += scnprintf(fileinfo + len, DEBUGFS_SIZE - len,
						"%s %p %s %lx %s %llx\n",
						"%s %pK %s %lx %s %llx\n",
						"map:", map,
						"map->va:", map->va,
						"map->phys:", map->phys);
@@ -2121,7 +2121,7 @@ static ssize_t fastrpc_debugfs_read(struct file *filp, char __user *buffer,
					"LIST OF PENDING SMQCONTEXTS:");
		hlist_for_each_entry_safe(ictx, n, &fl->clst.pending, hn) {
			len += scnprintf(fileinfo + len, DEBUGFS_SIZE - len,
						"%s %p %s %u %s %u %s %u\n",
						"%s %pK %s %u %s %u %s %u\n",
						"smqcontext:", ictx,
						"sc:", ictx->sc,
						"tid:", ictx->pid,
@@ -2132,7 +2132,7 @@ static ssize_t fastrpc_debugfs_read(struct file *filp, char __user *buffer,
					"LIST OF INTERRUPTED SMQCONTEXTS:");
		hlist_for_each_entry_safe(ictx, n, &fl->clst.interrupted, hn) {
		len += scnprintf(fileinfo + len, DEBUGFS_SIZE - len,
					"%s %p %s %u %s %u %s %u\n",
					"%s %pK %s %u %s %u %s %u\n",
					"smqcontext:", ictx,
					"sc:", ictx->sc,
					"tid:", ictx->pid,