FreeBSD kernel kern code
sysv_shm.c File Reference
#include <sys/cdefs.h>
#include "opt_sysvipc.h"
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/abi_compat.h>
#include <sys/kernel.h>
#include <sys/limits.h>
#include <sys/lock.h>
#include <sys/sysctl.h>
#include <sys/shm.h>
#include <sys/proc.h>
#include <sys/malloc.h>
#include <sys/mman.h>
#include <sys/module.h>
#include <sys/mutex.h>
#include <sys/racct.h>
#include <sys/resourcevar.h>
#include <sys/rwlock.h>
#include <sys/stat.h>
#include <sys/syscall.h>
#include <sys/syscallsubr.h>
#include <sys/sysent.h>
#include <sys/sysproto.h>
#include <sys/jail.h>
#include <security/audit/audit.h>
#include <security/mac/mac_framework.h>
#include <vm/vm.h>
#include <vm/vm_param.h>
#include <vm/pmap.h>
#include <vm/vm_object.h>
#include <vm/vm_map.h>
#include <vm/vm_page.h>
#include <vm/vm_pager.h>
Include dependency graph for sysv_shm.c:

Go to the source code of this file.

Data Structures

struct  shmmap_state
 
struct  shmdt_args
 
struct  shmat_args
 
struct  shmctl_args
 
struct  shmget_args
 

Macros

#define SHMSEG_FREE   0x0200
 
#define SHMSEG_REMOVED   0x0400
 
#define SHMSEG_ALLOCATED   0x0800
 
#define SHMMAXPGS   131072 /* Note: sysv shared memory is swap backed. */
 
#define SHMMAX   (SHMMAXPGS*PAGE_SIZE)
 
#define SHMMIN   1
 
#define SHMMNI   192
 
#define SHMSEG   128
 
#define SHMALL   (SHMMAXPGS)
 
#define SYSVSHM_LOCK()   sx_xlock(&sysvshmsx)
 
#define SYSVSHM_UNLOCK()   sx_xunlock(&sysvshmsx)
 
#define SYSVSHM_ASSERT_LOCKED()   sx_assert(&sysvshmsx, SA_XLOCKED)
 

Functions

 __FBSDID ("$FreeBSD$")
 
 FEATURE (sysv_shm, "System V shared memory segments support")
 
static MALLOC_DEFINE (M_SHM, "shm", "SVID compatible shared memory segments")
 
static void shm_deallocate_segment (struct shmid_kernel *)
 
static int shm_find_segment_by_key (struct prison *, key_t)
 
static struct shmid_kernel * shm_find_segment (struct prison *, int, bool)
 
static int shm_delete_mapping (struct vmspace *vm, struct shmmap_state *)
 
static int shmget_allocate_segment (struct thread *td, key_t key, size_t size, int mode)
 
static int shmget_existing (struct thread *td, size_t size, int shmflg, int mode, int segnum)
 
static void shmrealloc (void)
 
static int shminit (void)
 
static int sysvshm_modload (struct module *, int, void *)
 
static int shmunload (void)
 
static void shmexit_myhook (struct vmspace *vm)
 
static void shmfork_myhook (struct proc *p1, struct proc *p2)
 
static int sysctl_shmsegs (SYSCTL_HANDLER_ARGS)
 
static void shm_remove (struct shmid_kernel *, int)
 
static struct prison * shm_find_prison (struct ucred *)
 
static int shm_prison_cansee (struct prison *, struct shmid_kernel *)
 
static int shm_prison_check (void *, void *)
 
static int shm_prison_set (void *, void *)
 
static int shm_prison_get (void *, void *)
 
static int shm_prison_remove (void *, void *)
 
