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 07F1AEB64DA for ; Wed, 28 Jun 2023 14:08:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232405AbjF1OIZ (ORCPT ); Wed, 28 Jun 2023 10:08:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52568 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232651AbjF1OGn (ORCPT ); Wed, 28 Jun 2023 10:06:43 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 95BBE3580 for ; Wed, 28 Jun 2023 07:06:42 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 2B83D61341 for ; Wed, 28 Jun 2023 14:06:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D70C1C433C0; Wed, 28 Jun 2023 14:06:39 +0000 (UTC) Date: Wed, 28 Jun 2023 10:06:34 -0400 From: Steven Rostedt To: linux-kernel@vger.kernel.org Cc: Masami Hiramatsu , Mark Rutland , Andrew Morton Subject: Re: [for-linus][PATCH 0/3] tracing: Final updates for 6.4+ Message-ID: <20230628100634.7b95e358@rorschach.local.home> In-Reply-To: <20230628125448.007243475@goodmis.org> References: <20230628125448.007243475@goodmis.org> 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 Wed, 28 Jun 2023 08:54:48 -0400 Steven Rostedt wrote: > The user events write currently returns the size of what was suppose to be > written when tracing is disabled and nothing was written. Instead, behave like > trace_marker and return -EBADF, as that is what is returned if a file is opened > for read only, I accidentally sent this before it was ready to go (I was editing the change log from the previous one) I didn't finish the above paragraph, and was suppose to delete the below one. That's because I was about to rush to a talk at EOSS, and hit save and exit forgetting that sends the emails out! (I'm using quilt) I'll finish it properly for when I do the proper pull request. -- Steve > > Before user events become an ABI, fix the return value of the write > operation when tracing is disabled. It should not return an error, but > simply report it wrote zero bytes. Just like any other write operation > that doesn't write but does not "fail". > > This also includes test cases for this use case. > > git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git > trace/urgent > > Head SHA1: e155047e53d25f09d055c08ae9d6c269520e90d8 > > > sunliming (3): > tracing/user_events: Fix incorrect return value for writing operation when events are disabled > selftests/user_events: Enable the event before write_fault test in ftrace self-test > selftests/user_events: Add test cases when event is disabled > > ---- > kernel/trace/trace_events_user.c | 3 ++- > tools/testing/selftests/user_events/ftrace_test.c | 8 ++++++++ > 2 files changed, 10 insertions(+), 1 deletion(-)