From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 8A9F31B00C; Wed, 16 May 2018 13:40:58 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 May 2018 04:40:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,404,1520924400"; d="scan'208";a="55704693" Received: from irsmsx101.ger.corp.intel.com ([163.33.3.153]) by fmsmga001.fm.intel.com with ESMTP; 16 May 2018 04:40:55 -0700 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.150]) by IRSMSX101.ger.corp.intel.com ([169.254.1.118]) with mapi id 14.03.0319.002; Wed, 16 May 2018 12:40:54 +0100 From: "De Lara Guarch, Pablo" To: Jerin Jacob , "dev@dpdk.org" CC: "thomas@monjalon.net" , "Doherty, Declan" , "andy@warmcat.com" , "stable@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH 2/2] app/crypto-perf: fix memcpy source range Thread-Index: AQHT7ODG8Np0bDvLjk6/Sov0bQL+I6QyO3Tg Date: Wed, 16 May 2018 11:40:54 +0000 Message-ID: References: <20180516063955.6193-1-jerin.jacob@caviumnetworks.com> <20180516063955.6193-2-jerin.jacob@caviumnetworks.com> In-Reply-To: <20180516063955.6193-2-jerin.jacob@caviumnetworks.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZjIyMGE2MTctZWUyMS00OWRlLWFmZjMtYmZmNTg5YjJkODM1IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6InVrckFsdDZJcTUrVnRSNXRpVitnNEtcL0UwTGVjemR0WE9lMzhMZkpzQ1Q4PSJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.200.100 dlp-reaction: no-action x-originating-ip: [163.33.239.180] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH 2/2] app/crypto-perf: fix memcpy source range 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: Wed, 16 May 2018 11:40:59 -0000 > -----Original Message----- > From: Jerin Jacob [mailto:jerin.jacob@caviumnetworks.com] > Sent: Wednesday, May 16, 2018 7:40 AM > To: dev@dpdk.org > Cc: thomas@monjalon.net; Jerin Jacob ; De > Lara Guarch, Pablo ; Doherty, Declan > ; andy@warmcat.com; stable@dpdk.org > Subject: [dpdk-dev] [PATCH 2/2] app/crypto-perf: fix memcpy source range >=20 > Since arm64 was using plain memcpy for rte_memcpy, gcc 8.1, could detect = size > was more than source address range. >=20 > /export/dpdk.org/test/test/test_cryptodev.c: In function > 'test_multi_session_random_usage': > /export/dpdk.org/build/include/rte_memcpy_64.h:364:29: error: 'memcpy' > forming offset [113, 184] is out of the bounds [0, 112] of object > 'testsuite_params' with type 'struct crypto_testsuite_params' > [-Werror=3Darray-bounds] > #define rte_memcpy(d, s, n) memcpy((d), (s), (n)) > ^~~~~~~~~~~~~~~~~~~~~ > /export/dpdk.org/test/test/test_cryptodev.c:6618:3: note: in expansion of > macro 'rte_memcpy' > rte_memcpy(&ut_paramz[i].ut_params, &testsuite_params, > ^~~~~~~~~~ > /export/dpdk.org/test/test/test_cryptodev.c:140:39: note: > 'testsuite_params' declared here > static struct crypto_testsuite_params testsuite_params =3D { NULL }; >=20 > Fixes: ffbe3be0d4b5 ("app/test: add libcrypto") >=20 > Cc: pablo.de.lara.guarch@intel.com > Cc: declan.doherty@intel.com > Cc: andy@warmcat.com > Cc: stable@dpdk.org >=20 > Signed-off-by: Jerin Jacob > --- > test/test/test_cryptodev.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/test/test/test_cryptodev.c b/test/test/test_cryptodev.c inde= x > 680082f2b..169ecdef3 100644 > --- a/test/test/test_cryptodev.c > +++ b/test/test/test_cryptodev.c > @@ -6616,7 +6616,7 @@ test_multi_session_random_usage(void) > ts_params->session_mpool); >=20 > rte_memcpy(&ut_paramz[i].ut_params, &testsuite_params, > - sizeof(struct crypto_unittest_params)); > + sizeof(struct crypto_testsuite_params)); Actually, the source address is wrong. The fix should be: - rte_memcpy(&ut_paramz[i].ut_params, &testsuite_params, + rte_memcpy(&ut_paramz[i].ut_params, &unittest_params, Thanks for reporting this issue. Pablo