static void shm_prison_cleanup (struct prison *)
 
 SYSCTL_ULONG (_kern_ipc, OID_AUTO, shmmax, CTLFLAG_RWTUN, &shminfo.shmmax, 0, "Maximum shared memory segment size")
 
 SYSCTL_ULONG (_kern_ipc, OID_AUTO, shmmin, CTLFLAG_RWTUN, &shminfo.shmmin, 0, "Minimum shared memory segment size")
 
 SYSCTL_ULONG (_kern_ipc, OID_AUTO, shmmni, CTLFLAG_RDTUN, &shminfo.shmmni, 0, "Number of shared memory identifiers")
 
 SYSCTL_ULONG (_kern_ipc, OID_AUTO, shmseg, CTLFLAG_RDTUN, &shminfo.shmseg, 0, "Number of segments per process")
 
 SYSCTL_ULONG (_kern_ipc, OID_AUTO, shmall, CTLFLAG_RWTUN, &shminfo.shmall, 0, "Maximum number of pages available for shared memory")
 
 SYSCTL_INT (_kern_ipc, OID_AUTO, shm_use_phys, CTLFLAG_RWTUN, &shm_use_phys, 0, "Enable/Disable locking of shared memory pages in core")
 
 SYSCTL_INT (_kern_ipc, OID_AUTO, shm_allow_removed, CTLFLAG_RWTUN, &shm_allow_removed, 0, "Enable/Disable attachment to attached segments marked for removal")
 
 SYSCTL_PROC (_kern_ipc, OID_AUTO, shmsegs, CTLTYPE_OPAQUE|CTLFLAG_RD|CTLFLAG_MPSAFE, NULL, 0, sysctl_shmsegs, "", "Array of struct shmid_kernel for each potential shared memory segment")
 
static int kern_shmdt_locked (struct thread *td, const void *shmaddr)
 
int sys_shmdt (struct thread *td, struct shmdt_args *uap)
 
static int kern_shmat_locked (struct thread *td, int shmid, const void *shmaddr, int shmflg)
 
int kern_shmat (struct thread *td, int shmid, const void *shmaddr, int shmflg)
 
int sys_shmat (struct thread *td, struct shmat_args *uap)
 
static int kern_shmctl_locked (struct thread *td, int shmid, int cmd, void *buf, size_t *bufsz)
 
int kern_shmctl (struct thread *td, int shmid, int cmd, void *buf, size_t *bufsz)
 
int sys_shmctl (struct thread *td, struct shmctl_args *uap)
 
int sys_shmget (struct thread *td, struct shmget_args *uap)
 
static int shm_prison_remove (void *obj, void *data __unused)
 
 SYSCTL_JAIL_PARAM_SYS_NODE (sysvshm, CTLFLAG_RW, "SYSV shared memory")
 
 DECLARE_MODULE (sysvshm, sysvshm_mod, SI_SUB_SYSV_SHM, SI_ORDER_FIRST)
 
 MODULE_VERSION (sysvshm, 1)
 

Variables

static int shm_last_free
 
static int shm_nused
 
static int shmalloced
 
vm_size_t shm_committed
 
static struct shmid_kernel * shmsegs
 
static unsigned shm_prison_slot
 
struct shminfo shminfo
 
static int shm_use_phys
 
static int shm_allow_removed = 1
 
static struct sx sysvshmsx
 
static struct syscall_helper_data shm_syscalls []
 
static moduledata_t sysvshm_mod
 

Macro Definition Documentation

◆ SHMALL

#define SHMALL   (SHMMAXPGS)

Definition at line 173 of file sysv_shm.c.

◆ SHMMAX

#define SHMMAX   (SHMMAXPGS*PAGE_SIZE)

Definition at line 161 of file sysv_shm.c.

◆ SHMMAXPGS

#define SHMMAXPGS   131072 /* Note: sysv shared memory is swap backed. */

Definition at line 158 of file sysv_shm.c.

◆ SHMMIN

#define SHMMIN   1

Definition at line 164 of file sysv_shm.c.

◆ SHMMNI

#define SHMMNI   192

Definition at line 167 of file sysv_shm.c.

◆ SHMSEG

#define SHMSEG   128

Definition at line 170 of file sysv_shm.c.

◆ SHMSEG_ALLOCATED

#define SHMSEG_ALLOCATED   0x0800

Definition at line 116 of file sysv_shm.c.

◆ SHMSEG_FREE

#define SHMSEG_FREE   0x0200

Definition at line 114 of file sysv_shm.c.

◆ SHMSEG_REMOVED

#define SHMSEG_REMOVED   0x0400

Definition at line 115 of file sysv_shm.c.

◆ SYSVSHM_ASSERT_LOCKED

