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 E1CB4A0542; Mon, 29 Aug 2022 14:49:28 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D3D0B410FA; Mon, 29 Aug 2022 14:49:28 +0200 (CEST) Received: from mail-lf1-f53.google.com (mail-lf1-f53.google.com [209.85.167.53]) by mails.dpdk.org (Postfix) with ESMTP id 9DB504003C for ; Mon, 29 Aug 2022 14:49:27 +0200 (CEST) Received: by mail-lf1-f53.google.com with SMTP id z25so11000404lfr.2 for ; Mon, 29 Aug 2022 05:49:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc; bh=etvLFFkVa9qXcs0tF6cDKnD/pvvBljTdl2oR977P+eE=; b=I5wp4mQM1CylmGPR/IIumvXO8U6MsOlS04HsSVx9HrnWSqIcLM//IlkB0n3Y5Ia+hI 6I+lvmVB5AwzEumEFbhO2TJrL7OPszMJfOqBeKfX/ZWhuF/0QYuT77Y9Vj1yWk6NTg4i 4CvFN2JVwMF6ZP9MsDK8k7vv3LHHt1dLAs1ZsFoRV7zojuyiDJtYJcUIIfmalLjfGXR9 nUt4sbusaT0GM4HAQ8VLjziwxWQMekoQYwFD8Wm2moT7C8Jyv4OHWAs1B1YcKc2k972+ M0FE9TePmuFjJksnHN+GFqqWGkkc3K3u0WJPWLGFGciRXr7fper6LMUEdGfQOeg7jPhs nrpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc; bh=etvLFFkVa9qXcs0tF6cDKnD/pvvBljTdl2oR977P+eE=; b=jo/u33DemchBYB6g/u905wM7elHpPnHpWh7/2ZJxMEK/IjiJ3RCpQxFeWu+aW+5KLa NknKuY/RkB+Y9Zg4b7JBhNyTt0XgEK6MbflpXuPgb/eZaBdtBR8HChHcJg58VEJ46Vhh xCroM2fgMCWfKHPvUobrWogExKTKaIAsONGN/WFFmlI86rmjYErT8O+Mt6No3ANBKEKs 428PaHXGvgTP6c/JRqp8G7EJ1Zt2lasL7KM3Y9j42cR8CIe43GpgqLUy6A3REROGqwdW CPiy7vO4NNivgzKr+mAbu5CksE4pWXgusYKBF0QaVB+urhyq8ILr5Epo2Bd9xDdG4nGh GMKA== X-Gm-Message-State: ACgBeo1rJTa3+aaivnSUM2+67Y5DxJiWu1/ltcImrdggJP87REpwXo6H /4Z+V3IWFrPhcBb/TcisHZ8= X-Google-Smtp-Source: AA6agR645iNC5wZbAFCIZFb6IbhwuoKX/bQbaHWG2+gLJxB9DaDABRd/Skya22VzVU0Vull8RvE4EA== X-Received: by 2002:a05:6512:13a4:b0:477:a28a:2280 with SMTP id p36-20020a05651213a400b00477a28a2280mr5845801lfa.689.1661777367043; Mon, 29 Aug 2022 05:49:27 -0700 (PDT) Received: from sovereign (broadband-37-110-65-23.ip.moscow.rt.ru. [37.110.65.23]) by smtp.gmail.com with ESMTPSA id b13-20020a05651c032d00b002637c04b472sm705324ljp.83.2022.08.29.05.49.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Aug 2022 05:49:26 -0700 (PDT) Date: Mon, 29 Aug 2022 15:49:25 +0300 From: Dmitry Kozlyuk To: Morten =?UTF-8?B?QnLDuHJ1cA==?= Cc: "David Marchand" , "lic121" , "dev" Subject: Re: [PATCH] eal: zero out new added memory Message-ID: <20220829154925.6575540a@sovereign> In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35D872CC@smartserver.smartshare.dk> References: <20220827125750.291dd7d1@sovereign> <20220827175654.7a167eaf@sovereign> <98CBD80474FA8B44BF855DF32C47DC35D872CC@smartserver.smartshare.dk> X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 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 2022-08-29 14:37 (UTC+0200), Morten Br=C3=B8rup: > > From: David Marchand [mailto:david.marchand@redhat.com] > > Sent: Monday, 29 August 2022 13.58 > > > > > > > > On Sat, Aug 27, 2022 at 12:57:50PM +0300, Dmitry Kozlyuk wrote:= =20 > > > > > > > The kernel ensures that the newly mapped memory is zeroed, > > > > > > > and DPDK ensures that files in hugetlbfs are not re-mapped. = =20 >=20 > 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? >=20 > If so, the method to ensure the invariant is faulty for SELinux. Assuming= DPDK supports SELinux, this bug should be fixed. +1, I'd like to know more about that case. EAL checks the unlink() result, so if it fails, the allocation should fail and the invariant should not be broken. Code from 20.11.5: if (rte_eal_process_type() =3D=3D RTE_PROC_PRIMARY && unlink(path) =3D=3D -1 && errno !=3D ENOENT) { RTE_LOG(DEBUG, EAL, "%s(): could not remove '%s': %s\n", __func__, path, strerror(errno)); return -1; } Can SELinux restriction result in errno =3D=3D ENOENT? I'd expect EPERM/EACCESS.