Module Name:    src
Committed By:   pgoyette
Date:           Tue Apr  9 22:05:27 UTC 2019

Modified Files:
        src/sys/conf: files param.c
        src/sys/kern: sysv_ipc.c

Log Message:
defparam all of the config variables associated with SYSV IPC stuff.
The variables were removed from sys/conf/param.c and moved into the
SYSV IPC code, but config options were never propagated via any opt_*
file.

This should fix an issue reported on netbsd-users list from Dima Veselov.

Note that this does not address other parameters included in that report,
including CHILD_MAX and NOFILE; this commit only affects items related to
the SYSV IPC code.  Also note that this does not affect non-built-in
sysv_ipc modules, for which you need to update the Makefile to use any
non-standard config values - just like any other non-built-in modules
which have config params.

XXX Pull-up to -8 and -8-0

XXX Note that there are a couple of panic() calls in msginit() which
XXX really should be changed to simple printf() and then result in
XXX msginit failure.  Unfortunately msginit() currently doesn't return
XXX a value so we cannot indicate failure to the caller.  I will fix
XXX this is a future commit.


To generate a diff of this commit:
cvs rdiff -u -r1.1232 -r1.1233 src/sys/conf/files
cvs rdiff -u -r1.67 -r1.68 src/sys/conf/param.c
cvs rdiff -u -r1.37 -r1.38 src/sys/kern/sysv_ipc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/conf/files
diff -u src/sys/conf/files:1.1232 src/sys/conf/files:1.1233
--- src/sys/conf/files:1.1232	Mon Mar 25 19:24:30 2019
+++ src/sys/conf/files	Tue Apr  9 22:05:27 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: files,v 1.1232 2019/03/25 19:24:30 maxv Exp $
+#	$NetBSD: files,v 1.1233 2019/04/09 22:05:27 pgoyette Exp $
 #	@(#)files.newconf	7.5 (Berkeley) 5/10/93
 
 version 	20171118
@@ -73,7 +73,10 @@ defflag				CPU_IN_CKSUM
 defflag opt_dtrace.h		KDTRACE_HOOKS
 
 defflag	opt_sysv.h		SYSVMSG SYSVSEM	SYSVSHM
-defparam opt_sysvparam.h	SHMMAXPGS SEMMNI SEMMNS SEMUME SEMMNU
+defparam opt_sysvparam.h	MSGMAX MSGMNI MSGMNB MSGTQL MSGSSZ MSGSEG
+defparam opt_sysvparam.h	SEMMAP SEMMNI SEMMNS SEMMNU SEMMSL SEMOPM
+defparam opt_sysvparam.h	SEMUME SEMUSZ SEMVMX SEMAEM
+defparam opt_sysvparam.h	SHMMAX SHMMIN SHMMNI SHMSEG SHMMAXPGS
 
 defflag	opt_ntp.h		PPS_SYNC PPS_DEBUG NTP
 

Index: src/sys/conf/param.c
diff -u src/sys/conf/param.c:1.67 src/sys/conf/param.c:1.68
--- src/sys/conf/param.c:1.67	Mon Nov  9 01:21:18 2015
+++ src/sys/conf/param.c	Tue Apr  9 22:05:27 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: param.c,v 1.67 2015/11/09 01:21:18 pgoyette Exp $	*/
+/*	$NetBSD: param.c,v 1.68 2019/04/09 22:05:27 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 1980, 1986, 1989 Regents of the University of California.
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: param.c,v 1.67 2015/11/09 01:21:18 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: param.c,v 1.68 2019/04/09 22:05:27 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_hz.h"
@@ -149,69 +149,6 @@ int	mblowat = MBLOWAT;
 #endif
 int	mcllowat = MCLLOWAT;
 
-#if XXX_PRG
-/*
- * Values in support of System V compatible shared memory.	XXX
- */
-#ifdef SYSVSHM
-#if !defined(SHMMAX) && defined(SHMMAXPGS)
-#define	SHMMAX	SHMMAXPGS	/* shminit() performs a `*= PAGE_SIZE' */
-#elif !defined(SHMMAX)
-#define SHMMAX 0
-#endif
-#ifndef	SHMMIN
-#define	SHMMIN	1
-#endif
-#ifndef	SHMMNI
-#define	SHMMNI	128		/* <64k, see IPCID_TO_IX in ipc.h */
-#endif
-#ifndef	SHMSEG
-#define	SHMSEG	128
-#endif
-
-struct	shminfo shminfo = {
-	SHMMAX,
-	SHMMIN,
-	SHMMNI,
-	SHMSEG,
-	0
-};
-#endif
-
-/*
- * Values in support of System V compatible semaphores.
- */
-#ifdef SYSVSEM
-struct	seminfo seminfo = {
-	SEMMAP,		/* # of entries in semaphore map */
-	SEMMNI,		/* # of semaphore identifiers */
-	SEMMNS,		/* # of semaphores in system */
-	SEMMNU,		/* # of undo structures in system */
-	SEMMSL,		/* max # of semaphores per id */
-	SEMOPM,		/* max # of operations per semop call */
-	SEMUME,		/* max # of undo entries per process */
-	SEMUSZ,		/* size in bytes of undo structure */
-	SEMVMX,		/* semaphore maximum value */
-	SEMAEM		/* adjust on exit max value */
-};
-#endif
-
-/*
- * Values in support of System V compatible messages.
- */
-#ifdef SYSVMSG
-struct	msginfo msginfo = {
-	MSGMAX,		/* max chars in a message */
-	MSGMNI,		/* # of message queue identifiers */
-	MSGMNB,		/* max chars in a queue */
-	MSGTQL,		/* max messages in system */
-	MSGSSZ,		/* size of a message segment */
-			/* (must be small power of 2 greater than 4) */
-	MSGSEG		/* number of message segments */
-};
-#endif
-#endif /* XXX_PRG */
-
 /*
  * Actual network mbuf sizes (read-only), for netstat.
  */

Index: src/sys/kern/sysv_ipc.c
diff -u src/sys/kern/sysv_ipc.c:1.37 src/sys/kern/sysv_ipc.c:1.38
--- src/sys/kern/sysv_ipc.c:1.37	Fri Mar  1 11:06:57 2019
+++ src/sys/kern/sysv_ipc.c	Tue Apr  9 22:05:27 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: sysv_ipc.c,v 1.37 2019/03/01 11:06:57 pgoyette Exp $	*/
+/*	$NetBSD: sysv_ipc.c,v 1.38 2019/04/09 22:05:27 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2007 The NetBSD Foundation, Inc.
@@ -30,10 +30,11 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sysv_ipc.c,v 1.37 2019/03/01 11:06:57 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sysv_ipc.c,v 1.38 2019/04/09 22:05:27 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_sysv.h"
+#include "opt_sysvparam.h"
 #include "opt_compat_netbsd.h"
 #endif
 

Reply via email to