#define SYSVSHM_ASSERT_LOCKED ( )    sx_assert(&sysvshmsx, SA_XLOCKED)

Definition at line 209 of file sysv_shm.c.

◆ SYSVSHM_LOCK

#define SYSVSHM_LOCK ( )    sx_xlock(&sysvshmsx)

Definition at line 207 of file sysv_shm.c.

◆ SYSVSHM_UNLOCK

#define SYSVSHM_UNLOCK ( )    sx_xunlock(&sysvshmsx)

Definition at line 208 of file sysv_shm.c.

Function Documentation

◆ __FBSDID()

__FBSDID ( "$FreeBSD$"  )

◆ DECLARE_MODULE()

DECLARE_MODULE ( sysvshm  ,
sysvshm_mod  ,
SI_SUB_SYSV_SHM  ,
SI_ORDER_FIRST   
)

◆ FEATURE()

FEATURE ( sysv_shm  ,
"System V shared memory segments support"   
)

◆ kern_shmat()

int kern_shmat ( struct thread *  td,
int  shmid,
const void *  shmaddr,
int  shmflg 
)

Definition at line 473 of file sysv_shm.c.

References kern_shmat_locked(), shmmap_state::shmid, SYSVSHM_LOCK, and SYSVSHM_UNLOCK.

Referenced by sys_shmat().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ kern_shmat_locked()

static int kern_shmat_locked ( struct thread *  td,
int  shmid,
const void *  shmaddr,
int  shmflg 
)
static

Definition at line 383 of file sysv_shm.c.

References ipcperm(), lim_max(), malloc(), shm_find_prison(), shm_find_segment(), shmmap_state::shmid, shminfo, SYSVSHM_ASSERT_LOCKED, time_second, and shmmap_state::va.

Referenced by kern_shmat().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ kern_shmctl()

int kern_shmctl ( struct thread *  td,
int  shmid,
int  cmd,
void *  buf,
size_t *  bufsz 
)

Definition at line 602 of file sysv_shm.c.

References buf, kern_shmctl_locked(), SYSVSHM_LOCK, and SYSVSHM_UNLOCK.

Referenced by sys_shmctl().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ kern_shmctl_locked()

static int kern_shmctl_locked ( struct thread *  td,
int  shmid,
int  cmd,
void *  buf,
size_t *  bufsz 
)
static

Definition at line 498 of file sysv_shm.c.

References buf, ipcperm(), shm_find_prison(), shm_find_segment(), shm_nused, shm_remove(), shmalloced, shminfo, SYSVSHM_ASSERT_LOCKED, and time_second.

Referenced by kern_shmctl().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ kern_shmdt_locked()

static int kern_shmdt_locked ( struct thread *  td,
const void *  shmaddr 
)
static

Definition at line 333 of file sysv_shm.c.

References shm_delete_mapping(), shm_find_prison(), shmmap_state::shmid, shminfo, shmsegs, SYSVSHM_ASSERT_LOCKED, and shmmap_state::va.

Referenced by sys_shmdt().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MALLOC_DEFINE()

static MALLOC_DEFINE ( M_SHM  ,
"shm"  ,
"SVID compatible shared memory segments"   
)
static

◆ MODULE_VERSION()

MODULE_VERSION ( sysvshm  ,
 
)

◆ shm_deallocate_segment()

static void shm_deallocate_segment ( struct shmid_kernel *  shmseg)
static

Definition at line 249 of file sysv_shm.c.

References crfree(), shm_committed, shm_nused, SHMSEG_FREE, and SYSVSHM_ASSERT_LOCKED.

Referenced by shm_delete_mapping(), and shm_remove().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ shm_delete_mapping()

static int shm_delete_mapping ( struct vmspace *  vm,
struct shmmap_state shmmap_s 
)
static

Definition at line 271 of file sysv_shm.c.

References result, shm_deallocate_segment(), shm_last_free, shmalloced, shmmap_state::shmid, SHMSEG_REMOVED, shmsegs, SYSVSHM_ASSERT_LOCKED, time_second, and shmmap_state::va.

Referenced by kern_shmdt_locked(), and shmexit_myhook().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ shm_find_prison()

