sysv IPC and shminfo ABI
Alfred Perlstein
alfred at freebsd.org
Mon Feb 11 21:10:21 PST 2008
* Christian S.J. Peron <csjp at FreeBSD.org> [080211 18:00] wrote:
> All,
>
> A while ago, I committed a patch which changed what was a kernel private
> structure 'shminfo'. In order to access this structure, you must define
> _KERNEL which suggests to me we should not be making guarantees about it's
> size.
>
> See /usr/src/sys/shm.h
... yeah but...
>
> So I guess I have a few questions:
>
> (1) Is struct shminfo considered a sys V standard structure that has a
> predefined size that should be maintained across all architectures?
No, that's not required, what is required is backwards compat.
> (2) Is this an ABI breakage that we care about?
Yes, if it's breaking people, then yes. for ia32 in particular.
> (1) Back the change out now before any damage is done (assuming we care)
>
> (2) Apply this safety patch to RELENG_7 and RELENG_7_0
>
> http://people.freebsd.org/~csjp/sysv_shm.1202744975.6_abi_fix.diff
Honestly I was going to suggest all this cruft to "get it right", but
this patch looks like the most simple, most correct thing. I think
it should go in.
> (3) Leave things as they are, as we are going to be getting support for large
> shared memory allocations in the future. (This is why I asked if the
> structure supposed to be a standard size).
Afaik there's no "standard size" in the API (I think shmctl->shminfo is
pretty unix specific) but it pays to keep the backward compat.
>
> I apologize for this, I understand this is probably the last thing we need
> before the release, but I just want to make sure that we are doing the right
> thing.
Cool.
-Alfred
More information about the freebsd-arch
mailing list