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

Commit cff6fde1 authored by Jordan Crouse's avatar Jordan Crouse
Browse files

msm: kgsl: use %pK to restrict printing GPU / memory addresses



Use %pK in the output for the per-process memory dump to keep from
printing the GPU and user memory addresses for the GPU memory
objects own by the process.  This allows us to make the 'mem' file
world readable without exposing any really dangerous information.

Change-Id: Ic0dedbad21654110905d1b3744f562966584d8ed
Signed-off-by: default avatarJordan Crouse <jcrouse@codeaurora.org>
parent d4019006
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -171,8 +171,10 @@ static void print_mem_entry(struct seq_file *s, struct kgsl_mem_entry *entry)

	kgsl_get_memory_usage(usage, sizeof(usage), m->flags);

	seq_printf(s, "%08x %08lx %8zd %5d %5s %10s %16s %5d\n",
			m->gpuaddr, m->useraddr, m->size, entry->id, flags,
	seq_printf(s, "%pK %pK %8zd %5d %5s %10s %16s %5d\n",
			(unsigned long *) m->gpuaddr,
			(unsigned long *) m->useraddr,
			m->size, entry->id, flags,
			memtype_str(entry->memtype), usage, m->sglen);
}

@@ -258,7 +260,7 @@ kgsl_process_init_debugfs(struct kgsl_process_private *private)
	 * So if debugfs is disabled in kernel, return as
	 * success.
	 */
	dentry = debugfs_create_file("mem", 0400, private->debug_root, private,
	dentry = debugfs_create_file("mem", 0444, private->debug_root, private,
			    &process_mem_fops);

	if (IS_ERR(dentry)) {