drm/i915: restrict kernel address leak in debugfs
authorKees Cook <[email protected]>
Mon, 11 Mar 2013 19:25:19 +0000 (12:25 -0700)
committerDaniel Vetter <[email protected]>
Wed, 13 Mar 2013 20:31:02 +0000 (21:31 +0100)
Masks kernel address info-leak in object dumps with the %pK suffix,
so they cannot be used to target kernel memory corruption attacks if
the kptr_restrict sysctl is set.

Signed-off-by: Kees Cook <[email protected]>
Cc: [email protected]
Signed-off-by: Daniel Vetter <[email protected]>
drivers/gpu/drm/i915/i915_debugfs.c

index aae31489c89304f8d79ad2319bbb0ecb97897cef..7299ea45dd03dec217944f31422f5f1a62bcc6eb 100644 (file)
@@ -103,7 +103,7 @@ static const char *cache_level_str(int type)
 static void
 describe_obj(struct seq_file *m, struct drm_i915_gem_object *obj)
 {
-       seq_printf(m, "%p: %s%s %8zdKiB %02x %02x %d %d %d%s%s%s",
+       seq_printf(m, "%pK: %s%s %8zdKiB %02x %02x %d %d %d%s%s%s",
                   &obj->base,
                   get_pin_flag(obj),
                   get_tiling_flag(obj),