static struct prison * shm_find_prison ( struct ucred *  cred)
static

Definition at line 310 of file sysv_shm.c.

References pr, and shm_prison_slot.

Referenced by kern_shmat_locked(), kern_shmctl_locked(), kern_shmdt_locked(), sys_shmget(), and sysctl_shmsegs().

Here is the caller graph for this function:

◆ shm_find_segment()

static struct shmid_kernel * shm_find_segment ( struct prison *  rpr,
int  arg,
bool  is_shmid 
)
static

Definition at line 230 of file sysv_shm.c.

References shm_allow_removed, shm_prison_cansee(), shmalloced, SHMSEG_ALLOCATED, SHMSEG_REMOVED, and shmsegs.

Referenced by kern_shmat_locked(), and kern_shmctl_locked().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ shm_find_segment_by_key()

static int shm_find_segment_by_key ( struct prison *  pr,
key_t  key 
)
static

Definition at line 212 of file sysv_shm.c.

References pr, shmalloced, SHMSEG_ALLOCATED, and shmsegs.

Referenced by sys_shmget().

Here is the caller graph for this function:

◆ shm_prison_cansee()

static int shm_prison_cansee ( struct prison *  rpr,
struct shmid_kernel *  shmseg 
)
static

Definition at line 322 of file sysv_shm.c.

References prison_ischild().

Referenced by shm_find_segment(), and sysctl_shmsegs().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ shm_prison_check()

static int shm_prison_check ( void *  obj,
void *  data 
)
static

Definition at line 1099 of file sysv_shm.c.

References data, pr, shm_prison_slot, and vfs_copyopt().

Referenced by shminit().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ shm_prison_cleanup()

static void shm_prison_cleanup ( struct prison *  pr)
static

Definition at line 1258 of file sysv_shm.c.

References pr, shm_remove(), shmalloced, SHMSEG_ALLOCATED, and shmsegs.

Referenced by shm_prison_remove(), and shm_prison_set().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ shm_prison_get()

static int shm_prison_get ( void *  obj,
void *  data 
)
static

Definition at line 1222 of file sysv_shm.c.

References data, pr, shm_prison_slot, and vfs_setopt().

Referenced by shminit().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ shm_prison_remove() [1/2]

static int shm_prison_remove ( void *  ,
void *   
)
static

Referenced by shminit().

Here is the caller graph for this function:

◆ shm_prison_remove() [2/2]

static int shm_prison_remove ( void *  obj,
void *data  __unused 
)
static

Definition at line 1242 of file sysv_shm.c.

References pr, shm_prison_cleanup(), shm_prison_slot, SYSVSHM_LOCK, and SYSVSHM_UNLOCK.

Here is the call graph for this function:

◆ shm_prison_set()

static int shm_prison_set ( void *  obj,
void *  data 
)
static

Definition at line 1134 of file sysv_shm.c.

References data, osd_free_reserved(), osd_reserve(), pr, shm_prison_cleanup(), shm_prison_slot, vfs_copyopt(), and vfs_flagopt().

Referenced by shminit().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ shm_remove()

static void shm_remove ( struct shmid_kernel *  shmseg,
int  segnum 
)
static

Definition at line 298 of file sysv_shm.c.

References shm_deallocate_segment(), shm_last_free, and SHMSEG_REMOVED.

Referenced by kern_shmctl_locked(), and shm_prison_cleanup().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ shmexit_myhook()

static void shmexit_myhook ( struct vmspace *  vm)
static

Definition at line 843 of file sysv_shm.c.

References free(), shm_delete_mapping(), shmmap_state::shmid, shminfo, SYSVSHM_LOCK, and SYSVSHM_UNLOCK.

Referenced by shminit().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ shmfork_myhook()

static void shmfork_myhook ( struct proc *  p1,
struct proc *  p2 
)
static

Definition at line 814 of file sysv_shm.c.

References malloc(), shmalloced, shmmap_state::shmid, shminfo, shmsegs, SYSVSHM_LOCK, and SYSVSHM_UNLOCK.

Referenced by shminit().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ shmget_allocate_segment()

static int shmget_allocate_segment ( struct thread *  td,
key_t  key,
size_t  size,
int  mode 
)
static

