Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E9C87C433EF for ; Mon, 29 Nov 2021 17:33:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349354AbhK2Rg3 (ORCPT ); Mon, 29 Nov 2021 12:36:29 -0500 Received: from sin.source.kernel.org ([145.40.73.55]:33094 "EHLO sin.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242578AbhK2ReK (ORCPT ); Mon, 29 Nov 2021 12:34:10 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 669A2CE13A7; Mon, 29 Nov 2021 17:30:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 35211C53FAD; Mon, 29 Nov 2021 17:30:46 +0000 (UTC) Date: Mon, 29 Nov 2021 12:30:43 -0500 From: Steven Rostedt To: Sven Schnelle Cc: Yafang Shao , akpm@linux-foundation.org, netdev@vger.kernel.org, bpf@vger.kernel.org, linux-perf-users@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, oliver.sang@intel.com, lkp@intel.com, Andrii Nakryiko , David Hildenbrand , Mathieu Desnoyers , Arnaldo Carvalho de Melo , Andrii Nakryiko , Michal Miroslaw , Peter Zijlstra , Matthew Wilcox , Al Viro , Kees Cook , Petr Mladek , Tom Zanussi Subject: Re: [PATCH v2 7/7] tools/testing/selftests/bpf: replace open-coded 16 with TASK_COMM_LEN Message-ID: <20211129123043.5cfd687a@gandalf.local.home> In-Reply-To: References: <20211120112738.45980-1-laoar.shao@gmail.com> <20211120112738.45980-8-laoar.shao@gmail.com> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 29 Nov 2021 11:13:31 +0100 Sven Schnelle wrote: > This breaks the trigger-field-variable-support.tc from the ftrace test > suite at least on s390: > > echo 'hist:keys=next_comm:wakeup_lat=common_timestamp.usecs-$ts0:onmatch(sched.sched_waking).wakeup_latency($wakeup_lat,next_pid,sched.sched_waking.prio,next_comm) if next_comm=="ping"' > linux/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-field-variable-support.tc: line 15: echo: write error: Invalid argument > > I added a debugging line into check_synth_field(): > > [ 44.091037] field->size 16, hist_field->size 16, field->is_signed 1, hist_field->is_signed 0 > > Note the difference in the signed field. That should not break on strings. Does this fix it (if you keep the patch)? -- Steve diff --git a/kernel/trace/trace_events_hist.c b/kernel/trace/trace_events_hist.c index 9555b8e1d1e3..319f9c8ca7e7 100644 --- a/kernel/trace/trace_events_hist.c +++ b/kernel/trace/trace_events_hist.c @@ -3757,7 +3757,7 @@ static int check_synth_field(struct synth_event *event, if (strcmp(field->type, hist_field->type) != 0) { if (field->size != hist_field->size || - field->is_signed != hist_field->is_signed) + (!field->is_string && field->is_signed != hist_field->is_signed)) return -EINVAL; }