From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 2737D3D333E for ; Fri, 5 Jun 2026 15:58:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780675093; cv=none; b=lz4E4oe/BkWA6Lgfzz6fWK3tgvlzq0Fikzzx/gchlAqhr266Bz9dwNkEBtyoYZp5vYR2CEu4VaoIyeEYqNhNJZlRqedOikBJj5ZvSwbiSMzRjepZTAbSHqO90fG5c2ypSxr9/3kSXHSRodybG0mc92gZEIM6n9q7PgdjmkrXMqU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780675093; c=relaxed/simple; bh=UMx3UkH6b4TUHX4MOFgUIg5Twpl93oQOmiTVjBleuSw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=CLF0rT8wtd1QmlPRxr2cmsysK0HFexwgohUwAmY8R6+lSTFvva+iHOj+1Acvw2QrCsqJfHbDb1RdkPfaXcTtq0llmJd3FKqNEEuLlqfQHMnZqJuH65H1zCIgqwgkx+M6HCVy5gptUVxrTdLKUTgv8lOq44JMnm/ZnU14IBijDoE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Ea4RPOnB; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Ea4RPOnB" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 223D91F00893; Fri, 5 Jun 2026 15:58:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1780675088; bh=c7Fajtjxg/htm2u2RTu9338taQFCgnAmmBCLmg0cX5I=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=Ea4RPOnBC/sSMjt523bxDYopm0pfdqmAhpaBp61VIN80WtEjeYoakio5tkGgGeaEi XFJud38QgXIIG3gnZncewoqAscEQEEgKQc5V9cEmGP1UqRrBNbNs5xVao88LuORb6h xPFTaG2h1Q91+lb+uzB2DzFvKR+zMKzZSa/61Gh3hQjW6lp5OcBTDXHrn6jt6Az4xF n2As1cT2hMr6ESWUvP74twwjV4KB9yD5wuF83unVoOFz9hVL61SgcQMQ+yMsI+RtwL bYbuJe9fBXnk8EiAhw0TSA6UkYlUC114gYv4ZHPd294wF72fUSPuiBZZb4/C48xQ3V MZOU5ltKpvOrQ== Date: Fri, 5 Jun 2026 08:58:04 -0700 From: Nathan Chancellor To: Steven Rostedt , Linus Torvalds Cc: LKML , Masami Hiramatsu , Mathieu Desnoyers , Peter Zijlstra , Eva Kurchatova Subject: Re: [GIT PULL] tracing: Fixes for 7.1 Message-ID: <20260605155804.GA3472545@ax162> References: <20260604084755.4d94063e@fedora> 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-Disposition: inline In-Reply-To: <20260604084755.4d94063e@fedora> On Thu, Jun 04, 2026 at 08:47:55AM -0400, Steven Rostedt wrote: > 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)) > This needs a build fix, as ARCH=arm allmodconfig is now broken with Clang. https://lore.kernel.org/20260604-tracing-fix-cfi-h-build-error-v1-1-b27015390901@kernel.org/ -- Cheers, Nathan