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 7482DA0561; Tue, 21 Apr 2020 05:18:30 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 62E2E1D5CB; Tue, 21 Apr 2020 05:18:29 +0200 (CEST) Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-eopbgr80058.outbound.protection.outlook.com [40.107.8.58]) by dpdk.org (Postfix) with ESMTP id 812E51C2B9; Tue, 21 Apr 2020 05:18:28 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ke9ercwEAJrmMGCNE6A2MX9r1YQKxr1ywliXghJ8uTOU3EXU+PR7O/t6ZOv1gTaTnKlEIbJyNJOCbTiPxHVj095fP2Sg0Afe6croXrpbTXGwEx6NJpuhUrScd4gFLFww9hpBZY3zw9yLGg+iMYeZVBfHDvN+ZqoboKRVFyS9MVUhJY607uhlEZ61WS+flzOMdAEjJM2ePBX0HOGM/e6WCRMdY0Yx1SYMDeqVgRRT50IfzTUnPnIE8giKGT3nnnO5oNZfdUuIl3sJYy1ZoVsws0ZgsurQ/3zZfam4VQ1Vo2dI7dyT6BSCxt72PO8JVPF0WWemNFrh92TLx+urTtW9dQ== 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=h4q+vK5EO7IXBDYtqlh/fUwb7a6mq+/Ng6PVlnfSUyQ=; b=moGtGnC3BZfqd2CXZe6aLs/+CQLWRe71bF3I3vRedFDsj1HQb8Qe0gRivSw7T5l72bu0XjPl67BAhlAX+nlzVViWclDrQ8bf9FvqiBIPoj2oSYBhWmRHuehk0wMiKwEDUngAfCuWpY8o2TWTviknZ3elpUQFePU92BOkTtozT5KHW2EVZwxA1x7z4IxXw9RZeFM9Cw0mMC1vhv5DoUODJs8DuFkP7COrTAzWllUh5uelEqEXONak93jVDme6FMgLhfXnjDnJnHHTfpLJmTA5MXZ5K4FLUOaazFrzmomQWDMqruemrH9LuBQKn6KhcAK84Pi09XzPEGGX80eIiWftCQ== 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=h4q+vK5EO7IXBDYtqlh/fUwb7a6mq+/Ng6PVlnfSUyQ=; b=ANrJR+LmEIfw1CR4zUB05i2d+dCR8fPzDFmY8JWNQVcHkcKF/HPaC7gpF1W3X3/Dc2QjZj2TfyYfyGeVi1EmFyqyM0CUMMKjL8/A5/UsE/jN2kPdF9Hg84QgZCAGukCw2E49AGW4kYF7KdP8/V0G6EnlTe+A3vzB6jAOQu+ViKs= Received: from VI1PR05MB4192.eurprd05.prod.outlook.com (2603:10a6:803:4e::18) by VI1PR05MB5405.eurprd05.prod.outlook.com (2603:10a6:803:96::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2921.29; Tue, 21 Apr 2020 03:18:26 +0000 Received: from VI1PR05MB4192.eurprd05.prod.outlook.com ([fe80::1c12:fd7c:4788:232a]) by VI1PR05MB4192.eurprd05.prod.outlook.com ([fe80::1c12:fd7c:4788:232a%7]) with mapi id 15.20.2921.027; Tue, 21 Apr 2020 03:18:26 +0000 From: Bing Zhao To: "Burakov, Anatoly" CC: "dev@dpdk.org" , "sergio.gonzalez.monroy@intel.com" , "stable@dpdk.org" Thread-Topic: [PATCH] mem: fix the alloc size roundup overflow Thread-Index: AQHWFwhrBS8emmMMHEePRKMMC89erqiC6LmA Date: Tue, 21 Apr 2020 03:18:26 +0000 Message-ID: References: <1586256364-185699-1-git-send-email-bingz@mellanox.com> <88ce7ff0-27f7-9cf0-13bf-b66795bd64cd@intel.com> In-Reply-To: <88ce7ff0-27f7-9cf0-13bf-b66795bd64cd@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=bingz@mellanox.com; x-originating-ip: [103.65.43.201] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: ca7f3ac6-114f-4b10-5235-08d7e5a2a80e x-ms-traffictypediagnostic: VI1PR05MB5405: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7691; x-forefront-prvs: 038002787A 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:(10009020)(4636009)(376002)(39860400002)(366004)(346002)(136003)(396003)(8676002)(8936002)(86362001)(81156014)(316002)(478600001)(55016002)(186003)(71200400001)(6506007)(53546011)(33656002)(66556008)(66476007)(64756008)(66446008)(9686003)(76116006)(5660300002)(26005)(4326008)(7696005)(2906002)(66946007)(54906003)(6916009)(52536014); DIR:OUT; SFP:1101; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: dHw6pZytSQg5sJ4VMbHQQHuwZBwQpOsGq7f8c5NCYvMFH5N39qxrnam1K6yaFBylxn+O4UbIuh7ukPTve9nEka4cmcZ6fUPFj2V8AuT9olr+8+6VNpJyiKNE5Shpwi3hk6qvg+/Ujw9CTWutwgjPv4Xzxpg6ItwBmGGGLKCqvoh2zIA3atXRV18OOrcluDpKoPwp5QPcZ4V/dlRjU64+q4/gQYKUVs9v6970Q7F1nr8GkGhKJDYk8wL++vstBEcegjlucAfNYkaB8r3GEuPoI+slU8x+dS7qQPXGYhVktt/3J/WhT7gesW1T4u53GGKZRqX5I83lF2xDn4JPMsI0ZduZKwBIJlbDu9XqthmBELGZ0V94sagpQHicXToTQCCOOyF6zHjHl2/4o4YK6zhs65xVnw9EYtsojntfmkVs7iWPcofZo6MOTQ+gqJVJ2BO0 x-ms-exchange-antispam-messagedata: RwyC5adeEJbCFWb6Nh5xuSmicYAOO4UMLRb8bqybezKhPc9bWlv7z6/k2QoJSLRgWj8Qur4feWcn2PP533cj9nVpAVw+X89a+vxNflQuklhOpcyt3MjJ58bayHKZtI2pWkPExcJVE7MEMILZRkK4+g== 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: ca7f3ac6-114f-4b10-5235-08d7e5a2a80e X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Apr 2020 03:18:26.2388 (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: ic16Hp5Usfc2642b2q1I5ZEyVIX5red9QbyCjbsMtvpBdkcwEEZCaJ1Afq4vsrSGKFusRGISVWkvMX7vfVxGCw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR05MB5405 Subject: Re: [dpdk-dev] [PATCH] 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" PiAtLS0tLU9yaWdpbmFsIE1lc3NhZ2UtLS0tLQ0KPiBGcm9tOiBCdXJha292LCBBbmF0b2x5IDxh bmF0b2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