From: Stephen Hemminger <stephen@networkplumber.org>
To: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Cc: anatoly.burakov@intel.com, dev@dpdk.org, david.marchand@redhat.com
Subject: Re: [PATCH v3] mem: allow using ASan in multi-process mode
Date: Thu, 3 Oct 2024 14:18:45 -0700 [thread overview]
Message-ID: <20241003141845.1f37f3c4@hermes.local> (raw)
In-Reply-To: <20231025092717.2069-1-artur.paszkiewicz@intel.com>
On Wed, 25 Oct 2023 11:27:17 +0200
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>
> ---
> v3:
> - Removed conditional compilation from eal_common_memory.c.
> - Improved comments.
> v2:
> - Added checks for config options disabling multi-process support.
> - Fixed missing unmap in legacy mode.
>
> lib/eal/common/eal_common_memory.c | 7 ++
> lib/eal/common/eal_private.h | 35 ++++++++++
> lib/eal/linux/eal_memalloc.c | 23 +++++--
> lib/eal/linux/eal_memory.c | 101 +++++++++++++++++++++++++++++
> lib/eal/linux/meson.build | 4 ++
> 5 files changed, 164 insertions(+), 6 deletions(-)
Makes sense, but patch has some fuzz against current main branch.
There is also another patch that address the ASAN touch issue.
https://patchwork.dpdk.org/project/dpdk/patch/20240723083419.12435-1-amichon@kalrayinc.com/
next prev parent reply other threads:[~2024-10-03 21:18 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-04 14:23 [PATCH] mem: allow using ASan in multi-process mode Artur Paszkiewicz
2023-10-04 14:51 ` David Marchand
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
2024-10-03 21:18 ` Stephen Hemminger [this message]
2024-10-17 10:19 ` Artur Paszkiewicz
2024-10-17 10:03 ` [PATCH v4] " Artur Paszkiewicz
2024-10-18 9:04 ` Artur Paszkiewicz
2024-10-24 7:30 ` 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=20241003141845.1f37f3c4@hermes.local \
--to=stephen@networkplumber.org \
--cc=anatoly.burakov@intel.com \
--cc=artur.paszkiewicz@intel.com \
--cc=david.marchand@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.