First of several commits to allow kernel System V IPC data structures
to be modified and extended without breaking the user space ABI: Define _kernel wrapper data structures for the user-exposed data structures that current server as the internal data structures for the implementation: - struct msqid_kernel wraps struct msqid_ds. - struct semid_kernel wraps truct semid_ds. - struct shmid_kernel wraps struct shmid_ds. - Don't expose extern definition 'shmsegs' outside of sysv_shm.c. Submitted by: Dandekar Hrishikesh <rishi_dandekar at sbcglobal dot net> Obtained from: TrustedBSD Project Sponsored by: DARPA, SPAWAR, McAfee Research
This commit is contained in:
parent
e84711f2e5
commit
bfd525c6fc
@ -120,6 +120,20 @@ struct msginfo {
|
||||
};
|
||||
extern struct msginfo msginfo;
|
||||
|
||||
/*
|
||||
* Kernel wrapper for the user-level structure.
|
||||
*/
|
||||
struct msqid_kernel {
|
||||
/*
|
||||
* Data structure exposed to user space.
|
||||
*/
|
||||
struct msqid_ds u;
|
||||
|
||||
/*
|
||||
* Kernel-private components of the message queue.
|
||||
*/
|
||||
};
|
||||
|
||||
#else /* !_KERNEL */
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
@ -84,6 +84,13 @@ struct seminfo {
|
||||
};
|
||||
extern struct seminfo seminfo;
|
||||
|
||||
/*
|
||||
* Kernel wrapper for the user-level structure
|
||||
*/
|
||||
struct semid_kernel {
|
||||
struct semid_ds u;
|
||||
};
|
||||
|
||||
/* internal "mode" bits */
|
||||
#define SEM_ALLOC 01000 /* semaphore is allocated */
|
||||
#define SEM_DEST 02000 /* semaphore will be destroyed on last detach */
|
||||
|
@ -83,8 +83,16 @@ struct shminfo {
|
||||
shmseg, /* max shared memory segments per process */
|
||||
shmall; /* max amount of shared memory (pages) */
|
||||
};
|
||||
|
||||
/*
|
||||
* Add a kernel wrapper to the shmid_ds struct so that private info (like the
|
||||
* MAC label) can be added to it, without changing the user interface.
|
||||
*/
|
||||
struct shmid_kernel {
|
||||
struct shmid_ds u;
|
||||
};
|
||||
|
||||
extern struct shminfo shminfo;
|
||||
extern struct shmid_ds *shmsegs;
|
||||
|
||||
struct shm_info {
|
||||
int used_ids;
|
||||
|
Loading…
x
Reference in New Issue
Block a user