From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 22292A0542; Mon, 29 Aug 2022 14:43:48 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BDABA4069D; Mon, 29 Aug 2022 14:43:47 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id ABCAE4003C for ; Mon, 29 Aug 2022 14:43:46 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1661777026; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lyx0v8wSmWjhFpLg+MFnnQXxHnV4BT01sttglFzsMgI=; b=E5rakn5BSx69enROiMOmBvCKOFQpGGIsM79vCs93DglDS77/PR4moiH0co2pmb6kin7zxr rab81s/Vs+aVFtRLHh3g1WP8Mqs6tvWu1CXvIpDOp+alFqNuumgxGACE5qkeaoVVi1nWzX rwNKZUkxAlrsjNlIZbbCiwH9sX5hXeY= Received: from mail-lf1-f71.google.com (mail-lf1-f71.google.com [209.85.167.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-634-Th3mKX75PUaJxyVEBWaQ9w-1; Mon, 29 Aug 2022 08:43:43 -0400 X-MC-Unique: Th3mKX75PUaJxyVEBWaQ9w-1 Received: by mail-lf1-f71.google.com with SMTP id o23-20020ac25e37000000b0049475eb7a25so78543lfg.20 for ; Mon, 29 Aug 2022 05:43:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc; bh=lyx0v8wSmWjhFpLg+MFnnQXxHnV4BT01sttglFzsMgI=; b=AW2ShttbGLOGOD7l82ElwHGfL03CiZOrVO51zeh24fuKCwcTVGfSYj0mG8QtJbq++O VPTQm0TD5fDm1vGDBzZZvz0K6NIu4ymdDtPn5Rm0dyeNeuLoFhJL0RDUyFwfu75fqdzW ffgpWekELwIR2tvH3dftT6YY3ZBXhyHHjyB94L6ijQDtltY3WGVRzObFNCR2gJ8wxiK9 CtNQ0qJZyNU0r0zm6FJ3NCLypw8tFl+t88prBjQhiDw89HYptKxzGQNCjLHTbjKB/TRP SeSUXvdAcTY8zI6b/mU6ujGhD7oNgKjkAdiAS0xhytpmFZLO6gdltxyg5D3Mar4QyTHa cizA== X-Gm-Message-State: ACgBeo3JHtIPzjdKkZ8vS8FWsnvcREBpUUhgkZzLqlBdVYm3pr9715a9 Nlfe5E7iN5V6zj5XNeOSFUHEaUSuK2OhThqIcL3GSkd67vHqkWhrrhnhPmS3If8Mwju8WBw8/RE uMvZR6EiNM4kJaF+KJnM= X-Received: by 2002:a2e:9d0a:0:b0:261:85c6:efa8 with SMTP id t10-20020a2e9d0a000000b0026185c6efa8mr6051218lji.477.1661777022395; Mon, 29 Aug 2022 05:43:42 -0700 (PDT) X-Google-Smtp-Source: AA6agR5Er8FfilAjKsxIy195VitnYYMrLzC288u3YQxg2YwNNZCGc5WMj4S2dYjANSaYZ5V8d4MWblzFtHGZ7qDkuds= X-Received: by 2002:a2e:9d0a:0:b0:261:85c6:efa8 with SMTP id t10-20020a2e9d0a000000b0026185c6efa8mr6051211lji.477.1661777022134; Mon, 29 Aug 2022 05:43:42 -0700 (PDT) MIME-Version: 1.0 References: <20220827125750.291dd7d1@sovereign> <20220827175654.7a167eaf@sovereign> <98CBD80474FA8B44BF855DF32C47DC35D872CC@smartserver.smartshare.dk> In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35D872CC@smartserver.smartshare.dk> From: David Marchand Date: Mon, 29 Aug 2022 14:43:30 +0200 Message-ID: Subject: Re: [PATCH] eal: zero out new added memory To: =?UTF-8?Q?Morten_Br=C3=B8rup?= Cc: lic121 , Dmitry Kozlyuk , dev X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Mon, Aug 29, 2022 at 2:37 PM Morten Br=C3=B8rup 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 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 > > > > > > > > > > > > > > > > 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 me= mory 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. --=20 David Marchand