From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752589AbbCWMII (ORCPT ); Mon, 23 Mar 2015 08:08:08 -0400 Received: from mail-wg0-f47.google.com ([74.125.82.47]:34899 "EHLO mail-wg0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752218AbbCWMID (ORCPT ); Mon, 23 Mar 2015 08:08:03 -0400 Date: Mon, 23 Mar 2015 13:07:53 +0100 From: Ingo Molnar 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@vger.kernel.org" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v10 tip 5/9] tracing: allow BPF programs to call bpf_trace_printk() 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 Content-Disposition: inline In-Reply-To: <063D6719AE5E284EB5DD2968C1650D6D1CB07731@AcuExch.aculab.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@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