Definition at line 687 of file sysv_shm.c.

References crhold(), mode, shm_committed, shm_last_free, shm_nused, shm_use_phys, shmalloced, shminfo, shmrealloc(), SHMSEG_ALLOCATED, SHMSEG_FREE, shmsegs, SYSVSHM_ASSERT_LOCKED, and time_second.

Referenced by sys_shmget().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ shmget_existing()

static int shmget_existing ( struct thread *  td,
size_t  size,
int  shmflg,
int  mode,
int  segnum 
)
static

Definition at line 661 of file sysv_shm.c.

References shmalloced, shmsegs, and SYSVSHM_ASSERT_LOCKED.

Referenced by sys_shmget().

Here is the caller graph for this function:

◆ shminit()

◆ shmrealloc()

static void shmrealloc ( void  )
static

Definition at line 863 of file sysv_shm.c.

References free(), malloc(), shmalloced, shminfo, SHMSEG_FREE, shmsegs, and SYSVSHM_ASSERT_LOCKED.

Referenced by shmget_allocate_segment().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ shmunload()

static int shmunload ( void  )
static

Definition at line 1005 of file sysv_shm.c.

References free(), shm_nused, shm_prison_slot, shm_syscalls, shmalloced, shmexit_hook, shmfork_hook, SHMSEG_FREE, shmsegs, sx_destroy(), syscall_helper_unregister(), and sysvshmsx.

Referenced by sysvshm_modload().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sys_shmat()

int sys_shmat ( struct thread *  td,
struct shmat_args uap 
)

Definition at line 491 of file sysv_shm.c.

References kern_shmat(), shmat_args::shmaddr, shmat_args::shmflg, and shmat_args::shmid.

Here is the call graph for this function:

◆ sys_shmctl()

int sys_shmctl ( struct thread *  td,
struct shmctl_args uap 
)

Definition at line 620 of file sysv_shm.c.

References shmctl_args::buf, buf, shmctl_args::cmd, kern_shmctl(), and shmctl_args::shmid.

Here is the call graph for this function:

◆ sys_shmdt()

int sys_shmdt ( struct thread *  td,
struct shmdt_args uap 
)

Definition at line 372 of file sysv_shm.c.

References kern_shmdt_locked(), shmdt_args::shmaddr, SYSVSHM_LOCK, and SYSVSHM_UNLOCK.

Here is the call graph for this function:

◆ sys_shmget()

int sys_shmget ( struct thread *  td,
struct shmget_args uap 
)

◆ SYSCTL_INT() [1/2]

SYSCTL_INT ( _kern_ipc  ,
OID_AUTO  ,
shm_allow_removed  ,
CTLFLAG_RWTUN  ,
shm_allow_removed,
,
"Enable/Disable attachment to attached segments marked for removal"   
)

◆ SYSCTL_INT() [2/2]

SYSCTL_INT ( _kern_ipc  ,
OID_AUTO  ,
shm_use_phys  ,
CTLFLAG_RWTUN  ,
shm_use_phys,
,
"Enable/Disable locking of shared memory pages in core"   
)

◆ SYSCTL_JAIL_PARAM_SYS_NODE()

SYSCTL_JAIL_PARAM_SYS_NODE ( sysvshm  ,
CTLFLAG_RW  ,
"SYSV shared memory"   
)

◆ SYSCTL_PROC()

SYSCTL_PROC ( _kern_ipc  ,
OID_AUTO  ,
shmsegs  ,
CTLTYPE_OPAQUE|CTLFLAG_RD|  CTLFLAG_MPSAFE,
NULL  ,
,
sysctl_shmsegs  ,
""  ,
"Array of struct shmid_kernel for each potential shared memory segment"   
)

◆ sysctl_shmsegs()

static int sysctl_shmsegs ( SYSCTL_HANDLER_ARGS  )
static

Definition at line 1041 of file sysv_shm.c.

References pr, shm_find_prison(), shm_prison_cansee(), shmalloced, SHMSEG_ALLOCATED, SHMSEG_FREE, shmsegs, SYSVSHM_LOCK, and SYSVSHM_UNLOCK.

Here is the call graph for this function:

◆ SYSCTL_ULONG() [1/5]

