From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4C908A00C5; Thu, 7 May 2020 14:16:13 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A8E0D1DC1A; Thu, 7 May 2020 14:16:12 +0200 (CEST) Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2084.outbound.protection.outlook.com [40.107.22.84]) by dpdk.org (Postfix) with ESMTP id EF9231DC19; Thu, 7 May 2020 14:16:10 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FhVie9HsWm/fcxUgPe2pjBYfxCAsOurMfqvOziQMWoSpG1JeZKQzkPfFgWv4Y+InmZ6tjhvEh6yb+UCUY8U67gjCn+rinM9PgnPfnLPauSK+xZ8C/vH5vVqJ+N3qdDkzjZ8zZx1uUxDhYTeXOL3RNyORueKz+CcE/zIj2ygd2HGsyv1LIuCv0ZityE13scXWndd2hG/t/XgM3T0AssQB7hkvgxag/UwNIws8rlDTUxhjiRJLvcll5pwyG3HxZvQ9DD+U0RMdVrjT/LU9QhQZgfgFcBl7O7ImgSdTS1J2x6qgrnqZaIaR1TFL1BWKcVcuY6V7KrmdkWltba/uBWFykg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=r2dKA8NH02yYqmvO8/DL3dpHMPFJOr2kSydkcVQAQcA=; b=EqZsUeUD/86GlHW+TRYLyPX0+SQ1DirwbOT+MkFbkVJIUw0HQk/S59gjuh2GP9MnOVRC4XOwDN3HwrTxCur0MiWBFpEQ/KFQB0hmHvyZtt0vSlDOIibXC/I5lchWdGTzR//Ob1oveYpWrQPTvhTzEeKFWGjdOIvG3zRXDLC0pq1bpDS+8zG1hO2dynvVqKkzpFkHWDvB7c82XCV/KGE0mhjH3ppHoboCoK/ZvEchhDvkW4zlQ2my8pL4p4ZESvxfWMJQPi25n16YyhZhIvCCY6pr9P9i0zZhcxAaRx9ksr4+jTP4+4Ti0mSbXyec/yay2kAH4o7MQ6r26tPsIi3fDA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=mellanox.com; dmarc=pass action=none header.from=mellanox.com; dkim=pass header.d=mellanox.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=r2dKA8NH02yYqmvO8/DL3dpHMPFJOr2kSydkcVQAQcA=; b=BpCMM7uIWSKZHJZ/IKPxirehwFVctBq+IGjGg1X3i4GkssX7GXwiXoNtjR/hpnIF2CLzNtBccrf1V9T15EGaGe9wp9pxJcHM50wTlAw0SpV/Gx+R6ys9UOUQ8eAheoM+/ZHDL6kY+vUuaLhJRlzv9wGSIjbeuLcLI2zfy3wuuQY= Received: from VI1PR05MB4192.eurprd05.prod.outlook.com (2603:10a6:803:4e::18) by VI1PR05MB6880.eurprd05.prod.outlook.com (2603:10a6:800:18f::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.30; Thu, 7 May 2020 12:16:09 +0000 Received: from VI1PR05MB4192.eurprd05.prod.outlook.com ([fe80::2d66:8a63:f90:4a86]) by VI1PR05MB4192.eurprd05.prod.outlook.com ([fe80::2d66:8a63:f90:4a86%5]) with mapi id 15.20.2979.028; Thu, 7 May 2020 12:16:09 +0000 From: Bing Zhao To: David Marchand , "Burakov, Anatoly" CC: Thomas Monjalon , dev , dpdk stable , "sergio.gonzalez.monroy@intel.com" Thread-Topic: [dpdk-stable] [PATCH v2] mem: fix the alloc size roundup overflow Thread-Index: AQHWJGZp08ddnZlQ9kqEcWIj5Ca2d6iciLeAgAAAUSA= Date: Thu, 7 May 2020 12:16:09 +0000 Message-ID: References: <1586256364-185699-1-git-send-email-bingz@mellanox.com> <1588837269-360196-1-git-send-email-bingz@mellanox.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: redhat.com; dkim=none (message not signed) header.d=none;redhat.com; dmarc=none action=none header.from=mellanox.com; x-originating-ip: [112.10.107.242] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: d00b01c7-3112-4210-68a3-08d7f2806cdb x-ms-traffictypediagnostic: VI1PR05MB6880: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:4714; x-forefront-prvs: 03965EFC76 x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: d3P0cqEjp5NYE01wwTCEFAeOracj86yzLptOPUpjdDV4I5Df9gqH6TVpvgOfGwKy+KTNWEysCz5hQDLndYTVUMvHtS7naJFS7ePAZt+usAXK61i73aOJ/VFOZ7E4GzKG+vIwMU5JXLIwD6g5mL5zKjJfl4KGSuwzwo7ZSR9ZLMysyGHsw92FX4tDJKVdfxDW8Ymzp2kCzj8HGs/ZqbQ1KT8J4LUD8iMESBE05FruTmMANlgKbBZUztiYGu8HlXSIHc9e9EiMpwDqnEjDO8A/2r0jCmzoNyktoDyTBlzAXf0njOeN2tB9Ci7FZPSC80A1It3QvYsmI0T6Z3ADWLXoIrT0/ZRYQgnqgsA7cxmD3NQ6ZEujbojdMWFVqEJ32oPcdo50ugrbZRHCdy9+CpWE5UNylM+2y7MLg2WpAfNpGTnqguDr5ZywheC+y5aqqiauOTiFIaFuBSN3brcoVzm2C7Chp88hwGHTYfIl98kCGGcIYwNwxjn1GpAhcjsXRFf4d02SDpvqUHJXfiIpC04YrA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR05MB4192.eurprd05.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(136003)(39860400002)(366004)(376002)(346002)(396003)(33430700001)(6506007)(26005)(86362001)(53546011)(7696005)(52536014)(33656002)(4326008)(2906002)(186003)(76116006)(66556008)(71200400001)(64756008)(66446008)(33440700001)(478600001)(66476007)(5660300002)(110136005)(54906003)(9686003)(83320400001)(83280400001)(83310400001)(66946007)(83290400001)(55016002)(316002)(8936002)(8676002)(83300400001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: xAiTiy+/SsWpfckxm2nH5ez3lD+CJLcCVnwiAR8VCjZt+dSxULOA97ZsuRmTUByysslDjTGvmTUowe+hFFUh4mBnNyotLpFIMOxWvUUxGgqSifdtYUwVB4b7+zqYo8L4TTIWgWv563LKCwaEJ2tM/UTaUnT8L9HwMaRWV4dbOVifrUeQYkU0cY840L2UAmxhohC30KN1dqmQ3IMMHSTkrvnFec+JT4JQlL1Ut5wTE7y4bc+DQLcy+uooL7Huh9/KaJCfGjAVczDY7USF5oO8wJ6jehcunTNyq1edAMKqAOv7BUHSOmT3SnbJKcWDAGAN8TAibmrIqGcowbWUsDE6P5a93sSEh8xSj53lxA0mboeXmHEwQvkrMV+bcEqBKpTfaQHoEEGUMSwqmVe6LL/CpBuLgSxoDcX+LJn+1ujf0Jyr5UooI6cCZXIXPMKVPWw4R4dMqfLt9lCvxxb9ijFoiG+B3fKhSQYcBnkGqsoJeYcUSAVoulFsJ3EEaH6HzK6Zh7VZFNWdbHAjIbNTopr73sN/9m+Ia+WtSPZ52x69alxhhzBsSUuPxfHzp7TM4iK5KhRS4R4xakoGwau61CPb5XIYKQYeORcuAKvfoDRaWuVwNWDe8tIeZWY1GxKErxTnpOaFzEJ0l3RjhUqC94KoLdvHg31eVeFI8Tngd+XkQVzm3NcWNet5xQDfj6uf5mICGcnFGiyNv044qrF09nXJ60agY6ISePwuSTJH58DySJ0NLPRA/lLNSEzAb4EmPSUYz61ORKjykNdyP746fP4I1I/B3BF2mt+iYi4Th+vQZsc= x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: d00b01c7-3112-4210-68a3-08d7f2806cdb X-MS-Exchange-CrossTenant-originalarrivaltime: 07 May 2020 12:16:09.0599 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 3jXpzT/QUpB8Y+6d0O9uKYVw3QvGEovhviFMaUaWwH4VfYyhmIRBCapcAsh2YmWyKPWOIOA04/19KrBovRxcpA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR05MB6880 Subject: Re: [dpdk-dev] [dpdk-stable] [PATCH v2] mem: fix the alloc size roundup overflow 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" SGkgRGF2aWQsDQpJJ3ZlIGNoYW5nZWQgdGhlIHNwYWNlIGludG8gdGFicyBpbiB2MyBhbmQgc3Vw cHJlc3NlZCB0aGlzIG9uZS4NCg0KVGhhbmtzIGEgbG90DQoNCkJSLiBCaW5nDQoNCj4gLS0tLS1P cmlnaW5hbCBNZXNzYWdlLS0tLS0NCj4gRnJvbTogRGF2aWQgTWFyY2hhbmQgPGRhdmlkLm1hcmNo YW5kQHJlZGhhdC5jb20+DQo+IFNlbnQ6IFRodXJzZGF5LCBNYXkgNywgMjAyMCA4OjEyIFBNDQo+ IFRvOiBCdXJha292LCBBbmF0b2x5IDxhbmF0b2x5LmJ1cmFrb3ZAaW50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