From: Nick Desaulniers Date: Fri, 3 Mar 2017 23:40:12 +0000 (-0800) Subject: tracing: do not leak kernel addresses X-Git-Tag: MMI-RSA31.Q1-48-36-11~7 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8985bd8ae9c09b0d618c86081bb593ac18f9d463;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git tracing: do not leak kernel addresses This likely breaks tracing tools like trace-cmd. It logs in the same format but now addresses are all 0x0. Bug: 34277115 MOT-CRs-fixed: (CR) Change-Id: Ifb0d4d2a184bf0d95726de05b1acee0287a375d9 Reviewed-on: https://gerrit.mot.com/1887836 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Wang Wang Reviewed-by: Xiangpo Zhao Submit-Approved: Jira Key --- diff --git a/kernel/trace/trace_printk.c b/kernel/trace/trace_printk.c index ad1d6164e946..e82cff5c842c 100644 --- a/kernel/trace/trace_printk.c +++ b/kernel/trace/trace_printk.c @@ -304,7 +304,7 @@ static int t_show(struct seq_file *m, void *v) if (!*fmt) return 0; - seq_printf(m, "0x%lx : \"", *(unsigned long *)fmt); + seq_printf(m, "0x%lx : \"", 0L); /* * Tabs and new lines need to be converted.