cvs commit: src/sys/sys ipc.h shm.h src/sys/kern sysv_shm.c

John Baldwin jhb at freebsd.org
Tue Feb 12 15:05:29 PST 2008


On Tuesday 12 February 2008 04:42:26 pm Maxim Sobolev wrote:
> Christian S.J. Peron wrote:
> > csjp        2008-02-12 20:55:04 UTC
> > 
> >   FreeBSD src repository
> > 
> >   Modified files:
> >     sys/sys              ipc.h shm.h 
> >     sys/kern             sysv_shm.c 
> >   Log:
> >   Make sure we restrict Linux only IPC calls from being executed
> >   through the FreeBSD ABI.  IPC_INFO, SHM_INFO, SHM_STAT were added
> >   specifically for Linux binary support.  They are not documented
> >   as being a part of the FreeBSD ABI, also, the structures necessary
> >   for them have been hidden away from the users for a long time.
> >   
> >   Also, the Linux ABI layer uses it's own structures to populate the
> >   responses back to the user to ensure that the ABI is consistent.
> >   
> >   I think there is a bit more separation work that needs to happen.
> >   
> >   Reviewed by:    jhb
> >   Discussed with: jhb
> >   Discussed on:   freebsd-arch@ (very briefly)
> >   MFC after:      1 month
> 
> Just curious why not make those functions available via FreeBSD API 
> instead by properly advertising them in the documentation? From my 
> completely ignorant point of view it should make it easier to port a 
> software that has been created on Linux, which is always a Good Thing[tm].

The only thing Linux uses it for is to implement ipcs(8).  Our current ipcs(8) 
still grubs around in kvm directly.  I think a good idea would be to look at 
enabling these after the SYSV IPC ABI has settled from all the upcoming 
changes and use them (or sysctls) to replace the use of kvm on live kernels 
for ipcs and ipcrm.

-- 
John Baldwin


More information about the cvs-all mailing list