/trusty/user/app/storage/ |
D | tipc_ns.c | 51 struct storage_msg* msg, in check_response() argument 53 if (read_len < sizeof(*msg)) { in check_response() 58 if ((enum storage_cmd)msg->cmd != (cmd | STORAGE_RESP_BIT)) { in check_response() 59 SS_ERR("%s: invalid response (%d) for cmd (%d)\n", __func__, msg->cmd, in check_response() 64 return translate_error(msg->result); in check_response() 90 struct storage_msg msg = { in rpmb_send() local 95 .size = sizeof(msg) + sizeof(req) + reliable_write_size + in rpmb_send() 100 msg.flags |= STORAGE_MSG_FLAG_PRE_COMMIT_CHECKPOINT; in rpmb_send() 104 {.iov_base = &msg, .iov_len = sizeof(msg)}, in rpmb_send() 109 {.iov_base = &msg, .iov_len = sizeof(msg)}, in rpmb_send() [all …]
|
D | client_tipc.c | 57 void* msg, 62 struct storage_msg* msg, 66 struct storage_msg* msg, 81 struct storage_msg* msg, in storage_tipc_file_delete() argument 95 extract_storage_op_flags(msg->flags)); in storage_tipc_file_delete() 100 struct storage_msg* msg, in storage_tipc_file_move() argument 134 extract_storage_op_flags(msg->flags)); in storage_tipc_file_move() 139 struct storage_msg* msg, in storage_tipc_file_open() argument 144 return send_result(tipc_session, msg, STORAGE_ERR_NOT_VALID); in storage_tipc_file_open() 149 return send_result(tipc_session, msg, STORAGE_ERR_NOT_VALID); in storage_tipc_file_open() [all …]
|
/trusty/user/base/lib/storage/ |
D | storage.c | 75 static ssize_t check_response(struct storage_msg* msg, ssize_t res) { in check_response() argument 79 if ((size_t)res < sizeof(*msg)) { in check_response() 80 TLOGE("invalid msg length (%zd < %zd)\n", (size_t)res, sizeof(*msg)); in check_response() 86 switch (msg->result) { in check_response() 88 return res - sizeof(*msg); in check_response() 112 TLOGE("cmd 0x%x: is unhandles command\n", msg->cmd); in check_response() 116 TLOGE("cmd 0x%x: internal server error\n", msg->cmd); in check_response() 120 TLOGE("cmd 0x%x: unhandled server response %u\n", msg->cmd, in check_response() 121 msg->result); in check_response() 202 static int wait_to_send(handle_t session, struct ipc_msg* msg) { in wait_to_send() argument [all …]
|
/trusty/user/base/lib/hwwsk/ |
D | client.c | 98 } msg; in hwwsk_generate_key() local 101 memset(&msg, 0, sizeof(msg)); in hwwsk_generate_key() 102 msg.hdr.cmd = HWWSK_CMD_GENERATE_KEY; in hwwsk_generate_key() 103 msg.hdr.flags = 0; in hwwsk_generate_key() 105 msg.req.key_size = key_size; in hwwsk_generate_key() 106 msg.req.key_flags = key_flags; in hwwsk_generate_key() 109 rc = tipc_send2(hchan, &msg, sizeof(msg), raw_key, raw_key_len); in hwwsk_generate_key() 126 } msg; in hwwsk_export_key() local 129 msg.hdr.cmd = HWWSK_CMD_EXPORT_KEY; in hwwsk_export_key() 130 msg.hdr.flags = 0; in hwwsk_export_key() [all …]
|
/trusty/user/base/app/cfi-test/cfi-crasher/ |
D | cfi-crasher.c | 94 struct crasher_msg msg; in crasher_void() local 95 msg.cmd = CRASHER_VOID; in crasher_void() 105 int ret = tipc_send1(global_chan, &msg, sizeof(msg)); in crasher_void() 106 if (ret < 0 || ret != sizeof(msg)) { in crasher_void() 189 struct crasher_msg msg; in crasher_on_message() local 191 int ret = tipc_recv1(chan, sizeof(msg), &msg, sizeof(msg)); in crasher_on_message() 192 if (ret < 0 || ret != sizeof(msg)) { in crasher_on_message() 197 switch (msg.cmd) { in crasher_on_message() 283 TLOGE("Bad command: %d\n", msg.cmd); in crasher_on_message() 284 msg.cmd = CRASHER_BAD_CMD; in crasher_on_message() [all …]
|
/trusty/user/base/app/crash-test/crasher/ |
D | crasher.c | 51 struct crasher_msg msg; in crasher_on_message() local 53 int ret = tipc_recv1(chan, sizeof(msg), &msg, sizeof(msg)); in crasher_on_message() 54 if (ret < 0 || ret != sizeof(msg)) { in crasher_on_message() 59 TLOGD("cmd %d\n", msg.cmd); in crasher_on_message() 61 switch (msg.cmd) { in crasher_on_message() 104 TLOGE("Bad command: %d\n", msg.cmd); in crasher_on_message() 108 ret = tipc_send1(chan, &msg, sizeof(msg)); in crasher_on_message() 109 if (ret < 0 || ret != sizeof(msg)) { in crasher_on_message() 113 TLOGD("cmd %d done\n", msg.cmd); in crasher_on_message()
|
/trusty/user/base/lib/sancov/test/srv/ |
D | main.c | 91 __attribute__((noinline)) static uint32_t check_key(uint32_t msg) { in check_key() argument 94 for (size_t i = 0; i < sizeof(msg) * 8; i++) { in check_key() 96 if ((msg & mask) == (magic & mask)) { in check_key() 104 if (msg == magic) { in check_key() 113 uint32_t msg; in on_message() local 115 rc = tipc_recv1(chan, 0, &msg, sizeof(msg)); in on_message() 116 if (rc != (int)sizeof(msg)) { in on_message() 124 msg = check_key(msg); in on_message() 126 rc = tipc_send1(chan, &msg, sizeof(msg)); in on_message() 127 if (rc != (int)sizeof(msg)) { in on_message()
|
/trusty/device/arm/generic-arm64/project/qemu/ |
D | qemu_error.py | 11 def __init__(self, msg): argument 13 self.msg = msg 16 return "Runner failed: %s" % self.msg 22 def __init__(self, msg): argument 24 self.msg = msg 27 return "Invalid configuration: %s" % self.msg
|
/trusty/user/app/keymaster/ipc/ |
D | keymaster_ipc.cpp | 91 static int wait_to_send(handle_t session, struct ipc_msg* msg) { in wait_to_send() argument 102 return send_msg(session, msg); in wait_to_send() 123 ipc_msg_t msg = {2, iov, 0, NULL}; in send_response() local 136 long rc = send_msg(chan, &msg); in send_response() 138 rc = wait_to_send(chan, &msg); in send_response() 166 static long deserialize_request(struct keymaster_message* msg, in deserialize_request() argument 169 const uint8_t* payload = msg->payload; in deserialize_request() 170 if (!req.Deserialize(&payload, msg->payload + payload_size)) in deserialize_request() 195 struct keymaster_message* msg, in do_dispatch() argument 202 err = deserialize_request(msg, payload_size, req); in do_dispatch() [all …]
|
/trusty/hardware/nxp/app/hwcrypto/ |
D | hwkey_srv.c | 146 struct hwkey_msg* msg, in hwkey_handle_get_keyslot_cmd() argument 151 msg->header.status = _handle_slots(ctx, slot_id, key_slots, key_slot_cnt, in hwkey_handle_get_keyslot_cmd() 155 if (msg->header.status == HWKEY_ERR_NOT_FOUND) { in hwkey_handle_get_keyslot_cmd() 157 msg->header.status = _handle_slots(ctx, slot_id, test_key_slots, in hwkey_handle_get_keyslot_cmd() 163 rc = hwkey_send_rsp(ctx, msg, key_data, klen); in hwkey_handle_get_keyslot_cmd() 175 struct hwkey_msg* msg, in hwkey_handle_derive_key_cmd() argument 182 if (msg->arg1 == HWKEY_KDF_VERSION_BEST) in hwkey_handle_derive_key_cmd() 183 msg->arg1 = HWKEY_KDF_VERSION_1; /* we only support V1 */ in hwkey_handle_derive_key_cmd() 185 switch (msg->arg1) { in hwkey_handle_derive_key_cmd() 187 msg->header.status = derive_key_v1(&ctx->uuid, ikm_data, ikm_len, in hwkey_handle_derive_key_cmd() [all …]
|
D | main.c | 86 ipc_msg_t msg = { in tipc_send_single_buf() local 91 return send_msg(chan, &msg); in tipc_send_single_buf() 113 ipc_msg_t msg = { in tipc_recv_single_buf() local 117 rc = read_msg(chan, msg_inf.id, 0, &msg); in tipc_recv_single_buf() 142 ipc_msg_t msg = { in tipc_send_two_segments() local 146 return send_msg(chan, &msg); in tipc_send_two_segments() 176 ipc_msg_t msg = { in tipc_recv_two_segments() local 180 rc = read_msg(chan, msg_inf.id, 0, &msg); in tipc_recv_two_segments()
|
/trusty/user/app/sample/memref-test/lender/ |
D | lender.c | 108 struct ipc_msg msg = { in lender_lend() local 115 return send_msg(chan, &msg); in lender_lend() 161 struct lender_msg msg; in lender_on_message() local 164 int rc = tipc_recv2(chan, sizeof(msg), &msg, sizeof(msg), data, in lender_on_message() 171 switch (msg.cmd) { in lender_on_message() 174 rc = lender_lend(chan, msg.cmd); in lender_on_message() 183 rc = lender_read_bss(chan, &msg.region); in lender_on_message() 189 if (rc - sizeof(struct lender_msg) != msg.region.size) { in lender_on_message() 192 rc = lender_write_bss(chan, &msg.region, data); in lender_on_message() 198 TLOGE("Bad command: %d\n", msg.cmd); in lender_on_message()
|
/trusty/user/base/app/cfi-test/ |
D | cfi-test.c | 33 struct crasher_msg msg = { in crasher_command() local 37 ret = tipc_send1(chan, &msg, sizeof(msg)); in crasher_command() 39 ASSERT_EQ(ret, sizeof(msg)); in crasher_command() 74 struct crasher_msg msg; in crasher_wait() local 75 ret = tipc_recv1(chan, sizeof(msg), &msg, sizeof(msg)); in crasher_wait() 79 ASSERT_EQ(ret, sizeof(msg)); in crasher_wait() 86 return msg.cmd; in crasher_wait()
|
/trusty/user/base/lib/hwkey/ |
D | hwkey.c | 72 struct hwkey_msg* msg, in send_req() argument 80 {.iov_base = msg, .iov_len = sizeof(*msg)}, in send_req() 93 if (((size_t)rc) != sizeof(*msg) + req_buf_len) { in send_req() 111 if (inf.len > sizeof(*msg) + (size_t)*rsp_buf_len) { in send_req() 113 inf.len - sizeof(*msg), (size_t)*rsp_buf_len); in send_req() 118 if (inf.len < sizeof(*msg)) { in send_req() 124 uint32_t cmd_sent = msg->header.cmd; in send_req() 127 {.iov_base = msg, .iov_len = sizeof(*msg)}, in send_req() 150 if (msg->header.cmd != (cmd_sent | HWKEY_RESP_BIT)) { in send_req() 152 msg->header.cmd, cmd_sent); in send_req() [all …]
|
/trusty/user/base/lib/dlmalloc/test/srv/ |
D | dlmalloc_app.cpp | 70 struct dlmalloc_test_msg msg; in dlmalloc_on_message() local 72 int ret = tipc_recv1(chan, sizeof(msg), &msg, sizeof(msg)); in dlmalloc_on_message() 76 } else if (ret != sizeof(msg)) { in dlmalloc_on_message() 81 switch (msg.cmd) { in dlmalloc_on_message() 218 TLOGE("Bad command: %d\n", msg.cmd); in dlmalloc_on_message() 219 msg.cmd = DLMALLOC_TEST_BAD_CMD; in dlmalloc_on_message() 226 ret = tipc_send1(chan, &msg, sizeof(msg)); in dlmalloc_on_message() 227 if (ret < 0 || ret != sizeof(msg)) { in dlmalloc_on_message()
|
/trusty/user/base/app/metrics/ |
D | consumer.c | 65 uint8_t msg[METRICS_MAX_MSG_SIZE]; in on_message() local 67 memset(msg, 0, sizeof(msg)); in on_message() 68 int msg_size = tipc_recv1(chan, sizeof(req), msg, sizeof(msg)); in on_message() 77 rc = tipc_send1(state->ns_handle, msg, msg_size); in on_message() 88 cmd = ((struct metrics_req*)msg)->cmd; in on_message()
|
/trusty/user/base/lib/hwkey/rust/src/ |
D | lib.rs | 135 self.0.send(&HwkeyMsg { msg: req_msg, request: slot_id })?; in get_keyslot_data() 222 let msg = HwkeyDeriveVersionedMsg { msg: req_msg, context: src }; in derive() localVariable 224 self.0.send(&msg)?; in derive() 515 msg: hwkey_msg, field 529 serializer.serialize_as_bytes(&self.msg.header)?; in serialize() 530 serializer.serialize_as_bytes(&self.msg.arg1)?; in serialize() 531 serializer.serialize_as_bytes(&self.msg.arg2)?; in serialize() 538 msg: hwkey_derive_versioned_msg, field 553 serializer.serialize_as_bytes(&self.msg.header)?; in serialize() 554 serializer.serialize_as_bytes(&self.msg.kdf_version)?; in serialize() [all …]
|
/trusty/user/base/lib/scudo/test/srv/ |
D | scudo_app.cpp | 133 ipc_msg_t msg = { in recv_memref_msg() local 139 rc = read_msg(chan, msg_inf.id, 0, &msg); in recv_memref_msg() 149 struct scudo_msg msg; in scudo_on_message() local 152 int ret = recv_memref_msg(chan, sizeof(msg), &msg, sizeof(msg), &memref); in scudo_on_message() 153 if (ret < 0 || ret != sizeof(msg)) { in scudo_on_message() 158 switch (msg.cmd) { in scudo_on_message() 325 if (msg.cmd == SCUDO_TAGGED_MEMREF_LARGE) { in scudo_on_message() 335 msg.cmd = SCUDO_TEST_FAIL; in scudo_on_message() 346 msg.cmd = SCUDO_TEST_FAIL; in scudo_on_message() 359 if (msg.cmd == SCUDO_UNTAGGED_MEMREF_LARGE) { in scudo_on_message() [all …]
|
/trusty/user/base/lib/dlmalloc/test/ |
D | dlmalloc_test.c | 38 struct dlmalloc_test_msg msg = { in dlmalloc_srv_rpc_expect() local 42 ret = tipc_send1(chan, &msg, sizeof(msg)); in dlmalloc_srv_rpc_expect() 43 ASSERT_EQ(ret, sizeof(msg)); in dlmalloc_srv_rpc_expect() 57 ret = tipc_recv1(chan, sizeof(msg), &msg, sizeof(msg)); in dlmalloc_srv_rpc_expect() 58 ASSERT_EQ(ret, sizeof(msg)); in dlmalloc_srv_rpc_expect() 59 ASSERT_EQ(msg.cmd, cmd); in dlmalloc_srv_rpc_expect()
|
/trusty/user/base/experimental/lib/tidl/ |
D | ipc.cpp | 45 ipc_msg_t msg = { in send() local 51 return send_msg(chan, &msg); in send() 75 ipc_msg_t msg = { in recv() local 81 rc = read_msg(chan, msg_inf.id, 0, &msg); in recv() 105 ipc_msg_t msg = { in send() local 111 return send_msg(chan, &msg); in send() 143 ipc_msg_t msg = { in recv() local 149 rc = read_msg(chan, msg_inf.id, 0, &msg); in recv() 179 ipc_msg_t msg = { in send() local 185 return send_msg(chan, &msg); in send() [all …]
|
/trusty/user/base/lib/smc/ |
D | smc.c | 24 int smc_read_response(handle_t channel, struct smc_msg* msg) { in smc_read_response() argument 39 rc = tipc_recv2(channel, msg_len, msg, msg_len, &err, sizeof(err)); in smc_read_response() 56 int smc_send_request(handle_t channel, struct smc_msg* msg) { in smc_send_request() argument 58 int rc = tipc_send1(channel, msg, msg_len); in smc_send_request()
|
/trusty/user/base/lib/tipc/test/main/ |
D | main.c | 1056 ipc_msg_t msg; in TEST() local 1066 msg.num_handles = 0; in TEST() 1067 msg.handles = NULL; in TEST() 1068 msg.num_iov = 2; in TEST() 1069 msg.iov = iov; in TEST() 1079 rc = send_msg(chan, &msg); in TEST() 1107 ipc_msg_t msg; in TEST() local 1110 memset(&msg, 0, sizeof(msg)); in TEST() 1113 rc = send_msg(INVALID_IPC_HANDLE, &msg); in TEST() 1130 rc = send_msg(handle_base + MAX_USER_HANDLES, &msg); in TEST() [all …]
|
/trusty/kernel/lib/trusty/ |
D | ipc_msg.c | 194 const struct ipc_msg_kern* msg) { in kern_msg_write_locked() argument 198 if (msg->num_handles) { in kern_msg_write_locked() 199 if (msg->num_handles > MAX_MSG_HANDLES) { in kern_msg_write_locked() 200 LTRACEF("sending too many (%u) handles\n", msg->num_handles); in kern_msg_write_locked() 204 if (!msg->handles) in kern_msg_write_locked() 209 if (likely(msg->num_iov)) { in kern_msg_write_locked() 211 (const struct iovec_kern*)msg->iov, in kern_msg_write_locked() 212 msg->num_iov); in kern_msg_write_locked() 218 for (uint i = 0; i < msg->num_handles; i++) { in kern_msg_write_locked() 219 if (!msg->handles[i]) { in kern_msg_write_locked() [all …]
|
/trusty/user/base/lib/scudo/test/ |
D | scudo_test.c | 45 ipc_msg_t msg = { in send_memref_msg() local 51 return send_msg(chan, &msg); in send_memref_msg() 64 struct scudo_msg msg = { in scudo_srv_rpc_memref() local 68 ret = send_memref_msg(chan, &msg, sizeof(msg), memref); in scudo_srv_rpc_memref() 70 ASSERT_EQ(ret, sizeof(msg)); in scudo_srv_rpc_memref() 85 ret = tipc_recv1(chan, sizeof(msg), &msg, sizeof(msg)); in scudo_srv_rpc_memref() 89 ASSERT_EQ(ret, sizeof(msg)); in scudo_srv_rpc_memref() 90 if (msg.cmd == cmd) { in scudo_srv_rpc_memref() 93 return msg.cmd; in scudo_srv_rpc_memref()
|
/trusty/user/app/sample/hwcryptohal/common/ |
D | err.rs | 91 let msg = CString::new(format!("KM error {:?}", e).as_str()).unwrap(); in from() localVariable 92 binder::Status::new_service_specific_error(HalErrorCode::GENERIC_ERROR, Some(&msg)) in from() 95 let msg = CString::new( in from() localVariable 99 binder::Status::new_service_specific_error(code, Some(&msg)) in from() 102 let msg = in from() localVariable 106 Some(&msg), in from()
|