Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp5624369pxb; Mon, 28 Mar 2022 15:07:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxWbfD01mvFp8GNtUoo8haiMqcadM7wK0jJfXgL30oK5YcUxreTGOBf41Js0Y5RuDByJfR2 X-Received: by 2002:ab0:4504:0:b0:351:2448:a093 with SMTP id r4-20020ab04504000000b003512448a093mr13418724uar.121.1648505262040; Mon, 28 Mar 2022 15:07:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648505262; cv=none; d=google.com; s=arc-20160816; b=lpCOJzU66aHiXlPww//24jLFdBXbYToIsZk3pNHpQrLwX6XheN+8FR1yIbAmmJSjU2 Chk1qNKYh24ywHg/1FKqt5bleQCB2GlDSgMlIurIxIHmfeMOLpuv+PjTYfVHDbGs6d/O caM9F5qcU6KZnlAuVoOT5aOyMtam4N1MiPWPGWjpDrOGi4Ux5TMWIl18Hrwe50dJy4ax TjDwa6/dA3rPrdFYOGqiybNh8cAHHKtXAu5tvXLzpB7dnIrPKjbepjqpm5zcFFFwOtib sR5Ug5MfeEEFSM6L9yO1NzpwvwKGDpvOarJyUw1sKbqJ5gzOFlje5icGTDIxkd23RAH4 812Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:thread-index:thread-topic :content-transfer-encoding:mime-version:subject:references :in-reply-to:message-id:cc:to:from:date:dkim-signature:dkim-filter; bh=tNcH335YJ/4x8yVi8nSDMIeS4E89Ow3BdGUYIADF9gI=; b=gY2yrz59JoCp/J+n14n8Jj/2EVWfHwq+mGycdVkYpWNammbW7pJAyiHCgrEvlrPOag ysTRbhkntIL1bX44A3xIeu8fnNEZOKsnS5lRR9Mzthxw7PEz+yFmUOiiqNYXYUordQqO 5j7xhgRig1bYQy3zPi5JIQp1ik+Jj0xpWwpgr+keJyZTNKxj7R9t33Q+m3chBU3jbzw5 4BvK1o9AIUo058yiMMkUTvpYIiJ8si+jKxiW30LTKbUDHR5nmC8pmXT9Fash64Em/Fen wfVBdKlHk0kOOFiUVjRSPsmPyw7mCnGR7q5uybLkqzjrKjNX87Qfn0pGfxAmoBgcW4Sb j2sQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@efficios.com header.s=default header.b=oE92hvqb; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=efficios.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id x24-20020a67c098000000b00324f3e6cf5asi3362749vsi.114.2022.03.28.15.07.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Mar 2022 15:07:42 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@efficios.com header.s=default header.b=oE92hvqb; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=efficios.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 73C9A8303E; Mon, 28 Mar 2022 14:29:14 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344709AbiC1UhT (ORCPT + 99 others); Mon, 28 Mar 2022 16:37:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56674 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345187AbiC1UhL (ORCPT ); Mon, 28 Mar 2022 16:37:11 -0400 Received: from mail.efficios.com (mail.efficios.com [167.114.26.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 586F368FB4; Mon, 28 Mar 2022 13:35:14 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by mail.efficios.com (Postfix) with ESMTP id AFB663FBF24; Mon, 28 Mar 2022 16:35:13 -0400 (EDT) Received: from mail.efficios.com ([127.0.0.1]) by localhost (mail03.efficios.com [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id eGl2JjcfyixH; Mon, 28 Mar 2022 16:35:13 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mail.efficios.com (Postfix) with ESMTP id 3D39A3FBF23; Mon, 28 Mar 2022 16:35:13 -0400 (EDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.efficios.com 3D39A3FBF23 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=efficios.com; s=default; t=1648499713; bh=tNcH335YJ/4x8yVi8nSDMIeS4E89Ow3BdGUYIADF9gI=; h=Date:From:To:Message-ID:MIME-Version; b=oE92hvqbxg9Ro3dlq/CWgRV8YpFDucYZj2ABJ+hhQudLX9eNslVwB6xxCFKfHU0I+ fbrYGadCY9zJZDRZlePVW2zcV/9miO7E0VIYbrNuGUdd1h/6nWL0HkgW7np+90kKiR mDZMj/gDz8VGoMvHPotk6XZSXILGQ+5FqjJoanjcgo84Jym9lHV1Z8Os6O5WMXdk+F GmpFmRLX2u+T+jZmYcH9DhhdShuC9K2FE9dQVj1CWowINZWRhtw9A6zI4nBZuWPweq K6HdkqUpxMCRa7I4IXeKaGds6T/qKSTTe1+uPE2LSFtIN7BUwMDw+RDnWmHcCQUwMG dbhvny9nKC0rw== X-Virus-Scanned: amavisd-new at efficios.com Received: from mail.efficios.com ([127.0.0.1]) by localhost (mail03.efficios.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id hz3AuyqO_hcb; Mon, 28 Mar 2022 16:35:13 -0400 (EDT) Received: from mail03.efficios.com (mail03.efficios.com [167.114.26.124]) by mail.efficios.com (Postfix) with ESMTP id 3205F3FC089; Mon, 28 Mar 2022 16:35:13 -0400 (EDT) Date: Mon, 28 Mar 2022 16:35:13 -0400 (EDT) From: Mathieu Desnoyers To: Beau Belgrave , rostedt Cc: linux-kernel , linux-trace-devel , linux-arch Message-ID: <1283359416.196715.1648499713041.JavaMail.zimbra@efficios.com> In-Reply-To: <2059213643.196683.1648499088753.JavaMail.zimbra@efficios.com> References: <2059213643.196683.1648499088753.JavaMail.zimbra@efficios.com> Subject: Re: Comments on new user events ABI MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [167.114.26.124] X-Mailer: Zimbra 8.8.15_GA_4203 (ZimbraWebClient - FF98 (Linux)/8.8.15_GA_4232) Thread-Topic: Comments on new user events ABI Thread-Index: B0M+BmOcIucczO4F1K4t0lJIcDaNNfBSo6mg X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ----- On Mar 28, 2022, at 4:24 PM, Mathieu Desnoyers mathieu.desnoyers@efficios.com wrote: > Hi Beau, Hi Steven, > > I've done a review of the trace events ABI, and I have a few comments. > Sorry for being late to the party, but I only noticed this new ABI recently. > Hopefully we can improve this ABI before the 5.18 release. > Also a bit of testing shows that dyn_event_add() is called without holding the event_mutex. Has this been tested with lockdep ? [ 144.192299] ------------[ cut here ]------------ [ 144.194026] WARNING: CPU: 10 PID: 2689 at kernel/trace/trace_dynevent.h:82 user_event_parse_cmd+0x972/0xa00 [ 144.196850] Modules linked in: [ 144.197836] CPU: 10 PID: 2689 Comm: example Not tainted 5.17.0+ #269 [ 144.199805] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 [ 144.202303] RIP: 0010:user_event_parse_cmd+0x972/0xa00 [ 144.203899] Code: 48 00 00 00 00 e9 cf f8 ff ff 41 bf f4 ff ff ff e9 3a f7 ff ff be ff ff ff ff 48 c7 c7 08 bb f7 8a e8 b2 05 de 00 85 c0 75 02 <0f> 0b 48 83 bb 30 01 00 00 00 0f 84 54 fa ff ff e9 25 fa ff ff 48 [ 144.209398] RSP: 0018:ffffb6264b87be10 EFLAGS: 00010246 [ 144.211098] RAX: 0000000000000000 RBX: ffff9c3045cb7c00 RCX: 0000000000000001 [ 144.213314] RDX: 0000000000000000 RSI: ffffffff8aa2d11e RDI: ffffffff8aac2f16 [ 144.215577] RBP: ffff9c3045cb7d20 R08: 0000000000000001 R09: 0000000000000001 [ 144.217723] R10: 0000000000000000 R11: 0000000000000001 R12: 0000000000000011 [ 144.221511] R13: ffffb6264b87bea8 R14: 000000000000000c R15: 0000000000000000 [ 144.223760] FS: 00007ff6d10e54c0(0000) GS:ffff9c3627a80000(0000) knlGS:0000000000000000 [ 144.226364] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 144.228203] CR2: 00007ff6d0b16a80 CR3: 00000006530ae004 CR4: 00000000001706e0 [ 144.230349] Call Trace: [ 144.231307] [ 144.232140] ? _copy_from_user+0x68/0xa0 [ 144.233534] user_events_ioctl+0xfe/0x4d0 [ 144.234980] __x64_sys_ioctl+0x8e/0xd0 [ 144.236268] ? lockdep_hardirqs_on+0x7d/0x100 [ 144.237771] do_syscall_64+0x3a/0x80 [ 144.239036] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 144.240696] RIP: 0033:0x7ff6d0b16217 [ 144.241938] Code: b3 66 90 48 8b 05 71 4c 2d 00 64 c7 00 26 00 00 00 48 c7 c0 ff ff ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 b8 10 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 41 4c 2d 00 f7 d8 64 89 01 48 [ 144.247797] RSP: 002b:00007ffce19eb3b8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 144.252578] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007ff6d0b16217 [ 144.254897] RDX: 00007ffce19eb3e0 RSI: 00000000c0082a00 RDI: 0000000000000003 [ 144.257162] RBP: 00007ffce19eb400 R08: 0000000000000003 R09: 0000000000000000 [ 144.259487] R10: 0000000000000000 R11: 0000000000000246 R12: 000056095fe00820 [ 144.261817] R13: 00007ffce19eb550 R14: 0000000000000000 R15: 0000000000000000 [ 144.264135] [ 144.264980] irq event stamp: 4515 [ 144.266162] hardirqs last enabled at (4523): [] __up_console_sem+0x5e/0x70 [ 144.268987] hardirqs last disabled at (4532): [] __up_console_sem+0x43/0x70 [ 144.271739] softirqs last enabled at (4390): [] __do_softirq+0x361/0x4a8 [ 144.274480] softirqs last disabled at (4385): [] irq_exit_rcu+0x104/0x120 [ 144.277220] ---[ end trace 0000000000000000 ]--- -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com