Received: by 2002:a05:7412:2a91:b0:fc:a2b0:25d7 with SMTP id u17csp216711rdh; Tue, 13 Feb 2024 14:52:58 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXaPlujkIHC0x+8lMQY2fbaAz/oCKE1oUqIaDxaAeNKXodGlsGUIumn9evUCRFQjazXCT/OLT+gGUDkBxdSZNXX/vsGTxXBuBmgvFcJ2w== X-Google-Smtp-Source: AGHT+IHrzKvC42G70fq7jtAVn+MR+JoaQhVCOlzOKxqh9PY7n+OoKdejnclNEGIMVaK4eJnY5gc8 X-Received: by 2002:a05:6a20:d809:b0:19e:ba40:83e9 with SMTP id iv9-20020a056a20d80900b0019eba4083e9mr1484861pzb.17.1707864778713; Tue, 13 Feb 2024 14:52:58 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707864778; cv=pass; d=google.com; s=arc-20160816; b=IRYxbNDlNy46atZ3h3dKITxjJsMKC7FGpbrmgzOrqAKCp4Y5rdajm7pPXdowh1O8Dz m48Svrw4u7MiJz8aqZTDD0ecwB9thH8guMuz7GrbbcszPFVg2LxFVIh5ue+zt+vnUazs X1ZIlfEUhwFQM2m82otfFNpE979F6qC/1I4B/tX1aq7hscDP5qnrc8ss1bTPCxN7NWtq 06DB4u/qafk9qCJbupf5LorKLUIB66sNgcRrTSHgM7BYqlNFNYRvd2IKNl2Wio5guU0y kMUCjmsC5ejiQa7ltRCyEp+5UN8F6OmllnPG7pgXMV+4Kr5Lpq2J51eBUMz9RjP5L3TY D8vA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date; bh=1uHii/mY7N8PsFdblKgDWbCgsafIu5oOcq0aBt7clq4=; fh=2hBsviLR6xyxRUeQXK1w3PcamRpM6c93bbfOu3XJOLc=; b=oHOteQMg9YbH8bi36xBE2VtazXgKzdN+mkcC7851yVvSlpigxMW9htgZM0eOGes7rN 93jJ9z+o+iWJwQtOVSeD80AMMMIcG1O1vntE4TzyP6ibhUp28r1sGSjE/c7R0lDxupZo iC9bOSzXfTVwluJddNi0vtWOmz2fs9KiMegAHSUueT25LOQhEFpG+3tzp7jImYjDc83c +F1X36CK2yCFLitdpmw/odSTiHD2/KkQb8PLv6ngVFhFoAQntDInAMrUAsWBEQ96PDwg Wt+SZCqjsNw8MR1eIPok79DkpIwfdAfG2xo9VNBzW0HT52icessKCycRmS10X9vgygRl AzEQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-64494-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-64494-linux.lists.archive=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=2; AJvYcCXJQ4HKX3WHu57o7gDBPTo4AB2jRWxq1UJ0a8/+oXcXayr67r8p61og6DhVq6sfuWkVcf+0AjiP3I99eGASy4+jWe3KavGw8/J3d90MJw== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id x1-20020a170902ec8100b001d8edfe3a27si808658plg.163.2024.02.13.14.52.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Feb 2024 14:52:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-64494-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-64494-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-64494-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 0592F28CF6E for ; Tue, 13 Feb 2024 22:51:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D555362A04; Tue, 13 Feb 2024 22:50:09 +0000 (UTC) Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5E45A626C6; Tue, 13 Feb 2024 22:50:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707864609; cv=none; b=tinTAckYjvql084klJIvdW66gOxYdl7W7wZedp5zHGESKq1urRr22qTaV7h6ZaaZU/TpOYJ5bZhO2MA01D/ldgmFK5nDcBNZ5icbBdj+K90zyVnU3/I4OcicqiMi+QMbNRqH14G8STYHJ9P/TMy/fdx5Ur6IaKX7DnZJiXIvSuM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707864609; c=relaxed/simple; bh=MN7Hm+6Ysr7MPqO2FhWpicFrKyMuv7+TpmQv2eMGLZ4=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=kQnIeERa/hQKrTk/nuimP2tXlcoEvu0TwvTfdamqHOejklQL7JQ234zKNRqomnwl/gbpbNXqAbyJgUxqRUy7fCgl1dNhLFWJCjVPi8L+xZC6jJXBRJo3Hx2Gd0B/FMCghoyrmDtTAz5RzSXr1DMRuIPG4FgvPM2hf2S4b5hTjNE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 549CBC433C7; Tue, 13 Feb 2024 22:50:08 +0000 (UTC) Date: Tue, 13 Feb 2024 17:51:38 -0500 From: Steven Rostedt To: Vincent Donnefort Cc: mhiramat@kernel.org, linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, mathieu.desnoyers@efficios.com, kernel-team@android.com Subject: Re: [PATCH v17 2/6] ring-buffer: Introducing ring-buffer mapping functions Message-ID: <20240213175138.1bc30513@gandalf.local.home> In-Reply-To: <20240213155309.01c7c2b2@gandalf.local.home> References: <20240213114945.3528801-1-vdonnefort@google.com> <20240213114945.3528801-3-vdonnefort@google.com> <20240213155309.01c7c2b2@gandalf.local.home> X-Mailer: Claws Mail 3.19.1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Tue, 13 Feb 2024 15:53:09 -0500 Steven Rostedt wrote: > On Tue, 13 Feb 2024 11:49:41 +0000 > Vincent Donnefort wrote: >=20 > Did you test with lockdep? >=20 > > +static int __rb_inc_dec_mapped(struct trace_buffer *buffer, > > + struct ring_buffer_per_cpu *cpu_buffer, > > + bool inc) > > +{ > > + unsigned long flags; > > + > > + lockdep_assert_held(cpu_buffer->mapping_lock); =20 >=20 > /work/git/linux-trace.git/kernel/trace/ring_buffer.c: In function =E2=80= =98__rb_inc_dec_mapped=E2=80=99: > /work/git/linux-trace.git/include/linux/lockdep.h:234:61: error: invalid = type argument of =E2=80=98->=E2=80=99 (have =E2=80=98struct mutex=E2=80=99) > 234 | #define lockdep_is_held(lock) lock_is_held(&(lock)->dep= _map) > | ^~ > /work/git/linux-trace.git/include/asm-generic/bug.h:123:32: note: in defi= nition of macro =E2=80=98WARN_ON=E2=80=99 > 123 | int __ret_warn_on =3D !!(condition); = \ > | ^~~~~~~~~ > /work/git/linux-trace.git/include/linux/lockdep.h:267:9: note: in expansi= on of macro =E2=80=98lockdep_assert=E2=80=99 > 267 | lockdep_assert(lockdep_is_held(l) !=3D LOCK_STATE_NOT_HEL= D) > | ^~~~~~~~~~~~~~ > /work/git/linux-trace.git/include/linux/lockdep.h:267:24: note: in expans= ion of macro =E2=80=98lockdep_is_held=E2=80=99 > 267 | lockdep_assert(lockdep_is_held(l) !=3D LOCK_STATE_NOT_HEL= D) > | ^~~~~~~~~~~~~~~ > /work/git/linux-trace.git/kernel/trace/ring_buffer.c:6167:9: note: in exp= ansion of macro =E2=80=98lockdep_assert_held=E2=80=99 > 6167 | lockdep_assert_held(cpu_buffer->mapping_lock); > | ^~~~~~~~~~~~~~~~~~~ >=20 > I believe that is supposed to be: >=20 > lockdep_assert_held(&cpu_buffer->mapping_lock); If this is the only issue with this series, I may just fix up the patch myself.