Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-8]: src/sys Pull up following revision(s) (requested by pgoyette ...



details:   https://anonhg.NetBSD.org/src/rev/14d2e31357aa
branches:  netbsd-8
changeset: 450314:14d2e31357aa
user:      martin <martin%NetBSD.org@localhost>
date:      Wed Apr 10 07:39:31 2019 +0000

description:
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.

diffstat:

 sys/conf/files      |   7 +++-
 sys/conf/param.c    |  67 +---------------------------------------------------
 sys/kern/sysv_ipc.c |   5 ++-
 3 files changed, 10 insertions(+), 69 deletions(-)

diffs (131 lines):

diff -r 9fecf41ec7b1 -r 14d2e31357aa sys/conf/files
--- a/sys/conf/files    Sun Apr 07 13:48:23 2019 +0000
+++ b/sys/conf/files    Wed Apr 10 07:39:31 2019 +0000
@@ -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 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
 
diff -r 9fecf41ec7b1 -r 14d2e31357aa sys/conf/param.c
--- a/sys/conf/param.c  Sun Apr 07 13:48:23 2019 +0000
+++ b/sys/conf/param.c  Wed Apr 10 07:39:31 2019 +0000
@@ -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 @@
 #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.
  */
diff -r 9fecf41ec7b1 -r 14d2e31357aa sys/kern/sysv_ipc.c
--- a/sys/kern/sysv_ipc.c       Sun Apr 07 13:48:23 2019 +0000
+++ b/sys/kern/sysv_ipc.c       Wed Apr 10 07:39:31 2019 +0000
@@ -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
 



Home | Main Index | Thread Index | Old Index