Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753148AbbEKI75 (ORCPT ); Mon, 11 May 2015 04:59:57 -0400 Received: from a.ns.miles-group.at ([95.130.255.143]:65275 "EHLO radon.swed.at" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752633AbbEKI7z (ORCPT ); Mon, 11 May 2015 04:59:55 -0400 Message-ID: <55506F86.9020106@nod.at> Date: Mon, 11 May 2015 10:59:50 +0200 From: Richard Weinberger User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Masami Hiramatsu , akpm@linux-foundation.org CC: linux-kernel@vger.kernel.org Subject: Re: vsprintf: Add support for userspace strings References: <1431286936-4333-1-git-send-email-richard@nod.at> <554FF6B3.4030205@hitachi.com> In-Reply-To: <554FF6B3.4030205@hitachi.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1314 Lines: 33 Am 11.05.2015 um 02:24 schrieb Masami Hiramatsu: > On 2015/05/11 4:42, Richard Weinberger wrote: >> While debugging issues I often add (trace_)printks to strategic positions. >> Dealing with user provided string is complicated as an extra buffer a >> copy_from_user() is needed. >> This adds a new format string to allow direct printing of such strings. >> >> My initial plan was to use %pU but 'U' is already taken, therefore >> I used the next letter which comes in mind when one thinks of userpace, >> 'L'. >> The %pL format string works exactly like %s. > > BTW, if you need to do this for debug, you can also use ftrace's kprobe-tracer > (and perf probe) which allows you to dump userspace strings :) Sounds promising! But I fail to use it: $ perf probe -vv -L do_sys_open:0-3 -k /boot/vmlinux-4.1.0-rc2-3.g3541e77-vanilla Line range is 0 to 3 Use vmlinux: /boot/vmlinux-4.1.0-rc2-3.g3541e77-vanilla Failed to find path of kernel module. Error: Failed to show lines. Reason: No such file or directory (Code: -2) Any idea what's the issue? Thanks, //richard -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/