Subject: semconfig(2) and ipcs [sommerfeld@netbsd.org: CVS commit: syssrc]
To: None <sommerfeld@netbsd.org>
From: Simon Burge <simonb@netbsd.org>
List: tech-kern
Date: 05/29/2000 10:42:16
Bill Sommerfeld wrote:

> Module Name:	syssrc
> Committed By:	sommerfeld
> Date:		Sat May 27 21:00:26 UTC 2000
> 
> Modified Files:
> 
> 	syssrc/sys/kern: sysv_sem.c
> 
> Log Message:
> 
> Remove existing semaphore system locking mechanism and turn
> sys_semconfig into a placebo system call, to avoid giving folks an
> easy way to wedge processes which use semaphores.

Is it worth blowing away the semconfig() syscall altogether?  If the
only reasonable user was ipcs(1), then we may not even have to worry
about keeping the syscall for backwards compat either...


Also, is it worth sysctl'ing the retrieval of SysV IPC info?  Add, say,

	mib[0] = CTL_KERN;
	mib[1] = KERN_SYSVIPC_INFO;
	mib[2] = KERN_SYSVIPC_{SEM,SHM,MSG}_INFO;

and each could return 

	struct sem_sysctl_info {
		struct seminfo seminfo;
		struct semid_ds sema;
	}
or
	struct shm_sysctl_info {
		struct shminfo shminfo;
		struct shmid_ds shmsegs;
	}
or
	struct msg_sysctl_info {
		struct msginfo msginfo;
		struct msqid_ds msqids;
	}

Yet another setgid bit gotten rid of, and if new need to do any locking
to ensure the integrity of the results it can be done in-kernel...

Simon.