DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: "Morten Brørup" <mb@smartsharesystems.com>
Cc: lic121 <chengtcli@qq.com>,
	Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>, dev <dev@dpdk.org>
Subject: Re: [PATCH] eal: zero out new added memory
Date: Mon, 29 Aug 2022 14:43:30 +0200	[thread overview]
Message-ID: <CAJFAV8xR6c_o1C3BAqx95aky6Df9M0nyouwBwVCfznaKS12cDw@mail.gmail.com> (raw)
In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35D872CC@smartserver.smartshare.dk>

On Mon, Aug 29, 2022 at 2:37 PM Morten Brørup <mb@smartsharesystems.com> wrote:
>
> > From: David Marchand [mailto:david.marchand@redhat.com]
> > Sent: Monday, 29 August 2022 13.58
> >
> > On Mon, Aug 29, 2022 at 1:38 PM lic121 <chengtcli@qq.com> wrote:
> > >
> > > On Mon, Aug 29, 2022 at 01:18:36AM +0000, lic121 wrote:
> > > > On Sat, Aug 27, 2022 at 05:56:54PM +0300, Dmitry Kozlyuk wrote:
> > > > > 2022-08-27 13:31 (UTC+0000), lic121:
> > > > > > On Sat, Aug 27, 2022 at 12:57:50PM +0300, Dmitry Kozlyuk wrote:
> > > > > > > 2022-08-27 09:25 (UTC+0000), chengtcli@qq.com:
> > > > > > > > From: lic121 <lic121@chinatelecom.cn>
> > > > > > > >
> > > > > > > > When RTE_MALLOC_DEBUG not configured, rte_zmalloc_socket()
> > doens't
> > > > > > > > zero oute allocaed memory. Because memory are zeroed out
> > when free
> > > > > > > > in malloc_elem_free(). But seems the initial allocated
> > memory is
> > > > > > > > not zeroed out as expected.
> > > > > > > >
> > > > > > > > This patch zero out initial allocated memory in
> > > > > > > > malloc_heap_add_memory().
> > > > > > > >
>
> [...]
>
> > > > > > > Hi,
> > > > > > >
> > > > > > > The kernel ensures that the newly mapped memory is zeroed,
> > > > > > > and DPDK ensures that files in hugetlbfs are not re-mapped.
>
> David, are you suggesting that this invariant - guaranteeing that DPDK memory is zeroed - was violated by SELinux in the SELinux/container issue you were tracking?
>
> If so, the method to ensure the invariant is faulty for SELinux. Assuming DPDK supports SELinux, this bug should be fixed.

SELinux was preventing some file manipulations.
And I found the fix I had sent, which is already in 20.11, so it is
not the same issue.
aa48ddf4f0d2 ("mem: fix allocation in container with SELinux")

On the other hand, it is the kind of side effect to keep in mind when
debugging those "my memory is not zero'd" issues.


-- 
David Marchand


  reply	other threads:[~2022-08-29 12:43 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-27  9:25 chengtcli
2022-08-27  9:57 ` Dmitry Kozlyuk
2022-08-27 13:31   ` lic121
2022-08-27 14:56     ` Dmitry Kozlyuk
2022-08-29  1:18       ` lic121
2022-08-29 11:37         ` lic121
2022-08-29 11:57           ` David Marchand
2022-08-29 12:37             ` Morten Brørup
2022-08-29 12:43               ` David Marchand [this message]
2022-08-29 12:49               ` Dmitry Kozlyuk
2022-08-30  1:11                 ` lic121
2022-08-30  9:49                   ` lic121
2022-08-30 10:59                     ` Dmitry Kozlyuk
2022-08-30 12:47                       ` lic121
2022-08-30 12:53                       ` lic121
2022-09-03 13:53                         ` lic121

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=CAJFAV8xR6c_o1C3BAqx95aky6Df9M0nyouwBwVCfznaKS12cDw@mail.gmail.com \
    --to=david.marchand@redhat.com \
    --cc=chengtcli@qq.com \
    --cc=dev@dpdk.org \
    --cc=dmitry.kozliuk@gmail.com \
    --cc=mb@smartsharesystems.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).