XEN中ACM模块编译注意事项

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
[ 4 ] : ***  [ acm_core.o ]  Error  1
make
[ 4 ] : Leaving directory `/xen/xen- 3.4.2 /xen/xsm/acm'
make
[ 3 ] : ***  [ acm/built_in.o ]  Error  2
make
[ 3 ] : Leaving directory `/xen/xen- 3.4.2 /xen/xsm'
make
[ 2 ] : ***  [ /xen/xen-3.4.2/xen/xsm/built_in.o ]  Error  2
make
[ 2 ] : Leaving directory `/xen/xen- 3.4.2 /xen/arch/x86'
make
[ 1 ] : ***  [ /xen/xen-3.4.2/xen/xen ]  Error  2
make
[ 1 ] : Leaving directory `/xen/xen- 3.4.2 /xen'
make: *** 
[ build ]  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类型)

 

 

 

 

posted on 2010-09-02 17:02 Roger W 阅读(...) 评论(...) 编辑 收藏

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值