From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 44035A0C43 for ; Tue, 19 Oct 2021 17:58:01 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3112E4124A; Tue, 19 Oct 2021 17:58:01 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id 68016411C1; Tue, 19 Oct 2021 17:57:58 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10142"; a="292020327" X-IronPort-AV: E=Sophos;i="5.87,164,1631602800"; d="scan'208";a="292020327" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Oct 2021 08:57:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,164,1631602800"; d="scan'208";a="594299281" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by orsmga004.jf.intel.com with ESMTP; 19 Oct 2021 08:57:56 -0700 Received: from fmsmsx601.amr.corp.intel.com (10.18.126.81) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Tue, 19 Oct 2021 08:57:56 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12 via Frontend Transport; Tue, 19 Oct 2021 08:57:56 -0700 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.102) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.12; Tue, 19 Oct 2021 08:57:56 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=P6CdNlehNzRJIaV0OomuD0RN5hGyI0QeFpC17sKtIw7RRL0nWLaM63hSD43XnlNAxJcg2dV7DFeX6iI7wJGC+W7RUThxKWYf+XHqe6BgKMafl/d8Tnmppj/YF6UrZ+tnZbxGNfRA2aIRhaQ+WO14rqz3Osm/QWw/oGQYpf+fbvJBM8hKpfAIz/WE6EGJ+UJa57CWhel+ZIBeQ/jPXpJ7eO8p1afp1uf3M/PnH7XqqjeUpI9k7Fl2UCRqwQJe4t1NJoa/KVFwHdlYRi56901Sgh5swxvfbavYKtw6SiHC/pHcx++4lrIdEfHfa+nh/9f5y5dkCK4ZsRGLx81xWjjQEg== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=q8bXjm6yHvIWvs752yb9ODrHvyvQixdjMPZQQyaBPpc=; b=CysAde4nceP6ZQiJkKeAz2C7/hJDlvrZHuoaBX2H7kZX1P3Q368vDSZAzbEk5qHVZec5RrhFNUEaY9gwGs0vkqgAUPUh25dPH67++ejGjZnKiVqCUuEx5vRWFClpPFMI1ebj7EkNCuKy+zeWQ6aqmoGZNPt0Bc1UxmTHzPPoR1ZgJD1aSKBfW0olFKl0XNzk7DBzwN3mX/inH7te96nwEpYN1l0P0kD8TtIRrMCOxbqVG1bIU+ngbb/Qrf0SOhd8uNc0CvQwWPUM4/tqUaCXVNe5NYbOCVWiWj9YcATBpeLjVsmamT9Zh9CJlQXdtYcV7t/wx7udQV43NkkxA+25eQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=q8bXjm6yHvIWvs752yb9ODrHvyvQixdjMPZQQyaBPpc=; b=oivRiG1BSqLWd1tNtjkwpuf8CXUCIFkJ0sARljlMVMlrQGzaw4tshVYghPrPgeY6slfV9WqaBmP/SC2m0BiQmaKwmUDs7fUnJjDeqz5Hn+3kJf3Meh2sPJdTbY4VE11+LIv1KJCU7TvMpyUotVZ8A+knDecKaYTIpQM8EkaR658= Authentication-Results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=intel.com; Received: from CO1PR11MB5012.namprd11.prod.outlook.com (2603:10b6:303:90::18) by MW5PR11MB5906.namprd11.prod.outlook.com (2603:10b6:303:1a0::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.14; Tue, 19 Oct 2021 15:57:53 +0000 Received: from CO1PR11MB5012.namprd11.prod.outlook.com ([fe80::442b:2192:c62b:c6c3]) by CO1PR11MB5012.namprd11.prod.outlook.com ([fe80::442b:2192:c62b:c6c3%7]) with mapi id 15.20.4608.018; Tue, 19 Oct 2021 15:57:53 +0000 To: David Marchand CC: dev , "Wang, Yipeng1" , "Gobriel, Sameh" , Bruce Richardson , dpdk stable References: <1634153265-193315-1-git-send-email-vladimir.medvedkin@intel.com> <1634233699-197151-1-git-send-email-vladimir.medvedkin@intel.com> <543fb591-d38a-5573-1bbc-db6a0c624893@intel.com> From: "Medvedkin, Vladimir" Message-ID: <21a6e602-1138-b8bb-e5c1-ff9c6c314c59@intel.com> Date: Tue, 19 Oct 2021 17:57:47 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0 Thunderbird/78.14.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO2P123CA0086.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:138::19) To CO1PR11MB5012.namprd11.prod.outlook.com (2603:10b6:303:90::18) MIME-Version: 1.0 Received: from [192.198.151.52] (192.198.151.52) by LO2P123CA0086.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:138::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.17 via Frontend Transport; Tue, 19 Oct 2021 15:57:51 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e655a5ad-85f2-4391-fd8a-08d9931935ba X-MS-TrafficTypeDiagnostic: MW5PR11MB5906: X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Zd2sWQFeDjKtXsI7pJDm+Y1n1T3fWn/cRJb3O+C3QeQ5M3/6P0gjMmb9xSHSM4aJfy+rfw1vPaeIKvzFifhAtewsV28Eb3jm3bc9jQTFt0WznH09V6rzHZx4LEsQ7IVIgcaeM5MEwYC9LLaUjBE6Y1ZuX+S8FTwqhpq5BtTP7GTvRW08vaIMcdRE8I67NEtO+P3niN3u/iP09Hdx+/iSx97pEwd4yUelnzRS8cA6kzZHKS2ev/zACXFmpWkgpYyiaEFC6NWMvMkLf6YF/Yb2dcpCeGwu8SLL+V7XY4Jiy6rUMxtUIhJxgBLw9kYKCMB8PVrmEFsjeIsjUAWe8a5C2iPAskH+jsvdBnS4friO59QlejMJhxZSfVyRWlRV1DJ3wafdumT31YAOEc43gCmEKN5LqqzhB/mmPiwJwgn2hsWSOxelCChuSm1oo7uxvR6ueZyzkNLfYkwnbTCwhlBWuvHxK0G6s0evN4IZK6P8VRdCfpAqPkab0Si1zWN2pMtMki963y5RN5H4uv0g8EAuR9G00XrhNT8c5t9okUCQmY8YW0crahm7lI2aIyxez/MTKdqgEQbw5nVMqgA9VGmmH4u56Q+MxFnEaua5JszaMIdXlXeqR8vymiMFDCQPxbD6yRPeY8PSerii3YJr83ubchu5IQejWrUDM52J2JJbbpBvhC7XrR/h3ghiF7WCCBqYm+bYXPRIZNTqM+ASbGvTtrEPuIAQAmibdqNt37WMAw3Ak/ZbJMVDWa42mGpqbXdPf9nAS3POimfPYxd534/zNA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CO1PR11MB5012.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(66946007)(54906003)(6486002)(316002)(6706004)(16576012)(38100700002)(8936002)(508600001)(66556008)(6916009)(31686004)(66476007)(4326008)(956004)(5660300002)(31696002)(82960400001)(8676002)(53546011)(6666004)(186003)(26005)(36756003)(2616005)(2906002)(86362001)(3940600001)(45980500001)(43740500002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?QzVUdDNuaDZ5NkZnUTNGbG1MUGFIcnhEbENhaXZjeGxYbjkzWFlRTG1Yakpt?= =?utf-8?B?R1BQYjBMTmtKdUxNQVRoRm42NGpoRUdMNHkrSG1jeTRNWXpsOHg0N2VrUVda?= =?utf-8?B?T0dhWGI3Z29zaXFxY28xS05lTm5DcG1pNFJlS0hyYXhhbWtjVnhVRUtCVis5?= =?utf-8?B?dytvUTN6dDRMeTM3anJFazFrMW1GOUR4aG0rWjFvUW0yZklmZVJuMmpQb001?= =?utf-8?B?ZVl4c0JYei9yQmNoMi8xY3gyTGtoeFIxVVgzS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5pSWdiWkxmbk95Y1gxL09oNjlGVVN6R1lJL2Vr?= =?utf-8?B?TjBZQzdCdEcwN2NNRVF6WUpvMmhWWGpLT0FNVGtVN3c4TkRKU3BOV0FYS0tP?= =?utf-8?B?VklCNVJtVE9Ram5yWHdPbVZubUpTMElyei95OFZPK09wblhLL0JjU3J4V0dz?= =?utf-8?B?MGEwOGNNdGJEL2dNVHBCR3JDZ25ET3VVOWcxY3B2T0RCWEZkTUsvQXcwQ1Nj?= =?utf-8?B?MjZtVk0vWS9QNFdvdTVGL3JjVHVLYXZzR3NaNFgrQk94MnhBSld1dVRyMi8x?= =?utf-8?B?T1UrQlljRkRlMndXclFCQVZRanNheTc3R3lJWjEyUzlySDZlc0NSM2ZxRUVY?= =?utf-8?B?R2FpaWNZRGdscjVqNzNLeWJMeW5CalZRSEYwK09Ca1VLRmJMcVBoSmR6T1l3?= =?utf-8?B?ZTFubGRpWWh6VTRtajNKV05wa1o2WG10NzI0Y1pkdTlqSlVKOE1OSktjdHp1?= =?utf-8?B?ZVk2Mjdid25XSlBIZzJrMmlhbjkrZGJYZk1SUGVJanJsWTRrNGxIeVdoYnBo?= =?utf-8?B?eXFId3IwNjd6dS83NFdwV0U0SmlXay9lRHBzWmU1dEJLMnVHRE5LbHB0NHZ1?= =?utf-8?Q?W8C9xM20StfSHPbPDd+kCnpGkNUQWNIkX+wfe7P?= X-MS-Exchange-CrossTenant-Network-Message-Id: e655a5ad-85f2-4391-fd8a-08d9931935ba X-MS-Exchange-CrossTenant-AuthSource: CO1PR11MB5012.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Oct 2021 15:57:53.6141 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 1CuPzWU2r8oJo2kOmbiNMknzv4RuA4DSB9RW5QjvmISd3PxBrEg9bXd/I6v5KbRyd3UX/dxIuohk1JEKjLTy3Iwe7MbU9SCsNzHb/bQBsTs= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW5PR11MB5906 X-OriginatorOrg: intel.com Subject: Re: [dpdk-stable] [PATCH v3] test/hash: fix buffer overflow X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi David, On 19/10/2021 09:02, David Marchand wrote: > On Fri, Oct 15, 2021 at 3:02 PM Medvedkin, Vladimir > wrote: >>> I am confused. >>> Does it mean that rte_jhash_32b is not compliant with rte_hash_create API? >>> >> >> I think so too, because despite the fact that the ABI is the same, the >> API remains different with respect to the length argument. > > Sorry I don't follow you with "ABI is the same". > Can you explain please? > I meant that rte_hash accepts: /** Type of function that can be used for calculating the hash value. */ typedef uint32_t (*rte_hash_function)(const void *key, uint32_t key_len, uint32_t init_val); as a hash function. And signatures of rte_jhash() and rte_jhash_32b() are the same, but differ in the semantics of the "key_len" argument. Internally rte_hash passes a length of the key counted in bytes to this functions, so problems appears if configured hash function considers the key_len as something else than the size in bytes. > > I am not against the fix, but it seems to test something different > than what an application using the hash library would do. > Or if an application directly calls this hash function, maybe the unit > test should not test it via rte_hash_create (which seems to defeat the > abstraction). > I'd say that user should not use this hash function with rte_hash. Yipeng, Sameh, Bruce, what do you think? > -- Regards, Vladimir