From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751415AbdFABL7 (ORCPT ); Wed, 31 May 2017 21:11:59 -0400 Received: from smtprelay0156.hostedemail.com ([216.40.44.156]:44270 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750954AbdFABL6 (ORCPT ); Wed, 31 May 2017 21:11:58 -0400 X-Session-Marker: 726F737465647440676F6F646D69732E6F7267 X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,rostedt@goodmis.org,:::::::::::::::::::,RULES_HIT:41:69:355:379:541:599:800:960:973:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1542:1593:1594:1711:1730:1747:1777:1792:1801:1981:2194:2199:2393:2553:2559:2562:2895:3138:3139:3140:3141:3142:3354:3865:3866:3867:3868:3870:3871:3872:3874:4605:5007:6261:7550:7875:7903:8603:10004:10400:10848:10967:11026:11232:11473:11658:11914:12043:12050:12296:12663:12740:12760:12895:13071:13439:14096:14097:14180:14181:14659:14721:21060:21080:21220:21451:21627:30054:30070:30090:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:4,LUA_SUMMARY:none X-HE-Tag: route70_4a7597acea25c X-Filterd-Recvd-Size: 3470 Date: Wed, 31 May 2017 21:11:40 -0400 From: Steven Rostedt To: Jeremy Linton Cc: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, mingo@redhat.com, rusty@rustcorp.com.au, jeyu@redhat.com, kirill.shutemov@linux.intel.com, christoffer.dall@linaro.org, marc.zyngier@arm.com, jcm@jonmasters.org Subject: Re: [PATCH 00/12] trace: add the ability to parse sizeof() Message-ID: <20170531211038.63faa76b@vmware.local.home> In-Reply-To: <20170531215653.3240-1-jeremy.linton@arm.com> References: <20170531215653.3240-1-jeremy.linton@arm.com> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jeremy, I'm currently at the Open Source Summit in Tokyo. It may be a while before I get to look more at this. If I get time during my travels, I may get to it sooner, otherwise it may be a week or so. -- Steve On Wed, 31 May 2017 16:56:41 -0500 Jeremy Linton wrote: > There are a few cases of sizeof() embedded in TRACE_EVENT() > macros. That is a problem because the sizeof(structure) gets > passed to userspace which doesn't know how to decode the > size of kernel data structures. This is a similar problem > to enums which were being passed in their symbolic form to > userspace. > > Rather than recreating much of that infrastructure lets > simply extend it, and append additional symbols into the > enum_map that can translate string sizeof() calls into > values. Of course that means that much of the infrastructure > is now poorly named so we go through and replace instances > describing "enum" with "eval" to indicate a generic C > expression to numerical evaluation routine. > > Jeremy Linton (12): > trace: rename kernel enum section to eval > trace: rename trace_enum_map to trace_eval_map > trace: rename struct module entry for trace enums > trace: rename trace enum data structures in trace.c > trace: rename trace_enum_mutex to trace_eval_mutex > trace: rename trace.c enum functions > trace: rename enum_map functions > tracing: Rename enum_replace to eval_replace > tracing: define TRACE_DEFINE_SIZEOF() macro to map sizeof's to their > values > tracing: Update sample file to describe the new macro > tracing: Add TRACE_DEFINE_SIZEOF() macros > tracing: Rename update the enum_map file > > arch/arm64/kvm/trace.h | 2 + > include/asm-generic/vmlinux.lds.h | 6 +- > include/linux/module.h | 4 +- > include/linux/tracepoint.h | 7 +- > include/trace/events/xen.h | 13 +- > include/trace/trace_events.h | 26 +++- > kernel/module.c | 6 +- > kernel/trace/Kconfig | 22 ++-- > kernel/trace/trace.c | 194 > ++++++++++++++--------------- > kernel/trace/trace.h | 4 +- > kernel/trace/trace_events.c | 24 ++-- > samples/trace_events/trace-events-sample.h | 7 ++ 12 files changed, > 175 insertions(+), 140 deletions(-) >