Add Intel umip(User Mode Instruction Prevention) basic function tests
PATCH 1/2 Add Intel umip(User Mode Instruction Prevention) basic function tests
umip is one Intel security function, which protect(#GP exception) below instructions in user mode:
* SGDT - Store Global Descriptor Table
* SIDT - Store Interrupt Descriptor Table
* SLDT - Store Local Descriptor Table
* SMSW - Store Machine Status Word
* STR - Store Task Register
Add test code and scripts.
Signed-off-by Pengfei Xu <[email protected]>
--- testcases/kernel/security/umip/.gitignore | 1 + testcases/kernel/security/umip/Makefile | 9 ++ testcases/kernel/security/umip/umip_common.sh | 56 +++++++++ testcases/kernel/security/umip/umip_func.sh | 74 +++++++++++ testcases/kernel/security/umip/umip_gp_test.c | 171 ++++++++++++++++++++++++++ 5 files changed, 311 insertions(+) create mode 100644 testcases/kernel/security/umip/.gitignore create mode 100644 testcases/kernel/security/umip/Makefile create mode 100755 testcases/kernel/security/umip/umip_common.sh create mode 100755 testcases/kernel/security/umip/umip_func.sh create mode 100644 testcases/kernel/security/umip/umip_gp_test.c
testcases/kernel/security/umip/.gitignore new file +1 -0
@@ -0,0 +1 @@ +umip_gp_test
testcases/kernel/security/umip/Makefile new file +9 -0
@@ -0,0 +1,9 @@ +# SPDX-License-Identifier: GPL-2.0-or-later + +top_srcdir ?= ../../../.. + +include $(top_srcdir)/include/mk/testcases.mk + +INSTALL_TARGETS := *.sh + +include $(top_srcdir)/include/mk/generic_leaf_target.mk
testcases/kernel/security/umip/umip_common.sh new file +56 -0
56 lines not on this page · raw message
testcases/kernel/security/umip/umip_func.sh new file +74 -0
74 lines not on this page · raw message
testcases/kernel/security/umip/umip_gp_test.c new file +171 -0
171 lines not on this page · raw message
Signature · 1 line
2.14.1
PATCH 2/2 Add umip(User Mode Instruction Prevention) test cases
Add umip test cases into ltp/runtest/secure_umip
Signed-off-by Pengfei Xu <[email protected]>
--- runtest/secure_umip | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 runtest/secure_umip
runtest/secure_umip new file +6 -0
@@ -0,0 +1,6 @@ +#DESCRIPTION: CPU security feature UMIP test +umip_protect_sgdt umip_func.sh umip_gp_test g +umip_protect_sidt umip_func.sh umip_gp_test i +umip_protect_sldt umip_func.sh umip_gp_test l +umip_protect_smsw umip_func.sh umip_gp_test m +umip_protect_str umip_func.sh umip_gp_test t
Signature · 1 line
2.14.1