Displaying 10 results from an estimated 10 matches for "no_pad".
Did you mean:
nopad
2020 Jul 21
0
[PATCH v9 42/84] KVM: introspection: add KVMI_VM_CHECK_COMMAND and KVMI_VM_CHECK_EVENT
...st.c b/tools/testing/selftests/kvm/x86_64/kvmi_test.c
index d15eccc330e5..28216c4e8b9d 100644
--- a/tools/testing/selftests/kvm/x86_64/kvmi_test.c
+++ b/tools/testing/selftests/kvm/x86_64/kvmi_test.c
@@ -99,6 +99,8 @@ static void hook_introspection(struct kvm_vm *vm)
do_hook_ioctl(vm, Kvm_socket, no_padding, EEXIST);
set_command_perm(vm, KVMI_GET_VERSION, disallow, EPERM);
+ set_command_perm(vm, KVMI_VM_CHECK_COMMAND, disallow, EPERM);
+ set_command_perm(vm, KVMI_VM_CHECK_EVENT, disallow, EPERM);
set_command_perm(vm, all_IDs, allow_inval, EINVAL);
set_command_perm(vm, all_IDs, disallow, 0)...
2020 Jul 21
0
[PATCH v9 81/84] KVM: introspection: add KVMI_EVENT_SINGLESTEP
...rpl, sizeof(rpl));
+}
+
static void test_supported_singlestep(struct kvm_vm *vm)
{
- __u8 disable = 0, enable = 1, enable_inval = 2;
+ struct vcpu_worker_data data = {.vm = vm, .vcpu_id = VCPU_ID };
+ __u16 event_id = KVMI_EVENT_SINGLESTEP;
+ __u8 enable = 1, enable_inval = 2;
__u8 padding = 1, no_padding = 0;
+ pthread_t vcpu_thread;
- cmd_vcpu_singlestep(vm, enable, no_padding, 0);
- cmd_vcpu_singlestep(vm, disable, no_padding, 0);
+ enable_vcpu_event(vm, event_id);
+ vcpu_thread = start_vcpu_worker(&data);
+ test_singlestep_event(event_id);
+ stop_vcpu_worker(vcpu_thread, &data);
+...
2020 Jul 21
0
[PATCH v9 45/84] KVM: introspection: add KVMI_VM_CONTROL_EVENTS
..._event ev;
+ enable_vm_event(id);
+
trigger_event_unhook_notification(vm);
receive_event(&hdr, &ev, sizeof(ev), id);
+
+ disable_vm_event(id);
+}
+
+static void test_cmd_vm_control_events(struct kvm_vm *vm)
+{
+ __u16 id = KVMI_EVENT_UNHOOK, invalid_id = 0xffff;
+ __u16 padding = 1, no_padding = 0;
+ __u8 enable = 1, enable_inval = 2;
+
+ enable_vm_event(id);
+ disable_vm_event(id);
+
+ cmd_vm_control_events(id, enable, padding, -KVM_EINVAL);
+ cmd_vm_control_events(id, enable_inval, no_padding, -KVM_EINVAL);
+ cmd_vm_control_events(invalid_id, enable, no_padding, -KVM_EINVAL);
+
+ d...
2020 Jul 21
0
[PATCH v9 69/84] KVM: introspection: add KVMI_VCPU_GET_XCR
...+ &rpl, sizeof(rpl));
+
+ TEST_ASSERT(r == expected_err,
+ "KVMI_VCPU_GET_XCR failed with error %d (%s), expected err %d\n",
+ -r, kvm_strerror(-r), expected_err);
+
+ *value = r == 0 ? rpl.value : 0;
+}
+
+static void test_cmd_vcpu_get_xcr(struct kvm_vm *vm)
+{
+ u8 no_padding = 0, padding = 1;
+ u8 xcr0 = 0, xcr1 = 1;
+ u64 value;
+
+ cmd_vcpu_get_xcr(vm, xcr0, &value, no_padding, 0);
+ pr_info("XCR0 0x%lx\n", value);
+
+ cmd_vcpu_get_xcr(vm, xcr0, &value, padding, -KVM_EINVAL);
+ cmd_vcpu_get_xcr(vm, xcr1, &value, no_padding, -KVM_EINVAL);
+}...
2001 Mar 06
3
crashing on receiving connection
...ed signal SIGSEGV, Segmentation fault.
0x40075a30 in BN_MONT_CTX_set () from /usr/lib/libcrypto.so.0.9.6
Running step-for-step, I saw it crashing in the following line in
protocol.c:
/* Encrypt the random data */
if(RSA_public_encrypt(len, cl->hischallenge, buffer, cl->rsa_key, RSA_NO_PADDING) != len) /* NO_PADDING because the message size equals the RSA key size and it is totally random */
I have no idea, I am not a very good debuging expert.
BTW, the client on the other side says:
Mar 6 18:34:21 isdn tinc.vpn[3114]: Terminating
Mar 6 18:34:22 isdn tinc.vpn[3120]: tincd 1.0pre...
2020 Jul 21
0
[PATCH v9 44/84] KVM: introspection: add KVMI_EVENT_UNHOOK
...(__u16 id, __u16 padding, int expected_err)
-r, kvm_strerror(-r), expected_err);
}
-static void test_cmd_vm_check_event(void)
+static void test_cmd_vm_check_event(struct kvm_vm *vm)
{
- __u16 invalid_id = 0xffff;
+ __u16 valid_id = KVMI_EVENT_UNHOOK, invalid_id = 0xffff;
__u16 padding = 1, no_padding = 0;
cmd_vm_check_event(invalid_id, padding, -KVM_EINVAL);
cmd_vm_check_event(invalid_id, no_padding, -KVM_ENOENT);
+
+ cmd_vm_check_event(valid_id, no_padding, 0);
+ cmd_vm_check_event(valid_id, padding, -KVM_EINVAL);
+
+ disallow_event(vm, valid_id);
+ cmd_vm_check_event(valid_id, 0, -K...
2020 Jul 21
0
[PATCH v9 75/84] KVM: introspection: add KVMI_VCPU_CONTROL_MSR and KVMI_EVENT_MSR
...ev.msr.msr, msr);
+
+ *old_value = rpl.msr.new_val = ev.msr.old_value;
+
+ reply_to_event(&hdr, &ev.common, KVMI_EVENT_ACTION_CONTINUE,
+ &rpl.common, sizeof(rpl));
+}
+
+static void test_invalid_control_msr(struct kvm_vm *vm, __u32 msr)
+{
+ __u8 enable = 1, enable_inval = 2;
+ __u8 no_padding = 0, padding = 1;
+ int expected_err = -KVM_EINVAL;
+ __u32 msr_inval = -1;
+
+ cmd_control_msr(vm, msr, enable_inval, no_padding, expected_err);
+ cmd_control_msr(vm, msr, enable, padding, expected_err);
+ cmd_control_msr(vm, msr_inval, enable, no_padding, expected_err);
+}
+
+static void test...
2020 Jul 21
87
[PATCH v9 00/84] VM introspection
The KVM introspection subsystem provides a facility for applications
running on the host or in a separate VM, to control the execution of
other VMs (pause, resume, shutdown), query the state of the vCPUs (GPRs,
MSRs etc.), alter the page access bits in the shadow page tables (only
for the hardware backed ones, eg. Intel's EPT) and receive notifications
when events of interest have taken place
2020 Jul 21
0
[PATCH v9 70/84] KVM: introspection: add KVMI_VCPU_GET_XSAVE
...ing/selftests/kvm/x86_64/kvmi_test.c
index 8b92ff7cee6b..657684ec6ff5 100644
--- a/tools/testing/selftests/kvm/x86_64/kvmi_test.c
+++ b/tools/testing/selftests/kvm/x86_64/kvmi_test.c
@@ -1551,6 +1551,35 @@ static void test_cmd_vcpu_get_xcr(struct kvm_vm *vm)
cmd_vcpu_get_xcr(vm, xcr1, &value, no_padding, -KVM_EINVAL);
}
+static void cmd_vcpu_get_xsave(struct kvm_vm *vm)
+{
+ struct {
+ struct kvmi_msg_hdr hdr;
+ struct kvmi_vcpu_hdr vcpu_hdr;
+ } req = {};
+ struct kvm_xsave rpl;
+ int r;
+
+ r = do_vcpu0_command(vm, KVMI_VCPU_GET_XSAVE, &req.hdr, sizeof(req),
+ &rpl, sizeo...
2020 Jul 21
0
[PATCH v9 71/84] KVM: introspection: add KVMI_VCPU_SET_XSAVE
...ng/selftests/kvm/x86_64/kvmi_test.c
index 657684ec6ff5..30741983a3ab 100644
--- a/tools/testing/selftests/kvm/x86_64/kvmi_test.c
+++ b/tools/testing/selftests/kvm/x86_64/kvmi_test.c
@@ -1551,25 +1551,43 @@ static void test_cmd_vcpu_get_xcr(struct kvm_vm *vm)
cmd_vcpu_get_xcr(vm, xcr1, &value, no_padding, -KVM_EINVAL);
}
-static void cmd_vcpu_get_xsave(struct kvm_vm *vm)
+static void cmd_vcpu_get_xsave(struct kvm_vm *vm, struct kvm_xsave *rpl)
{
struct {
struct kvmi_msg_hdr hdr;
struct kvmi_vcpu_hdr vcpu_hdr;
} req = {};
- struct kvm_xsave rpl;
int r;
r = do_vcpu0_command(vm...