Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751822AbbH1B6h (ORCPT ); Thu, 27 Aug 2015 21:58:37 -0400 Received: from mail-yk0-f179.google.com ([209.85.160.179]:35884 "EHLO mail-yk0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751680AbbH1B6f (ORCPT ); Thu, 27 Aug 2015 21:58:35 -0400 Subject: Re: [PATCH net-next] bpf: add support for %s specifier to bpf_trace_printk() To: Steven Rostedt , David Miller References: <1440656819-25622-1-git-send-email-ast@plumgrid.com> <20150827.153409.893765406170260565.davem@davemloft.net> <55DF97E6.9050108@plumgrid.com> <20150827.162039.1520656052011605652.davem@davemloft.net> <20150827194332.279edaa4@gandalf.local.home> Cc: mingo@kernel.org, wangnan0@huawei.com, hekuang@huawei.com, daniel@iogearbox.net, brendan.d.gregg@gmail.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org From: Alexei Starovoitov Message-ID: <55DFC048.4070504@plumgrid.com> Date: Thu, 27 Aug 2015 18:58:32 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <20150827194332.279edaa4@gandalf.local.home> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 940 Lines: 27 On 8/27/15 4:43 PM, Steven Rostedt wrote: > On Thu, 27 Aug 2015 16:20:39 -0700 (PDT) > David Miller wrote: > >> From: Alexei Starovoitov >> Date: Thu, 27 Aug 2015 16:06:14 -0700 >> >>> Fair or you still think it should be per byte copy? >> >> I'm terribly surprised we don't have an equivalent of strncpy() >> for unsafe kernel pointers. >> >> You probably won't be the last person to want this, and it's silly >> to optimize it in one place and then wait for cut&paste into the >> next guy. > > If it doesn't exist. Perhaps its time to create it. all makes sense. Working on generalizing FETCH_FUNC_NAME from trace_kprobe.c. Seems to fit quite well. -- 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/