From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) (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 A1C6C47A0BE for ; Thu, 4 Jun 2026 12:47:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=216.40.44.15 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780577281; cv=none; b=dDB7HVbe6SsYkoAVsDJWKmgOZRLjXMbEP9b1pr7HlU87ybcrk1fPonqilgBlELHksscxMFpU4teSAZ++zXEuMrGZKuk9uQGix1TuiWuVyYs8Z2XUfsmrxICUv4AujTg3qlN3FM80RSxf0/eKvbJ0/dFiSRplhqkHY5nkkytTzdw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780577281; c=relaxed/simple; bh=0cK/+8RggfZ9hDn0+TjrfPemmKygnDApcWlmwrzQmic=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type; b=ustLcb54sGfekKFHdVTQD+T5hPOKLfNPaD4ye4yvsmilA+vr651hd/3nky3HGt4lixzei1M8++7CXQU7MkYTJxo22t91TwpvsdbWHSmnXYDo1yrNmaoCwC9QYyVYlHqe3zMJ581af/sqO0hG7VaNWMI8S7OqTZpzg7ae4wHD7t0= 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.15 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 omf19.hostedemail.com (lb01a-stub [10.200.18.249]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 785081C1FAB; Thu, 4 Jun 2026 12:47:58 +0000 (UTC) Received: from [HIDDEN] (Authenticated sender: rostedt@goodmis.org) by omf19.hostedemail.com (Postfix) with ESMTPA id BA92A20026; Thu, 4 Jun 2026 12:47:56 +0000 (UTC) Date: Thu, 4 Jun 2026 08:47:55 -0400 From: Steven Rostedt To: Linus Torvalds Cc: LKML , Masami Hiramatsu , Mathieu Desnoyers , Peter Zijlstra , Eva Kurchatova Subject: [GIT PULL] tracing: Fixes for 7.1 Message-ID: <20260604084755.4d94063e@fedora> X-Mailer: Claws Mail 4.4.0 (GTK 3.24.52; 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-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Server: rspamout05 X-Rspamd-Queue-Id: BA92A20026 X-Stat-Signature: cdwq7944umw57y47eiapezbdi18nuxgi X-Session-Marker: 726F737465647440676F6F646D69732E6F7267 X-Session-ID: U2FsdGVkX1/78LtcPCFdtedqeRzxgbgCXYaazp6oPhQ= X-HE-Tag: 1780577276-933333 X-HE-Meta: U2FsdGVkX18vfT/E4/V+a2ZwB9WaOANinM6m6H+zeb2rc+SYLtqVPTLf1uuGCgrYPzyoSnLdyje0V3R+4/qD6yg0jC0G/rnIEfFj4tPk91L1P+zD0rY0Udr9kHEHlUabTFPNB74RuVJpMeZKsHizPaqWioGLvSyH6rEfaT7lyShRLCpyI3miO297g/eoAH6MJyBCCi9dW+z7P9915+sBrVBZ289dExPLMkd5e9CKyfWsL9w6hxwUt39pub62YCKDxKt5OCj5ce1nSQnPZJTJOdB5S0b90hZcUk6UhhnKiMrxND2SuhxDXP72nQ84mFPXUXE413cUKESgy1oUeR1hMWR8OG0t+DMmorHsJ8jxQjZDXuQcDyZ+M3XynWHNt3Be33cbwXjJZ5fXQ3AcxQZMMQ3VmNPIMcXPVeTypQIZpJAjvjFRrrUXoC1Pap3jFemaDKua4XD5q6BWh2Mrkf8FlHQDEZrx4cIn8WJmG3UtSSe5MUNGVYsiNHvmGOT1K0/kIAcV6qj3yX/mkPW5KrwwK1iRWoJLBQzU2gB05dPA6GE= Linus, tracing fixes for 7.1: - Fix CFI violation in probestub function The probestub is a function to allow tprobes to hook to a tracepoint to gain access to its parameters. The function itself is only referenced by the tracepoint structure which lives in the __tracepoint section. objtool explicitly ignores that section and when processing functions in the kernel, if it detects one that has no references it will seal it to have its ENDBR stripped on boot up. This means the probstub function will have its ENDBR stripped and if a tprobe is attached to it with IBT enabled, it will go *boom*. Please pull the latest trace-v7.1-rc6 tree, which can be found at: git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git trace-v7.1-rc6 Tag SHA1: f9504915379aa495293ca8adc857a1ee27407952 Head SHA1: 0652a3daa78723f955b1ebeb621665ce72bec53e Eva Kurchatova (1): tracing: Fix CFI violation in probestub being called by tprobes ---- include/linux/tracepoint.h | 8 ++++++++ 1 file changed, 8 insertions(+) --------------------------- commit 0652a3daa78723f955b1ebeb621665ce72bec53e Author: Eva Kurchatova Date: Wed Jun 3 18:31:42 2026 +0300 tracing: Fix CFI violation in probestub being called by tprobes The probestub is a function to allow tprobes to hook to a tracepoint to gain access to its parameters. The function itself is only referenced by the tracepoint structure which lives in the __tracepoint section. objtool explicitly ignores that section and when processing functions in the kernel, if it detects one that has no references it will seal it to have its ENDBR stripped on boot up. This means when a tprobe is attached to the sched_wakeup tracepoint, when it is triggered it will call __probestub_sched_wakeup and due to the missing ENDBR on a CFI-enabled machine it will take a #CP exception. Fix this by adding CFI_NOSEAL annotation to probestub declaration. Cc: stable@vger.kernel.org Acked-by: Masami Hiramatsu (Google) Link: https://patch.msgid.link/20260603153147.573589-1-eva.kurchatova@virtuozzo.com Fixes: d5173f753750 ("objtool: Exclude __tracepoints data from ENDBR checks") Signed-off-by: Eva Kurchatova [ Updated change log ] Signed-off-by: Steven Rostedt diff --git a/include/linux/tracepoint.h b/include/linux/tracepoint.h index 763eea4d80d8..2d2b9f8cdda4 100644 --- a/include/linux/tracepoint.h +++ b/include/linux/tracepoint.h @@ -20,6 +20,7 @@ #include #include #include +#include struct module; struct tracepoint; @@ -389,6 +390,13 @@ static inline struct tracepoint *tracepoint_ptr_deref(tracepoint_ptr_t *p) void __probestub_##_name(void *__data, proto) \ { \ } \ + /* \ + * Annotate the probestub 'CFI_NOSEAL' to stop objtool from \ + * requesting the kernel remove the ENDBR, because the only \ + * references to the function are in the __tracepoint section, \ + * that objtool doesn't scan. \ + */ \ + CFI_NOSEAL(__probestub_##_name); \ DEFINE_STATIC_CALL(tp_func_##_name, __traceiter_##_name); \ DEFINE_RUST_DO_TRACE(_name, TP_PROTO(proto), TP_ARGS(args))