From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bruce Richardson Subject: Re: [PATCH v2 1/2] mem: check if allocation size is too big Date: Mon, 30 Apr 2018 13:49:32 +0100 Message-ID: <20180430124931.GA100464@bricha3-MOBL.ger.corp.intel.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: dev@dpdk.org To: Anatoly Burakov Return-path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 8A8F916E for ; Mon, 30 Apr 2018 14:49:36 +0200 (CEST) Content-Disposition: inline In-Reply-To: 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 Mon, Apr 30, 2018 at 12:21:42PM +0100, Anatoly Burakov wrote: > Mapping size is a 64-bit integer, but mmap() will accept size_t for > size mappings. A user could request a mapping with an alignment, which > would have overflown size_t, so check if (size + alignment) will > overflow size_t. > > Signed-off-by: Anatoly Burakov > --- Acked-by: Bruce Richardson