re: CVS commit: src/sys/dev/sysmon

2015-04-25 Thread matthew green

Christos Zoulas writes:
 Module Name:  src
 Committed By: christos
 Date: Sat Apr 25 14:06:58 UTC 2015
 
 Modified Files:
   src/sys/dev/sysmon: sysmon_envsys.c
 
 Log Message:
 make things boot again, from martin.

thanks.  updating to test now..

but shouldn't this use RUN_ONCE() and/or a lock/atomic?


.mrg.


CVS commit: src/sys/kern

2015-04-25 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Sat Apr 25 19:10:29 UTC 2015

Modified Files:
src/sys/kern: kern_veriexec.c

Log Message:
Make veriexec_renamechk() more readable. Also add a KASSERT on vte_count.

No real functional change


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/kern/kern_veriexec.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/kern/kern_veriexec.c
diff -u src/sys/kern/kern_veriexec.c:1.4 src/sys/kern/kern_veriexec.c:1.5
--- src/sys/kern/kern_veriexec.c:1.4	Sat Apr 25 18:43:13 2015
+++ src/sys/kern/kern_veriexec.c	Sat Apr 25 19:10:29 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_veriexec.c,v 1.4 2015/04/25 18:43:13 maxv Exp $	*/
+/*	$NetBSD: kern_veriexec.c,v 1.5 2015/04/25 19:10:29 maxv Exp $	*/
 
 /*-
  * Copyright (c) 2005, 2006 Elad Efrat e...@netbsd.org
@@ -29,7 +29,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: kern_veriexec.c,v 1.4 2015/04/25 18:43:13 maxv Exp $);
+__KERNEL_RCSID(0, $NetBSD: kern_veriexec.c,v 1.5 2015/04/25 19:10:29 maxv Exp $);
 
 #include opt_veriexec.h
 
@@ -878,7 +878,6 @@ veriexec_removechk(struct lwp *l, struct
 		return 0;
 
 	rw_enter(veriexec_op_lock, RW_READER);
-
 	vfe = veriexec_get(vp);
 	rw_exit(veriexec_op_lock);
 
@@ -913,7 +912,7 @@ int
 veriexec_renamechk(struct lwp *l, struct vnode *fromvp, const char *fromname,
 struct vnode *tovp, const char *toname)
 {
-	struct veriexec_file_entry *vfe, *tvfe;
+	struct veriexec_file_entry *fvfe = NULL, *tvfe = NULL;
 
 	if (veriexec_bypass  (veriexec_strict == VERIEXEC_LEARNING))
 		return 0;
@@ -924,70 +923,73 @@ veriexec_renamechk(struct lwp *l, struct
 		log(LOG_ALERT, Veriexec: Preventing rename of `%s' to 
 		`%s', uid=%u, pid=%u: Lockdown mode.\n, fromname, toname,
 		kauth_cred_geteuid(l-l_cred), l-l_proc-p_pid);
-
 		rw_exit(veriexec_op_lock);
 		return (EPERM);
 	}
 
-	vfe = veriexec_get(fromvp);
-	tvfe = NULL;
+	fvfe = veriexec_get(fromvp);
 	if (tovp != NULL)
 		tvfe = veriexec_get(tovp);
 
-	if ((vfe != NULL) || (tvfe != NULL)) {
-		if (veriexec_strict = VERIEXEC_IPS) {
-			log(LOG_ALERT, Veriexec: Preventing rename of `%s' 
-			to `%s', uid=%u, pid=%u: IPS mode, %s 
-			monitored.\n, fromname, toname,
-			kauth_cred_geteuid(l-l_cred),
-			l-l_proc-p_pid, (vfe != NULL  tvfe != NULL) ?
-			files : file);
+	if ((fvfe == NULL)  (tvfe == NULL)) {
+		/* None of them is monitored */
+		rw_exit(veriexec_op_lock);
+		return 0;
+	}
 
-			rw_exit(veriexec_op_lock);
-			return (EPERM);
-		}
+	if (veriexec_strict = VERIEXEC_IPS) {
+		log(LOG_ALERT, Veriexec: Preventing rename of `%s' 
+		to `%s', uid=%u, pid=%u: IPS mode, %s 
+		monitored.\n, fromname, toname,
+		kauth_cred_geteuid(l-l_cred),
+		l-l_proc-p_pid, (fvfe != NULL  tvfe != NULL) ?
+		files : file);
+		rw_exit(veriexec_op_lock);
+		return (EPERM);
+	}
 
+	if (fvfe != NULL) {
 		/*
 		 * Monitored file is renamed; filename no longer relevant.
-		 *
+		 */
+
+		/*
 		 * XXX: We could keep the buffer, and when (and if) updating the
 		 * XXX: filename post-rename, re-allocate it only if it's not
 		 * XXX: big enough for the new filename.
 		 */
-		if (vfe != NULL) {
-			/*  get write lock on vfe here? */
 
-			VERIEXEC_RW_UPGRADE(veriexec_op_lock);
-			/* once we have the op lock in write mode
-			 * there should be no locks on any file
-			 * entries so we can destroy the object.
-			 */
+		/* XXX: Get write lock on fvfe here? */
 
-			if (vfe-filename_len  0)
-kmem_free(vfe-filename, vfe-filename_len);
+		VERIEXEC_RW_UPGRADE(veriexec_op_lock);
+		/* once we have the op lock in write mode
+		 * there should be no locks on any file
+		 * entries so we can destroy the object.
+		 */
 
-			vfe-filename = NULL;
-			vfe-filename_len = 0;
+		if (fvfe-filename_len  0)
+			kmem_free(fvfe-filename, fvfe-filename_len);
 
-			rw_downgrade(veriexec_op_lock);
-		}
+		fvfe-filename = NULL;
+		fvfe-filename_len = 0;
 
-		log(LOG_NOTICE, Veriexec: %s file `%s' renamed to 
-		%s file `%s', uid=%u, pid=%u.\n, (vfe != NULL) ?
-		Monitored : Non-monitored, fromname, (tvfe != NULL) ?
-		monitored : non-monitored, toname,
-		kauth_cred_geteuid(l-l_cred), l-l_proc-p_pid);
+		rw_downgrade(veriexec_op_lock);
+	}
 
-		rw_exit(veriexec_op_lock);
+	log(LOG_NOTICE, Veriexec: %s file `%s' renamed to 
+	%s file `%s', uid=%u, pid=%u.\n, (fvfe != NULL) ?
+	Monitored : Non-monitored, fromname, (tvfe != NULL) ?
+	monitored : non-monitored, toname,
+	kauth_cred_geteuid(l-l_cred), l-l_proc-p_pid);
+
+	rw_exit(veriexec_op_lock);
 
+	if (tvfe != NULL) {
 		/*
 		 * Monitored file is overwritten. Remove the entry.
 		 */
-		if (tvfe != NULL)
-			(void)veriexec_file_delete(l, tovp);
-
-	} else
-		rw_exit(veriexec_op_lock);
+		(void)veriexec_file_delete(l, tovp);
+	}
 
 	return (0);
 }
@@ -1337,7 +1339,8 @@ veriexec_file_add(struct lwp *l, prop_di
 }
 

CVS commit: src/sys/kern

2015-04-25 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Sat Apr 25 19:10:29 UTC 2015

Modified Files:
src/sys/kern: kern_veriexec.c

Log Message:
Make veriexec_renamechk() more readable. Also add a KASSERT on vte_count.

No real functional change


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/kern/kern_veriexec.c

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



Re: CVS commit: src/distrib/atari/floppies/install

2015-04-25 Thread Izumi Tsutsui
christos@ wrote:

 |  Log Message:
 |  double the size of the image to fix the build
 | 
 | AFAIK atari doesn't handle to write, load, and mount 1440KB floppy images.
 | (i.e. no ustarfs support)
 
 How do we fix it? Can we add ustarfs support..

No idea.

I don't know atari hardware/firmware specification at all
except NetBSD sources.
(someone who wrote usr/mdec/fdboot might know hint?)

It's easier to have smaller binaries (awk?) in distrib/utils?

---
Izumi Tsutsui


CVS commit: src/distrib/atari/floppies/install

2015-04-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Apr 25 18:41:55 UTC 2015

Modified Files:
src/distrib/atari/floppies/install: Makefile list

Log Message:
kill sed so we fit on one floppy again.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/distrib/atari/floppies/install/Makefile
cvs rdiff -u -r1.16 -r1.17 src/distrib/atari/floppies/install/list

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



Re: CVS commit: src/share/misc

2015-04-25 Thread rodent
 I think that NetBSD's acronyms file should be for acronyms that ordinary
 people are likely to encounter in ordinary situations; not for acronyms used
 in some small subculture.

In that case, the file(s) would be rather short. I feel differently about the
direction of acronyms and it seems others do as well. Since forks are
ideological differences in projects which arise over time and the license on
these files is public-domain, I've forked wtf-20140424 from jmcneill's last
commit as wtfubar. It's available on github:

https://github.com/othyro/wtfubar


CVS commit: src/sys/external/bsd/drm2/dist/drm/radeon

2015-04-25 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sat Apr 25 20:50:04 UTC 2015

Modified Files:
src/sys/external/bsd/drm2/dist/drm/radeon: radeon_display.c

Log Message:
don't apply the don't set CLUT to RV280.  it isn't necessary for
my PCI 9250 card, and hoses the colours in X when running.

unfortunately, my RV250 does need this to avoid the console being
very very dark on black.

i'm curious what other earlier radeon card (anything matching any
of the card marked as:  CHIP_R100, CHIP_RV100, CHIP_RS100,
CHIP_RV200, CHIP_RS200, CHIP_R200, CHIP_RV250, and CHIP_RS300.)

the RV280 now works again properly, but the RV250 is still having
a problem waiting for commands to complete and it appears as if
X is hung, when infact it is asking the kernel quite frequently
if the job it asked for is complete, each time sleeping for a
short time and thus only appearing to take almost no CPU.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
src/sys/external/bsd/drm2/dist/drm/radeon/radeon_display.c

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



CVS commit: src/sys/external/bsd/drm2/dist/drm/radeon

2015-04-25 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sat Apr 25 20:50:04 UTC 2015

Modified Files:
src/sys/external/bsd/drm2/dist/drm/radeon: radeon_display.c

Log Message:
don't apply the don't set CLUT to RV280.  it isn't necessary for
my PCI 9250 card, and hoses the colours in X when running.

unfortunately, my RV250 does need this to avoid the console being
very very dark on black.

i'm curious what other earlier radeon card (anything matching any
of the card marked as:  CHIP_R100, CHIP_RV100, CHIP_RS100,
CHIP_RV200, CHIP_RS200, CHIP_R200, CHIP_RV250, and CHIP_RS300.)

the RV280 now works again properly, but the RV250 is still having
a problem waiting for commands to complete and it appears as if
X is hung, when infact it is asking the kernel quite frequently
if the job it asked for is complete, each time sleeping for a
short time and thus only appearing to take almost no CPU.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
src/sys/external/bsd/drm2/dist/drm/radeon/radeon_display.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/external/bsd/drm2/dist/drm/radeon/radeon_display.c
diff -u src/sys/external/bsd/drm2/dist/drm/radeon/radeon_display.c:1.3 src/sys/external/bsd/drm2/dist/drm/radeon/radeon_display.c:1.4
--- src/sys/external/bsd/drm2/dist/drm/radeon/radeon_display.c:1.3	Wed Mar 18 02:57:13 2015
+++ src/sys/external/bsd/drm2/dist/drm/radeon/radeon_display.c	Sat Apr 25 20:50:04 2015
@@ -185,7 +185,7 @@ static void legacy_crtc_load_lut(struct 
 	 * At least the RV100 [vendor 1002 product 515e (rev. 0x02)]
 	 * has an old style palette
 	 */
-	if (ASIC_IS_RV100(rdev)) {
+	if (rdev-family  CHIP_RV280) {
 #ifdef notyet
 		/*
 		 * Leave CLUT alone for now. The code below gives us a



Re: CVS commit: src/sys/dev/sysmon

2015-04-25 Thread Paul Goyette

Done.  Doing some testing now but should be ok.

On Sat, 25 Apr 2015, Christos Zoulas wrote:


In article 1723.1429983...@splode.eterna.com.au,
matthew green  m...@eterna.com.au wrote:


Christos Zoulas writes:

Module Name:src
Committed By:   christos
Date:   Sat Apr 25 14:06:58 UTC 2015

Modified Files:
src/sys/dev/sysmon: sysmon_envsys.c

Log Message:
make things boot again, from martin.


thanks.  updating to test now..

but shouldn't this use RUN_ONCE() and/or a lock/atomic?


Yes, I am letting paul fix it properly the way he wants.

christos




-
| Paul Goyette | PGP Key fingerprint: | E-mail addresses:   |
| (Retired)| FA29 0E3B 35AF E8AE 6651 | paul at whooppee.com|
| Kernel Developer | 0786 F758 55DE 53BA 7731 | pgoyette at netbsd.org  |
-


Re: CVS commit: src/sys/dev/sysmon

2015-04-25 Thread Paul Goyette

Thanks.   :)

I'll get this (and the corresponding changes to sysmon_power and 
sysmon_wdog subcomponents) done shortly.




On Sat, 25 Apr 2015, Christos Zoulas wrote:


In article 1723.1429983...@splode.eterna.com.au,
matthew green  m...@eterna.com.au wrote:


Christos Zoulas writes:

Module Name:src
Committed By:   christos
Date:   Sat Apr 25 14:06:58 UTC 2015

Modified Files:
src/sys/dev/sysmon: sysmon_envsys.c

Log Message:
make things boot again, from martin.


thanks.  updating to test now..

but shouldn't this use RUN_ONCE() and/or a lock/atomic?


Yes, I am letting paul fix it properly the way he wants.

christos




-
| Paul Goyette | PGP Key fingerprint: | E-mail addresses:   |
| (Retired)| FA29 0E3B 35AF E8AE 6651 | paul at whooppee.com|
| Kernel Developer | 0786 F758 55DE 53BA 7731 | pgoyette at netbsd.org  |
-


Re: CVS commit: src/sys/dev/sysmon

2015-04-25 Thread Jeff Rizzo

On 4/25/15 3:46 PM, Paul Goyette wrote:

Module Name:src
Committed By:   pgoyette
Date:   Sat Apr 25 22:46:31 UTC 2015


  
+	if (pmf_device_register(sysmon_dev, NULL, NULL))

+   aprintf_error(%s: failed to register with pmf\n,



I think you mean aprint_error.  This doesn't link.

+j



CVS commit: src/sys/dev/sysmon

2015-04-25 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat Apr 25 23:55:24 UTC 2015

Modified Files:
src/sys/dev/sysmon: swsensor.c

Log Message:
Remove another debug printf() that snuck in.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/dev/sysmon/swsensor.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/dev/sysmon/swsensor.c
diff -u src/sys/dev/sysmon/swsensor.c:1.14 src/sys/dev/sysmon/swsensor.c:1.15
--- src/sys/dev/sysmon/swsensor.c:1.14	Thu Apr 23 23:23:01 2015
+++ src/sys/dev/sysmon/swsensor.c	Sat Apr 25 23:55:23 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: swsensor.c,v 1.14 2015/04/23 23:23:01 pgoyette Exp $ */
+/*	$NetBSD: swsensor.c,v 1.15 2015/04/25 23:55:23 pgoyette Exp $ */
 /*
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: swsensor.c,v 1.14 2015/04/23 23:23:01 pgoyette Exp $);
+__KERNEL_RCSID(0, $NetBSD: swsensor.c,v 1.15 2015/04/25 23:55:23 pgoyette Exp $);
 
 #include sys/param.h
 #include sys/kernel.h
@@ -225,7 +225,6 @@ swsensor_init(void *arg)
 val = prop_number_integer_value(po);
 
 			/* Sensor type/units */
-printf(%s: prop object key = \%s\\n, __func__, key);
 			if (strcmp(key, type) == 0) {
 if (type == PROP_TYPE_NUMBER) {
 	descr = sme_find_table_entry(



CVS commit: src/sys/dev/sysmon

2015-04-25 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat Apr 25 23:55:24 UTC 2015

Modified Files:
src/sys/dev/sysmon: swsensor.c

Log Message:
Remove another debug printf() that snuck in.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/dev/sysmon/swsensor.c

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



Re: CVS commit: src/distrib/atari/floppies/install

2015-04-25 Thread Izumi Tsutsui
christos@ wrote:

 Module Name:  src
 Committed By: christos
 Date: Sat Apr 25 18:41:55 UTC 2015
 
 Modified Files:
   src/distrib/atari/floppies/install: Makefile list
 
 Log Message:
 kill sed so we fit on one floppy again.

What makes you think it works?
http://nxr.netbsd.org/xref/src/distrib/atari/floppies/common/dot.profile?r=1.4#51

---
Izumi Tsutsui



Re: CVS commit: src/distrib/atari/floppies/install

2015-04-25 Thread Izumi Tsutsui
christos@ wrote:

 Module Name:  src
 Committed By: christos
 Date: Wed Apr 22 20:21:11 UTC 2015
 
 Modified Files:
   src/distrib/atari/floppies/install: Makefile
 
 Log Message:
 double the size of the image to fix the build

AFAIK atari doesn't handle to write, load, and mount 1440KB floppy images.
(i.e. no ustarfs support)

---
Izumi Tsutsui


Re: CVS commit: src/distrib/atari/floppies/install

2015-04-25 Thread Christos Zoulas
On Apr 26,  2:49am, tsut...@ceres.dti.ne.jp (Izumi Tsutsui) wrote:
-- Subject: Re: CVS commit: src/distrib/atari/floppies/install

| christos@ wrote:
| 
|  |  Log Message:
|  |  double the size of the image to fix the build
|  | 
|  | AFAIK atari doesn't handle to write, load, and mount 1440KB floppy 
images.
|  | (i.e. no ustarfs support)
|  
|  How do we fix it? Can we add ustarfs support..
| 
| No idea.
| 
| I don't know atari hardware/firmware specification at all
| except NetBSD sources.
| (someone who wrote usr/mdec/fdboot might know hint?)
| 
| It's easier to have smaller binaries (awk?) in distrib/utils?

Let's see how far we are from fitting...

christos


CVS commit: src/sys/external/bsd/drm2/ttm

2015-04-25 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat Apr 25 21:00:29 UTC 2015

Modified Files:
src/sys/external/bsd/drm2/ttm: ttm_agp_backend.c

Log Message:
kmem_free the container structure, not a substructure.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/external/bsd/drm2/ttm/ttm_agp_backend.c

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



CVS commit: src/sys/external/bsd/drm2/ttm

2015-04-25 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat Apr 25 21:00:29 UTC 2015

Modified Files:
src/sys/external/bsd/drm2/ttm: ttm_agp_backend.c

Log Message:
kmem_free the container structure, not a substructure.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/external/bsd/drm2/ttm/ttm_agp_backend.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/external/bsd/drm2/ttm/ttm_agp_backend.c
diff -u src/sys/external/bsd/drm2/ttm/ttm_agp_backend.c:1.3 src/sys/external/bsd/drm2/ttm/ttm_agp_backend.c:1.4
--- src/sys/external/bsd/drm2/ttm/ttm_agp_backend.c:1.3	Thu Aug 14 16:50:22 2014
+++ src/sys/external/bsd/drm2/ttm/ttm_agp_backend.c	Sat Apr 25 21:00:29 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: ttm_agp_backend.c,v 1.3 2014/08/14 16:50:22 riastradh Exp $	*/
+/*	$NetBSD: ttm_agp_backend.c,v 1.4 2015/04/25 21:00:29 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ttm_agp_backend.c,v 1.3 2014/08/14 16:50:22 riastradh Exp $);
+__KERNEL_RCSID(0, $NetBSD: ttm_agp_backend.c,v 1.4 2015/04/25 21:00:29 riastradh Exp $);
 
 #include sys/types.h
 #include sys/kmem.h
@@ -156,7 +156,7 @@ ttm_agp_destroy(struct ttm_tt *ttm)
 	if (ttm_agp-bound)
 		ttm_agp_unbind(ttm);
 	ttm_tt_fini(ttm);
-	kmem_free(ttm, sizeof(*ttm));
+	kmem_free(ttm_agp, sizeof(*ttm_agp));
 }
 
 static const struct ttm_backend_func ttm_agp_backend_func = {



CVS commit: src/sbin/disklabel

2015-04-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Apr 25 21:43:53 UTC 2015

Modified Files:
src/sbin/disklabel: main.c

Log Message:
make table smaller in size.


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/sbin/disklabel/main.c

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

Modified files:

Index: src/sbin/disklabel/main.c
diff -u src/sbin/disklabel/main.c:1.43 src/sbin/disklabel/main.c:1.44
--- src/sbin/disklabel/main.c:1.43	Fri Jan  2 14:46:02 2015
+++ src/sbin/disklabel/main.c	Sat Apr 25 17:43:53 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: main.c,v 1.43 2015/01/02 19:46:02 christos Exp $	*/
+/*	$NetBSD: main.c,v 1.44 2015/04/25 21:43:53 christos Exp $	*/
 
 /*
  * Copyright (c) 2006 The NetBSD Foundation, Inc.
@@ -76,7 +76,7 @@ __COPYRIGHT(@(#) Copyright (c) 1987, 19
 static char sccsid[] = @(#)disklabel.c	8.4 (Berkeley) 5/4/95;
 /* from static char sccsid[] = @(#)disklabel.c	1.2 (Symmetric) 11/28/85; */
 #else
-__RCSID($NetBSD: main.c,v 1.43 2015/01/02 19:46:02 christos Exp $);
+__RCSID($NetBSD: main.c,v 1.44 2015/04/25 21:43:53 christos Exp $);
 #endif
 #endif	/* not lint */
 
@@ -198,97 +198,97 @@ int bswap_p;
 
 static const struct disklabel_params {
 	const char *machine;
-	int labelusesmbr;
-	u_int labelsector;
-	u_int labeloffset;
-	u_int maxpartitions;
-	u_int raw_part;
-	u_int oldmaxpartitions;
-	int byteorder;
+	u_char labelusesmbr : 4;
+	u_char labelsector : 4;
+	u_char maxpartitions;
+	u_char raw_part;
+	u_char oldmaxpartitions;
+	u_short labeloffset;
+	u_short byteorder;
 } disklabel_params[] = {
-	{ mvme68k,	0, 0,   0,  8, 2, 0, BIG_ENDIAN },	/* m68k */
-	{ next68k,	0, 0,   0,  8, 2, 0, BIG_ENDIAN },	/* m68k */
+	{ mvme68k,	0, 0,  8, 2, 0,   0, BIG_ENDIAN },	/* m68k */
+	{ next68k,	0, 0,  8, 2, 0,   0, BIG_ENDIAN },	/* m68k */
 
-	{ algor,	0, 0,  64,  8, 2, 0, LITTLE_ENDIAN },	/* mips */
-	{ alpha,	0, 0,  64,  8, 2, 0, LITTLE_ENDIAN },	/* alpha */
-	{ luna68k,	0, 0,  64,  8, 2, 0, BIG_ENDIAN },	/* m68k */
-	{ mac68k,	0, 0,  64,  8, 2, 0, BIG_ENDIAN },	/* m68k */
-	{ news68k,	0, 0,  64,  8, 2, 0, BIG_ENDIAN },	/* m68k */
-	{ newsmips,	0, 0,  64,  8, 2, 0, BIG_ENDIAN },	/* mips */
-	{ pmax,	0, 0,  64,  8, 2, 0, LITTLE_ENDIAN },	/* mips */
-	{ sun2,	0, 0,  64,  8, 2, 0, BIG_ENDIAN },	/* m68k */
-	{ sun68k,	0, 0,  64,  8, 2, 0, BIG_ENDIAN },	/* m68010 */
-	{ x68k,	0, 0,  64,  8, 2, 0, BIG_ENDIAN },	/* m68010 */
-
-	{ vax,	0, 0,  64, 12, 2, 8, LITTLE_ENDIAN },	/* vax */
-
-	{ amiga,	0, 0,  64, 16, 2, 0, BIG_ENDIAN },	/* m68k */
-	{ amigappc,	0, 0,  64, 16, 2, 0, BIG_ENDIAN },	/* powerpc */
-	{ evbmips,	0, 0,  64, 16, 2, 0, 0 },		/* mips */
-	{ evbppc,	0, 0,  64, 16, 2, 0, BIG_ENDIAN },	/* powerpc */
-
-	{ sparc,	0, 0, 128,  8, 2, 0, BIG_ENDIAN },	/* sun */
-	{ sparc64,	0, 0, 128,  8, 2, 0, BIG_ENDIAN },	/* sun */
-	{ sun3,	0, 0, 128,  8, 2, 0, BIG_ENDIAN },	/* sun */
-
-	{ atari,	0, 0, 516, 16, 2, 0, BIG_ENDIAN },	/* m68k */
-
-	{ mipsco,	0, 1,   0,  8, 2, 0, BIG_ENDIAN },	/* mips */
-	{ mvmeppc,	0, 1,   0,  8, 3, 0, BIG_ENDIAN },	/* powerpc */
-
-	{ bebox,	0, 1,   0,  8, 3, 0, BIG_ENDIAN },	/* powerpc */
-
-	{ emips,	0, 1,   0, 16, 2, 0, BIG_ENDIAN },	/* mips */
-	{ hppa,	0, 1,   0, 16, 2, 0, BIG_ENDIAN },	/* hppa */
-	{ ibmnws,	0, 1,   0, 16, 2, 0, BIG_ENDIAN },	/* powerpc */
-	{ ofppc,	0, 1,   0, 16, 2, 0, BIG_ENDIAN },	/* powerpc */
-	{ rs6000,	0, 1,   0, 16, 2, 0, BIG_ENDIAN },	/* powerpc */
-	{ sandpoint,	0, 1,   0, 16, 2, 0, BIG_ENDIAN },	/* powerpc */
-	{ sgimips,	0, 1,   0, 16, 2, 0, BIG_ENDIAN },	/* mips */
-
-	{ sbmips,	0, 1,   0, 16, 3, 0, 0 },		/* mips */
-
-	{ cesfic,	0, 2,   0,  8, 2, 0, BIG_ENDIAN },	/* m68k */
-	{ hp300,	0, 2,   0,  8, 2, 0, BIG_ENDIAN },	/* m68k */
-
-	{ ews4800mips,0, 9,   0, 16, 15, 0, BIG_ENDIAN },	/* mips */
-
-	{ macppc,	1, 0,  64, 16, 2, 0, BIG_ENDIAN },	/* powerpc */
-	{ pmon,	1, 0,  64, 16, 2, 0, 0 },		/* evbmips */
-
-	{ prep,	1, 1,   0,  8, 2, 0, BIG_ENDIAN },	/* powerpc */
-
-	{ dreamcast,	1, 1,   0, 16, 2, 0, LITTLE_ENDIAN },	/* sh3 */
-	{ evbarm64,	1, 1,   0, 16, 2, 0, 0 },		/* aarch64 */
-	{ evbcf,	1, 1,   0, 16, 2, 0, BIG_ENDIAN },	/* coldfire */
-	{ evbppc-mbr,	1, 1,   0, 16, 2, 0, BIG_ENDIAN },	/* powerpc */
-	{ evbsh3,	1, 1,   0, 16, 2, 0, 0 },		/* sh3 */
-	{ hpcsh,	1, 1,   0, 16, 2, 0, LITTLE_ENDIAN },	/* sh3 */
-	{ mmeye,	1, 1,   0, 16, 2, 0, 0 },		/* sh3 */
-	{ or1k,	1, 1,   0, 16, 2, 0, BIG_ENDIAN },	/* or1k */
-	{ riscv,	1, 1,   0, 16, 2, 0, LITTLE_ENDIAN },	/* riscv */
-
-	{ acorn26,	1, 1,   0, 16, 2, 8, LITTLE_ENDIAN },	/* arm */
-	{ acorn32,	1, 1,   0, 16, 2, 8, LITTLE_ENDIAN },	/* arm */
-	{ cats,	1, 1,   0, 16, 2, 8, LITTLE_ENDIAN },	/* arm */
-	{ evbarm,	1, 1,   0, 16, 2, 8, 0 },		/* arm */
-	{ iyonix,	1, 1,   0, 16, 2, 8, LITTLE_ENDIAN },	/* arm */
-	{ netwinder,	1, 1,   0, 16, 2, 8, LITTLE_ENDIAN },	/* arm */
-	{ shark,	1, 1,   0, 16, 2, 8, LITTLE_ENDIAN },	/* arm */
-
-	{ amd64,	1, 1,   0, 16, 3, 0, LITTLE_ENDIAN },	/* x86 */
-	

CVS commit: src/distrib/atari/floppies/install

2015-04-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Apr 25 21:44:34 UTC 2015

Modified Files:
src/distrib/atari/floppies/install: list

Log Message:
put back sed, it fits again (and is needed)


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/distrib/atari/floppies/install/list

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

Modified files:

Index: src/distrib/atari/floppies/install/list
diff -u src/distrib/atari/floppies/install/list:1.17 src/distrib/atari/floppies/install/list:1.18
--- src/distrib/atari/floppies/install/list:1.17	Sat Apr 25 14:41:55 2015
+++ src/distrib/atari/floppies/install/list	Sat Apr 25 17:44:34 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: list,v 1.17 2015/04/25 18:41:55 christos Exp $
+#	$NetBSD: list,v 1.18 2015/04/25 21:44:34 christos Exp $
 
 PROG	bin/cat
 PROG	bin/chmod
@@ -39,7 +39,7 @@ PROG	sbin/umount
 
 PROG	usr/bin/ftp
 PROG	usr/bin/gzip	usr/bin/gzcat usr/bin/gunzip
-#PROG	usr/bin/sed
+PROG	usr/bin/sed
 
 PROG	usr/mdec/installboot
 



CVS commit: src/sbin/disklabel

2015-04-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Apr 25 21:43:53 UTC 2015

Modified Files:
src/sbin/disklabel: main.c

Log Message:
make table smaller in size.


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/sbin/disklabel/main.c

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



CVS commit: src/share/man/man5

2015-04-25 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sat Apr 25 22:03:07 UTC 2015

Modified Files:
src/share/man/man5: boot.cfg.5

Log Message:
Sort keywords. From dieter roelants in PR 49855.
Bump date.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/share/man/man5/boot.cfg.5

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



CVS commit: src/share/man/man5

2015-04-25 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sat Apr 25 22:03:07 UTC 2015

Modified Files:
src/share/man/man5: boot.cfg.5

Log Message:
Sort keywords. From dieter roelants in PR 49855.
Bump date.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/share/man/man5/boot.cfg.5

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

Modified files:

Index: src/share/man/man5/boot.cfg.5
diff -u src/share/man/man5/boot.cfg.5:1.26 src/share/man/man5/boot.cfg.5:1.27
--- src/share/man/man5/boot.cfg.5:1.26	Mon Apr 15 22:46:52 2013
+++ src/share/man/man5/boot.cfg.5	Sat Apr 25 22:03:07 2015
@@ -1,4 +1,4 @@
-.\	$NetBSD: boot.cfg.5,v 1.26 2013/04/15 22:46:52 jdf Exp $
+.\	$NetBSD: boot.cfg.5,v 1.27 2015/04/25 22:03:07 wiz Exp $
 .\
 .\ Copyright (c) 2007 Stephen Borrill
 .\ All rights reserved.
@@ -25,7 +25,7 @@
 .\ INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 .\ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\
-.Dd November 28, 2011
+.Dd April 25, 2014
 .Dt BOOT.CFG 5
 .Os
 .Sh NAME
@@ -131,6 +131,20 @@ normal boot prompt.
 In addition,
 .Dq Ic prompt
 can be used to drop to the normal boot prompt.
+.It Sy rndseed
+Takes the path to a random-seed file as written by the
+.Fl S
+flag to
+.Xr rndctl 8
+as an argument.
+This file is used to seed the kernel entropy pool
+.Xr rnd 9
+very early in kernel startup, so that high quality randomness is
+available to all kernel modules.
+This argument should be supplied
+before any
+.Dq Ic load
+commands that may load executable modules.
 .It Sy timeout
 If the value is greater than zero, this specifies the time in seconds
 that the boot loader will wait for the end-user to choose a menu item.
@@ -146,20 +160,6 @@ time limit for the user to choose an opt
 Passes a
 .Xr userconf 4
 command to the kernel at boot time.
-.It Sy rndseed
-Takes the path to a random-seed file as written by the
-.Fl S
-flag to
-.Xr rndctl 8
-as an argument.
-This file is used to seed the kernel entropy pool
-.Xr rnd 9
-very early in kernel startup, so that high quality randomness is
-available to all kernel modules.
-This argument should be supplied
-before any
-.Dq Ic load
-commands that may load executable modules.
 .El
 .Sh EXAMPLES
 Here is an example



Re: CVS commit: src/sys/dev/sysmon

2015-04-25 Thread Paul Goyette

Ooops - this should have been two commits.

Log message is correct for sysmon.c

For the others, message has been corrected to read:

Handle early initialization requirements - thanks martin@
and others



On Sat, 25 Apr 2015, Paul Goyette wrote:


Module Name:src
Committed By:   pgoyette
Date:   Sat Apr 25 23:40:09 UTC 2015

Modified Files:
src/sys/dev/sysmon: sysmon.c sysmon_envsys.c sysmon_power.c
sysmon_wdog.c

Log Message:
Correctly check return status when registering with pmf


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/dev/sysmon/sysmon.c
cvs rdiff -u -r1.136 -r1.137 src/sys/dev/sysmon/sysmon_envsys.c
cvs rdiff -u -r1.54 -r1.55 src/sys/dev/sysmon/sysmon_power.c
cvs rdiff -u -r1.26 -r1.27 src/sys/dev/sysmon/sysmon_wdog.c

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




-
| Paul Goyette | PGP Key fingerprint: | E-mail addresses:   |
| (Retired)| FA29 0E3B 35AF E8AE 6651 | paul at whooppee.com|
| Kernel Developer | 0786 F758 55DE 53BA 7731 | pgoyette at netbsd.org  |
-


CVS commit: src/sys/dev/sysmon

2015-04-25 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat Apr 25 23:40:09 UTC 2015

Modified Files:
src/sys/dev/sysmon: sysmon.c sysmon_envsys.c sysmon_power.c
sysmon_wdog.c

Log Message:
Correctly check return status when registering with pmf


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/dev/sysmon/sysmon.c
cvs rdiff -u -r1.136 -r1.137 src/sys/dev/sysmon/sysmon_envsys.c
cvs rdiff -u -r1.54 -r1.55 src/sys/dev/sysmon/sysmon_power.c
cvs rdiff -u -r1.26 -r1.27 src/sys/dev/sysmon/sysmon_wdog.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/dev/sysmon/sysmon.c
diff -u src/sys/dev/sysmon/sysmon.c:1.23 src/sys/dev/sysmon/sysmon.c:1.24
--- src/sys/dev/sysmon/sysmon.c:1.23	Sat Apr 25 23:16:37 2015
+++ src/sys/dev/sysmon/sysmon.c	Sat Apr 25 23:40:09 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: sysmon.c,v 1.23 2015/04/25 23:16:37 pgoyette Exp $	*/
+/*	$NetBSD: sysmon.c,v 1.24 2015/04/25 23:40:09 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2000 Zembu Labs, Inc.
@@ -39,7 +39,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: sysmon.c,v 1.23 2015/04/25 23:16:37 pgoyette Exp $);
+__KERNEL_RCSID(0, $NetBSD: sysmon.c,v 1.24 2015/04/25 23:40:09 pgoyette Exp $);
 
 #include sys/param.h
 #include sys/conf.h
@@ -397,7 +397,7 @@ sysmon_init(void)
 		error = ENODEV;
 	}
 
-	if (pmf_device_register(sysmon_dev, NULL, NULL))
+	if (!pmf_device_register(sysmon_dev, NULL, NULL))
 		aprint_error(%s: failed to register with pmf\n,
 		sysmon_cd.cd_name);
 

Index: src/sys/dev/sysmon/sysmon_envsys.c
diff -u src/sys/dev/sysmon/sysmon_envsys.c:1.136 src/sys/dev/sysmon/sysmon_envsys.c:1.137
--- src/sys/dev/sysmon/sysmon_envsys.c:1.136	Sat Apr 25 14:06:58 2015
+++ src/sys/dev/sysmon/sysmon_envsys.c	Sat Apr 25 23:40:09 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: sysmon_envsys.c,v 1.136 2015/04/25 14:06:58 christos Exp $	*/
+/*	$NetBSD: sysmon_envsys.c,v 1.137 2015/04/25 23:40:09 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2007, 2008 Juan Romero Pardines.
@@ -64,7 +64,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: sysmon_envsys.c,v 1.136 2015/04/25 14:06:58 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: sysmon_envsys.c,v 1.137 2015/04/25 23:40:09 pgoyette Exp $);
 
 #include sys/param.h
 #include sys/types.h
@@ -78,6 +78,7 @@ __KERNEL_RCSID(0, $NetBSD: sysmon_envsy
 #include sys/kmem.h
 #include sys/rndsource.h
 #include sys/module.h
+#include sys/once.h
 
 #include dev/sysmon/sysmonvar.h
 #include dev/sysmon/sysmon_envsysvar.h
@@ -109,18 +110,17 @@ static struct sysmon_opvec sysmon_envsys
 NULL, NULL, NULL
 };
 
-static void
+ONCE_DECL(once_envsys);
+
+static int
 sme_preinit(void)
 {
-	static bool passed = false;
 
-	if (passed)
-		return;
-
-	passed = true;
 	LIST_INIT(sysmon_envsys_list);
 	mutex_init(sme_global_mtx, MUTEX_DEFAULT, IPL_NONE);
 	sme_propd = prop_dictionary_create();
+
+	return 0;
 }
 
 /*
@@ -133,7 +133,7 @@ sysmon_envsys_init(void)
 {
 	int error;
 
-	sme_preinit();
+	(void)RUN_ONCE(once_envsys, sme_preinit);
 
 	error = sysmon_attach_minor(SYSMON_MINOR_ENVSYS, sysmon_envsys_opvec);
 
@@ -694,7 +694,7 @@ sysmon_envsys_register(struct sysmon_env
 	KASSERT(sme != NULL);
 	KASSERT(sme-sme_name != NULL);
 
-	sme_preinit();
+	(void)RUN_ONCE(once_envsys, sme_preinit);
 
 	/*
 	 * Check if requested sysmon_envsys device is valid

Index: src/sys/dev/sysmon/sysmon_power.c
diff -u src/sys/dev/sysmon/sysmon_power.c:1.54 src/sys/dev/sysmon/sysmon_power.c:1.55
--- src/sys/dev/sysmon/sysmon_power.c:1.54	Thu Apr 23 23:22:03 2015
+++ src/sys/dev/sysmon/sysmon_power.c	Sat Apr 25 23:40:09 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: sysmon_power.c,v 1.54 2015/04/23 23:22:03 pgoyette Exp $	*/
+/*	$NetBSD: sysmon_power.c,v 1.55 2015/04/25 23:40:09 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2007 Juan Romero Pardines.
@@ -69,7 +69,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: sysmon_power.c,v 1.54 2015/04/23 23:22:03 pgoyette Exp $);
+__KERNEL_RCSID(0, $NetBSD: sysmon_power.c,v 1.55 2015/04/25 23:40:09 pgoyette Exp $);
 
 #ifndef _LKM
 #include opt_compat_netbsd.h
@@ -88,6 +88,7 @@ __KERNEL_RCSID(0, $NetBSD: sysmon_power
 #include sys/device.h
 #include sys/rndsource.h
 #include sys/module.h
+#include sys/once.h
 
 #include dev/sysmon/sysmonvar.h
 #include prop/proplib.h
@@ -199,6 +200,18 @@ static struct sysmon_opvec sysmon_power_
 
 #define	SYSMON_NEXT_EVENT(x)		(((x) + 1) % SYSMON_MAX_POWER_EVENTS)
 
+ONCE_DECL(once_power);
+
+static int
+power_preinit(void)
+{
+
+	mutex_init(sysmon_power_event_queue_mtx, MUTEX_DEFAULT, IPL_NONE);
+	cv_init(sysmon_power_event_queue_cv, smpower);
+
+	return 0;
+}
+
 /*
  * sysmon_power_init:
  *
@@ -210,8 +223,8 @@ sysmon_power_init(void)
 {
 	int error;
 
-	mutex_init(sysmon_power_event_queue_mtx, MUTEX_DEFAULT, IPL_NONE);
-	cv_init(sysmon_power_event_queue_cv, smpower);
+	(void)RUN_ONCE(once_power, power_preinit);
+
 	

CVS commit: src/sys/dev/sysmon

2015-04-25 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat Apr 25 23:40:09 UTC 2015

Modified Files:
src/sys/dev/sysmon: sysmon.c sysmon_envsys.c sysmon_power.c
sysmon_wdog.c

Log Message:
Correctly check return status when registering with pmf


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/dev/sysmon/sysmon.c
cvs rdiff -u -r1.136 -r1.137 src/sys/dev/sysmon/sysmon_envsys.c
cvs rdiff -u -r1.54 -r1.55 src/sys/dev/sysmon/sysmon_power.c
cvs rdiff -u -r1.26 -r1.27 src/sys/dev/sysmon/sysmon_wdog.c

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



Re: CVS commit: src/distrib/atari/floppies/install

2015-04-25 Thread Christos Zoulas
On Apr 26,  2:31am, tsut...@ceres.dti.ne.jp (Izumi Tsutsui) wrote:
-- Subject: Re: CVS commit: src/distrib/atari/floppies/install

| christos@ wrote:
| 
|  Module Name:src
|  Committed By:   christos
|  Date:   Wed Apr 22 20:21:11 UTC 2015
|  
|  Modified Files:
|  src/distrib/atari/floppies/install: Makefile
|  
|  Log Message:
|  double the size of the image to fix the build
| 
| AFAIK atari doesn't handle to write, load, and mount 1440KB floppy images.
| (i.e. no ustarfs support)

How do we fix it? Can we add ustarfs support..

christos


Re: CVS commit: src/distrib/atari/floppies/install

2015-04-25 Thread Izumi Tsutsui
christos@ wrote:

 | It's easier to have smaller binaries (awk?) in distrib/utils?
 
 Let's see how far we are from fitting...

All thing I know is it works in 7.0_BETA.

I just think buildability fix won't help users,
as we discussed in the past.
http://mail-index.netbsd.org/source-changes-d/2012/08/01/msg005113.html

---
Izumi Tsutsui


CVS commit: src/sys/kern

2015-04-25 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Sat Apr 25 18:43:13 UTC 2015

Modified Files:
src/sys/kern: kern_veriexec.c

Log Message:
Instead of duplicating code, add veriexec_fp_status(). Also reorder a
useless goto.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/kern/kern_veriexec.c

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



CVS commit: src/sys/dev/sysmon

2015-04-25 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat Apr 25 23:16:37 UTC 2015

Modified Files:
src/sys/dev/sysmon: sysmon.c

Log Message:
Fix typo - thanks, riz@


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/dev/sysmon/sysmon.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/dev/sysmon/sysmon.c
diff -u src/sys/dev/sysmon/sysmon.c:1.22 src/sys/dev/sysmon/sysmon.c:1.23
--- src/sys/dev/sysmon/sysmon.c:1.22	Sat Apr 25 22:46:31 2015
+++ src/sys/dev/sysmon/sysmon.c	Sat Apr 25 23:16:37 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: sysmon.c,v 1.22 2015/04/25 22:46:31 pgoyette Exp $	*/
+/*	$NetBSD: sysmon.c,v 1.23 2015/04/25 23:16:37 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2000 Zembu Labs, Inc.
@@ -39,7 +39,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: sysmon.c,v 1.22 2015/04/25 22:46:31 pgoyette Exp $);
+__KERNEL_RCSID(0, $NetBSD: sysmon.c,v 1.23 2015/04/25 23:16:37 pgoyette Exp $);
 
 #include sys/param.h
 #include sys/conf.h
@@ -398,7 +398,7 @@ sysmon_init(void)
 	}
 
 	if (pmf_device_register(sysmon_dev, NULL, NULL))
-		aprintf_error(%s: failed to register with pmf\n,
+		aprint_error(%s: failed to register with pmf\n,
 		sysmon_cd.cd_name);
 
 	return error;



CVS commit: src/sys/dev/sysmon

2015-04-25 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat Apr 25 23:16:37 UTC 2015

Modified Files:
src/sys/dev/sysmon: sysmon.c

Log Message:
Fix typo - thanks, riz@


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/dev/sysmon/sysmon.c

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



Re: CVS commit: src/sys/dev/sysmon

2015-04-25 Thread Paul Goyette

Yup - fixing now...

On Sat, 25 Apr 2015, Jeff Rizzo wrote:


On 4/25/15 3:46 PM, Paul Goyette wrote:

Module Name:src
Committed By:   pgoyette
Date:   Sat Apr 25 22:46:31 UTC 2015



  + if (pmf_device_register(sysmon_dev, NULL, NULL))
+   aprintf_error(%s: failed to register with pmf\n,



I think you mean aprint_error.  This doesn't link.

+j




-
| Paul Goyette | PGP Key fingerprint: | E-mail addresses:   |
| (Retired)| FA29 0E3B 35AF E8AE 6651 | paul at whooppee.com|
| Kernel Developer | 0786 F758 55DE 53BA 7731 | pgoyette at netbsd.org  |
-


Re: CVS commit: src/sys/dev/sysmon

2015-04-25 Thread Christos Zoulas
In article 1723.1429983...@splode.eterna.com.au,
matthew green  m...@eterna.com.au wrote:

Christos Zoulas writes:
 Module Name: src
 Committed By:christos
 Date:Sat Apr 25 14:06:58 UTC 2015
 
 Modified Files:
  src/sys/dev/sysmon: sysmon_envsys.c
 
 Log Message:
 make things boot again, from martin.

thanks.  updating to test now..

but shouldn't this use RUN_ONCE() and/or a lock/atomic?

Yes, I am letting paul fix it properly the way he wants.

christos



Re: CVS commit: src/distrib/atari/floppies/install

2015-04-25 Thread Christos Zoulas
On Apr 26,  3:55am, tsut...@ceres.dti.ne.jp (Izumi Tsutsui) wrote:
-- Subject: Re: CVS commit: src/distrib/atari/floppies/install

| christos@ wrote:
| 
|  | It's easier to have smaller binaries (awk?) in distrib/utils?
|  
|  Let's see how far we are from fitting...
| 
| All thing I know is it works in 7.0_BETA.
| 
| I just think buildability fix won't help users,
| as we discussed in the past.
| http://mail-index.netbsd.org/source-changes-d/2012/08/01/msg005113.html

Well, it does not help being broken for months... I say tier III, since
nobody seems to care. Anyway, fixed for now.

christos


CVS commit: src/distrib/atari/floppies/install

2015-04-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Apr 25 21:44:34 UTC 2015

Modified Files:
src/distrib/atari/floppies/install: list

Log Message:
put back sed, it fits again (and is needed)


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/distrib/atari/floppies/install/list

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



CVS commit: src/sys/dev/sysmon

2015-04-25 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat Apr 25 22:46:31 UTC 2015

Modified Files:
src/sys/dev/sysmon: sysmon.c

Log Message:
Register the sysmon pseudo-device with power management framework so we
can properly suspend the system.

Thanks, mrg, for pointing this out.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/dev/sysmon/sysmon.c

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



CVS commit: src/sys/dev/sysmon

2015-04-25 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat Apr 25 22:46:31 UTC 2015

Modified Files:
src/sys/dev/sysmon: sysmon.c

Log Message:
Register the sysmon pseudo-device with power management framework so we
can properly suspend the system.

Thanks, mrg, for pointing this out.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/dev/sysmon/sysmon.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/dev/sysmon/sysmon.c
diff -u src/sys/dev/sysmon/sysmon.c:1.21 src/sys/dev/sysmon/sysmon.c:1.22
--- src/sys/dev/sysmon/sysmon.c:1.21	Fri Apr 24 03:35:49 2015
+++ src/sys/dev/sysmon/sysmon.c	Sat Apr 25 22:46:31 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: sysmon.c,v 1.21 2015/04/24 03:35:49 pgoyette Exp $	*/
+/*	$NetBSD: sysmon.c,v 1.22 2015/04/25 22:46:31 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2000 Zembu Labs, Inc.
@@ -39,7 +39,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: sysmon.c,v 1.21 2015/04/24 03:35:49 pgoyette Exp $);
+__KERNEL_RCSID(0, $NetBSD: sysmon.c,v 1.22 2015/04/25 22:46:31 pgoyette Exp $);
 
 #include sys/param.h
 #include sys/conf.h
@@ -397,6 +397,10 @@ sysmon_init(void)
 		error = ENODEV;
 	}
 
+	if (pmf_device_register(sysmon_dev, NULL, NULL))
+		aprintf_error(%s: failed to register with pmf\n,
+		sysmon_cd.cd_name);
+
 	return error;
 }
 
@@ -413,6 +417,7 @@ sysmon_fini(void)
 		error = EBUSY;
 
 	else {
+		pmf_device_deregister(sysmon_dev);
 		config_detach(sysmon_dev, 0);
 		devsw_detach(NULL, sysmon_cdevsw);
 		config_cfattach_detach(sysmon_cd.cd_name, sysmon_ca);



Re: CVS commit: src/distrib/atari/floppies/install

2015-04-25 Thread Izumi Tsutsui
christos@ wrote:

 | I just think buildability fix won't help users,
 | as we discussed in the past.
 | http://mail-index.netbsd.org/source-changes-d/2012/08/01/msg005113.html
 
 Well, it does not help being broken for months... I say tier III, since
 nobody seems to care. Anyway, fixed for now.

You always miss the point.

Please don't commit untested and broken fix.
Please file a PR instead if you can't test it.

What I wrote was:

 I agree you can blame port masters if they leave their ports broken
 more than *weeks*.
 :
 If you claim port-masters must check buildable state *everyday*
 against all MI changes without review or announcement, I'll resign
 from all maintainership.

Claiming tier III since nobody seems to care without PR is quite unfair.

---
Izumi Tsutsui


CVS commit: src/sys/kern

2015-04-25 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Sat Apr 25 09:08:51 UTC 2015

Modified Files:
src/sys/kern: kern_veriexec.c

Log Message:
Don't mix veriexec lock and file lock in veriexec_file_verify().

Now:
 - 'veriexec_op_lock' needs to be held when calling veriexec_file_verify()
 - the 'file_lock_state' argument indicates if the file is locked
 - add some KASSERTs


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/kern/kern_veriexec.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/kern/kern_veriexec.c
diff -u src/sys/kern/kern_veriexec.c:1.2 src/sys/kern/kern_veriexec.c:1.3
--- src/sys/kern/kern_veriexec.c:1.2	Sat Apr 25 08:19:06 2015
+++ src/sys/kern/kern_veriexec.c	Sat Apr 25 09:08:51 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_veriexec.c,v 1.2 2015/04/25 08:19:06 maxv Exp $	*/
+/*	$NetBSD: kern_veriexec.c,v 1.3 2015/04/25 09:08:51 maxv Exp $	*/
 
 /*-
  * Copyright (c) 2005, 2006 Elad Efrat e...@netbsd.org
@@ -29,7 +29,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: kern_veriexec.c,v 1.2 2015/04/25 08:19:06 maxv Exp $);
+__KERNEL_RCSID(0, $NetBSD: kern_veriexec.c,v 1.3 2015/04/25 09:08:51 maxv Exp $);
 
 #include opt_veriexec.h
 
@@ -78,6 +78,9 @@ __KERNEL_RCSID(0, $NetBSD: kern_veriexe
 #define VERIEXEC_UNLOCKED	0x00	/* Nothing locked, callee does it */
 #define VERIEXEC_LOCKED		0x01	/* Global op lock held */
 
+/* state of file locking for veriexec_file_verify */
+#define VERIEXEC_FILE_UNLOCKED	0x02	/* Nothing locked, callee does it */
+#define VERIEXEC_FILE_LOCKED	0x04	/* File locked */
 
 #define VERIEXEC_RW_UPGRADE(lock)	while((rw_tryupgrade(lock)) == 0){};
 
@@ -423,7 +426,7 @@ veriexec_fpops_lookup(const char *name)
  * NOTE: vfe is assumed to be locked for writing on entry.
  */
 static int
-veriexec_fp_calc(struct lwp *l, struct vnode *vp, int lock_state,
+veriexec_fp_calc(struct lwp *l, struct vnode *vp, int file_lock_state,
 struct veriexec_file_entry *vfe, u_char *fp)
 {
 	struct vattr va;
@@ -433,10 +436,13 @@ veriexec_fp_calc(struct lwp *l, struct v
 	size_t resid, npages;
 	int error, do_perpage, pagen;
 
-	if (lock_state == VERIEXEC_UNLOCKED)
+	KASSERT((file_lock_state != VERIEXEC_LOCKED) 
+	(file_lock_state != VERIEXEC_UNLOCKED));
+
+	if (file_lock_state == VERIEXEC_FILE_UNLOCKED)
 		vn_lock(vp, LK_SHARED | LK_RETRY);
 	error = VOP_GETATTR(vp, va, l-l_cred);
-	if (lock_state == VERIEXEC_UNLOCKED)
+	if (file_lock_state == VERIEXEC_FILE_UNLOCKED)
 		VOP_UNLOCK(vp);
 	if (error)
 		return (error);
@@ -473,7 +479,7 @@ veriexec_fp_calc(struct lwp *l, struct v
 
 		error = vn_rdwr(UIO_READ, vp, buf, len, offset,
 UIO_SYSSPACE,
-((lock_state == VERIEXEC_LOCKED)?
+((file_lock_state == VERIEXEC_FILE_LOCKED)?
  IO_NODELOCKED : 0),
 l-l_cred, resid, NULL);
 
@@ -608,16 +614,22 @@ veriexec_file_report(struct veriexec_fil
  * exec_script(), 'flag' will be VERIEXEC_INDIRECT.  If we are called from
  * vn_open(), 'flag' will be VERIEXEC_FILE.
  *
+ * 'veriexec_op_lock' must be locked (and remains locked).
+ *
  * NOTE: The veriexec file entry pointer (vfep) will be returned LOCKED
  *   on no error.
  */
 static int
 veriexec_file_verify(struct lwp *l, struct vnode *vp, const u_char *name,
-int flag, int lockstate, struct veriexec_file_entry **vfep)
+int flag, int file_lock_state, struct veriexec_file_entry **vfep)
 {
 	struct veriexec_file_entry *vfe;
 	int error;
 
+	KASSERT(rw_lock_held(veriexec_op_lock));
+	KASSERT((file_lock_state != VERIEXEC_LOCKED) 
+	(file_lock_state != VERIEXEC_UNLOCKED));
+
 #define VFE_NEEDS_EVAL(vfe) ((vfe-status == FINGERPRINT_NOTEVAL) || \
 			 (vfe-type  VERIEXEC_UNTRUSTED))
 
@@ -627,9 +639,6 @@ veriexec_file_verify(struct lwp *l, stru
 	if (vp-v_type != VREG)
 		return (0);
 
-	if (lockstate == VERIEXEC_UNLOCKED)
-		rw_enter(veriexec_op_lock, RW_READER);
-
 	/* Lookup veriexec table entry, save pointer if requested. */
 	vfe = veriexec_get(vp);
 	if (vfep != NULL)
@@ -659,14 +668,12 @@ veriexec_file_verify(struct lwp *l, stru
 		/* Calculate fingerprint for on-disk file. */
 		digest = kmem_zalloc(vfe-ops-hash_len, KM_SLEEP);
 
-		error = veriexec_fp_calc(l, vp, lockstate, vfe, digest);
+		error = veriexec_fp_calc(l, vp, file_lock_state, vfe, digest);
 		if (error) {
 			veriexec_file_report(vfe, Fingerprint calculation error.,
 			name, NULL, REPORT_ALWAYS);
 			kmem_free(digest, vfe-ops-hash_len);
 			rw_exit(vfe-lock);
-			if (lockstate == VERIEXEC_UNLOCKED)
-rw_exit(veriexec_op_lock);
 			return (error);
 		}
 
@@ -687,8 +694,6 @@ veriexec_file_verify(struct lwp *l, stru
 		/* IPS mode: Enforce access type. */
 		if (veriexec_strict = VERIEXEC_IPS) {
 			rw_exit(vfe-lock);
-			if (lockstate == VERIEXEC_UNLOCKED)
-rw_exit(veriexec_op_lock);
 			return (EPERM);
 		}
 	}
@@ -699,8 +704,6 @@ veriexec_file_verify(struct lwp *l, stru
 		veriexec_file_report(NULL, No 

CVS commit: src/sys/kern

2015-04-25 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Sat Apr 25 09:08:51 UTC 2015

Modified Files:
src/sys/kern: kern_veriexec.c

Log Message:
Don't mix veriexec lock and file lock in veriexec_file_verify().

Now:
 - 'veriexec_op_lock' needs to be held when calling veriexec_file_verify()
 - the 'file_lock_state' argument indicates if the file is locked
 - add some KASSERTs


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/kern/kern_veriexec.c

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



CVS commit: src/sys/rump

2015-04-25 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Sat Apr 25 08:48:06 UTC 2015

Modified Files:
src/sys/rump: listsrcdirs

Log Message:
Add libkvm to list of userspace libraries.

Even though kvm per se isn't support by rump kernels at least for now,
libkvm contains methods such as kvm_getproc2() which can be necessary for
compiling existing applications with kvm awareness as rumprun unikernels.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/sys/rump/listsrcdirs

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

Modified files:

Index: src/sys/rump/listsrcdirs
diff -u src/sys/rump/listsrcdirs:1.30 src/sys/rump/listsrcdirs:1.31
--- src/sys/rump/listsrcdirs:1.30	Fri Apr 17 13:04:19 2015
+++ src/sys/rump/listsrcdirs	Sat Apr 25 08:48:06 2015
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-#	$NetBSD: listsrcdirs,v 1.30 2015/04/17 13:04:19 pooka Exp $
+#	$NetBSD: listsrcdirs,v 1.31 2015/04/25 08:48:06 pooka Exp $
 #
 
 #
@@ -92,7 +92,7 @@ lsrc posix /usr.bin/		rump_server rump_a
 # NOTE! libc++ is handled below as a special case due to the NetBSD
 # dist directory consisting ~90% (50+MB) of tests unnecessary to us
 lsrc usr /lib/			i18n_module
-lsrc usr /lib/lib		crypt ipsec m npf pci prop
+lsrc usr /lib/lib		crypt ipsec kvm m npf pci prop
 lsrc usr /lib/lib		pthread rmt y z
 lsrc usr /libexec/		ld.elf_so
 lsrc usr /bin/			chmod cp dd df ed ln ls mkdir mv pax



CVS commit: src/sys/rump

2015-04-25 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Sat Apr 25 08:48:06 UTC 2015

Modified Files:
src/sys/rump: listsrcdirs

Log Message:
Add libkvm to list of userspace libraries.

Even though kvm per se isn't support by rump kernels at least for now,
libkvm contains methods such as kvm_getproc2() which can be necessary for
compiling existing applications with kvm awareness as rumprun unikernels.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/sys/rump/listsrcdirs

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



Re: CVS commit: src/share/misc

2015-04-25 Thread David Holland
On Fri, Apr 24, 2015 at 12:20:17AM +, Blue Rats wrote:
  Module Name: src
  Committed By:rodent
  Date:Fri Apr 24 00:20:17 UTC 2015
  
  Modified Files:
   src/share/misc: acronyms
  
  Log Message:
  +BB = baby - with this commit, we document, rather than police, yet another
  acronym/abbreviation which is part of Internet culture. Those who feel
  otherwise are welcome to turn this over to core@, who resolve disputes
  among developers.

If you persist in this attitude, you're likely to generate a consensus
within this part of the Internet culture to document your sudden
lack of a commit bit.

-- 
David A. Holland
dholl...@netbsd.org


CVS commit: src/sys/kern

2015-04-25 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Sat Apr 25 08:19:06 UTC 2015

Modified Files:
src/sys/kern: kern_veriexec.c

Log Message:
KNF


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/kern/kern_veriexec.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/kern/kern_veriexec.c
diff -u src/sys/kern/kern_veriexec.c:1.1 src/sys/kern/kern_veriexec.c:1.2
--- src/sys/kern/kern_veriexec.c:1.1	Fri Feb 13 17:50:48 2015
+++ src/sys/kern/kern_veriexec.c	Sat Apr 25 08:19:06 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_veriexec.c,v 1.1 2015/02/13 17:50:48 maxv Exp $	*/
+/*	$NetBSD: kern_veriexec.c,v 1.2 2015/04/25 08:19:06 maxv Exp $	*/
 
 /*-
  * Copyright (c) 2005, 2006 Elad Efrat e...@netbsd.org
@@ -29,7 +29,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: kern_veriexec.c,v 1.1 2015/02/13 17:50:48 maxv Exp $);
+__KERNEL_RCSID(0, $NetBSD: kern_veriexec.c,v 1.2 2015/04/25 08:19:06 maxv Exp $);
 
 #include opt_veriexec.h
 
@@ -713,7 +713,7 @@ veriexec_file_verify(struct lwp *l, stru
 		return (0);
 	}
 
-switch (vfe-status) {
+	switch (vfe-status) {
 	case FINGERPRINT_NOTEVAL:
 		/* Should not happen. */
 		rw_exit(vfe-lock);
@@ -722,8 +722,7 @@ veriexec_file_verify(struct lwp *l, stru
 		veriexec_file_report(vfe, Not-evaluated status 
 		post evaluation; inconsistency detected., name,
 		NULL, REPORT_ALWAYS|REPORT_PANIC);
-
-		/*NOTREACHED*/
+		/* NOTREACHED */
 
 	case FINGERPRINT_VALID:
 		/* Valid fingerprint. */
@@ -752,7 +751,8 @@ veriexec_file_verify(struct lwp *l, stru
 			rw_exit(veriexec_op_lock);
 		veriexec_file_report(vfe, Invalid status 
 		post evaluation., name, NULL, REPORT_ALWAYS|REPORT_PANIC);
-}
+		/* NOTREACHED */
+	}
 
 	if (lockstate == VERIEXEC_UNLOCKED)
 		rw_exit(veriexec_op_lock);
@@ -889,7 +889,6 @@ veriexec_removechk(struct lwp *l, struct
 	else
 		error = veriexec_file_delete(l, vp);
 
-
 	return error;
 }
 
@@ -1029,7 +1028,6 @@ veriexec_file_purge_cb(struct veriexec_f
 void
 veriexec_purge(struct vnode *vp)
 {
-
 	rw_enter(veriexec_op_lock, RW_READER);
 	veriexec_file_purge(veriexec_get(vp), VERIEXEC_UNLOCKED);
 	rw_exit(veriexec_op_lock);
@@ -1201,14 +1199,11 @@ veriexec_file_add(struct lwp *l, prop_di
 	if (vp-v_type != VREG) {
 		log(LOG_ERR, Veriexec: Not adding `%s': Not a regular file.\n,
 		file);
-
 		error = EBADF;
-
 		goto out;
 	}
 
 	vfe = kmem_zalloc(sizeof(*vfe), KM_SLEEP);
-
 	rw_init(vfe-lock);
 
 	/* Lookup fingerprint hashing algorithm. */
@@ -1217,9 +1212,7 @@ veriexec_file_add(struct lwp *l, prop_di
 	if ((vfe-ops = veriexec_fpops_lookup(fp_type)) == NULL) {
 		log(LOG_ERR, Veriexec: Invalid or unknown fingerprint type 
 		`%s' for file `%s'.\n, fp_type, file);
-
 		error = EOPNOTSUPP;
-
 		goto out;
 	}
 
@@ -1227,9 +1220,7 @@ veriexec_file_add(struct lwp *l, prop_di
 	vfe-ops-hash_len) {
 		log(LOG_ERR, Veriexec: Bad fingerprint length for `%s'.\n,
 		file);
-
 		error = EINVAL;
-
 		goto out;
 	}
 
@@ -1253,16 +1244,16 @@ veriexec_file_add(struct lwp *l, prop_di
 		else
 			fp_mismatch = false;
 
-		if ((veriexec_verbose = 1) || fp_mismatch)
+		if ((veriexec_verbose = 1) || fp_mismatch) {
 			log(LOG_NOTICE, Veriexec: Duplicate entry for `%s' 
 			ignored. (%s fingerprint)\n, file,
 			fp_mismatch ? different : same);
+		}
 
 		veriexec_file_free(vfe);
 
 		/* XXX Should this be EEXIST if fp_mismatch is true? */
 		error = 0;
-
 		goto unlock_out;
 	}
 
@@ -1277,9 +1268,7 @@ veriexec_file_add(struct lwp *l, prop_di
 		if (extra_flags) {
 			log(LOG_NOTICE, Veriexec: Contaminated flags `0x%x' 
 			for `%s', skipping.\n, extra_flags, file);
-
 			error = EINVAL;
-
 			goto unlock_out;
 		}
 	}
@@ -1411,8 +1400,8 @@ veriexec_convert(struct vnode *vp, prop_
 
 	rw_enter(vfe-lock, RW_READER);
 	veriexec_file_convert(vfe, rdict);
-
 	rw_exit(vfe-lock);
+
 	rw_exit(veriexec_op_lock);
 	return (0);
 }



CVS commit: src/sys/kern

2015-04-25 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Sat Apr 25 08:19:06 UTC 2015

Modified Files:
src/sys/kern: kern_veriexec.c

Log Message:
KNF


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/kern/kern_veriexec.c

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



CVS commit: src/sys/dev

2015-04-25 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat Apr 25 12:55:05 UTC 2015

Modified Files:
src/sys/dev: cgd_crypto.c cgd_crypto.h

Log Message:
Sprinkle const into cgd crypto API.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/dev/cgd_crypto.c
cvs rdiff -u -r1.7 -r1.8 src/sys/dev/cgd_crypto.h

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

Modified files:

Index: src/sys/dev/cgd_crypto.c
diff -u src/sys/dev/cgd_crypto.c:1.12 src/sys/dev/cgd_crypto.c:1.13
--- src/sys/dev/cgd_crypto.c:1.12	Mon Jun 24 04:21:20 2013
+++ src/sys/dev/cgd_crypto.c	Sat Apr 25 12:55:04 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: cgd_crypto.c,v 1.12 2013/06/24 04:21:20 riastradh Exp $ */
+/* $NetBSD: cgd_crypto.c,v 1.13 2015/04/25 12:55:04 riastradh Exp $ */
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: cgd_crypto.c,v 1.12 2013/06/24 04:21:20 riastradh Exp $);
+__KERNEL_RCSID(0, $NetBSD: cgd_crypto.c,v 1.13 2015/04/25 12:55:04 riastradh Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -126,8 +126,8 @@ static void
 cgd_cipher_uio_cbc(void *privdata, cipher_func cipher,
 struct uio *dstuio, struct uio *srcuio)
 {
-	struct iovec	*dst;
-	struct iovec	*src;
+	const struct iovec	*dst;
+	const struct iovec	*src;
 	int		 dstnum;
 	int		 dstoff = 0;
 	int		 srcnum;
@@ -140,7 +140,7 @@ cgd_cipher_uio_cbc(void *privdata, ciphe
 	for (;;) {
 		int	  l = MIN(dst-iov_len - dstoff, src-iov_len - srcoff);
 		u_int8_t *d = (u_int8_t *)dst-iov_base + dstoff;
-		u_int8_t *s = (u_int8_t *)src-iov_base + srcoff;
+		const u_int8_t *s = (const u_int8_t *)src-iov_base + srcoff;
 
 		cipher(privdata, d, s, l);
 
@@ -238,7 +238,7 @@ aes_cbc_dec_int(void *privdata, void *ds
 
 static void
 cgd_cipher_aes_cbc(void *privdata, struct uio *dstuio,
-struct uio *srcuio, void *iv, int dir)
+struct uio *srcuio, const void *iv, int dir)
 {
 	struct aes_privdata	*apd = privdata;
 	struct aes_encdata	 encd;
@@ -334,7 +334,7 @@ c3des_cbc_dec_int(void *privdata, void *
 
 static void
 cgd_cipher_3des_cbc(void *privdata, struct uio *dstuio,
-	struct uio *srcuio, void *iv, int dir)
+	struct uio *srcuio, const void *iv, int dir)
 {
 	struct	c3des_privdata *cp = privdata;
 	struct	c3des_encdata ce;
@@ -417,7 +417,7 @@ bf_cbc_dec_int(void *privdata, void *dst
 
 static void
 cgd_cipher_bf_cbc(void *privdata, struct uio *dstuio,
-struct uio *srcuio, void *iv, int dir)
+struct uio *srcuio, const void *iv, int dir)
 {
 	struct	bf_privdata *bp = privdata;
 	struct	bf_encdata be;

Index: src/sys/dev/cgd_crypto.h
diff -u src/sys/dev/cgd_crypto.h:1.7 src/sys/dev/cgd_crypto.h:1.8
--- src/sys/dev/cgd_crypto.h:1.7	Wed Dec  5 02:23:20 2012
+++ src/sys/dev/cgd_crypto.h	Sat Apr 25 12:55:04 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: cgd_crypto.h,v 1.7 2012/12/05 02:23:20 christos Exp $ */
+/* $NetBSD: cgd_crypto.h,v 1.8 2015/04/25 12:55:04 riastradh Exp $ */
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -38,7 +38,8 @@
 
 typedef void *(cfunc_init)(size_t, const void *, size_t *);
 typedef void  (cfunc_destroy)(void *);
-typedef void  (cfunc_cipher)(void *, struct uio *, struct uio *, void *, int);
+typedef void  (cfunc_cipher)(void *, struct uio *, struct uio *, const void *,
+int);
 
 struct cryptfuncs {
 	const char	 *cf_name;	/* cipher name */



CVS commit: src/sys/dev

2015-04-25 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat Apr 25 12:55:05 UTC 2015

Modified Files:
src/sys/dev: cgd_crypto.c cgd_crypto.h

Log Message:
Sprinkle const into cgd crypto API.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/dev/cgd_crypto.c
cvs rdiff -u -r1.7 -r1.8 src/sys/dev/cgd_crypto.h

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



CVS commit: src/sys/dev

2015-04-25 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat Apr 25 13:06:11 UTC 2015

Modified Files:
src/sys/dev: cgd.c

Log Message:
Use explicit_memset to zero key material.


To generate a diff of this commit:
cvs rdiff -u -r1.96 -r1.97 src/sys/dev/cgd.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/dev/cgd.c
diff -u src/sys/dev/cgd.c:1.96 src/sys/dev/cgd.c:1.97
--- src/sys/dev/cgd.c:1.96	Fri Jan  2 19:42:06 2015
+++ src/sys/dev/cgd.c	Sat Apr 25 13:06:11 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: cgd.c,v 1.96 2015/01/02 19:42:06 christos Exp $ */
+/* $NetBSD: cgd.c,v 1.97 2015/04/25 13:06:11 riastradh Exp $ */
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: cgd.c,v 1.96 2015/01/02 19:42:06 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: cgd.c,v 1.97 2015/04/25 13:06:11 riastradh Exp $);
 
 #include sys/types.h
 #include sys/param.h
@@ -705,7 +705,7 @@ cgd_ioctl_set(struct cgd_softc *cs, void
 	 * and encblkno8.
 	 */
 	cs-sc_cdata.cf_blocksize /= encblkno[i].d;
-	(void)memset(inbuf, 0, MAX_KEYSIZE);
+	(void)explicit_memset(inbuf, 0, MAX_KEYSIZE);
 	if (!cs-sc_cdata.cf_priv) {
 		ret = EINVAL;		/* XXX is this the right error? */
 		goto bail;



CVS commit: src/sys/dev

2015-04-25 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat Apr 25 13:06:11 UTC 2015

Modified Files:
src/sys/dev: cgd.c

Log Message:
Use explicit_memset to zero key material.


To generate a diff of this commit:
cvs rdiff -u -r1.96 -r1.97 src/sys/dev/cgd.c

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



Re: CVS commit: src/share/misc

2015-04-25 Thread Alan Barrett

On Fri, 24 Apr 2015, Taylor R Campbell wrote:

Modified Files:
src/share/misc: acronyms acronyms-o.real

Log Message:
Per discussion with board@, remove inappropriate, hostile acronyms.


Thank you.

--apb (Alan Barrett)


CVS commit: src/sys/arch

2015-04-25 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sat Apr 25 14:41:33 UTC 2015

Modified Files:
src/sys/arch/arm/amlogic: amlogic_crureg.h amlogic_io.c amlogic_reg.h
files.amlogic
src/sys/arch/evbarm/conf: ODROID-C1
Added Files:
src/sys/arch/arm/amlogic: amlogic_gpio.c

Log Message:
Add Amlogic GPIO driver.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arm/amlogic/amlogic_crureg.h
cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/amlogic/amlogic_gpio.c
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/arm/amlogic/amlogic_io.c \
src/sys/arch/arm/amlogic/amlogic_reg.h
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/arm/amlogic/files.amlogic
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/evbarm/conf/ODROID-C1

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

Modified files:

Index: src/sys/arch/arm/amlogic/amlogic_crureg.h
diff -u src/sys/arch/arm/amlogic/amlogic_crureg.h:1.9 src/sys/arch/arm/amlogic/amlogic_crureg.h:1.10
--- src/sys/arch/arm/amlogic/amlogic_crureg.h:1.9	Sun Apr 19 18:54:52 2015
+++ src/sys/arch/arm/amlogic/amlogic_crureg.h	Sat Apr 25 14:41:33 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: amlogic_crureg.h,v 1.9 2015/04/19 18:54:52 jmcneill Exp $ */
+/* $NetBSD: amlogic_crureg.h,v 1.10 2015/04/25 14:41:33 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill jmcne...@invisible.ca
@@ -85,6 +85,20 @@
 #define PREG_PAD_GPIO0_EN_N_REG		CBUS_REG(0x200c)
 #define PREG_PAD_GPIO0_OUT_REG		CBUS_REG(0x200d)
 #define PREG_PAD_GPIO0_IN_REG		CBUS_REG(0x200e)
+#define PREG_PAD_GPIO0_PUPD_EN_REG	CBUS_REG(0x204c)
+#define PREG_PAD_GPIO0_PUPD_REG		CBUS_REG(0x203e)
+
+#define PREG_PAD_GPIO1_EN_N_REG		CBUS_REG(0x200f)
+#define PREG_PAD_GPIO1_OUT_REG		CBUS_REG(0x2010)
+#define PREG_PAD_GPIO1_IN_REG		CBUS_REG(0x2011)
+#define PREG_PAD_GPIO1_PUPD_EN_REG	CBUS_REG(0x204b)
+#define PREG_PAD_GPIO1_PUPD_REG		CBUS_REG(0x203d)
+
+#define PREG_PAD_GPIO2_EN_N_REG		CBUS_REG(0x2012)
+#define PREG_PAD_GPIO2_OUT_REG		CBUS_REG(0x2013)
+#define PREG_PAD_GPIO2_IN_REG		CBUS_REG(0x2014)
+#define PREG_PAD_GPIO2_PUPD_EN_REG	CBUS_REG(0x2048)
+#define PREG_PAD_GPIO2_PUPD_REG		CBUS_REG(0x203a)
 
 #define PREG_PAD_GPIO3_EN_N_REG		CBUS_REG(0x2015)
 #define PREG_PAD_GPIO3_OUT_REG		CBUS_REG(0x2016)

Index: src/sys/arch/arm/amlogic/amlogic_io.c
diff -u src/sys/arch/arm/amlogic/amlogic_io.c:1.10 src/sys/arch/arm/amlogic/amlogic_io.c:1.11
--- src/sys/arch/arm/amlogic/amlogic_io.c:1.10	Sun Apr 19 18:54:52 2015
+++ src/sys/arch/arm/amlogic/amlogic_io.c	Sat Apr 25 14:41:33 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: amlogic_io.c,v 1.10 2015/04/19 18:54:52 jmcneill Exp $ */
+/* $NetBSD: amlogic_io.c,v 1.11 2015/04/25 14:41:33 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill jmcne...@invisible.ca
@@ -29,7 +29,7 @@
 #include opt_amlogic.h
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: amlogic_io.c,v 1.10 2015/04/19 18:54:52 jmcneill Exp $);
+__KERNEL_RCSID(0, $NetBSD: amlogic_io.c,v 1.11 2015/04/25 14:41:33 jmcneill Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -63,6 +63,8 @@ static const struct amlogic_locators aml
 AMLOGIC_UART0AO_OFFSET, AMLOGIC_UART_SIZE, 0, AMLOGIC_INTR_UART0AO },
   { amlogiccom,
 AMLOGIC_UART2AO_OFFSET, AMLOGIC_UART_SIZE, 2, AMLOGIC_INTR_UART2AO },
+  { amlogicgpio,
+0, 0, NOPORT, NOINTR },
   { genfb,
 AMLOGIC_DMC_OFFSET, AMLOGIC_DMC_SIZE, NOPORT, NOINTR },
   { amlogicrng,
Index: src/sys/arch/arm/amlogic/amlogic_reg.h
diff -u src/sys/arch/arm/amlogic/amlogic_reg.h:1.10 src/sys/arch/arm/amlogic/amlogic_reg.h:1.11
--- src/sys/arch/arm/amlogic/amlogic_reg.h:1.10	Sun Mar 22 17:28:22 2015
+++ src/sys/arch/arm/amlogic/amlogic_reg.h	Sat Apr 25 14:41:33 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: amlogic_reg.h,v 1.10 2015/03/22 17:28:22 jmcneill Exp $ */
+/* $NetBSD: amlogic_reg.h,v 1.11 2015/04/25 14:41:33 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill jmcne...@invisible.ca
@@ -58,6 +58,12 @@
 #define AMLOGIC_AO_RTI_PIN_MUX_OFFSET 0x08100014
 #define AMLOGIC_GPIOAO_OFFSET	0x08100024
 
+#define AMLOGIC_GPIOAO_EN_N_REG		0x00	/* [15:0] */
+#define AMLOGIC_GPIOAO_OUT_REG		0x00	/* [31:16] */
+#define AMLOGIC_GPIOAO_IN_REG		0x04
+#define AMLOGIC_GPIOAO_PUPD_EN_REG	0x08	/* [15:0] */
+#define AMLOGIC_GPIOAO_PUPD_REG		0x08	/* [31:16] */
+
 #define AMLOGIC_UART0AO_OFFSET	0x081004c0
 #define AMLOGIC_UART2AO_OFFSET	0x081004e0
 #define AMLOGIC_UART_SIZE	0x20

Index: src/sys/arch/arm/amlogic/files.amlogic
diff -u src/sys/arch/arm/amlogic/files.amlogic:1.11 src/sys/arch/arm/amlogic/files.amlogic:1.12
--- src/sys/arch/arm/amlogic/files.amlogic:1.11	Sun Apr 19 18:54:52 2015
+++ src/sys/arch/arm/amlogic/files.amlogic	Sat Apr 25 14:41:33 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: files.amlogic,v 1.11 2015/04/19 18:54:52 jmcneill Exp $
+#	$NetBSD: files.amlogic,v 1.12 2015/04/25 14:41:33 jmcneill Exp $
 #
 # Configuration info for Amlogic ARM Peripherals
 #
@@ -26,6 +26,11 @@ device	amlogiccom
 attach	

Re: CVS commit: src/share/misc

2015-04-25 Thread rodent
I'm responding to the recent posts ITT, because it seems there's some
misunderstanding:

1) What has been committed is no more offensive than the existing material
in wtf and fortune. Please, review fortune's data files if any doubts exist;

2) wtf and fortune have existed in source since $TIME without any uproar;

3) There aren't any rules documenting appending entries to either;

4) We don't tend to make up rules as we go along committing;

5) Since #2 and #4 are ad antiquitam arguments, if $YOU feel wtf and fortune
are no longer representative of the project and have evidence thereof (some
sort of poll indicating the majority of developers/users are in agreement with
the sentiment), then just rm them and deal with whatever backlash! It's that
simple;

6) A vocal minority ($developers_itt / $total_developers - on either side) is
not the voice of the entire group. See #5. My actions are based on #1-3,
and are not intended to be disrespectful, incendiary, or whatever other
strawman label which has been attached;

7) Being a reasonable person and presented with convincing evidence that my
actions were incorrect, I'm open to changing them and have done so many times
since being part of this project. However, poorly-reasoned and emotional
arguments are not sufficient. I don't find demands and expectations based on
those arguments to be reasonable. See #6 as well;

8) Commits made by christos@ seem to be a good solution/compromise. It's what
is being done with fortune already, though I recognise that as another ad
antiquitam argument;

9) The slippery slope of a) whatever group that mitigates disputes among
developers deciding the outcome of a particular source commit or set of
commits to b) threats to someone's project membership being revoked by team
members who are not part of membership-exec@ paints a rather particular image
of our project works to the public;

10) Given #7, it would be a rather interesting value judgment in revoking the
membership of someone who's maintaining 400+ packages and doing a bit of work
in making pkgsrc work better across ${OPSYS}. Though, i do not profess to
understand our values, apart from what's in the bylaws;

11) I like {,un}ordered lists!


CVS commit: src/sys/arch

2015-04-25 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sat Apr 25 14:41:33 UTC 2015

Modified Files:
src/sys/arch/arm/amlogic: amlogic_crureg.h amlogic_io.c amlogic_reg.h
files.amlogic
src/sys/arch/evbarm/conf: ODROID-C1
Added Files:
src/sys/arch/arm/amlogic: amlogic_gpio.c

Log Message:
Add Amlogic GPIO driver.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arm/amlogic/amlogic_crureg.h
cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/amlogic/amlogic_gpio.c
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/arm/amlogic/amlogic_io.c \
src/sys/arch/arm/amlogic/amlogic_reg.h
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/arm/amlogic/files.amlogic
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/evbarm/conf/ODROID-C1

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



CVS commit: src/sys/netinet6

2015-04-25 Thread Tyler R. Retzlaff
Module Name:src
Committed By:   rtr
Date:   Sat Apr 25 14:56:05 UTC 2015

Modified Files:
src/sys/netinet6: dccp6_usrreq.c dccp6_var.h

Log Message:
fix missed parameter type change in dccp6_accept() to sockaddr * from mbuf *


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/netinet6/dccp6_usrreq.c
cvs rdiff -u -r1.2 -r1.3 src/sys/netinet6/dccp6_var.h

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

Modified files:

Index: src/sys/netinet6/dccp6_usrreq.c
diff -u src/sys/netinet6/dccp6_usrreq.c:1.3 src/sys/netinet6/dccp6_usrreq.c:1.4
--- src/sys/netinet6/dccp6_usrreq.c:1.3	Fri Apr 24 22:32:37 2015
+++ src/sys/netinet6/dccp6_usrreq.c	Sat Apr 25 14:56:05 2015
@@ -1,5 +1,5 @@
 /*	$KAME: dccp6_usrreq.c,v 1.13 2005/07/27 08:42:56 nishida Exp $	*/
-/*	$NetBSD: dccp6_usrreq.c,v 1.3 2015/04/24 22:32:37 rtr Exp $ */
+/*	$NetBSD: dccp6_usrreq.c,v 1.4 2015/04/25 14:56:05 rtr Exp $ */
 
 /*
  * Copyright (C) 2003 WIDE Project.
@@ -31,7 +31,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: dccp6_usrreq.c,v 1.3 2015/04/24 22:32:37 rtr Exp $);
+__KERNEL_RCSID(0, $NetBSD: dccp6_usrreq.c,v 1.4 2015/04/25 14:56:05 rtr Exp $);
 
 #include opt_inet.h
 #include opt_dccp.h
@@ -268,7 +268,7 @@ dccp6_accept(struct socket *so, struct s
 	int error = 0;
 
 	DCCP_DEBUG((LOG_INFO, Entering dccp6_accept!\n));
-	if (m == NULL) {
+	if (nam == NULL) {
 		return EINVAL;
 	}
 	if (so-so_state  SS_ISDISCONNECTED) {

Index: src/sys/netinet6/dccp6_var.h
diff -u src/sys/netinet6/dccp6_var.h:1.2 src/sys/netinet6/dccp6_var.h:1.3
--- src/sys/netinet6/dccp6_var.h:1.2	Sat Apr  4 04:33:39 2015
+++ src/sys/netinet6/dccp6_var.h	Sat Apr 25 14:56:05 2015
@@ -1,5 +1,5 @@
 /*	$KAME: dccp6_var.h,v 1.3 2003/11/18 04:55:43 ono Exp $	*/
-/*	$NetBSD: dccp6_var.h,v 1.2 2015/04/04 04:33:39 rtr Exp $ */
+/*	$NetBSD: dccp6_var.h,v 1.3 2015/04/25 14:56:05 rtr Exp $ */
 
 /*
  * Copyright (c) 2003 Joacim Häggmark
@@ -46,7 +46,7 @@ int	dccp6_usrreq(struct socket *, int, s
 int	dccp6_bind(struct socket *, struct sockaddr *, struct lwp *);
 int	dccp6_listen(struct socket *, struct lwp *);
 int	dccp6_connect(struct socket *, struct mbuf *, struct lwp *);
-int	dccp6_accept(struct socket *, struct mbuf *);
+int	dccp6_accept(struct socket *, struct sockaddr *);
 
 #endif
 #endif



CVS commit: src/sys/netinet6

2015-04-25 Thread Tyler R. Retzlaff
Module Name:src
Committed By:   rtr
Date:   Sat Apr 25 14:56:05 UTC 2015

Modified Files:
src/sys/netinet6: dccp6_usrreq.c dccp6_var.h

Log Message:
fix missed parameter type change in dccp6_accept() to sockaddr * from mbuf *


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/netinet6/dccp6_usrreq.c
cvs rdiff -u -r1.2 -r1.3 src/sys/netinet6/dccp6_var.h

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



CVS commit: src/sys/netinet

2015-04-25 Thread Tyler R. Retzlaff
Module Name:src
Committed By:   rtr
Date:   Sat Apr 25 15:19:54 UTC 2015

Modified Files:
src/sys/netinet: raw_ip.c

Log Message:
make rip_connect_pcb take sockaddr_in * instead of mbuf *
make rip_connect_pcb static since it appears to be used only in raw_ip.c

moves m_len check to callers which is a small duplication of code
that will go away when the callers are converted to receive sockaddr *.


To generate a diff of this commit:
cvs rdiff -u -r1.148 -r1.149 src/sys/netinet/raw_ip.c

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



CVS commit: src/sys/netinet

2015-04-25 Thread Tyler R. Retzlaff
Module Name:src
Committed By:   rtr
Date:   Sat Apr 25 15:19:54 UTC 2015

Modified Files:
src/sys/netinet: raw_ip.c

Log Message:
make rip_connect_pcb take sockaddr_in * instead of mbuf *
make rip_connect_pcb static since it appears to be used only in raw_ip.c

moves m_len check to callers which is a small duplication of code
that will go away when the callers are converted to receive sockaddr *.


To generate a diff of this commit:
cvs rdiff -u -r1.148 -r1.149 src/sys/netinet/raw_ip.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/netinet/raw_ip.c
diff -u src/sys/netinet/raw_ip.c:1.148 src/sys/netinet/raw_ip.c:1.149
--- src/sys/netinet/raw_ip.c:1.148	Fri Apr 24 22:32:37 2015
+++ src/sys/netinet/raw_ip.c	Sat Apr 25 15:19:54 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: raw_ip.c,v 1.148 2015/04/24 22:32:37 rtr Exp $	*/
+/*	$NetBSD: raw_ip.c,v 1.149 2015/04/25 15:19:54 rtr Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -65,7 +65,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: raw_ip.c,v 1.148 2015/04/24 22:32:37 rtr Exp $);
+__KERNEL_RCSID(0, $NetBSD: raw_ip.c,v 1.149 2015/04/25 15:19:54 rtr Exp $);
 
 #include opt_inet.h
 #include opt_compat_netbsd.h
@@ -111,7 +111,7 @@ struct inpcbtable rawcbtable;
 
 int	 rip_pcbnotify(struct inpcbtable *, struct in_addr,
 struct in_addr, int, int, void (*)(struct inpcb *, int));
-int	 rip_connect_pcb(struct inpcb *, struct mbuf *);
+static int	 rip_connect_pcb(struct inpcb *, struct sockaddr_in *);
 static void	 rip_disconnect1(struct inpcb *);
 
 static void sysctl_net_inet_raw_setup(struct sysctllog **);
@@ -480,12 +480,9 @@ rip_ctloutput(int op, struct socket *so,
 }
 
 int
-rip_connect_pcb(struct inpcb *inp, struct mbuf *nam)
+rip_connect_pcb(struct inpcb *inp, struct sockaddr_in *addr)
 {
-	struct sockaddr_in *addr = mtod(nam, struct sockaddr_in *);
 
-	if (nam-m_len != sizeof(*addr))
-		return (EINVAL);
 	if (IFNET_EMPTY())
 		return (EADDRNOTAVAIL);
 	if (addr-sin_family != AF_INET)
@@ -612,7 +609,9 @@ rip_connect(struct socket *so, struct mb
 	KASSERT(nam != NULL);
 
 	s = splsoftnet();
-	error = rip_connect_pcb(inp, nam);
+	if (nam-m_len != sizeof(struct sockaddr_in))
+		return EINVAL;
+	error = rip_connect_pcb(inp, mtod(nam, struct sockaddr_in *));
 	if (! error)
 		soisconnected(so);
 	splx(s);
@@ -763,7 +762,9 @@ rip_send(struct socket *so, struct mbuf 
 			error = EISCONN;
 			goto die;
 		}
-		error = rip_connect_pcb(inp, nam);
+		if (nam-m_len != sizeof(struct sockaddr_in))
+			return EINVAL;
+		error = rip_connect_pcb(inp, mtod(nam, struct sockaddr_in *));
 		if (error) {
 		die:
 			m_freem(m);



CVS commit: src/sys/dev/sysmon

2015-04-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Apr 25 14:06:58 UTC 2015

Modified Files:
src/sys/dev/sysmon: sysmon_envsys.c

Log Message:
make things boot again, from martin.


To generate a diff of this commit:
cvs rdiff -u -r1.135 -r1.136 src/sys/dev/sysmon/sysmon_envsys.c

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



CVS commit: src/sys/dev/sysmon

2015-04-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Apr 25 14:06:58 UTC 2015

Modified Files:
src/sys/dev/sysmon: sysmon_envsys.c

Log Message:
make things boot again, from martin.


To generate a diff of this commit:
cvs rdiff -u -r1.135 -r1.136 src/sys/dev/sysmon/sysmon_envsys.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/dev/sysmon/sysmon_envsys.c
diff -u src/sys/dev/sysmon/sysmon_envsys.c:1.135 src/sys/dev/sysmon/sysmon_envsys.c:1.136
--- src/sys/dev/sysmon/sysmon_envsys.c:1.135	Fri Apr 24 22:41:42 2015
+++ src/sys/dev/sysmon/sysmon_envsys.c	Sat Apr 25 10:06:58 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: sysmon_envsys.c,v 1.135 2015/04/25 02:41:42 pgoyette Exp $	*/
+/*	$NetBSD: sysmon_envsys.c,v 1.136 2015/04/25 14:06:58 christos Exp $	*/
 
 /*-
  * Copyright (c) 2007, 2008 Juan Romero Pardines.
@@ -64,7 +64,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: sysmon_envsys.c,v 1.135 2015/04/25 02:41:42 pgoyette Exp $);
+__KERNEL_RCSID(0, $NetBSD: sysmon_envsys.c,v 1.136 2015/04/25 14:06:58 christos Exp $);
 
 #include sys/param.h
 #include sys/types.h
@@ -109,6 +109,20 @@ static struct sysmon_opvec sysmon_envsys
 NULL, NULL, NULL
 };
 
+static void
+sme_preinit(void)
+{
+	static bool passed = false;
+
+	if (passed)
+		return;
+
+	passed = true;
+	LIST_INIT(sysmon_envsys_list);
+	mutex_init(sme_global_mtx, MUTEX_DEFAULT, IPL_NONE);
+	sme_propd = prop_dictionary_create();
+}
+
 /*
  * sysmon_envsys_init:
  *
@@ -119,9 +133,7 @@ sysmon_envsys_init(void)
 {
 	int error;
 
-	LIST_INIT(sysmon_envsys_list);
-	mutex_init(sme_global_mtx, MUTEX_DEFAULT, IPL_NONE);
-	sme_propd = prop_dictionary_create();
+	sme_preinit();
 
 	error = sysmon_attach_minor(SYSMON_MINOR_ENVSYS, sysmon_envsys_opvec);
 
@@ -141,6 +153,8 @@ sysmon_envsys_fini(void)
 	if (error == 0)
 		mutex_destroy(sme_global_mtx);
 
+	// XXX: prop_dictionary ???
+
 	return error;
 }
 
@@ -680,6 +694,8 @@ sysmon_envsys_register(struct sysmon_env
 	KASSERT(sme != NULL);
 	KASSERT(sme-sme_name != NULL);
 
+	sme_preinit();
+
 	/*
 	 * Check if requested sysmon_envsys device is valid
 	 * and does not exist already in the list.



CVS commit: src/share/man/man8/man8.x86

2015-04-25 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sat Apr 25 14:05:43 UTC 2015

Modified Files:
src/share/man/man8/man8.x86: boot.8

Log Message:
Explain how the kernel determines the root filesystem from information
passed by the bootloader.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/share/man/man8/man8.x86/boot.8

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

Modified files:

Index: src/share/man/man8/man8.x86/boot.8
diff -u src/share/man/man8/man8.x86/boot.8:1.4 src/share/man/man8/man8.x86/boot.8:1.5
--- src/share/man/man8/man8.x86/boot.8:1.4	Sat Aug 16 12:30:12 2014
+++ src/share/man/man8/man8.x86/boot.8	Sat Apr 25 14:05:43 2015
@@ -1,4 +1,4 @@
-.\	$NetBSD: boot.8,v 1.4 2014/08/16 12:30:12 apb Exp $
+.\	$NetBSD: boot.8,v 1.5 2015/04/25 14:05:43 mlelstv Exp $
 .\
 .\ Copyright (c) 1991, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -624,6 +624,55 @@ In an emergency, the bootstrap methods d
 installation notes for the x86 architectures
 can be used to boot from floppy or other media,
 or over the network.
+.Ss Locating the root filesystem
+The kernel uses information from the bootloader to locate the
+filesystem to mount as root. There are three methods:
+.Bl -tag -width 04n -offset 04n
+.It Ic BTINFO_ROOTDEVICE Va from
+.Xr boot.cfg 5
+or multiboot.
+The bootloader passes the root device name as driver,unit and
+partition (like sd0a). This will be automatically substituted
+by a
+.Xr dk 4
+wedge if one is discovered.
+.Pp
+The bootloader passes a wedge name as wedge: followed by the name.
+The kernel will search for a
+.Xr dk 4
+device with that name.
+.It Ic BTINFO_BOOTWEDGE Va determined by bootblock
+The bootloader passes start offset and length of a hard disk partition
+and a offset, size and hash of a boot area. Then kernel searches
+all disks and wedges for a block sequence at that offset with a
+matching hash. If one is found, the kernel will look for a wedge
+on that device at the same offset.
+.Pp
+An additional partition number is provided if the bootloader also
+passed a BTINFO_BOOTDISK record. This (or partition 'a') will be used
+by the kernel as a fallback if there is no matching wedge.
+.It Ic BTINFO_BOOTDISK Va determined by bootblock
+This uses the device number passed by the BIOS that
+distinguishes between floppy, hard drive and CD-ROM boot.
+.Bl -tag -width xxx
+.It Ic Floppy
+The kernel searches for the
+.Xr fd 4
+device with the correct unit, the partition number is used
+to select a specific disk format. See
+.Xr fd 4 for details.
+.It Ic Hard drive
+The bootloader passed a partition number and disklabel
+data (offset, type, checksum, packname). The kernel searches
+all disks for a matching disklabel. If one is found, the
+kernel will use that device and partition number.
+.It Ic CDROM
+The BIOS does not distinguish between multiple CD devices.
+The kernel searches for the first
+.Xr cd 4
+device. So you can only boot from unit 0.
+.El
+.El
 .Sh FILES
 .Bl -tag -width /usr/mdec/bootxx_fstype -compact
 .It Pa /boot
@@ -647,6 +696,7 @@ partition by
 .Xr ddb 4 ,
 .Xr pciback 4 ,
 .Xr userconf 4 ,
+.Xr fd 4 ,
 .Xr boot.cfg 5 ,
 .Xr boot_console 8 ,
 .Xr dosboot 8 ,



CVS commit: src/share/man/man8/man8.x86

2015-04-25 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sat Apr 25 14:05:43 UTC 2015

Modified Files:
src/share/man/man8/man8.x86: boot.8

Log Message:
Explain how the kernel determines the root filesystem from information
passed by the bootloader.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/share/man/man8/man8.x86/boot.8

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



CVS commit: src/share/man/man8/man8.x86

2015-04-25 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sat Apr 25 14:27:02 UTC 2015

Modified Files:
src/share/man/man8/man8.x86: boot.8

Log Message:
New sentence, new line. Bump date for previous. Various minor changes.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/share/man/man8/man8.x86/boot.8

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

Modified files:

Index: src/share/man/man8/man8.x86/boot.8
diff -u src/share/man/man8/man8.x86/boot.8:1.5 src/share/man/man8/man8.x86/boot.8:1.6
--- src/share/man/man8/man8.x86/boot.8:1.5	Sat Apr 25 14:05:43 2015
+++ src/share/man/man8/man8.x86/boot.8	Sat Apr 25 14:27:02 2015
@@ -1,4 +1,4 @@
-.\	$NetBSD: boot.8,v 1.5 2015/04/25 14:05:43 mlelstv Exp $
+.\	$NetBSD: boot.8,v 1.6 2015/04/25 14:27:02 wiz Exp $
 .\
 .\ Copyright (c) 1991, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -32,7 +32,7 @@
 .\
 .\ @(#)boot_i386.8	8.2 (Berkeley) 4/19/94
 .\
-.Dd August 16, 2014
+.Dd April 25, 2015
 .Dt BOOT 8 x86
 .Os
 .Sh NAME
@@ -343,7 +343,7 @@ See
 in
 .Xr boot_console 8 .
 .It Ic dev Op Va device
-Set the default drive and partition for subsequent filesystem
+Set the default drive and partition for subsequent file system
 operations.
 Without an argument, print the current setting.
 .Va device
@@ -442,7 +442,7 @@ network mask
 address of the host
 .It Va iface
 interface
-.Po e.g. Dq xennet0
+.Po e.g., Dq xennet0
 or
 .Dq eth0
 .Pc
@@ -624,16 +624,17 @@ In an emergency, the bootstrap methods d
 installation notes for the x86 architectures
 can be used to boot from floppy or other media,
 or over the network.
-.Ss Locating the root filesystem
+.Ss Locating the root file system
 The kernel uses information from the bootloader to locate the
-filesystem to mount as root. There are three methods:
+file system to mount as root.
+There are three methods:
 .Bl -tag -width 04n -offset 04n
 .It Ic BTINFO_ROOTDEVICE Va from
 .Xr boot.cfg 5
 or multiboot.
-The bootloader passes the root device name as driver,unit and
-partition (like sd0a). This will be automatically substituted
-by a
+The bootloader passes the root device name as driver, unit, and
+partition (like sd0a).
+This will be automatically substituted by a
 .Xr dk 4
 wedge if one is discovered.
 .Pp
@@ -643,13 +644,16 @@ The kernel will search for a
 device with that name.
 .It Ic BTINFO_BOOTWEDGE Va determined by bootblock
 The bootloader passes start offset and length of a hard disk partition
-and a offset, size and hash of a boot area. Then kernel searches
+and a offset, size and hash of a boot area.
+Then kernel searches
 all disks and wedges for a block sequence at that offset with a
-matching hash. If one is found, the kernel will look for a wedge
+matching hash.
+If one is found, the kernel will look for a wedge
 on that device at the same offset.
 .Pp
 An additional partition number is provided if the bootloader also
-passed a BTINFO_BOOTDISK record. This (or partition 'a') will be used
+passed a BTINFO_BOOTDISK record.
+This (or partition 'a') will be used
 by the kernel as a fallback if there is no matching wedge.
 .It Ic BTINFO_BOOTDISK Va determined by bootblock
 This uses the device number passed by the BIOS that
@@ -659,18 +663,23 @@ distinguishes between floppy, hard drive
 The kernel searches for the
 .Xr fd 4
 device with the correct unit, the partition number is used
-to select a specific disk format. See
-.Xr fd 4 for details.
+to select a specific disk format.
+See
+.Xr fd 4
+for details.
 .It Ic Hard drive
 The bootloader passed a partition number and disklabel
-data (offset, type, checksum, packname). The kernel searches
-all disks for a matching disklabel. If one is found, the
+data (offset, type, checksum, packname).
+The kernel searches
+all disks for a matching disklabel.
+If one is found, the
 kernel will use that device and partition number.
 .It Ic CDROM
 The BIOS does not distinguish between multiple CD devices.
 The kernel searches for the first
 .Xr cd 4
-device. So you can only boot from unit 0.
+device.
+So you can only boot from unit 0.
 .El
 .El
 .Sh FILES
@@ -686,7 +695,7 @@ gzip-compressed system code
 .It Pa /usr/mdec/boot
 master copy of the boot program (copy to /boot)
 .It Pa /usr/mdec/bootxx_fstype
-primary bootstrap for filesystem type fstype, copied to the start of
+primary bootstrap for file system type fstype, copied to the start of
 the
 .Nx
 partition by
@@ -694,9 +703,9 @@ partition by
 .El
 .Sh SEE ALSO
 .Xr ddb 4 ,
+.Xr fd 4 ,
 .Xr pciback 4 ,
 .Xr userconf 4 ,
-.Xr fd 4 ,
 .Xr boot.cfg 5 ,
 .Xr boot_console 8 ,
 .Xr dosboot 8 ,



CVS commit: src/share/man/man8/man8.x86

2015-04-25 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sat Apr 25 14:27:02 UTC 2015

Modified Files:
src/share/man/man8/man8.x86: boot.8

Log Message:
New sentence, new line. Bump date for previous. Various minor changes.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/share/man/man8/man8.x86/boot.8

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



Re: CVS commit: src/share/misc

2015-04-25 Thread Alan Barrett

On Sat, 25 Apr 2015, rod...@netbsd.org wrote:
I'm responding to the recent posts ITT, because it seems there's 
some misunderstanding:


I had no idea what ITT meant, until I looked it up.  (ITT = in 
this thread, apparently).


1) What has been committed is no more offensive than the 
existing material in wtf and fortune. Please, review fortune's 
data files if any doubts exist;


2) wtf and fortune have existed in source since $TIME without 
any uproar;


3) There aren't any rules documenting appending entries to 
either;


4) We don't tend to make up rules as we go along committing;


We have a rule or at least a convention that things that are 
likely to be controversial should be discussed first.  If you 
don't realise that something is controversial, and commit without 
discussion, then the appropriate response is to engage in 
discussion as soon as you learn that the issue was controversial.  
Continuing without discussion is not appropriate.


I think that NetBSD's acronyms file should be for acronyms that 
ordinary people are likely to encounter in ordinary situations; 
not for acronyms used in some small subculture.


--apb (Alan Barrett)