[dpdk-dev] [RFC] mem: poison memory when freed

Burakov, Anatoly anatoly.burakov at intel.com
Thu Jul 19 11:03:55 CEST 2018


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 <stephen at networkplumber.org>
> ---

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


More information about the dev mailing list