numam-spdk/test
Pawel Wodkowski 6397801009 jsonrpc: fix received JSON buffer overwrite
The receive buffer and JSON values array are shared across all requests
on one connection. If RPC handlers deferre processing response, do the
lazy decode or capture JSON by pointer instead of copying it then
content of the request array might be overwritten by now. As we don't
have any requirement here we must assert that the received request is
valid till response is finished.

Fix this issue by copying request data and work on the copy. This change
also void the need of having JSON RPC 'id' field releasing over 128
bytes from each spdk_jsonrpc_request.

Change-Id: I665be446cbcd8f625e5a73514582efad3021a4ff
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/437160
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2019-01-10 14:31:37 +00:00
..
app lib/trace: add 3 RPC method for tpoint_group_mask 2018-12-14 21:29:12 +00:00
bdev build: move app rules to spdk.app.mk 2018-12-12 22:35:21 +00:00
blobfs test/rocksdb: only use 2GB cache for per-patch testing 2018-12-13 21:52:12 +00:00
blobstore vbdev_crypto.c: Always initialize crypto drivers up front 2018-10-24 23:29:28 +00:00
common vtophys: add length parameter to the vtophys function 2019-01-09 08:24:59 +00:00
config_converter nvmf: remove tgt_opts from nvmf_tgt 2018-11-08 23:08:26 +00:00
cpp_headers build: don't include spdk.app.mk in test/cpp_headers 2018-12-12 22:35:21 +00:00
env vtophys: add length parameter to the vtophys function 2019-01-09 08:24:59 +00:00
event build: move app rules to spdk.app.mk 2018-12-12 22:35:21 +00:00
ioat ioat: remove ioat kperf kernel driver test harness 2018-04-30 17:11:53 +00:00
iscsi_tgt test/iscsi_tgt: Move ip_migration test from nightly to per-patch 2019-01-08 13:27:25 +00:00
json_config test/json_config: add passthru to clear_config.py 2018-11-12 20:14:32 +00:00
lvol test: modprobe nbd at the start of autotest 2018-11-26 18:17:28 +00:00
nvme nvme/aer: unregister aer cb before detaching from ctrlrs 2018-12-23 00:59:42 +00:00
nvmf Revert "test/nvmf: Use bdevperf in lvol test instead of fio" 2019-01-09 20:50:36 +00:00
pmem Check file permissions in the check_format script 2018-10-04 23:08:12 +00:00
rpc_client jsonrpc: add connection close callback 2019-01-10 14:31:37 +00:00
spdkcli test/spdkcli: Run different parts of tests with given spdk target. 2018-12-07 22:59:07 +00:00
unit jsonrpc: fix received JSON buffer overwrite 2019-01-10 14:31:37 +00:00
vhost autotest: move vhost test script execution to separate file 2018-12-23 00:43:18 +00:00
Makefile jsonrpc-client: add new C client library 2018-10-11 20:07:44 +00:00
spdk_cunit.h test: remove leftover spdk_cunit declaration 2018-07-06 22:47:56 +00:00