Re: 2Gb SYSVSHM limitation

From: Robert Watson <rwatson_at_FreeBSD.org>
Date: Mon, 17 Jul 2006 18:25:03 +0100 (BST)
On Mon, 17 Jul 2006, John Baldwin wrote:

> On Wednesday 12 July 2006 04:58, Igor Sysoev wrote:
>
>> the current kernel limit of SysV memory segment is 2G. Today it is too 
>> small for amd64 machines.
>>
>> Year ago Christian S.J. Peron had propsed the patch 
>> http://people.freebsd.org/~csjp/bigsharedmem.1117028863.diff to increase 
>> the limit: 
>> http://freebsd.rambler.ru/bsdmail/freebsd-current_2005/msg05627.html
>>
>> Are objections against this patch ?
>
> Well, it breaks the ABI of shminfo. :( Changing the ABI of structures shared 
> with userspace like this requires duplicate syscalls, etc. to not break 
> existing binaries (such as existing 6.x amd64 binaries).

We're well-overdue for an ABI roll on the System V IPC data structures, but 
when we do this, we need to be careful to:

(a) Provide the compat bits properly.

(b) Make sure we fix all the things that need fixing.

The current ipc perm data structure contains the following fields:

struct ipc_perm {
         unsigned short  cuid;   /* creator user id */
         unsigned short  cgid;   /* creator group id */
         unsigned short  uid;    /* user id */
         unsigned short  gid;    /* group id */
         unsigned short  mode;   /* r/w permission */
         unsigned short  seq;    /* sequence # (to generate unique ipcid) */
         key_t           key;    /* user specified msg/sem/shm key */
};

While here, we should fix the above uids and gids do be of appropriate data 
types.  McAfee did the first step here by breaking out kernel and user data 
structures a few years ago as part of the MAC Framework work, but we'll need 
new bits to do the next part for compat system calls.

Robert N M Watson
Computer Laboratory
University of Cambridge
Received on Mon Jul 17 2006 - 15:25:05 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:58 UTC