XEN中ACM模块编译注意事项
在默认设置下,ACM模块是不被编译和加载到内核中的。如果需要编译该模块,需要手动修改根目录下的Config.mk文件# Enable XSM security module.Enabling XSM requires selection of an
# XSM security module (FLASK_ENABLE or ACM_SECURITY).
XSM_ENABLE ?= n
FLASK_ENABLE ?= n
ACM_SECURITY ?= n 注意事项1:此处除需要更改ACM_SECURITY项外,XSM_ENABLE也需要打开
# Enable XSM security module.Enabling XSM requires selection of an
# XSM security module (FLASK_ENABLE or ACM_SECURITY).
XSM_ENABLE ?= y
FLASK_ENABLE ?= n
ACM_SECURITY ?= y 否则,将出现错误
acm_core.c: In function ‘acm_init’:
acm_core.c:283: error: ‘policy_buffer’ undeclared (first use in this function)
acm_core.c:283: error: (Each undeclared identifier is reported only once
acm_core.c:283: error: for each function it appears in.)
acm_core.c:283: error: ‘policy_size’ undeclared (first use in this function)
cc1: warnings being treated as errors
acm_core.c:319: warning: implicit declaration of function ‘register_xsm’
acm_core.c: At top level:
acm_core.c:325: warning: data definition has no type or storage class
acm_core.c:325: warning: type defaults to ‘int’ in declaration of ‘xsm_initcall’
acm_core.c:325: warning: parameter names (without types) in function declaration
make: *** Error 1
make: Leaving directory `/xen/xen-3.4.2/xen/xsm/acm'
make: *** Error 2
make: Leaving directory `/xen/xen-3.4.2/xen/xsm'
make: *** Error 2
make: Leaving directory `/xen/xen-3.4.2/xen/arch/x86'
make: *** Error 2
make: Leaving directory `/xen/xen-3.4.2/xen'
make: *** Error 2 此错误是因为/xen/include/xsm/xsm.h中定义了如下内容:
#ifdef XSM_ENABLE
extern char *policy_buffer;
extern u32 policy_size; 注意事项2:xend-config.sxp
增加如下内容
(xsm_module_name acm) 否则,ACM策略类型将被认为不支持(未指定使用的xsm类型)
页:
[1]