From: "Burakov, Anatoly" Subject: Re: [RFC] mem: poison memory when freed Date: Thu, 19 Jul 2018 10:03:55 +0100 Message-ID: References: <20180718214434.608-1-stephen@networkplumber.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org To: Stephen Hemminger , sergio.gonzalez.monroy@intel.com Return-path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id C29632F7D for ; Thu, 19 Jul 2018 11:03:58 +0200 (CEST) In-Reply-To: <20180718214434.608-1-stephen@networkplumber.org> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 18-Jul-18 10:44 PM, Stephen Hemminger wrote: > DPDK malloc library allows broken programs to work because > the semantics of zmalloc and malloc are the same. > > This patch changes to a more secure model which will catch > (and crash) programs that reuse memory already freed. > > This supersedes earlier changes to zero memory on free and > avoid zeroing memory in zmalloc. > > Signed-off-by: Stephen Hemminger > --- I would be a bit wary of introducing this change without prior announcement. Currently, rte_malloc'd memory is semantically identical to zmalloc'd memory, which means there may be code that relies on this behavior, even though it's technically incorrect. How about a deprecation notice, and do this in 18.11? -- Thanks, Anatoly