From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <pablo.de.lara.guarch@intel.com>
Received: from mga02.intel.com (mga02.intel.com [134.134.136.20])
 by dpdk.org (Postfix) with ESMTP id 7415A593E
 for <dev@dpdk.org>; Thu, 16 Oct 2014 21:24:53 +0200 (CEST)
Received: from orsmga001.jf.intel.com ([10.7.209.18])
 by orsmga101.jf.intel.com with ESMTP; 16 Oct 2014 12:32:46 -0700
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.04,734,1406617200"; d="scan'208";a="590389338"
Received: from irsmsx102.ger.corp.intel.com ([163.33.3.155])
 by orsmga001.jf.intel.com with ESMTP; 16 Oct 2014 12:32:43 -0700
Received: from irsmsx155.ger.corp.intel.com (163.33.192.3) by
 IRSMSX102.ger.corp.intel.com (163.33.3.155) with Microsoft SMTP Server (TLS)
 id 14.3.195.1; Thu, 16 Oct 2014 20:32:43 +0100
Received: from irsmsx108.ger.corp.intel.com ([169.254.11.21]) by
 IRSMSX155.ger.corp.intel.com ([169.254.14.152]) with mapi id 14.03.0195.001;
 Thu, 16 Oct 2014 20:32:42 +0100
From: "De Lara Guarch, Pablo" <pablo.de.lara.guarch@intel.com>
To: "Carew, Alan" <alan.carew@intel.com>, "dev@dpdk.org" <dev@dpdk.org>
Thread-Topic: [dpdk-dev] [PATCH] librte_eal: FreeBSD contigmem prevent
 possible	buffer overrun during module unload.
Thread-Index: AQHP56kc5gF75UGlD02TaJX8+11G+pwzIHOQ
Date: Thu, 16 Oct 2014 19:32:42 +0000
Message-ID: <E115CCD9D858EF4F90C690B0DCB4D8972262CA4C@IRSMSX108.ger.corp.intel.com>
References: <1413289116-4825-1-git-send-email-alan.carew@intel.com>
In-Reply-To: <1413289116-4825-1-git-send-email-alan.carew@intel.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
x-originating-ip: [163.33.239.181]
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Subject: Re: [dpdk-dev] [PATCH] librte_eal: FreeBSD contigmem prevent
 possible	buffer overrun during module unload.
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: patches and discussions about DPDK <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Thu, 16 Oct 2014 19:24:53 -0000



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Alan Carew
> Sent: Tuesday, October 14, 2014 1:19 PM
> To: dev@dpdk.org
> Subject: [dpdk-dev] [PATCH] librte_eal: FreeBSD contigmem prevent
> possible buffer overrun during module unload.
>=20
> The maximum mount contiguous memory regions for FreeBSD is limited by
> RTE_CONTIGMEM_MAX_NUM_BUFS, a pointer to each region is stored in
> static void * contigmem_buffers[RTE_CONTIGMEM_MAX_NUM_BUFS]
>=20
> A user can specify a greater amount via hw.contigmem.num_buffers,
> while the allocation logic will prevent this allocation from occuring the=
 logic
> in contigmem_unload() will attempt to free hw.contigmem.num_buffers and
> an
> overrun occurs.
>=20
> This patch limits the freeing to a maximum of
> RTE_CONTIGMEM_MAX_NUM_BUFS.
>=20
> Signed-off-by: Alan Carew <alan.carew@intel.com>

Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>