public inbox for linux-trace-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Vladimir Riabchun <ferr.lambarginio@gmail.com>
Cc: mhiramat@kernel.org, mark.rutland@arm.com,
	linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org,
	Josh Poimboeuf <jpoimboe@redhat.com>
Subject: Re: [PATCH] ftrace/samples: Fix function size computation
Date: Tue, 26 Aug 2025 09:48:30 -0400	[thread overview]
Message-ID: <20250826094830.29df8e62@gandalf.local.home> (raw)
In-Reply-To: <aK2I2IGKRwmkQuIR@vova-pc>

On Tue, 26 Aug 2025 12:13:44 +0200
Vladimir Riabchun <ferr.lambarginio@gmail.com> wrote:

> In my_tramp1 function ASM_RET instruction was placed below
> .size directive, leading to a wrong function size.

Looking at the Fixes commit, it appears that the .size directive was placed
above the ret instruction ;-)

-- Steve


> 
> Fixes: 9d907f1ae80b ("samples/ftrace: Fix asm function ELF annotations")
> Signed-off-by: Vladimir Riabchun <ferr.lambarginio@gmail.com>
> ---
>  samples/ftrace/ftrace-direct-modify.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/samples/ftrace/ftrace-direct-modify.c b/samples/ftrace/ftrace-direct-modify.c
> index cfea7a38befb..da3a9f2091f5 100644
> --- a/samples/ftrace/ftrace-direct-modify.c
> +++ b/samples/ftrace/ftrace-direct-modify.c
> @@ -75,8 +75,8 @@ asm (
>  	CALL_DEPTH_ACCOUNT
>  "	call my_direct_func1\n"
>  "	leave\n"
> -"	.size		my_tramp1, .-my_tramp1\n"
>  	ASM_RET
> +"	.size		my_tramp1, .-my_tramp1\n"
>  
>  "	.type		my_tramp2, @function\n"
>  "	.globl		my_tramp2\n"


      reply	other threads:[~2025-08-26 13:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-26 10:13 [PATCH] ftrace/samples: Fix function size computation Vladimir Riabchun
2025-08-26 13:48 ` Steven Rostedt [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250826094830.29df8e62@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=ferr.lambarginio@gmail.com \
    --cc=jpoimboe@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mhiramat@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox