From: Daniel Pharos <danielpharos@hotmail.com>
To: Yongseok Koh <yskoh@mellanox.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>, Dekel Peled <dekelp@mellanox.com>,
"Olga Shern" <olgas@mellanox.com>
Subject: Re: [dpdk-dev] MLX5: Array written to out-of-bounds when freeing memory
Date: Sat, 19 Jan 2019 12:16:32 +0000 [thread overview]
Message-ID: <AM0PR0402MB3826C23350AB582D435EFB4FD39D0@AM0PR0402MB3826.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <EA965E8D-8EDF-4113-BECE-5347C761CC8B@mellanox.com>
Hi Yongseok,
Thanks for the quick response! If there is any information you need that I may be able to provide, please just ask.
Kind regards,
DanielPharos
-----Original Message-----
From: Yongseok Koh <yskoh@mellanox.com>
Sent: 19 January 2019 08:15
To: Daniel Pharos <danielpharos@hotmail.com>
Cc: dev@dpdk.org; Dekel Peled <dekelp@mellanox.com>; Olga Shern <olgas@mellanox.com>
Subject: Re: [dpdk-dev] MLX5: Array written to out-of-bounds when freeing memory
Appreciate your report.
We are aware of the issue and Dekel is investigating it.
As I wrote the code, I'm also looking at the issue.
Will keep you posted.
Thanks,
Yongseok
> On Jan 18, 2019, at 9:36 AM, Daniel Pharos <danielpharos@hotmail.com> wrote:
>
> Hi,
>
> Recently I had the privilege of some play-time on a IBM Power 9 machine with a Mellanox MLX5-card in it. However, I encountered a seg fault problem using DPDK and DPDK-pktgen. It's the exact same one as somebody else encountered (also on a Power 9) here:
> https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugzilla.redhat.com%2Fshow_bug.cgi%3Fid%3D1634159%23c10&data=02%7C01%7Cyskoh%40mellanox.com%7Ce3e3546283b64a84e3b608d67d9acf8f%7Ca652971c7d2e4d9ba6a4d149256f461b%7C0%7C0%7C636834501198813346&sdata=722uRuNvcISF69NTrqwFldzIPC%2FP8Wz3CDKPutStWP8%3D&reserved=0
> It looks like it's writing out-of-bounds on the "free"-array in DPDK.
>
> Reverting the patch that added the bulk-free ( https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmails.dpdk.org%2Farchives%2Fdev%2F2017-June%2F069154.html&data=02%7C01%7Cyskoh%40mellanox.com%7Ce3e3546283b64a84e3b608d67d9acf8f%7Ca652971c7d2e4d9ba6a4d149256f461b%7C0%7C0%7C636834501198813346&sdata=73up%2FKm9SZHBTdu64f5guSojTGNTFRkY7ePrBal7Bvo%3D&reserved=0 ) indeed makes DPDK and pktgen function correctly. A better workaround I found is to change drivers/net/mlx5/mlx5_rxtx.h, line 580 to:
> if (likely((m->pool == pool) && (blk_n != elts_n))) {
>
> I'm not familiar enough with the code to understand why the array is being written to out-of-bounds, and why it's only happening on a Power 9 machine. Unfortunately, my play-time is now over, but I thought I'd report this issue anyway, so hopefully it can be investigated and fixed properly.
>
>
> Kind regards,
> DanielPharos
prev parent reply other threads:[~2019-01-19 12:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-18 17:36 Daniel Pharos
2019-01-19 7:15 ` Yongseok Koh
2019-01-19 12:16 ` Daniel Pharos [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=AM0PR0402MB3826C23350AB582D435EFB4FD39D0@AM0PR0402MB3826.eurprd04.prod.outlook.com \
--to=danielpharos@hotmail.com \
--cc=dekelp@mellanox.com \
--cc=dev@dpdk.org \
--cc=olgas@mellanox.com \
--cc=yskoh@mellanox.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).