Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp2866228rdh; Mon, 30 Oct 2023 09:50:26 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEgj/iAZGBgcrutFDbDUaoQtfUaXbiGcoZCHqjMIa+7UPCnA6FKENE4Guywv+OKuYNrkyK2 X-Received: by 2002:a05:6a20:8f03:b0:13d:5b8e:db83 with SMTP id b3-20020a056a208f0300b0013d5b8edb83mr10587511pzk.9.1698684625737; Mon, 30 Oct 2023 09:50:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698684625; cv=none; d=google.com; s=arc-20160816; b=wPuRYyc3Dwr4x+ZHVOWHv1uc3O7fM5cKkxDuqCbBdtjuRotJz0uJdNVkG62H1oS0XN vRGghQZtKzwjdlGQ6YUpJmv1fE2B16eWrQdwpS5HLghntOceX+4BZL7RY1P/5IEZapLp namB8xJ96kSAxZ8WVxTCA7FZEdi0IQvMVIbIyJZL5necuNsbx8/l32yUo9t5gHAw+yRl xF7XqcKe0og7O1YZSm5vh7kENBbeEpYz9vfNo05h7hrTxus5iMWGLzhHSh7//au3z6Om 1m/DshY1qSctTFFi4gs6cb6zxyAGvoPho5uMVmIZcftUOiYJHW+QZamRBoNeTnSg9OAq 2How== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :dkim-filter; bh=JHefCrJLTkGBQZ4igD3txsOG23Cw0nh8cWKcanFsWys=; fh=5+oF2jOCSNVVrqafxvK3FfoE5XXfnm3R1cHBSeTUp7A=; b=ZTnb7kAZjJoDFYXf0H+23uja8Z5o/uMn5ja6d1BqXM9sHzyh/+W0DK0YejrY46ho+0 IcOrVy2XQa6vGZEw8mpB5IxPtktWwMWiM8qvoKcl8Wxy/CQlb1mqnhNcvK4yRqqoghQn fO4+g13oocN5y6BmQf0K6CUkNDM4IM7gPv44AK40FN7kFKTm8iALaXWBfXPoJ4EwZ9Rq ynnNwNgrPY2TK2mrKk+tL7ShDmERfVvuAQz4CAvYx64lFYZ+IMtT23OxaCDB2VeqdEGe WDzd1tn0Vg40QGTWBGRhmvjIMKDqmegoJg3ytGZ7MHZxRL4THllQU1VjV98Ql1QnUdoR Ti7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=APEnktSS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id k125-20020a636f83000000b005b92bac2e5csi5055061pgc.350.2023.10.30.09.50.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Oct 2023 09:50:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=APEnktSS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id A349380B31FA; Mon, 30 Oct 2023 09:50:22 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232938AbjJ3QuN (ORCPT + 99 others); Mon, 30 Oct 2023 12:50:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40188 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232666AbjJ3QuM (ORCPT ); Mon, 30 Oct 2023 12:50:12 -0400 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A183FB3; Mon, 30 Oct 2023 09:50:09 -0700 (PDT) Received: from DESKTOP-4OLSCEK. (unknown [76.135.27.212]) by linux.microsoft.com (Postfix) with ESMTPSA id 00C8D20B74C0; Mon, 30 Oct 2023 09:50:08 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 00C8D20B74C0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1698684609; bh=JHefCrJLTkGBQZ4igD3txsOG23Cw0nh8cWKcanFsWys=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=APEnktSSlhePU3woMi4bMkcFO9skBuA8rk6iyslvg9Mq56e/lJ8oWLuW+JoGknaMt HJ3T0iv8SOxh2LsAAiDv6n/gdjLkXagM3EBkgr9o1c/ghJBIi7pqz2SwqZwwZXae2k BMNzeJ8U7pCLwpfdKiM3EaJ74XiALg3zYtBTNdmg= Date: Mon, 30 Oct 2023 09:50:03 -0700 From: Beau Belgrave To: Steven Rostedt Cc: Naresh Kamboju , "open list:KERNEL SELFTEST FRAMEWORK" , open list , linux-trace-kernel@vger.kernel.org, lkft-triage@lists.linaro.org, Mark Brown , Zheng Yejian , Dan Carpenter , Arnd Bergmann Subject: Re: selftests: user_events: ftrace_test - RIP: 0010:tracing_update_buffers (kernel/trace/trace.c:6470) Message-ID: <20231030165003.GA1879-beaub@linux.microsoft.com> References: <20231027192011.GA436-beaub@linux.microsoft.com> <20231027183640.2529ab68@gandalf.local.home> <20231027223344.3854ac1f@rorschach.local.home> <20231030163102.GA1853-beaub@linux.microsoft.com> <20231030124223.4e4ddeb8@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231030124223.4e4ddeb8@gandalf.local.home> X-Spam-Status: No, score=-8.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Mon, 30 Oct 2023 09:50:22 -0700 (PDT) On Mon, Oct 30, 2023 at 12:42:23PM -0400, Steven Rostedt wrote: > On Mon, 30 Oct 2023 09:31:02 -0700 > Beau Belgrave wrote: > > > I applied both [1][2] patches, and I no longer get any panics. However, > > Great! Can I add "Tested-by" from you on those patches? > Yep, please do. > > I still get the splat about the trace_array_put when running > > user_event's ftrace selftest: > > > > [ 26.665931] ------------[ cut here ]------------ > > [ 26.666663] WARNING: CPU: 12 PID: 291 at kernel/trace/trace.c:516 tracing_release_file_tr+0x46/0x50 > > [ 26.667470] Modules linked in: > > [ 26.667808] CPU: 12 PID: 291 Comm: ftrace_test Not tainted 6.6.0-rc7-next-20231026 #3 > > [ 26.668665] RIP: 0010:tracing_release_file_tr+0x46/0x50 > > [ 26.669093] Code: d1 03 01 8b 83 c0 1e 00 00 85 c0 74 1d 83 e8 01 48 c7 c7 80 5b ef bc 89 83 c0 1e 00 00 e8 f2 b5 03 01 31 c0 5b e9 75 ee 27 01 <0f> 0b eb df 66 0f 1f 44 00 00 90 90 90 90 90 90 90 90 90 90 90 90 > > [ 26.670580] RSP: 0018:ffffb6ef858ffee8 EFLAGS: 00010246 > > [ 26.671128] RAX: 0000000000000000 RBX: ffff9d7ae2364058 RCX: 0000000000000000 > > [ 26.671793] RDX: 0000000000000000 RSI: ffffffffbcb6b38b RDI: 00000000ffffffff > > [ 26.672444] RBP: ffff9d7ac3e72200 R08: 0000000000000000 R09: 0000000000000000 > > [ 26.673072] R10: ffffb6ef858ffee8 R11: ffffffffbb28526f R12: 00000000000f801f > > [ 26.673705] R13: ffff9d7b661a2020 R14: ffff9d7ac6057728 R15: 0000000000000000 > > [ 26.674339] FS: 00007fa852fa6740(0000) GS:ffff9d81a6300000(0000) knlGS:0000000000000000 > > [ 26.674978] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 > > [ 26.675506] CR2: 00007fa852c2a250 CR3: 0000000105d92001 CR4: 0000000000370eb0 > > [ 26.676142] Call Trace: > > [ 26.676357] > > [ 26.676572] ? __warn+0x7f/0x160 > > [ 26.677092] ? tracing_release_file_tr+0x46/0x50 > > [ 26.677540] ? report_bug+0x1c3/0x1d0 > > [ 26.677871] ? handle_bug+0x3c/0x70 > > [ 26.678196] ? exc_invalid_op+0x14/0x70 > > [ 26.678520] ? asm_exc_invalid_op+0x16/0x20 > > [ 26.678845] ? tracing_release_file_tr+0x1f/0x50 > > [ 26.679268] ? tracing_release_file_tr+0x46/0x50 > > [ 26.679691] ? tracing_release_file_tr+0x1f/0x50 > > [ 26.680105] __fput+0xab/0x300 > > [ 26.680437] __x64_sys_close+0x38/0x80 > > Hmm, this doesn't tell me much. Let me go play with the user_event self > tests. > > Thanks Beau! > > -- Steve I get a 100% repro, so hopefully it's easy. Let me know if you can't or if you need something tested. Thanks, -Beau > > > > [ 26.680757] do_syscall_64+0x41/0xf0 > > [ 26.681329] entry_SYSCALL_64_after_hwframe+0x6c/0x74 > > [ 26.681784] RIP: 0033:0x7fa852d15157 > > [ 26.682126] Code: ff e8 0d 16 02 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 f3 0f 1e fa 64 8b 04 25 18 00 00 00 85 c0 75 10 b8 03 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 41 c3 48 83 ec 18 89 7c 24 0c e8 83 b8 f7 ff > > [ 26.684255] RSP: 002b:00007ffd226914f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000003 > > [ 26.684939] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fa852d15157 > > [ 26.685602] RDX: 0000000000000002 RSI: 0000560ad54567d4 RDI: 0000000000000005 > > [ 26.686257] RBP: 00007ffd22691520 R08: 0000000000000000 R09: 00007fa852fa6740 > > [ 26.686877] R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffd22691758 > > [ 26.687480] R13: 0000560ad5455ae7 R14: 0000560ad5458c38 R15: 00007fa8530d4040 > > [ 26.688107] > > [ 26.688315] irq event stamp: 1361 > > [ 26.688618] hardirqs last enabled at (1369): [] console_unlock+0x109/0x130 > > [ 26.689339] hardirqs last disabled at (1376): [] console_unlock+0xee/0x130 > > [ 26.690062] softirqs last enabled at (1272): [] irq_exit_rcu+0x8a/0xe0 > > [ 26.690774] softirqs last disabled at (1267): [] irq_exit_rcu+0x8a/0xe0 > > [ 26.691620] ---[ end trace 0000000000000000 ]--- > > > > Thanks, > > -Beau > > > > 1. https://lore.kernel.org/linux-trace-kernel/20231030115018.25399dbd@gandalf.local.home/ > > 2. https://lore.kernel.org/linux-trace-kernel/20231028164650.4f5ea18a@rorschach.local.home/