Skip to contentSkip to conversation

Missing XSM permission for livepatch sysctl

DISCUSSION Wei Liu 3 participants 5 messages Feb 6, 2017

lore
Share & tools
lore

Wei Liu

author
#0 lore raw

When running XTF with a XSM-enabled Xen (generated by one of my osstest flight for testing something else).

Executing 'xl create -F tests/livepatch-priv-check/test-hvm32-livepatch-priv-check.cfg' --- Xen Test Framework ---
Environment: HVM 32bit (No paging)
Live Patch Privilege Check
Fail: test_upload: Unexpected return code -13
Fail: test_list: Unexpected return code -13
Fail: test_get: Unexpected return code -13
Fail: test_action: Unexpected return code -13
Fail: test_action: Unexpected return code -13
Fail: test_action: Unexpected return code -13
Fail: test_action: Unexpected return code -13
Test result: FAILURE

-13 is EACCESS.

Should be easy to fix.

Wei.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

author
#1 lore raw
Quoted 17 lines · Wei Liu

When running XTF with a XSM-enabled Xen (generated by one of my osstest flight for testing something else).

Executing 'xl create -F tests/livepatch-priv-check/test-hvm32-livepatch-priv-check.cfg' --- Xen Test Framework ---
Environment: HVM 32bit (No paging)
Live Patch Privilege Check
Fail: test_upload: Unexpected return code -13
Fail: test_list: Unexpected return code -13
Fail: test_get: Unexpected return code -13
Fail: test_action: Unexpected return code -13
Fail: test_action: Unexpected return code -13
Fail: test_action: Unexpected return code -13
Fail: test_action: Unexpected return code -13
Test result: FAILURE

Quoted 3 lines

-13 is EACCESS.

Should be easy to fix.

But but but there is already livepatch_op in dom0.te, so I'm baffled.

Wei.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#2 lore raw
Quoted 18 lines · Wei Liu
Quoted 17 lines · Wei Liu

When running XTF with a XSM-enabled Xen (generated by one of my osstest flight for testing something else).

Executing 'xl create -F tests/livepatch-priv-check/test-hvm32-livepatch-priv-check.cfg' --- Xen Test Framework ---
Environment: HVM 32bit (No paging)
Live Patch Privilege Check
Fail: test_upload: Unexpected return code -13
Fail: test_list: Unexpected return code -13
Fail: test_get: Unexpected return code -13
Fail: test_action: Unexpected return code -13
Fail: test_action: Unexpected return code -13
Fail: test_action: Unexpected return code -13
Fail: test_action: Unexpected return code -13
Test result: FAILURE

Quoted 5 lines
Quoted 3 lines

-13 is EACCESS.

Should be easy to fix.

But but but there is already livepatch_op in dom0.te, so I'm baffled.

43 if ( op->interface_version != XEN_SYSCTL_INTERFACE_VERSION )
44 return -EACCES;

in do_sysctl

Quoted 2 lines

Wei.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

author
#3 lore raw
Quoted 21 lines · Konrad Rzeszutek Wilk
Quoted 20 lines · Wei Liu
Quoted 19 lines · Wei Liu

When running XTF with a XSM-enabled Xen (generated by one of my osstest flight for testing something else).

Executing 'xl create -F tests/livepatch-priv-check/test-hvm32-livepatch-priv-check.cfg' --- Xen Test Framework ---
Environment: HVM 32bit (No paging)
Live Patch Privilege Check
Fail: test_upload: Unexpected return code -13
Fail: test_list: Unexpected return code -13
Fail: test_get: Unexpected return code -13
Fail: test_action: Unexpected return code -13
Fail: test_action: Unexpected return code -13
Fail: test_action: Unexpected return code -13
Fail: test_action: Unexpected return code -13
Test result: FAILURE

-13 is EACCESS.

Quoted 9 lines
Quoted 3 lines
Quoted 1 line

Should be easy to fix.

But but but there is already livepatch_op in dom0.te, so I'm baffled.

43 if ( op->interface_version != XEN_SYSCTL_INTERFACE_VERSION )
44 return -EACCES;

in do_sysctl

They are supposed to be the same version. I didn't modify Xen source code at all and the test box was freshly installed. The non-XSM build passed.

Wei.

Quoted 3 lines
Quoted 3 lines

Wei.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#4 lore raw
Quoted 24 lines · Wei Liu
Quoted 23 lines · Konrad Rzeszutek Wilk
Quoted 22 lines · Wei Liu
Quoted 17 lines · Wei Liu

When running XTF with a XSM-enabled Xen (generated by one of my osstest flight for testing something else).

Executing 'xl create -F tests/livepatch-priv-check/test-hvm32-livepatch-priv-check.cfg' --- Xen Test Framework ---
Environment: HVM 32bit (No paging)
Live Patch Privilege Check
Fail: test_upload: Unexpected return code -13
Fail: test_list: Unexpected return code -13
Fail: test_get: Unexpected return code -13
Fail: test_action: Unexpected return code -13
Fail: test_action: Unexpected return code -13
Fail: test_action: Unexpected return code -13
Fail: test_action: Unexpected return code -13
Test result: FAILURE

Quoted 3 lines

-13 is EACCESS.

Should be easy to fix.

But but but there is already livepatch_op in dom0.te, so I'm baffled.

Quoted 8 lines
Quoted 5 lines

43 if ( op->interface_version != XEN_SYSCTL_INTERFACE_VERSION )
44 return -EACCES;

in do_sysctl

They are supposed to be the same version. I didn't modify Xen source code at all and the test box was freshly installed. The non-XSM build passed.

XTF already probes for the SYSCTL_INTERFACE_VERSION in use by the hypervisor, and that check succeeds by virtue of the test not exiting early.

(P.S. This test is a very good reason why we shouldn't have unstable ABIs. It makes testing basically impossible to do correctly.)

~Andrew

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel