From: David Marchand <david.marchand@redhat.com>
To: Artur Paszkiewicz <artur.paszkiewicz@intel.com>,
anatoly.burakov@intel.com
Cc: dev@dpdk.org
Subject: Re: [PATCH] mem: allow using ASan in multi-process mode
Date: Wed, 4 Oct 2023 16:51:25 +0200 [thread overview]
Message-ID: <CAJFAV8wKp6=-WjmHVpqnE_MnukDCOvVoet90ZfS--6LRCrS66g@mail.gmail.com> (raw)
In-Reply-To: <20231004142308.15395-1-artur.paszkiewicz@intel.com>
On Wed, Oct 4, 2023 at 4:23 PM Artur Paszkiewicz
<artur.paszkiewicz@intel.com> wrote:
>
> Multi-process applications operate on shared hugepage memory but each
> process has its own ASan shadow region which is not synchronized with
> the other processes. This causes issues when different processes try to
> use the same memory because they have their own view of which addresses
> are valid.
>
> Fix it by mapping the shadow regions for memseg lists as shared memory.
> The primary process is responsible for creating and removing the shared
> memory objects.
>
> Disable ASan instrumentation for triggering the page fault in
> alloc_seg() because if the segment is already allocated by another
> process and is marked as free in the shadow, accessing this address will
> cause an ASan error.
>
> Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Interesting patch.
I have a few questions:
- did you test with --in-memory mode? with --no-huge?
- I did not look at the patch, but I wonder if there is a risk some
"local" ASan region (for the process heap, for example) can overlap
with some "shared" ASan region (for shared DPDK hugepages).
- with this work, would unit tests (that were marked failing with
ASan) be ok now? See REGISTER_FAST_TEST macro in app/test.
Thanks for working on this topic.
--
David Marchand
next prev parent reply other threads:[~2023-10-04 14:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-04 14:23 Artur Paszkiewicz
2023-10-04 14:51 ` David Marchand [this message]
2023-10-09 11:05 ` Artur Paszkiewicz
2023-10-09 11:03 ` [PATCH v2] " Artur Paszkiewicz
2023-10-25 9:27 ` [PATCH v3] " Artur Paszkiewicz
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='CAJFAV8wKp6=-WjmHVpqnE_MnukDCOvVoet90ZfS--6LRCrS66g@mail.gmail.com' \
--to=david.marchand@redhat.com \
--cc=anatoly.burakov@intel.com \
--cc=artur.paszkiewicz@intel.com \
--cc=dev@dpdk.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;
as well as URLs for NNTP newsgroup(s).