Hi,
On Sat Dec 06, 2014 at 22:24:20 +0800, li94575 wrote:
As I know, we can set access permissions for the kernel objects, and access to user-level objects is through IPC_Gate. So, can I set access permissions for user-level objects through the IPC_Gate?
Yes. This is done by giving the appropriate rights flags on mapping. In Ned's scripting, there are those ':mode("...")' statements (typically abbreviated with just ':m("...")' or just 'svr()' that define those permissions. However, bits to be used by user-level implementations are just the write bit.
Another question is that If multiple clients need to access a particular service object, do they use different IPC_Gate or the same?
Mostly the same IPC-gate but actually both is possible. The purpose of the IPC-gate is not only to identify the server object but also to identify the client, or at the least the group of clients. So if you want to identify a specific client (or a specific group of clients) you hand them a separate IPC gate. If the server does not care a single IPC-gate will just be fine.
Adam