C Share a memory segment across jails

I've written code to share memory across processes but never thought to try this across jails. Is this supported?

Precisely - I'd like to create a shared memory segment in one jail but allow another process in another jail to map this segment into the other process's address space.
 

Before FreeBSD 11 SYSV IPC resources were not namespaced, and you could only enable everything with allow.sysvipc=1 or enable nothing at all.

In FreeBSD 11 allow.sysvipc=1 is no longer recommended, instead three new permissions has been introduced:
  • sysvshm: Controls access to shared memory
  • sysvsem: Controls access to SYSV semaphores
  • sysvmsg: Controls access to SYSV message queues
Each of these can have three values:
  • disable: Disables access to this type of resource (default)
  • inherit: Makes the jail inherit the global SYSV namespace (the old behaviour, same as allow.sysvipc=1)
  • new: Creates a new seperate SYSV namespace for this jail. This is what you want.
I suspect this doesn't quite do what I want which is two or more jails share the same namespace for shared memory.
 
Back
Top