From: David Marchand <david.marchand@redhat.com>
To: fengchengwen <fengchengwen@huawei.com>, Jerin Jacob <jerinj@marvell.com>
Cc: Bruce Richardson <bruce.richardson@intel.com>,
Andre Muezerie <andremue@linux.microsoft.com>,
Kevin Laatz <kevin.laatz@intel.com>,
"dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [EXTERNAL] Re: [PATCH 1/2] lib/dmadev: eliminate undefined behavior
Date: Fri, 24 Jan 2025 12:13:19 +0100 [thread overview]
Message-ID: <CAJFAV8z6pQAddX+ajSxwZDMGDXdQu28c06MPwN1-EYA_QiE34Q@mail.gmail.com> (raw)
In-Reply-To: <b49d2c83-3a4b-4dcb-9da3-abcc8f0cad1b@huawei.com>
On Tue, Dec 10, 2024 at 1:58 AM fengchengwen <fengchengwen@huawei.com> wrote:
> > + @Chengwen Feng
> >
> > This kind of patten is not used other places like ethdev traces, Why we need this kind of pattern in dmadev?
> > Looks like, it can be fixed by caller of this function by initializing struct rte_dma_info. So may not need a fixup patch to begin with
>
> It's strange that no other library doesn't have this problem.
>
> When I first add tracepoints support for dmadev, there is no such macro (just like other library),
> but the CI report ASAN error.
>
> The rootcause is that register:
> RTE_TRACE_POINT_REGISTER(rte_dma_trace_info_get,
> lib.dmadev.info_get)
> it will invoke :
> __rte_trace_point_register(&__rte_dma_trace_info_get, __rte_dma_trace_info_get_lib.dmadev.info_get,
> (void (*)(void)rte_dma_trace_info_get) {
> rte_dma_trace_info_get();
> }
>
> But rte_dma_trace_info_get() it was defined with parameters: int16_t dev_id, struct rte_dma_info *dev_info
> If we force invoke rte_dma_trace_info_get() without pass any parameter, it may lead to ASAN problem because
> the parameter's corresponding register was not set (and it's value undefine).
I remember of an issue with tracepoint and *UB*SAN, but I fail to see
how ASAN is affected (plus I see that the CI runs the tracepoint
autotests with ASAN).
Can you clarify?
In any case, this looks like something that should be handled at the
tracepoint framework level, and not silenced/wrapped around in the
dmadev library.
--
David Marchand
next prev parent reply other threads:[~2025-01-24 11:13 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-06 19:27 [PATCH 0/2] enable dmadev lib to be compiled with MSVC Andre Muezerie
2024-12-06 19:27 ` [PATCH 1/2] lib/dmadev: eliminate undefined behavior Andre Muezerie
2024-12-09 12:58 ` Bruce Richardson
2024-12-09 23:21 ` [EXTERNAL] " Jerin Jacob
2024-12-10 0:58 ` fengchengwen
2025-01-24 11:13 ` David Marchand [this message]
2024-12-06 19:27 ` [PATCH 2/2] lib/dmadev: enable dmadev lib to be compiled with MSVC Andre Muezerie
2024-12-09 1:53 ` [PATCH 0/2] " fengchengwen
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=CAJFAV8z6pQAddX+ajSxwZDMGDXdQu28c06MPwN1-EYA_QiE34Q@mail.gmail.com \
--to=david.marchand@redhat.com \
--cc=andremue@linux.microsoft.com \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=fengchengwen@huawei.com \
--cc=jerinj@marvell.com \
--cc=kevin.laatz@intel.com \
/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;
as well as URLs for NNTP newsgroup(s).