Module Name: src Committed By: martin Date: Wed Apr 10 07:39:31 UTC 2019
Modified Files: src/sys/conf [netbsd-8]: files param.c src/sys/kern [netbsd-8]: sysv_ipc.c Log Message: Pull up following revision(s) (requested by pgoyette in ticket #1229): sys/kern/sysv_ipc.c: revision 1.38 sys/conf/files: revision 1.1233 sys/conf/param.c: revision 1.68 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.1173.2.6 -r1.1173.2.7 src/sys/conf/files cvs rdiff -u -r1.67 -r1.67.10.1 src/sys/conf/param.c cvs rdiff -u -r1.32 -r1.32.10.1 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.1173.2.6 src/sys/conf/files:1.1173.2.7 --- src/sys/conf/files:1.1173.2.6 Wed Oct 31 09:30:10 2018 +++ src/sys/conf/files Wed Apr 10 07:39:31 2019 @@ -1,4 +1,4 @@ -# $NetBSD: files,v 1.1173.2.6 2018/10/31 09:30:10 martin Exp $ +# $NetBSD: files,v 1.1173.2.7 2019/04/10 07:39:31 martin Exp $ # @(#)files.newconf 7.5 (Berkeley) 5/10/93 version 20170615 @@ -69,7 +69,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.67.10.1 --- src/sys/conf/param.c:1.67 Mon Nov 9 01:21:18 2015 +++ src/sys/conf/param.c Wed Apr 10 07:39:31 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: param.c,v 1.67 2015/11/09 01:21:18 pgoyette Exp $ */ +/* $NetBSD: param.c,v 1.67.10.1 2019/04/10 07:39:31 martin 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.67.10.1 2019/04/10 07:39:31 martin 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.32 src/sys/kern/sysv_ipc.c:1.32.10.1 --- src/sys/kern/sysv_ipc.c:1.32 Sat Dec 5 00:51:42 2015 +++ src/sys/kern/sysv_ipc.c Wed Apr 10 07:39:31 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: sysv_ipc.c,v 1.32 2015/12/05 00:51:42 pgoyette Exp $ */ +/* $NetBSD: sysv_ipc.c,v 1.32.10.1 2019/04/10 07:39:31 martin 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.32 2015/12/05 00:51:42 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sysv_ipc.c,v 1.32.10.1 2019/04/10 07:39:31 martin Exp $"); #ifdef _KERNEL_OPT #include "opt_sysv.h" +#include "opt_sysvparam.h" #include "opt_compat_netbsd.h" #endif