numam-dpdk/app/test
Tomasz Kulasek 2c007ea106 app/test: fix array overflow warning with gcc 4.5
DPDK/app/test/test_cryptodev.c:
	In function 'test_snow3g_encrypted_authentication.clone.3':
DPDK/x86_64-ivshmem-linuxapp-gcc/include/rte_memcpy.h:796:14: error:
	array subscript is above array bounds

In lines like:
    rte_memcpy(sym_op->cipher.iv.data, iv, iv_len);
when "iv" is 64 bytes long array, and "iv_len" is "unsigned int",
compiler tries to evaluate also a code for array size larger than 255 bytes
long and reports error "array subscript is above array bounds" in line:
	rte_memcpy.h:796
    rte_mov128((uint8_t *)dst + 128, (const uint8_t *)src + 128);
caused by evaluation to:
    rte_mov128((uint8_t *)sym_op->cipher.iv.data + 128, (const uint8_t *)iv
			+ 128);
where "iv" is 64 bytes long buffer and "iv + 128" point out of it, gcc 4.5.

Using uint8_t as a size of copied block prevents to evaluate in rte_memcpy
code for length bigger than 255, causing the problem.

Fixes: 8bdf665fe6 ("app/test: add SNOW 3G")

Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2016-04-07 19:52:07 +02:00
..
autotest_data.py app/test: increase memory for group 2 2016-04-06 12:10:05 +02:00
autotest_runner.py app/test: display command line when starting 2016-03-24 21:12:45 +01:00
autotest_test_funcs.py app: fix whitespace 2015-06-12 11:10:10 +02:00
autotest.py app/test: return error code on failed tests 2015-06-15 15:17:52 +02:00
commands.c tailq: remove unneeded inclusions 2015-03-10 11:47:46 +01:00
Makefile mk: fix missing librt dependencies 2016-03-22 20:46:53 +01:00
packet_burst_generator.c mbuf: remove packet type from offload flags 2015-09-03 19:22:48 +02:00
packet_burst_generator.h app/test: add unit tests for link bonding mode 6 2015-02-20 23:07:02 +01:00
process.h app: fix whitespace 2015-06-12 11:10:10 +02:00
test_acl.c acl: remove old API 2015-09-03 19:22:48 +02:00
test_acl.h acl: remove old API 2015-09-03 19:22:48 +02:00
test_alarm.c app/test: convert all tests to register system 2014-08-26 17:52:33 +02:00
test_atomic.c tailq: remove unneeded inclusions 2015-03-10 11:47:46 +01:00
test_byteorder.c app/test: convert all tests to register system 2014-08-26 17:52:33 +02:00
test_cmdline_cirbuf.c eal: deprecate rte_snprintf 2014-06-27 02:31:24 +02:00
test_cmdline_etheraddr.c cmdline: fix overflow on bsd 2014-12-05 16:54:53 +01:00
test_cmdline_ipaddr.c cmdline: fix overflow on bsd 2014-12-05 16:54:53 +01:00
test_cmdline_lib.c remove trailing whitespaces 2014-06-11 00:29:34 +02:00
test_cmdline_num.c cmdline: fix overflow on bsd 2014-12-05 16:54:53 +01:00
test_cmdline_portlist.c cmdline: fix overflow on bsd 2014-12-05 16:54:53 +01:00
test_cmdline_string.c cmdline: fix overflow on bsd 2014-12-05 16:54:53 +01:00
test_cmdline.c app/test: only build what has been selected in config 2014-08-26 17:52:34 +02:00
test_cmdline.h remove trailing whitespaces 2014-06-11 00:29:34 +02:00
test_common.c eal: fix type casting of value to align 2015-03-17 00:46:01 +01:00
test_cpuflags.c eal/arm: check support of armv8.1 atomics 2016-03-05 19:46:50 +01:00
test_cryptodev_gcm_test_vectors.h aesni_gcm: add driver for AES-GCM crypto operations 2016-03-11 01:01:42 +01:00
test_cryptodev_perf.c mbuf_offload: remove library 2016-03-10 21:08:28 +01:00
test_cryptodev_snow3g_hash_test_vectors.h cryptodev: add bit-wise handling for SNOW 3G 2016-03-11 00:18:01 +01:00
test_cryptodev_snow3g_test_vectors.h cryptodev: add bit-wise handling for SNOW 3G 2016-03-11 00:18:01 +01:00
test_cryptodev.c app/test: fix array overflow warning with gcc 4.5 2016-04-07 19:52:07 +02:00
test_cryptodev.h app/test: add SNOW 3G 2016-03-10 23:05:36 +01:00
test_cycles.c app/test: convert all tests to register system 2014-08-26 17:52:33 +02:00
test_debug.c app: no more bare metal environment 2014-11-27 13:09:55 +01:00
test_devargs.c remove unneeded tests for NULL when freeing 2016-01-27 15:34:48 +01:00
test_distributor_perf.c apps: fix default mbuf size 2015-05-11 15:51:14 +02:00
test_distributor.c apps: fix default mbuf size 2015-05-11 15:51:14 +02:00
test_eal_flags.c app/test: fix EAL flags check 2016-04-06 12:02:09 +02:00
test_eal_fs.c eal: factorize common headers 2014-11-25 13:16:24 +01:00
test_errno.c eal: remove useless errno 2015-03-10 12:17:31 +01:00
test_func_reentrancy.c app/test: fix reentrancy autotest 2016-04-06 17:30:51 +02:00
test_hash_functions.c app/test: fix CRC hash values 2016-03-01 14:20:13 +01:00
test_hash_perf.c hash: remove deprecated function and macros 2015-09-04 15:56:58 +02:00
test_hash_scaling.c eal: move CPU flag functions out of headers 2016-02-16 08:28:00 +01:00
test_hash.c hash: fix allocation of an existing object 2016-04-06 17:30:48 +02:00
test_interrupts.c app: no more bare metal environment 2014-11-27 13:09:55 +01:00
test_ivshmem.c add prefix to cache line macros 2014-11-27 16:21:11 +01:00
test_kni.c remove extra parentheses in return statement 2016-02-10 15:47:50 +01:00
test_kvargs.c app/test: fix crash after null check 2014-12-17 01:04:06 +01:00
test_link_bonding_mode4.c bonding: do not ignore multicast in mode 4 2016-03-16 19:05:47 +01:00
test_link_bonding_rssconf.c app/test: add cryptodev unit and performance tests 2015-11-25 19:18:04 +01:00
test_link_bonding.c remove unneeded tests for NULL when freeing 2016-01-27 15:34:48 +01:00
test_logs.c tailq: remove unneeded inclusions 2015-03-10 11:47:46 +01:00
test_lpm6_routes.h remove trailing whitespaces 2014-06-11 00:29:34 +02:00
test_lpm6.c lpm: fix allocation of an existing object 2016-04-06 17:30:06 +02:00
test_lpm_routes.h remove trailing whitespaces 2014-06-11 00:29:34 +02:00
test_lpm.c lpm/x86: move SSE implementation to be architecture agnostic 2016-03-11 15:50:11 +01:00
test_malloc.c app/test: update malloc and memzone unit tests 2015-07-16 14:01:04 +02:00
test_mbuf.c mbuf: fix performance with 128-byte cache line 2016-02-11 12:45:35 +01:00
test_memcpy_perf.c remove extra parentheses in return statement 2016-02-10 15:47:50 +01:00
test_memcpy.c app/test: remove unnecessary memcpy test cases 2015-02-25 11:27:44 +01:00
test_memory.c app/test: fix integer overflow in memory unit test 2015-12-07 04:10:15 +01:00
test_mempool_perf.c app/test: decrease size of requested mempool 2015-07-09 17:35:25 +02:00
test_mempool.c remove extra parentheses in return statement 2016-02-10 15:47:50 +01:00
test_memzone.c remove extra parentheses in return statement 2016-02-10 15:47:50 +01:00
test_meter.c app/test: only build what has been selected in config 2014-08-26 17:52:34 +02:00
test_mp_secondary.c lpm: add a new config structure for IPv4 2016-03-09 23:05:05 +01:00
test_pci.c remove unneeded tests for NULL when freeing 2016-01-27 15:34:48 +01:00
test_per_lcore.c tailq: remove unneeded inclusions 2015-03-10 11:47:46 +01:00
test_pmd_perf.c ethdev: use constants for link state 2016-04-01 21:38:34 +02:00
test_pmd_ring_perf.c app/test: add performance test for ring driver 2015-11-03 02:01:58 +01:00
test_pmd_ring.c app/test: fix check for virtual ring device 2016-03-24 21:12:45 +01:00
test_power_acpi_cpufreq.c app/test: vm power management 2014-11-26 17:27:04 +01:00
test_power_kvm_vm.c config: remove useless explicit includes of generated header 2016-02-10 22:43:38 +01:00
test_power.c app/test: vm power management 2014-11-26 17:27:04 +01:00
test_prefetch.c app/test: convert all tests to register system 2014-08-26 17:52:33 +02:00
test_red.c remove extra parentheses in return statement 2016-02-10 15:47:50 +01:00
test_reorder.c reorder: fix unit test for random starting point 2015-11-12 16:49:00 +01:00
test_ring_perf.c use simple zero initializers 2015-04-20 14:37:36 +02:00
test_ring.c remove extra parentheses in return statement 2016-02-10 15:47:50 +01:00
test_rwlock.c tailq: remove unneeded inclusions 2015-03-10 11:47:46 +01:00
test_sched.c app/test: fix sched mempool allocation 2015-08-03 23:44:05 +02:00
test_spinlock.c tailq: remove unneeded inclusions 2015-03-10 11:47:46 +01:00
test_string_fns.c eal: remove rte_snprintf 2014-09-29 15:04:55 +02:00
test_table_acl.c pipeline: support packet redirection at action handlers 2016-03-10 01:28:29 +01:00
test_table_acl.h app/test: rename acl function to lowercase 2015-12-07 04:10:15 +01:00
test_table_combined.c lpm: add a new config structure for IPv4 2016-03-09 23:05:05 +01:00
test_table_combined.h app/test: packet framework unit tests 2014-06-17 03:34:11 +02:00
test_table_pipeline.c pipeline: add new functions for action handlers 2016-03-10 01:29:42 +01:00
test_table_pipeline.h app/test: packet framework unit tests 2014-06-17 03:34:11 +02:00
test_table_ports.c app/test: only build what has been selected in config 2014-08-26 17:52:34 +02:00
test_table_ports.h app/test: packet framework unit tests 2014-06-17 03:34:11 +02:00
test_table_tables.c lpm: add a new config structure for IPv4 2016-03-09 23:05:05 +01:00
test_table_tables.h app/test: packet framework unit tests 2014-06-17 03:34:11 +02:00
test_table.c app/test: rename acl function to lowercase 2015-12-07 04:10:15 +01:00
test_table.h port: move metadata offset reference at mbuf head 2015-10-19 17:00:36 +02:00
test_tailq.c tailq: introduce dynamic register system 2015-03-10 11:58:02 +01:00
test_thash.c hash: add unit test for thash 2015-07-01 23:26:10 +02:00
test_timer_perf.c app/test: only build what has been selected in config 2014-08-26 17:52:34 +02:00
test_timer_racecond.c timer: add race condition test 2015-08-03 12:43:01 +02:00
test_timer.c timer: fix synchronization in stress test 2015-08-03 12:43:01 +02:00
test_version.c app/test: convert all tests to register system 2014-08-26 17:52:33 +02:00
test_xmmt_ops.h lpm/arm: support NEON 2016-03-11 15:56:07 +01:00
test.c app/test: fix missing brackets 2016-03-31 17:09:23 +02:00
test.h app/test: add cryptodev unit and performance tests 2015-11-25 19:18:04 +01:00
virtual_pmd.c ethdev: rename link speed constants 2016-04-01 21:38:34 +02:00
virtual_pmd.h app/test: add unit tests for link bonding mode 6 2015-02-20 23:07:02 +01:00