From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754129Ab1ATBSt (ORCPT ); Wed, 19 Jan 2011 20:18:49 -0500 Received: from mail4.hitachi.co.jp ([133.145.228.5]:49687 "EHLO mail4.hitachi.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752881Ab1ATBSs (ORCPT ); Wed, 19 Jan 2011 20:18:48 -0500 X-AuditID: b753bd60-a1894ba000000ca4-cc-4d378d7450d6 Message-ID: <4D378D71.3050204@hitachi.com> Date: Thu, 20 Jan 2011 10:18:41 +0900 From: Masami Hiramatsu Organization: Systems Development Lab., Hitachi, Ltd., Japan User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; ja; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 MIME-Version: 1.0 To: Dan Rosenberg Cc: Paul Menage , Li Zefan , Ananth N Mavinakayanahalli , Anil S Keshavamurthy , "David S. Miller" , Peter Zijlstra , Ingo Molnar , John Stultz , Thomas Gleixner , linux-kernel@vger.kernel.org Subject: Re: [PATCH] Switch proc interfaces in kernel/ to %pK References: <1295391078.1831.21.camel@dan> <4D363E92.2020602@hitachi.com> <1295449491.1806.13.camel@dan> In-Reply-To: <1295449491.1806.13.camel@dan> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Brightmail-Tracker: AAAAAA== X-FMFTCR: RANGEA Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org (2011/01/20 0:04), Dan Rosenberg wrote: > On Wed, 2011-01-19 at 10:29 +0900, Masami Hiramatsu wrote: >> (2011/01/19 7:51), Dan Rosenberg wrote: >>> Switch users of %p in /proc interfaces in kernel/ to %pK, to allow >>> configuring the level of exposure of kernel pointers via the >>> kptr_restrict sysctl. >> >> This report_probe interface is at /sys/kernel/debug/kprobes/list. >> Is that policy applied to debugfs interface (for debug) too? >> # in that case, you might update ftrace and perf tracing interfaces... >> > > There's no reason to not update ftrace and perf too, since I'd assume no > one is using debugging interfaces without root privileges anyway. I'll > add them to my list. OK, I see. Acked-by: Masami Hiramatsu >>> diff --git a/kernel/kprobes.c b/kernel/kprobes.c >>> index 7798181..2437ca4 100644 >>> --- a/kernel/kprobes.c >>> +++ b/kernel/kprobes.c >>> @@ -2021,11 +2021,11 @@ static void __kprobes report_probe(struct seq_file *pi, struct kprobe *p, >>> kprobe_type = "k"; >>> >>> if (sym) >>> - seq_printf(pi, "%p %s %s+0x%x %s ", >>> + seq_printf(pi, "%pK %s %s+0x%x %s ", >>> p->addr, kprobe_type, sym, offset, >>> (modname ? modname : " ")); >>> else >>> - seq_printf(pi, "%p %s %p ", >>> + seq_printf(pi, "%pK %s %pK ", >>> p->addr, kprobe_type, p->addr); >>> >>> if (!pp) >> >> >> -- >> Masami HIRAMATSU >> 2nd Dept. Linux Technology Center >> Hitachi, Ltd., Systems Development Laboratory >> E-mail: masami.hiramatsu.pt@hitachi.com > > -- Masami HIRAMATSU 2nd Dept. Linux Technology Center Hitachi, Ltd., Systems Development Laboratory E-mail: masami.hiramatsu.pt@hitachi.com