From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ingo Molnar Subject: Re: [PATCH v10 tip 5/9] tracing: allow BPF programs to call bpf_trace_printk() Date: Mon, 23 Mar 2015 13:07:53 +0100 Message-ID: <20150323120753.GA22560@gmail.com> References: <1427053150-32213-1-git-send-email-ast@plumgrid.com> <1427053150-32213-6-git-send-email-ast@plumgrid.com> <063D6719AE5E284EB5DD2968C1650D6D1CB07731@AcuExch.aculab.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <063D6719AE5E284EB5DD2968C1650D6D1CB07731-VkEWCZq2GCInGFn1LkZF6NBPR1lH4CV8@public.gmane.org> Sender: linux-api-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: David Laight Cc: 'Alexei Starovoitov' , Steven Rostedt , Namhyung Kim , Arnaldo Carvalho de Melo , Jiri Olsa , Masami Hiramatsu , "David S. Miller" , Daniel Borkmann , Peter Zijlstra , "linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , "netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , "linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" List-Id: linux-api@vger.kernel.org * David Laight wrote: > From: Alexei Starovoitov > > Debugging of BPF programs needs some form of printk from the program, > > so let programs call limited trace_printk() with %d %u %x %p modifiers only. > > Should anyone be allowed to use BPF programs to determine the kernel > addresses of any items? > Looks as though it is leaking kernel addresses to userspace. > Note that the problem is with the arguments, not the format string. All of these are privileged operations - inherent if you are trying to debug the kernel. Thanks, Ingo