From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-f51.google.com (mail-wg0-f51.google.com [74.125.82.51]) by dpdk.org (Postfix) with ESMTP id D1F797E89 for ; Mon, 20 Oct 2014 23:40:04 +0200 (CEST) Received: by mail-wg0-f51.google.com with SMTP id b13so6461755wgh.22 for ; Mon, 20 Oct 2014 14:48:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=MbojOZlHwJJhDOtK4ggKEgMYaZOcGWCCySefjLvpWdA=; b=BxTv5hkqZWATdn5XwCJb3e6+04luJKC5yHeply+7Tsg+po1XPmwyToKih0in2KofYp ulHKjOANr61Z5GncRFq985y5CGJHJnWbTqdW/3a4hX6f05aSaobjF8H8x/ivYDnmugsZ APgGhnsdxIObKzHfCHSUlsStRLon6BMYn4/7M9w7Neflb6WAS5u6e7x6hbV1Fv2sWlLl dqz2fnft3rJm5EuzLD6gF7Q+cOw0ZRE4R69XTapd1i8FBXw8Srji9ZQQc5caEjNRyxFu M1lxZHY+k2SZozL7i15m9VVhVT7sc8igiwj644fRucBzQh0JAZ6lIzclcuvEEUGhSyOF luqw== X-Gm-Message-State: ALoCoQldBIT/IStApBikHOiELbZ8iJ0AnWqiKHn6v1/mQG0EwUca1FlY23hIkvYPVqjg3d38QyhF X-Received: by 10.180.84.194 with SMTP id b2mr24003882wiz.57.1413841697901; Mon, 20 Oct 2014 14:48:17 -0700 (PDT) Received: from xps13.localnet (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by mx.google.com with ESMTPSA id l10sm10935896wif.20.2014.10.20.14.48.16 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 20 Oct 2014 14:48:17 -0700 (PDT) From: Thomas Monjalon To: "Carew, Alan" Date: Mon, 20 Oct 2014 23:48:01 +0200 Message-ID: <3008758.TcMj3bSWGZ@xps13> Organization: 6WIND User-Agent: KMail/4.14.1 (Linux/3.16.4-1-ARCH; KDE/4.14.1; x86_64; ; ) In-Reply-To: References: <1413289116-4825-1-git-send-email-alan.carew@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Oct 2014 21:40:04 -0000 > > 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] > > > > 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. > > > > This patch limits the freeing to a maximum of > > RTE_CONTIGMEM_MAX_NUM_BUFS. > > > > Signed-off-by: Alan Carew > > Acked-by: Pablo de Lara Applied Thanks -- Thomas