SYSCTL_ULONG ( _kern_ipc  ,
OID_AUTO  ,
shmall  ,
CTLFLAG_RWTUN  ,
&shminfo.  shmall,
,
"Maximum number of pages available for shared memory"   
)

◆ SYSCTL_ULONG() [2/5]

SYSCTL_ULONG ( _kern_ipc  ,
OID_AUTO  ,
shmmax  ,
CTLFLAG_RWTUN  ,
&shminfo.  shmmax,
,
"Maximum shared memory segment size"   
)

◆ SYSCTL_ULONG() [3/5]

SYSCTL_ULONG ( _kern_ipc  ,
OID_AUTO  ,
shmmin  ,
CTLFLAG_RWTUN  ,
&shminfo.  shmmin,
,
"Minimum shared memory segment size"   
)

◆ SYSCTL_ULONG() [4/5]

SYSCTL_ULONG ( _kern_ipc  ,
OID_AUTO  ,
shmmni  ,
CTLFLAG_RDTUN  ,
&shminfo.  shmmni,
,
"Number of shared memory identifiers"   
)

◆ SYSCTL_ULONG() [5/5]

SYSCTL_ULONG ( _kern_ipc  ,
OID_AUTO  ,
shmseg  ,
CTLFLAG_RDTUN  ,
&shminfo.  shmseg,
,
"Number of segments per process"   
)

◆ sysvshm_modload()

static int sysvshm_modload ( struct module module,
int  cmd,
void *  arg 
)
static

Definition at line 1674 of file sysv_shm.c.

References shminit(), and shmunload().

Here is the call graph for this function:

Variable Documentation

◆ shm_allow_removed

int shm_allow_removed = 1
static

Definition at line 185 of file sysv_shm.c.

Referenced by shm_find_segment().

◆ shm_committed

vm_size_t shm_committed

Definition at line 119 of file sysv_shm.c.

Referenced by shm_deallocate_segment(), shmget_allocate_segment(), and shminit().

◆ shm_last_free

int shm_last_free
static

Definition at line 118 of file sysv_shm.c.

Referenced by shm_delete_mapping(), shm_remove(), shmget_allocate_segment(), and shminit().

◆ shm_nused

int shm_nused
static

◆ shm_prison_slot

unsigned shm_prison_slot
static

◆ shm_syscalls

struct syscall_helper_data shm_syscalls[]
static
Initial value:
= {
SYSCALL_INIT_HELPER(shmat),
SYSCALL_INIT_HELPER(shmctl),
SYSCALL_INIT_HELPER(shmdt),
SYSCALL_INIT_HELPER(shmget),
SYSCALL_INIT_LAST
}

Definition at line 889 of file sysv_shm.c.

Referenced by shminit(), and shmunload().

◆ shm_use_phys

int shm_use_phys
static

Definition at line 184 of file sysv_shm.c.

Referenced by shmget_allocate_segment().

◆ shmalloced

◆ shminfo

struct shminfo shminfo
Initial value:
= {
.shmmax = SHMMAX,
.shmmin = SHMMIN,
.shmmni = SHMMNI,
.shmseg = SHMSEG,
.shmall = SHMALL
}
#define SHMMNI
Definition: sysv_shm.c:167
#define SHMSEG
Definition: sysv_shm.c:170
#define SHMMAX
Definition: sysv_shm.c:161
#define SHMMIN
Definition: sysv_shm.c:164
#define SHMALL
Definition: sysv_shm.c:173

Definition at line 176 of file sysv_shm.c.

Referenced by kern_shmat_locked(), kern_shmctl_locked(), kern_shmdt_locked(), shmexit_myhook(), shmfork_myhook(), shmget_allocate_segment(), shminit(), and shmrealloc().

◆ shmsegs

◆ sysvshm_mod

moduledata_t sysvshm_mod
static
Initial value:
= {
"sysvshm",
NULL
}
static int sysvshm_modload(struct module *, int, void *)
Definition: sysv_shm.c:1674

Definition at line 1696 of file sysv_shm.c.

◆ sysvshmsx

struct sx sysvshmsx
static

Definition at line 206 of file sysv_shm.c.

Referenced by shminit(), and shmunload().