From nobody Thu Dec 18 08:37:35 2025 Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) (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 DAF56D27E for ; Wed, 10 Dec 2025 01:20:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=216.40.44.11 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765329649; cv=none; b=aoxd3eKDkGor6fWjUhPep0d/ROcO6m3qPbmzEHN1nXdUY0walKyL6B+HnNKMQqeQ2C104a8j7Rnuz1E4zuRyqCmRIBSuurOgkODc3edd/PE925hqPe8rNl5plL01cJ0ajXJchQAmHaxrfykfai04AClyRU1cx2uPw8Ow7fYvidY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765329649; c=relaxed/simple; bh=Cw4+C2KF2MDqB6garALtxT5rGMgBmZKHSXhevvCzsEw=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type; b=HiX2mo5lgMbHcNcdzV+EDXlW148562pe85QjapQq+yG735cJ0adxAIXlVaIiCEtoyX1fSC/U7e+/rAPGnYytknehm5aSDU+gUHBBAdNngBKm9+G4a6si20W4OFOVvdv9Dbwqe96jixIHbCok8tA6DWMQbx08ItQuP70e3nguM9k= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=goodmis.org; spf=pass smtp.mailfrom=goodmis.org; arc=none smtp.client-ip=216.40.44.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=goodmis.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=goodmis.org Received: from omf20.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 23F9614030D; Wed, 10 Dec 2025 01:20:40 +0000 (UTC) Received: from [HIDDEN] (Authenticated sender: rostedt@goodmis.org) by omf20.hostedemail.com (Postfix) with ESMTPA id 8CBE520026; Wed, 10 Dec 2025 01:20:37 +0000 (UTC) Date: Tue, 9 Dec 2025 20:20:32 -0500 From: Steven Rostedt To: Linus Torvalds Cc: LKML , Masami Hiramatsu , Mathieu Desnoyers Subject: [GIT PULL] tracing: Fix for v6.19 Message-ID: <20251209202032.4430caac@fedora> X-Mailer: Claws Mail 4.3.1 (GTK 3.24.51; x86_64-redhat-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Rspamd-Server: rspamout06 X-Rspamd-Queue-Id: 8CBE520026 X-Stat-Signature: 7eab75d8o6z3ozrmqobnptkyfnyhj1jw X-Session-Marker: 726F737465647440676F6F646D69732E6F7267 X-Session-ID: U2FsdGVkX18IwendS9GnP5kjGYD8KKLzmlthRUGcnxQ= X-HE-Tag: 1765329637-130871 X-HE-Meta: U2FsdGVkX19mc69rP5Izd7Ql73M6MPJI/wstFwgqn4375tOzcG+qLRLyefXyY0SiC2yhst5fzKVsjj/Aob4Pu499sujFVMqtoLXaqG2QgqmTKuaOixA1u1HNhgEJDPNYuREUYp8WtoGk8S29VdsnWxEF9REHJUFwOY9evZ/DqTAvNaCCTIQqfdJRqLdDPlYnhCxxOqrWX9YBVNCUq+4ZXZpEt53RfmHGE5ATRbVqJFYS6WhsPmtfBMI3454xU8amOogXd1wrCn5Bky0ZpeR8dGBxrpD3MZi3yIByL4jzMM5pqtmbJUEpE2bCx7PR0x6XTvngwSnjIiN92Qh+2ul8I50+5T7F2QLEKK9N6+zm1+Hmy9llq9AiQW75QLMizVJPxiqcFI9cow+UqthqKoNbMrRT1SfLBkQl0vPpOGfrMThVPZE6eeAkhG2R8Z9nnwjIEwFCTzLMwVBe4ZdKoOe19nhnK0QA4VeTUVHnVwfM+srCrR6jnFtv5vpk/Tt6UWcVWp9swJ+KXM7HTd0D9l8yjVvHsQrTNoHyxIhGsgShqnI= Content-Type: text/plain; charset="utf-8" Linus, tracing fix for v6.19: - Fix unused tracepoint build for modules only using exported tracepoints The tracepoint-update.c code that looks for unused tracepoints expects if tracepoints are used then it will have tracepoints defined. If not, it errors out which fails the build. In most cases this the way things work. A tracepoint can't be used if it is not defined. There is one exception; If a module only uses tracepoints that are defined in other modules or the vmlinux proper, where the tracepoints are exported. In this case, the tracepoint-update.c code thinks tracepoints are used but not defined and errors out, failing the build. When tracepoint-update.c detects this case, if it is a module that is being processed, exit out normally as it is a legitimate case. Please pull the latest trace-v6.19-3 tree, which can be found at: git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git trace-v6.19-3 Tag SHA1: b613febe6771857577224547f0f68783be45f77a Head SHA1: 0c5d252a7cb0073f475be389a523de2095973dd2 Steven Rostedt (1): tracing: Fix unused tracepoints when module uses only exported ones ---- scripts/tracepoint-update.c | 3 +++ 1 file changed, 3 insertions(+) --------------------------- commit 0c5d252a7cb0073f475be389a523de2095973dd2 Author: Steven Rostedt Date: Mon Dec 8 08:53:36 2025 -0500 tracing: Fix unused tracepoints when module uses only exported ones =20 Building the KVM intel module failed to build with UT=3D1: =20 no __tracepoint_strings in file: arch/x86/kvm/kvm-intel.o make[3]: *** [/work/git/test-linux.git/scripts/Makefile.modfinal:62: ar= ch/x86/kvm/kvm-intel.ko] Error 1 =20 The reason is that the module only uses the tracepoints defined and exported by the main kvm module. The tracepoint-udpate.c code fails the build if a tracepoint is used, but there's no tracepoints defined. But this is acceptable in modules if the tracepoints is defined in the vmli= nux proper or another module and exported. =20 Do not fail to build if a tracepoint is used but no tracepoints are defined if the code is a module. This should still never happen for the vmlinux itself. =20 Cc: Masami Hiramatsu Cc: Mathieu Desnoyers Cc: Masahiro Yamada Link: https://patch.msgid.link/20251208085336.6658743c@debian Fixes: e30f8e61e2518 ("tracing: Add a tracepoint verification check at = build time") Signed-off-by: Steven Rostedt (Google) diff --git a/scripts/tracepoint-update.c b/scripts/tracepoint-update.c index 7f7d90df14ce..90046aedc97b 100644 --- a/scripts/tracepoint-update.c +++ b/scripts/tracepoint-update.c @@ -210,6 +210,9 @@ static int process_tracepoints(bool mod, void *addr, co= nst char *fname) } =20 if (!tracepoint_data_sec) { + /* A module may reference only exported tracepoints */ + if (mod) + return 0; fprintf(stderr, "no __tracepoint_strings in file: %s\n", fname); return -1; }