tracing: do not leak kernel addresses
authorNick Desaulniers <ndesaulniers@google.com>
Fri, 3 Mar 2017 23:40:12 +0000 (15:40 -0800)
committerDanny Wood <danwood76@gmail.com>
Thu, 18 Oct 2018 08:41:38 +0000 (09:41 +0100)
This likely breaks tracing tools like trace-cmd.  It logs in the same
format but now addresses are all 0x0.

Bug: 34277115
Change-Id: Ifb0d4d2a184bf0d95726de05b1acee0287a375d9
Git-repo: https://android.googlesource.com/kernel/msm
Git-commit: 9ad8f2cc1bb73a3e2255dff4ee9c45c909869225
Signed-off-by: Srinivasa Rao Kuppala <srkupp@codeaurora.org>
kernel/trace/trace_printk.c

index a9077c1b4ad3f402ecc7580b8c918e0b50db5318..d492b1b5e87a13eafc5f92b4c7257c9b79a9bd84 100644 (file)
@@ -272,7 +272,7 @@ static int t_show(struct seq_file *m, void *v)
        const char *str = *fmt;
        int i;
 
-       seq_printf(m, "0x%lx : \"", *(unsigned long *)fmt);
+       seq_printf(m, "0x%lx : \"", 0L);
 
        /*
         * Tabs and new lines need to be converted.