From mboxrd@z Thu Jan 1 00:00:00 1970 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) X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Apr 2018 05:49:35 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,346,1520924400"; d="scan'208";a="51129131" Received: from bricha3-mobl.ger.corp.intel.com ([10.237.221.51]) by fmsmga001.fm.intel.com with SMTP; 30 Apr 2018 05:49:33 -0700 Received: by (sSMTP sendmail emulation); Mon, 30 Apr 2018 13:49:32 +0100 Date: Mon, 30 Apr 2018 13:49:32 +0100 From: Bruce Richardson To: Anatoly Burakov Cc: dev@dpdk.org Message-ID: <20180430124931.GA100464@bricha3-MOBL.ger.corp.intel.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Research and Development Ireland Ltd. User-Agent: Mutt/1.9.4 (2018-02-28) Subject: Re: [dpdk-dev] [PATCH v2 1/2] mem: check if allocation size is too big X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Apr 2018 12:49:37 -0000 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