[EXTERNAL] Re: [PATCH v2 3/3] trace: fix undefined behavior in register
Sunil Kumar Kori
skori at marvell.com
Fri Feb 7 12:39:19 CET 2025
Hi David,
I will look into this at earliest and provide feedback.
Thanks
From: David Marchand <david.marchand at redhat.com>
Sent: Friday, February 7, 2025 2:20 PM
To: Jerin Jacob <jerinj at marvell.com>; Sunil Kumar Kori <skori at marvell.com>
Cc: dev at dpdk.org; Chengwen Feng <fengchengwen at huawei.com>; Kevin Laatz <kevin.laatz at intel.com>; Bruce Richardson <bruce.richardson at intel.com>; Tyler Retzlaff <roretzla at linux.microsoft.com>; Andre Muezerie <andremue at linux.microsoft.com>; Thomas Monjalon <thomas at monjalon.net>; Stephen Hemminger <stephen at networkplumber.org>
Subject: [EXTERNAL] Re: [PATCH v2 3/3] trace: fix undefined behavior in register
Hello Jerin, Sunil, On Thu, Jan 30, 2025 at 3: 59 PM David Marchand <david. marchand@ redhat. com> wrote: > > Registering a tracepoint handler was resulting so far in undefined > behavior at runtime. > > The RTE_TRACE_POINT_REGISTER()
Hello Jerin, Sunil,
On Thu, Jan 30, 2025 at 3:59 PM David Marchand
<david.marchand at redhat.com<mailto:david.marchand at redhat.com>> wrote:
>
> Registering a tracepoint handler was resulting so far in undefined
> behavior at runtime.
>
> The RTE_TRACE_POINT_REGISTER() macro was casting the tracepoint handler
> (which expects arguments) to a void (*)(void).
> At runtime, calling this handler while registering resulted in
> reading the current stack with no relation to this function prototype.
>
> Instead, declare an additional inline _register() handler for each
> tracepoint and make sure that the emitting macros in
> rte_trace_point_register.h only work on arguments name and type.
>
> The original tracepoint handler prototype is adjusted by adding a
> __rte_unused for each argument (since emitting macros do nothing
> with them).
> This last part introduces an implementation limit of 15 arguments.
>
> With this change in place, the workaround in dmadev tracepoints can be
> removed.
>
> Signed-off-by: David Marchand <david.marchand at redhat.com<mailto:david.marchand at redhat.com>>
Can I have your opinion and review on this patch?
Thanks.
--
David Marchand
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mails.dpdk.org/archives/dev/attachments/20250207/fb7d6c2d/attachment.htm>
More information about the dev
mailing list