From mboxrd@z Thu Jan 1 00:00:00 1970 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 4B1F8C433FE for ; Thu, 7 Apr 2022 15:50:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345190AbiDGPw4 (ORCPT ); Thu, 7 Apr 2022 11:52:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32912 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345205AbiDGPwe (ORCPT ); Thu, 7 Apr 2022 11:52:34 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9A94513F0A; Thu, 7 Apr 2022 08:50:33 -0700 (PDT) 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 dfw.source.kernel.org (Postfix) with ESMTPS id 31F3361E35; Thu, 7 Apr 2022 15:50:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0389DC385A4; Thu, 7 Apr 2022 15:50:31 +0000 (UTC) Date: Thu, 7 Apr 2022 11:50:30 -0400 From: Steven Rostedt To: Chuck Lever III Cc: Stephen Rothwell , Linux Kernel Mailing List , Linux Next Mailing List Subject: Re: linux-next: runtime warning after merge of the cel-fixes tree Message-ID: <20220407115030.3454b29e@gandalf.local.home> In-Reply-To: <20220407114241.0c52b8f0@gandalf.local.home> References: <20220407144524.2a592ed6@canb.auug.org.au> <20220407105446.186114c3@gandalf.local.home> <20220407111318.649f908d@gandalf.local.home> <20220407114241.0c52b8f0@gandalf.local.home> 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 Thu, 7 Apr 2022 11:42:41 -0400 Steven Rostedt wrote: > Actually, I found an issue with the above that will not fix it, but the fix > to that is not that difficult (currently testing it this time). Take two: diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c index e11e167b7809..55d3ed6656ac 100644 --- a/kernel/trace/trace_events.c +++ b/kernel/trace/trace_events.c @@ -392,12 +392,6 @@ static void test_event_printk(struct trace_event_call *call) if (!(dereference_flags & (1ULL << arg))) goto next_arg; - /* Check for __get_sockaddr */; - if (str_has_prefix(fmt + i, "__get_sockaddr(")) { - dereference_flags &= ~(1ULL << arg); - goto next_arg; - } - /* Find the REC-> in the argument */ c = strchr(fmt + i, ','); r = strstr(fmt + i, "REC->"); @@ -413,7 +407,23 @@ static void test_event_printk(struct trace_event_call *call) a = strchr(fmt + i, '&'); if ((a && (a < r)) || test_field(r, call)) dereference_flags &= ~(1ULL << arg); + } else { + /* Check for type casts */ + if (fmt[i] == '(') { + while (fmt[i] && fmt[i] != ')') + i++; + if (fmt[i]) + i++; + while (isspace(fmt[i])) + i++; + } + /* Check for __get_sockaddr or __get_dynamic_array */; + if (str_has_prefix(fmt + i, "__get_sockaddr(") || + str_has_prefix(fmt + i, "__get_dynamic_array(")) { + dereference_flags &= ~(1ULL << arg); + } } + next_arg: i--; arg++;