0

我试图根据它们的属性和用途清楚地区分这两个术语/技术。我最感兴趣的是它们之间的区别。

我知道它们通过插入系统调用以相同的方式工作。或者我可能错了!

但是,我仍然对系统包装器属于什么层和模式(用户、内核)以及参考监视器属于什么层和模式感到困惑。

用尽可能少的词。请告诉我您对这两种插入技术的了解。

非常感谢。

4

1 回答 1

0

这就是我对两者的解释:

系统调用包装器 系统调用包装器是包装系统调用的用户模式代码。也就是说,它在系统调用之前和/或之后执行以验证某些属性。一个简单的例子是在 execve 周围添加一层代码来检查权限或记录此操作。照原样,libc 和其他库已经包装了系统调用。您通常不会直接使用 execve、clone、open、read 或 write - 而是有 execv、fork、fopen、fread 和 fread 等版本,以使程序员的工作更轻松一些。

参考监视器 另一方面,我认为参考监视器的功能有些不同。它试图调解对资源的访问,这可以在用户和内核中完成,并且可以干预系统调用甚至更低。

I think the best way to distinguish the two is that one (system call wrapper) is an implementation, whereas the other (reference monitor) is an idea or policy you would like to enforce. That is, you could wrap system calls in a program to ensure access control and proper resource allocation, but the idea and the implementation are not one and the same.

Note: I'm not very familiar with reference monitors. I used http://en.wikipedia.org/wiki/Reference_monitor and http://www.cse.psu.edu/~tjaeger/cse544-s10/papers/refmon.pdf as partial sources.

于 2012-04-11T01:27:03.067 回答