CVS commit: src/external/bsd/tcpdump/dist

2017-01-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jan 25 08:20:15 UTC 2017

Modified Files:
src/external/bsd/tcpdump/dist: print-ip.c

Log Message:
Add missing argument


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/external/bsd/tcpdump/dist/print-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/external/bsd/tcpdump/dist/print-ip.c
diff -u src/external/bsd/tcpdump/dist/print-ip.c:1.9 src/external/bsd/tcpdump/dist/print-ip.c:1.10
--- src/external/bsd/tcpdump/dist/print-ip.c:1.9	Tue Jan 24 23:29:14 2017
+++ src/external/bsd/tcpdump/dist/print-ip.c	Wed Jan 25 08:20:15 2017
@@ -21,7 +21,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: print-ip.c,v 1.9 2017/01/24 23:29:14 christos Exp $");
+__RCSID("$NetBSD: print-ip.c,v 1.10 2017/01/25 08:20:15 martin Exp $");
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -483,7 +483,7 @@ again:
 		break;
 
 	case IPPROTO_PFSYNC:
-		pfsync_ip_print(ipds->cp, ipds->len, (const u_char *)ipds->ip);
+		pfsync_ip_print(ndo, ipds->cp, ipds->len, (const u_char *)ipds->ip);
 		break;
 
 	default:



CVS commit: src/external/bsd/tcpdump/dist

2017-01-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jan 25 08:20:15 UTC 2017

Modified Files:
src/external/bsd/tcpdump/dist: print-ip.c

Log Message:
Add missing argument


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/external/bsd/tcpdump/dist/print-ip.c

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



CVS commit: src/external/bsd/tcpdump/dist

2017-01-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jan 25 08:14:07 UTC 2017

Modified Files:
src/external/bsd/tcpdump/dist: util-print.c

Log Message:
toupper() takes an unsigned char.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/tcpdump/dist/util-print.c

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

Modified files:

Index: src/external/bsd/tcpdump/dist/util-print.c
diff -u src/external/bsd/tcpdump/dist/util-print.c:1.2 src/external/bsd/tcpdump/dist/util-print.c:1.3
--- src/external/bsd/tcpdump/dist/util-print.c:1.2	Tue Jan 24 23:29:14 2017
+++ src/external/bsd/tcpdump/dist/util-print.c	Wed Jan 25 08:14:07 2017
@@ -37,7 +37,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: util-print.c,v 1.2 2017/01/24 23:29:14 christos Exp $");
+__RCSID("$NetBSD: util-print.c,v 1.3 2017/01/25 08:14:07 martin Exp $");
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -788,7 +788,7 @@ txtproto_print(netdissect_options *ndo, 
 
 	/* Capitalize the protocol name */
 	for (pnp = protoname; *pnp != '\0'; pnp++)
-		ND_PRINT((ndo, "%c", toupper(*pnp)));
+		ND_PRINT((ndo, "%c", toupper((unsigned char)*pnp)));
 
 	if (is_reqresp) {
 		/*



CVS commit: src/external/bsd/tcpdump/dist

2017-01-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jan 25 08:14:07 UTC 2017

Modified Files:
src/external/bsd/tcpdump/dist: util-print.c

Log Message:
toupper() takes an unsigned char.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/tcpdump/dist/util-print.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/rasops

2017-01-25 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Wed Jan 25 14:53:43 UTC 2017

Modified Files:
src/sys/dev/rasops: rasops15.c

Log Message:
Add rasops15_putchar_aa() for greyscale fonts.

Based on rasops8_putchar_aa() and rasops32_putchar_aa().


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/dev/rasops/rasops15.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/rasops

2017-01-25 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Wed Jan 25 14:53:43 UTC 2017

Modified Files:
src/sys/dev/rasops: rasops15.c

Log Message:
Add rasops15_putchar_aa() for greyscale fonts.

Based on rasops8_putchar_aa() and rasops32_putchar_aa().


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/dev/rasops/rasops15.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/rasops/rasops15.c
diff -u src/sys/dev/rasops/rasops15.c:1.20 src/sys/dev/rasops/rasops15.c:1.21
--- src/sys/dev/rasops/rasops15.c:1.20	Tue Apr 17 12:06:25 2012
+++ src/sys/dev/rasops/rasops15.c	Wed Jan 25 14:53:43 2017
@@ -1,4 +1,4 @@
-/* 	$NetBSD: rasops15.c,v 1.20 2012/04/17 12:06:25 macallan Exp $	*/
+/* 	$NetBSD: rasops15.c,v 1.21 2017/01/25 14:53:43 jakllsch Exp $	*/
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rasops15.c,v 1.20 2012/04/17 12:06:25 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rasops15.c,v 1.21 2017/01/25 14:53:43 jakllsch Exp $");
 
 #include "opt_rasops.h"
 
@@ -43,6 +43,7 @@ __KERNEL_RCSID(0, "$NetBSD: rasops15.c,v
 #include 
 
 static void 	rasops15_putchar(void *, int, int, u_int, long attr);
+static void 	rasops15_putchar_aa(void *, int, int, u_int, long attr);
 #ifndef RASOPS_SMALL
 static void 	rasops15_putchar8(void *, int, int, u_int, long attr);
 static void 	rasops15_putchar12(void *, int, int, u_int, long attr);
@@ -78,23 +79,27 @@ void
 rasops15_init(struct rasops_info *ri)
 {
 
-	switch (ri->ri_font->fontwidth) {
+	if (FONT_IS_ALPHA(ri->ri_font)) {
+		ri->ri_ops.putchar = rasops15_putchar_aa;
+	} else {
+		switch (ri->ri_font->fontwidth) {
 #ifndef RASOPS_SMALL
-	case 8:
-		ri->ri_ops.putchar = rasops15_putchar8;
-		break;
-
-	case 12:
-		ri->ri_ops.putchar = rasops15_putchar12;
-		break;
-
-	case 16:
-		ri->ri_ops.putchar = rasops15_putchar16;
-		break;
+		case 8:
+			ri->ri_ops.putchar = rasops15_putchar8;
+			break;
+
+		case 12:
+			ri->ri_ops.putchar = rasops15_putchar12;
+			break;
+
+		case 16:
+			ri->ri_ops.putchar = rasops15_putchar16;
+			break;
 #endif	/* !RASOPS_SMALL */
-	default:
-		ri->ri_ops.putchar = rasops15_putchar;
-		break;
+		default:
+			ri->ri_ops.putchar = rasops15_putchar;
+			break;
+		}
 	}
 
 	if (ri->ri_rnum == 0) {
@@ -203,6 +208,98 @@ rasops15_putchar(void *cookie, int row, 
 	}
 }
 
+static void
+rasops15_putchar_aa(void *cookie, int row, int col, u_int uc, long attr)
+{
+	int width, height, cnt, clr[2];
+	struct rasops_info *ri = (struct rasops_info *)cookie;
+	struct wsdisplay_font *font = PICK_FONT(ri, uc);
+	int16_t *dp, *rp;
+	uint8_t *rrp;
+	u_char *fr;
+	uint16_t buffer[64]; /* XXX */
+	int x, y, r, g, b, aval;
+	int r1, g1, b1, r0, g0, b0, fgo, bgo;
+
+
+#ifdef RASOPS_CLIPPING
+	/* Catches 'row < 0' case too */
+	if ((unsigned)row >= (unsigned)ri->ri_rows)
+		return;
+
+	if ((unsigned)col >= (unsigned)ri->ri_cols)
+		return;
+#endif
+
+	/* check if character fits into font limits */
+	if (!CHAR_IN_FONT(uc, font))
+		return;
+
+	rrp = (ri->ri_bits + row*ri->ri_yscale + col*ri->ri_xscale);
+	rp = (int16_t *)rrp;
+
+	height = font->fontheight;
+	width = font->fontwidth;
+
+	clr[0] = ri->ri_devcmap[(attr >> 16) & 0xf];
+	clr[1] = ri->ri_devcmap[(attr >> 24) & 0xf];
+
+	if (uc == ' ') {
+	for (cnt = 0; cnt < width; cnt++)
+	buffer[cnt] = clr[0];
+		while (height--) {
+			dp = rp;
+			DELTA(rp, ri->ri_stride, int16_t *);
+			memcpy(dp, buffer, width << 1);
+		}
+	} else {
+		fr = WSFONT_GLYPH(uc, font);
+
+		fgo = ((attr >> 24) & 0xf) * 3;
+		bgo = ((attr >> 16) & 0xf) * 3;
+
+		r0 = rasops_cmap[bgo];
+		r1 = rasops_cmap[fgo];
+		g0 = rasops_cmap[bgo + 1];
+		g1 = rasops_cmap[fgo + 1];
+		b0 = rasops_cmap[bgo + 2];
+		b1 = rasops_cmap[fgo + 2];
+
+		for (y = 0; y < height; y++) {
+			dp = (uint16_t *)(rrp + ri->ri_stride * y);
+			for (x = 0; x < width; x++) {
+aval = *fr;
+if (aval == 0) {
+	buffer[x] = clr[0];
+} else if (aval == 255) {
+	buffer[x] = clr[1];
+} else {
+	r = aval * r1 + (255 - aval) * r0;
+	g = aval * g1 + (255 - aval) * g0;
+	b = aval * b1 + (255 - aval) * b0;
+	buffer[x] =
+	((r >> (16 - ri->ri_rnum)) <<
+		ri->ri_rpos) |
+	((g >> (16 - ri->ri_gnum)) <<
+	ri->ri_gpos) |
+	((b >> (16 - ri->ri_bnum)) <<
+		ri->ri_bpos);
+}
+fr++;
+			}
+			memcpy(dp, buffer, width << 1);
+		}
+	}
+
+	/* Do underline */
+	if ((attr & 1) != 0) {
+	rp = (uint16_t *)rrp;
+		DELTA(rp, (ri->ri_stride * (height - 2)), int16_t *);
+		while (width--)
+			*rp++ = clr[1];
+	}
+}
+
 #ifndef RASOPS_SMALL
 /*
  * Recompute the (2x2)x1 blitting stamp.



CVS commit: src/lib/libcurses

2017-01-25 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Wed Jan 25 12:21:18 UTC 2017

Modified Files:
src/lib/libcurses: curses.3

Log Message:
And more functions 


To generate a diff of this commit:
cvs rdiff -u -r1.69 -r1.70 src/lib/libcurses/curses.3

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

Modified files:

Index: src/lib/libcurses/curses.3
diff -u src/lib/libcurses/curses.3:1.69 src/lib/libcurses/curses.3:1.70
--- src/lib/libcurses/curses.3:1.69	Wed Jan 25 12:05:26 2017
+++ src/lib/libcurses/curses.3	Wed Jan 25 12:21:18 2017
@@ -1,4 +1,4 @@
-.\"	$NetBSD: curses.3,v 1.69 2017/01/25 12:05:26 roy Exp $
+.\"	$NetBSD: curses.3,v 1.70 2017/01/25 12:21:18 roy Exp $
 .\"
 .\" Copyright (c) 1985, 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -291,6 +291,7 @@ must be called before any of the other r
 .It wclrtobot Ta Xr curses_clear 3
 .It wclrtoeol Ta Xr curses_clear 3
 .It wcolor_set Ta Xr curses_attributes 3
+.It wcursyncup Ta Xr curses_cursor 3
 .It wdelch Ta Xr curses_delch 3
 .It wdeleteln Ta Xr curses_deleteln 3
 .It werase Ta Xr curses_clear 3
@@ -317,6 +318,8 @@ must be called before any of the other r
 .It wsetscrreg Ta Xr curses_scroll 3
 .It wstandend Ta Xr curses_standout 3
 .It wstandout Ta Xr curses_standout 3
+.It wsyncup Ta Xr curses_touch 3
+.It wsyncdown Ta Xr curses_touch 3
 .It wtimeout Ta Xr curses_input 3
 .It wtouchln Ta Xr curses_touch 3
 .It wunderend Ta Xr curses_underscore 3



CVS commit: src/lib/libcurses

2017-01-25 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Wed Jan 25 12:42:05 UTC 2017

Modified Files:
src/lib/libcurses: curses.3 curses_tty.3

Log Message:
Document baudrate(3).


To generate a diff of this commit:
cvs rdiff -u -r1.70 -r1.71 src/lib/libcurses/curses.3
cvs rdiff -u -r1.10 -r1.11 src/lib/libcurses/curses_tty.3

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

Modified files:

Index: src/lib/libcurses/curses.3
diff -u src/lib/libcurses/curses.3:1.70 src/lib/libcurses/curses.3:1.71
--- src/lib/libcurses/curses.3:1.70	Wed Jan 25 12:21:18 2017
+++ src/lib/libcurses/curses.3	Wed Jan 25 12:42:05 2017
@@ -1,4 +1,4 @@
-.\"	$NetBSD: curses.3,v 1.70 2017/01/25 12:21:18 roy Exp $
+.\"	$NetBSD: curses.3,v 1.71 2017/01/25 12:42:05 roy Exp $
 .\"
 .\" Copyright (c) 1985, 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -79,6 +79,7 @@ must be called before any of the other r
 .It attroff Ta Xr curses_attributes 3
 .It attron Ta Xr curses_attributes 3
 .It attrset Ta Xr curses_attributes 3
+.It baudrate Ta Xr curses_tty 3
 .It beep Ta Xr curses_tty 3
 .It bkgd Ta Xr curses_background 3
 .It bkgdset Ta Xr curses_background 3

Index: src/lib/libcurses/curses_tty.3
diff -u src/lib/libcurses/curses_tty.3:1.10 src/lib/libcurses/curses_tty.3:1.11
--- src/lib/libcurses/curses_tty.3:1.10	Sat Dec 31 22:47:01 2016
+++ src/lib/libcurses/curses_tty.3	Wed Jan 25 12:42:05 2017
@@ -1,4 +1,4 @@
-.\"	$NetBSD: curses_tty.3,v 1.10 2016/12/31 22:47:01 roy Exp $
+.\"	$NetBSD: curses_tty.3,v 1.11 2017/01/25 12:42:05 roy Exp $
 .\"
 .\" Copyright (c) 2002
 .\"	Brett Lymn (bl...@netbsd.org, brett_l...@yahoo.com.au)
@@ -30,11 +30,12 @@
 .\" SUCH DAMAGE.
 .\"
 .\"
-.Dd December 31, 2016
+.Dd January 25, 2017
 .Dt CURSES_TTY 3
 .Os
 .Sh NAME
 .Nm curses_tty ,
+.Nm baudrate ,
 .Nm beep ,
 .Nm flash ,
 .Nm curs_set ,
@@ -74,6 +75,8 @@
 .Sh SYNOPSIS
 .In curses.h
 .Ft int
+.Fn baudrate "void"
+.Ft int
 .Fn beep "void"
 .Ft int
 .Fn flash "void"
@@ -143,6 +146,11 @@
 These functions manipulate curses terminal settings.
 .Pp
 The
+.Fn baudrate
+function extrats the output speed of the terminal
+and returns it in bits per second.
+.Pp
+The
 .Fn beep
 function rings the terminal bell, if this is possible.
 Failing that, the terminal screen will be flashed.



CVS commit: src/lib/libcurses

2017-01-25 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Wed Jan 25 12:42:05 UTC 2017

Modified Files:
src/lib/libcurses: curses.3 curses_tty.3

Log Message:
Document baudrate(3).


To generate a diff of this commit:
cvs rdiff -u -r1.70 -r1.71 src/lib/libcurses/curses.3
cvs rdiff -u -r1.10 -r1.11 src/lib/libcurses/curses_tty.3

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



CVS commit: src/doc

2017-01-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jan 25 13:43:58 UTC 2017

Modified Files:
src/doc: 3RDPARTY CHANGES

Log Message:
new acpica


To generate a diff of this commit:
cvs rdiff -u -r1.1401 -r1.1402 src/doc/3RDPARTY
cvs rdiff -u -r1.2238 -r1.2239 src/doc/CHANGES

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



CVS commit: src/external/bsd/tcpdump/dist

2017-01-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jan 25 14:46:16 UTC 2017

Modified Files:
src/external/bsd/tcpdump/dist: netdissect-stdinc.h

Log Message:
- don't use their ntoh{l,s}/hton{l,s} implementation
- fix their ntohl/htonl implementations to use unsigned int instead of
  unsigned long so they work on _LP64.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/bsd/tcpdump/dist/netdissect-stdinc.h

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

Modified files:

Index: src/external/bsd/tcpdump/dist/netdissect-stdinc.h
diff -u src/external/bsd/tcpdump/dist/netdissect-stdinc.h:1.1.1.1 src/external/bsd/tcpdump/dist/netdissect-stdinc.h:1.2
--- src/external/bsd/tcpdump/dist/netdissect-stdinc.h:1.1.1.1	Tue Jan 24 16:33:38 2017
+++ src/external/bsd/tcpdump/dist/netdissect-stdinc.h	Wed Jan 25 09:46:16 2017
@@ -279,13 +279,13 @@ typedef char* caddr_t;
  * avoid the bswap instruction, as OS X only supports machines that
  * have it.)
  */
-#if defined(__GNUC__) && defined(__i386__) && !defined(__APPLE__) && !defined(__ntohl)
+#if defined(__GNUC__) && defined(__i386__) && !defined(__APPLE__) && !defined(__ntohl) && !defined(ntohl)
   #undef ntohl
   #undef ntohs
   #undef htonl
   #undef htons
 
-  static __inline__ unsigned long __ntohl (unsigned long x);
+  static __inline__ unsigned int __ntohl (unsigned int x);
   static __inline__ unsigned short __ntohs (unsigned short x);
 
   #define ntohl(x)  __ntohl(x)
@@ -293,7 +293,7 @@ typedef char* caddr_t;
   #define htonl(x)  __ntohl(x)
   #define htons(x)  __ntohs(x)
 
-  static __inline__ unsigned long __ntohl (unsigned long x)
+  static __inline__ unsigned int __ntohl (unsigned int x)
   {
 __asm__ ("xchgb %b0, %h0\n\t"   /* swap lower bytes  */
  "rorl  $16, %0\n\t"/* swap words*/



CVS commit: src/external/bsd/tcpdump/dist

2017-01-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jan 25 14:46:16 UTC 2017

Modified Files:
src/external/bsd/tcpdump/dist: netdissect-stdinc.h

Log Message:
- don't use their ntoh{l,s}/hton{l,s} implementation
- fix their ntohl/htonl implementations to use unsigned int instead of
  unsigned long so they work on _LP64.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/bsd/tcpdump/dist/netdissect-stdinc.h

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



CVS commit: src/lib/libcurses

2017-01-25 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Wed Jan 25 12:21:18 UTC 2017

Modified Files:
src/lib/libcurses: curses.3

Log Message:
And more functions 


To generate a diff of this commit:
cvs rdiff -u -r1.69 -r1.70 src/lib/libcurses/curses.3

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



CVS import: src/sys/external/bsd/acpica/dist

2017-01-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jan 25 13:03:58 UTC 2017

Update of /cvsroot/src/sys/external/bsd/acpica/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv20065

Log Message:
One more time in the right place...


19 January 2017. Summary of changes for version 20170119:

This release is available at https://acpica.org/downloads

1) General ACPICA software:

Entire source code base: Added the 2017 copyright to all source code 
legal/licensing module headers and utility/tool signons. This includes 
the standard Linux dual-license header. This affects virtually every file 
in the ACPICA core subsystem, iASL compiler, all ACPICA utilities, and 
the ACPICA test suite.


2) iASL Compiler/Disassembler and Tools:

iASL: Removed/fixed an inadvertent remark when a method argument 
containing a reference is used as a target operand within the method (and 
never used as a simple argument), as in the example below. Jeffrey Hugo.

dsdt.asl   1507:Store(0x1, Arg0)
Remark   2146 -^ Method Argument is never used (Arg0)

All tools: Removed the bit width of the compiler that generated the tool 
from the common signon for all user space tools. This proved to be 
confusing and unnecessary. This includes similar removal of HARDWARE_NAME 
from the generic makefiles (Thomas Petazzoni). Example below.

Old:
ASL+ Optimizing Compiler version 20170119-32
ASL+ Optimizing Compiler version 20170119-64

New:
ASL+ Optimizing Compiler version 20170119


22 December 2016. Summary of changes for version 20161222:


1) ACPICA kernel-resident subsystem:

AML Debugger: Implemented a new mechanism to simplify and enhance 
debugger integration into all environments, including kernel debuggers 
and user-space utilities, as well as remote debug services. This 
mechanism essentially consists of new OSL interfaces to support debugger 
initialization/termination, as well as wait/notify interfaces to perform 
the debugger handshake with the host. Lv Zheng.

New OSL interfaces:
AcpiOsInitializeDebugger (void)
AcpiOsTerminateDebugger (void)
AcpiOsWaitCommandReady (void)
AcpiOsNotifyCommandComplete (void)

New OS services layer:
osgendbg.c -- Example implementation, and used for AcpiExec

Update for Generic Address Space (GAS) support: Although the AccessWidth 
and/or BitOffset fields of the GAS are not often used, this change now 
fully supports these fields. This affects the internal support for FADT 
registers, registers in other ACPI data tables, and the AcpiRead and 
AcpiWrite public interfaces. Lv Zheng.

Sleep support: In order to simplify integration of ACPI sleep for the 
various host operating systems, a new OSL interface has been introduced. 
AcpiOsEnterSleep allows the host to perform any required operations 
before the final write to the sleep control register(s) is performed by 
ACPICA. Lv Zheng.

New OSL interface:
AcpiOsEnterSleep(SleepState, RegisterAValue, RegisterBValue)

Called from these internal interfaces:
AcpiHwLegacySleep
AcpiHwExtendedSleep

EFI support: Added a very small EFI/ACPICA example application. Provides 
a simple demo for EFI integration, as well as assisting with resolution 
of issues related to customer ACPICA/EFI integration. Lv Zheng. See:

source/tools/efihello/efihello.c

Local C library: Implemented several new functions to enhance ACPICA 
portability, for environments where these clib functions are not 
available (such as EFI). Lv Zheng:
putchar
getchar
strpbrk
strtok
memmove

Fixed a regression where occasionally a valid resource descriptor was 
incorrectly detected as invalid at runtime, and a 
AE_AML_NO_RESOURCE_END_TAG was returned.

Fixed a problem with the recently implemented support that enables 
control method invocations as Target operands to many ASL operators. 
Warnings of this form: "Needed type [Reference], found [Processor]" were 
seen at runtime for some method invocations.

Example Code and Data Size: These are the sizes for the OS-independent 
acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The 
debug version of the code includes the debug output trace mechanism and 
has a much larger code and data size.

  Current Release:
Non-Debug Version: 141.5K Code, 58.5K Data, 200.0K Total
Debug Version: 201.7K Code, 82.7K Data, 284.4K Total
  Previous Release:
Non-Debug Version: 140.5K Code, 58.5K Data, 198.9K Total
Debug Version: 201.3K Code, 82.7K Data, 284.0K Total


2) iASL Compiler/Disassembler and Tools:

Disassembler: Enhanced output by adding the capability to detect and 
disassemble ASL Switch/Case statements back to the original ASL source 
code instead of if/else blocks. David Box.

AcpiHelp: Split a large file into separate files based upon 
functionality/purpose. New files are:

CVS import: src/sys/external/bsd/acpica/dist

2017-01-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jan 25 13:03:58 UTC 2017

Update of /cvsroot/src/sys/external/bsd/acpica/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv20065

Log Message:
One more time in the right place...


19 January 2017. Summary of changes for version 20170119:

This release is available at https://acpica.org/downloads

1) General ACPICA software:

Entire source code base: Added the 2017 copyright to all source code 
legal/licensing module headers and utility/tool signons. This includes 
the standard Linux dual-license header. This affects virtually every file 
in the ACPICA core subsystem, iASL compiler, all ACPICA utilities, and 
the ACPICA test suite.


2) iASL Compiler/Disassembler and Tools:

iASL: Removed/fixed an inadvertent remark when a method argument 
containing a reference is used as a target operand within the method (and 
never used as a simple argument), as in the example below. Jeffrey Hugo.

dsdt.asl   1507:Store(0x1, Arg0)
Remark   2146 -^ Method Argument is never used (Arg0)

All tools: Removed the bit width of the compiler that generated the tool 
from the common signon for all user space tools. This proved to be 
confusing and unnecessary. This includes similar removal of HARDWARE_NAME 
from the generic makefiles (Thomas Petazzoni). Example below.

Old:
ASL+ Optimizing Compiler version 20170119-32
ASL+ Optimizing Compiler version 20170119-64

New:
ASL+ Optimizing Compiler version 20170119


22 December 2016. Summary of changes for version 20161222:


1) ACPICA kernel-resident subsystem:

AML Debugger: Implemented a new mechanism to simplify and enhance 
debugger integration into all environments, including kernel debuggers 
and user-space utilities, as well as remote debug services. This 
mechanism essentially consists of new OSL interfaces to support debugger 
initialization/termination, as well as wait/notify interfaces to perform 
the debugger handshake with the host. Lv Zheng.

New OSL interfaces:
AcpiOsInitializeDebugger (void)
AcpiOsTerminateDebugger (void)
AcpiOsWaitCommandReady (void)
AcpiOsNotifyCommandComplete (void)

New OS services layer:
osgendbg.c -- Example implementation, and used for AcpiExec

Update for Generic Address Space (GAS) support: Although the AccessWidth 
and/or BitOffset fields of the GAS are not often used, this change now 
fully supports these fields. This affects the internal support for FADT 
registers, registers in other ACPI data tables, and the AcpiRead and 
AcpiWrite public interfaces. Lv Zheng.

Sleep support: In order to simplify integration of ACPI sleep for the 
various host operating systems, a new OSL interface has been introduced. 
AcpiOsEnterSleep allows the host to perform any required operations 
before the final write to the sleep control register(s) is performed by 
ACPICA. Lv Zheng.

New OSL interface:
AcpiOsEnterSleep(SleepState, RegisterAValue, RegisterBValue)

Called from these internal interfaces:
AcpiHwLegacySleep
AcpiHwExtendedSleep

EFI support: Added a very small EFI/ACPICA example application. Provides 
a simple demo for EFI integration, as well as assisting with resolution 
of issues related to customer ACPICA/EFI integration. Lv Zheng. See:

source/tools/efihello/efihello.c

Local C library: Implemented several new functions to enhance ACPICA 
portability, for environments where these clib functions are not 
available (such as EFI). Lv Zheng:
putchar
getchar
strpbrk
strtok
memmove

Fixed a regression where occasionally a valid resource descriptor was 
incorrectly detected as invalid at runtime, and a 
AE_AML_NO_RESOURCE_END_TAG was returned.

Fixed a problem with the recently implemented support that enables 
control method invocations as Target operands to many ASL operators. 
Warnings of this form: "Needed type [Reference], found [Processor]" were 
seen at runtime for some method invocations.

Example Code and Data Size: These are the sizes for the OS-independent 
acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The 
debug version of the code includes the debug output trace mechanism and 
has a much larger code and data size.

  Current Release:
Non-Debug Version: 141.5K Code, 58.5K Data, 200.0K Total
Debug Version: 201.7K Code, 82.7K Data, 284.4K Total
  Previous Release:
Non-Debug Version: 140.5K Code, 58.5K Data, 198.9K Total
Debug Version: 201.3K Code, 82.7K Data, 284.0K Total


2) iASL Compiler/Disassembler and Tools:

Disassembler: Enhanced output by adding the capability to detect and 
disassemble ASL Switch/Case statements back to the original ASL source 
code instead of if/else blocks. David Box.

AcpiHelp: Split a large file into separate files based upon 
functionality/purpose. New files are:

CVS commit: src/doc

2017-01-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jan 25 13:43:58 UTC 2017

Modified Files:
src/doc: 3RDPARTY CHANGES

Log Message:
new acpica


To generate a diff of this commit:
cvs rdiff -u -r1.1401 -r1.1402 src/doc/3RDPARTY
cvs rdiff -u -r1.2238 -r1.2239 src/doc/CHANGES

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

Modified files:

Index: src/doc/3RDPARTY
diff -u src/doc/3RDPARTY:1.1401 src/doc/3RDPARTY:1.1402
--- src/doc/3RDPARTY:1.1401	Tue Jan 24 18:31:03 2017
+++ src/doc/3RDPARTY	Wed Jan 25 08:43:58 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1401 2017/01/24 23:31:03 christos Exp $
+#	$NetBSD: 3RDPARTY,v 1.1402 2017/01/25 13:43:58 christos Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -40,8 +40,8 @@
 #
 
 Package:	acpica
-Version:	20160930
-Current Vers:	20160930
+Version:	20170119
+Current Vers:	20170119
 Maintainer:	Intel
 Archive Site:	http://www.acpica.org/downloads/
 Home Page:	http://www.acpica.org/

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.2238 src/doc/CHANGES:1.2239
--- src/doc/CHANGES:1.2238	Tue Jan 24 18:31:03 2017
+++ src/doc/CHANGES	Wed Jan 25 08:43:58 2017
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2238 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2239 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -454,3 +454,4 @@ Changes from NetBSD 7.0 to NetBSD 8.0:
 	siginfo(2): Add new si_code for SIGTRAP: TRAP_LWP [kamil 20170114]
 	libpcap: Import 1.8.1. [christos 20170124]
 	tcpdump(8): Import 4.8.1. [christos 20170124]
+	acpi(4): Updated ACPICA to 20170119. [christos 20170125]



CVS import: sys/external/bsd/acpica/dist

2017-01-25 Thread Christos Zoulas
Module Name:sys
Committed By:   christos
Date:   Wed Jan 25 13:02:33 UTC 2017

Update of /cvsroot/sys/external/bsd/acpica/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv7705

Log Message:


19 January 2017. Summary of changes for version 20170119:

This release is available at https://acpica.org/downloads

1) General ACPICA software:

Entire source code base: Added the 2017 copyright to all source code 
legal/licensing module headers and utility/tool signons. This includes 
the standard Linux dual-license header. This affects virtually every file 
in the ACPICA core subsystem, iASL compiler, all ACPICA utilities, and 
the ACPICA test suite.


2) iASL Compiler/Disassembler and Tools:

iASL: Removed/fixed an inadvertent remark when a method argument 
containing a reference is used as a target operand within the method (and 
never used as a simple argument), as in the example below. Jeffrey Hugo.

dsdt.asl   1507:Store(0x1, Arg0)
Remark   2146 -^ Method Argument is never used (Arg0)

All tools: Removed the bit width of the compiler that generated the tool 
from the common signon for all user space tools. This proved to be 
confusing and unnecessary. This includes similar removal of HARDWARE_NAME 
from the generic makefiles (Thomas Petazzoni). Example below.

Old:
ASL+ Optimizing Compiler version 20170119-32
ASL+ Optimizing Compiler version 20170119-64

New:
ASL+ Optimizing Compiler version 20170119


22 December 2016. Summary of changes for version 20161222:


1) ACPICA kernel-resident subsystem:

AML Debugger: Implemented a new mechanism to simplify and enhance 
debugger integration into all environments, including kernel debuggers 
and user-space utilities, as well as remote debug services. This 
mechanism essentially consists of new OSL interfaces to support debugger 
initialization/termination, as well as wait/notify interfaces to perform 
the debugger handshake with the host. Lv Zheng.

New OSL interfaces:
AcpiOsInitializeDebugger (void)
AcpiOsTerminateDebugger (void)
AcpiOsWaitCommandReady (void)
AcpiOsNotifyCommandComplete (void)

New OS services layer:
osgendbg.c -- Example implementation, and used for AcpiExec

Update for Generic Address Space (GAS) support: Although the AccessWidth 
and/or BitOffset fields of the GAS are not often used, this change now 
fully supports these fields. This affects the internal support for FADT 
registers, registers in other ACPI data tables, and the AcpiRead and 
AcpiWrite public interfaces. Lv Zheng.

Sleep support: In order to simplify integration of ACPI sleep for the 
various host operating systems, a new OSL interface has been introduced. 
AcpiOsEnterSleep allows the host to perform any required operations 
before the final write to the sleep control register(s) is performed by 
ACPICA. Lv Zheng.

New OSL interface:
AcpiOsEnterSleep(SleepState, RegisterAValue, RegisterBValue)

Called from these internal interfaces:
AcpiHwLegacySleep
AcpiHwExtendedSleep

EFI support: Added a very small EFI/ACPICA example application. Provides 
a simple demo for EFI integration, as well as assisting with resolution 
of issues related to customer ACPICA/EFI integration. Lv Zheng. See:

source/tools/efihello/efihello.c

Local C library: Implemented several new functions to enhance ACPICA 
portability, for environments where these clib functions are not 
available (such as EFI). Lv Zheng:
putchar
getchar
strpbrk
strtok
memmove

Fixed a regression where occasionally a valid resource descriptor was 
incorrectly detected as invalid at runtime, and a 
AE_AML_NO_RESOURCE_END_TAG was returned.

Fixed a problem with the recently implemented support that enables 
control method invocations as Target operands to many ASL operators. 
Warnings of this form: "Needed type [Reference], found [Processor]" were 
seen at runtime for some method invocations.

Example Code and Data Size: These are the sizes for the OS-independent 
acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The 
debug version of the code includes the debug output trace mechanism and 
has a much larger code and data size.

  Current Release:
Non-Debug Version: 141.5K Code, 58.5K Data, 200.0K Total
Debug Version: 201.7K Code, 82.7K Data, 284.4K Total
  Previous Release:
Non-Debug Version: 140.5K Code, 58.5K Data, 198.9K Total
Debug Version: 201.3K Code, 82.7K Data, 284.0K Total


2) iASL Compiler/Disassembler and Tools:

Disassembler: Enhanced output by adding the capability to detect and 
disassemble ASL Switch/Case statements back to the original ASL source 
code instead of if/else blocks. David Box.

AcpiHelp: Split a large file into separate files based upon 
functionality/purpose. New files are:
ahaml.c
ahasl.c


CVS import: sys/external/bsd/acpica/dist

2017-01-25 Thread Christos Zoulas
Module Name:sys
Committed By:   christos
Date:   Wed Jan 25 13:02:33 UTC 2017

Update of /cvsroot/sys/external/bsd/acpica/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv7705

Log Message:


19 January 2017. Summary of changes for version 20170119:

This release is available at https://acpica.org/downloads

1) General ACPICA software:

Entire source code base: Added the 2017 copyright to all source code 
legal/licensing module headers and utility/tool signons. This includes 
the standard Linux dual-license header. This affects virtually every file 
in the ACPICA core subsystem, iASL compiler, all ACPICA utilities, and 
the ACPICA test suite.


2) iASL Compiler/Disassembler and Tools:

iASL: Removed/fixed an inadvertent remark when a method argument 
containing a reference is used as a target operand within the method (and 
never used as a simple argument), as in the example below. Jeffrey Hugo.

dsdt.asl   1507:Store(0x1, Arg0)
Remark   2146 -^ Method Argument is never used (Arg0)

All tools: Removed the bit width of the compiler that generated the tool 
from the common signon for all user space tools. This proved to be 
confusing and unnecessary. This includes similar removal of HARDWARE_NAME 
from the generic makefiles (Thomas Petazzoni). Example below.

Old:
ASL+ Optimizing Compiler version 20170119-32
ASL+ Optimizing Compiler version 20170119-64

New:
ASL+ Optimizing Compiler version 20170119


22 December 2016. Summary of changes for version 20161222:


1) ACPICA kernel-resident subsystem:

AML Debugger: Implemented a new mechanism to simplify and enhance 
debugger integration into all environments, including kernel debuggers 
and user-space utilities, as well as remote debug services. This 
mechanism essentially consists of new OSL interfaces to support debugger 
initialization/termination, as well as wait/notify interfaces to perform 
the debugger handshake with the host. Lv Zheng.

New OSL interfaces:
AcpiOsInitializeDebugger (void)
AcpiOsTerminateDebugger (void)
AcpiOsWaitCommandReady (void)
AcpiOsNotifyCommandComplete (void)

New OS services layer:
osgendbg.c -- Example implementation, and used for AcpiExec

Update for Generic Address Space (GAS) support: Although the AccessWidth 
and/or BitOffset fields of the GAS are not often used, this change now 
fully supports these fields. This affects the internal support for FADT 
registers, registers in other ACPI data tables, and the AcpiRead and 
AcpiWrite public interfaces. Lv Zheng.

Sleep support: In order to simplify integration of ACPI sleep for the 
various host operating systems, a new OSL interface has been introduced. 
AcpiOsEnterSleep allows the host to perform any required operations 
before the final write to the sleep control register(s) is performed by 
ACPICA. Lv Zheng.

New OSL interface:
AcpiOsEnterSleep(SleepState, RegisterAValue, RegisterBValue)

Called from these internal interfaces:
AcpiHwLegacySleep
AcpiHwExtendedSleep

EFI support: Added a very small EFI/ACPICA example application. Provides 
a simple demo for EFI integration, as well as assisting with resolution 
of issues related to customer ACPICA/EFI integration. Lv Zheng. See:

source/tools/efihello/efihello.c

Local C library: Implemented several new functions to enhance ACPICA 
portability, for environments where these clib functions are not 
available (such as EFI). Lv Zheng:
putchar
getchar
strpbrk
strtok
memmove

Fixed a regression where occasionally a valid resource descriptor was 
incorrectly detected as invalid at runtime, and a 
AE_AML_NO_RESOURCE_END_TAG was returned.

Fixed a problem with the recently implemented support that enables 
control method invocations as Target operands to many ASL operators. 
Warnings of this form: "Needed type [Reference], found [Processor]" were 
seen at runtime for some method invocations.

Example Code and Data Size: These are the sizes for the OS-independent 
acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The 
debug version of the code includes the debug output trace mechanism and 
has a much larger code and data size.

  Current Release:
Non-Debug Version: 141.5K Code, 58.5K Data, 200.0K Total
Debug Version: 201.7K Code, 82.7K Data, 284.4K Total
  Previous Release:
Non-Debug Version: 140.5K Code, 58.5K Data, 198.9K Total
Debug Version: 201.3K Code, 82.7K Data, 284.0K Total


2) iASL Compiler/Disassembler and Tools:

Disassembler: Enhanced output by adding the capability to detect and 
disassemble ASL Switch/Case statements back to the original ASL source 
code instead of if/else blocks. David Box.

AcpiHelp: Split a large file into separate files based upon 
functionality/purpose. New files are:
ahaml.c
ahasl.c


CVS commit: src/lib/libcurses

2017-01-25 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Wed Jan 25 12:05:26 UTC 2017

Modified Files:
src/lib/libcurses: curses.3

Log Message:
Note the substantial work by others on the curses library.


To generate a diff of this commit:
cvs rdiff -u -r1.68 -r1.69 src/lib/libcurses/curses.3

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

Modified files:

Index: src/lib/libcurses/curses.3
diff -u src/lib/libcurses/curses.3:1.68 src/lib/libcurses/curses.3:1.69
--- src/lib/libcurses/curses.3:1.68	Wed Jan 25 12:00:57 2017
+++ src/lib/libcurses/curses.3	Wed Jan 25 12:05:26 2017
@@ -1,4 +1,4 @@
-.\"	$NetBSD: curses.3,v 1.68 2017/01/25 12:00:57 roy Exp $
+.\"	$NetBSD: curses.3,v 1.69 2017/01/25 12:05:26 roy Exp $
 .\"
 .\" Copyright (c) 1985, 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -367,3 +367,6 @@ The Curses package appeared in
 .Bx 4.0 .
 .Sh AUTHORS
 .An Ken Arnold
+.An Julian Coleman
+.An Brett Lymn
+.An Roy Marples



CVS commit: src/lib/libcurses

2017-01-25 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Wed Jan 25 12:00:57 UTC 2017

Modified Files:
src/lib/libcurses: curses.3

Log Message:
Document recently added functions in curses.3


To generate a diff of this commit:
cvs rdiff -u -r1.67 -r1.68 src/lib/libcurses/curses.3

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

Modified files:

Index: src/lib/libcurses/curses.3
diff -u src/lib/libcurses/curses.3:1.67 src/lib/libcurses/curses.3:1.68
--- src/lib/libcurses/curses.3:1.67	Wed Jan 25 11:44:55 2017
+++ src/lib/libcurses/curses.3	Wed Jan 25 12:00:57 2017
@@ -1,4 +1,4 @@
-.\"	$NetBSD: curses.3,v 1.67 2017/01/25 11:44:55 roy Exp $
+.\"	$NetBSD: curses.3,v 1.68 2017/01/25 12:00:57 roy Exp $
 .\"
 .\" Copyright (c) 1985, 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -110,6 +110,7 @@ must be called before any of the other r
 .It endwin Ta Xr curses_screen 3
 .It erase Ta Xr curses_clear 3
 .It erasechar Ta Xr curses_tty 3
+.It filter Ta Xr curses_screen 3
 .It flash Ta Xr curses_tty 3
 .It flushinp Ta Xr curses_tty 3
 .It flushok Ta Xr curses_refresh 3
@@ -134,9 +135,11 @@ must be called before any of the other r
 .It has_colors Ta Xr curses_color 3
 .It has_ic Ta Xr curses_tty 3
 .It has_il Ta Xr curses_tty 3
+.It has_key Ta Xr curses_input 3
 .It hline Ta Xr curses_line 3
 .It idcok Ta Xr curses_tty 3
 .It idlok Ta Xr curses_tty 3
+.It immedok Ta Xr curses_refresh 3
 .It inch Ta Xr curses_inch 3
 .It inchnstr Ta Xr curses_inch 3
 .It inchstr Ta Xr curses_inch 3
@@ -149,7 +152,11 @@ must be called before any of the other r
 .It insertln Ta Xr curses_insertln 3
 .It instr Ta Xr curses_inch 3
 .It intrflush Ta Xr curses_tty 3
+.It is_keypad Ta Xr curses_input 3
+.It is_leaveok Ta Xr curses_refresh 3
 .It is_linetouched Ta Xr curses_touch 3
+.It is_pad Ta Xr curses_pad 3
+.It is_term_resized Ta Xr curses_screen 3
 .It is_wintouched Ta Xr curses_touch 3
 .It isendwin Ta Xr curses_screen 3
 .It keyname Ta Xr curses_keyname 3
@@ -217,6 +224,7 @@ must be called before any of the other r
 .It resetty Ta Xr curses_tty 3
 .It resize_term Ta Xr curses_screen 3
 .It resizeterm Ta Xr curses_screen 3
+.It ripoffline Ta Xr curses_Screen 3
 .It savetty Ta Xr curses_tty 3
 .It scanw Ta Xr curses_scanw 3
 .It scrl Ta Xr curses_scroll 3
@@ -246,6 +254,7 @@ must be called before any of the other r
 .It standend Ta Xr curses_standout 3
 .It standout Ta Xr curses_standout 3
 .It start_color Ta Xr curses_color 3
+.It syncok Ta Xr curses_touch 3
 .It subpad Ta Xr curses_pad 3
 .It subwin Ta Xr curses_window 3
 .It termattrs Ta Xr curses_attributes 3
@@ -253,12 +262,14 @@ must be called before any of the other r
 .It touchline Ta Xr curses_touch 3
 .It touchoverlap Ta Xr curses_touch 3
 .It touchwin Ta Xr curses_touch 3
+.It typeahead Ta Xr curses_tty 3
 .It unctrl Ta Xr curses_print 3
 .It underend Ta Xr curses_underscore 3
 .It underscore Ta Xr curses_underscore 3
 .It ungetch Ta Xr curses_input 3
 .It untouchwin Ta Xr curses_touch 3
 .It use_default_colors Ta Xr curses_default_colors 3
+.It use_env Ta Xr curses_screen 3
 .It vline Ta Xr curses_line 3
 .It waddch Ta Xr curses_addch 3
 .It waddchnstr Ta Xr curses_addchstr 3



CVS commit: src/lib/libcurses

2017-01-25 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Wed Jan 25 12:05:26 UTC 2017

Modified Files:
src/lib/libcurses: curses.3

Log Message:
Note the substantial work by others on the curses library.


To generate a diff of this commit:
cvs rdiff -u -r1.68 -r1.69 src/lib/libcurses/curses.3

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/acpica/dist

2017-01-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jan 25 13:38:23 UTC 2017

Modified Files:
src/sys/external/bsd/acpica/dist/common: dmtbdump.c dmtbinfo.c
src/sys/external/bsd/acpica/dist/compiler: aslanalyze.c aslcompile.c
aslcompiler.h aslcompiler.l aslerror.c aslfileio.c aslfiles.c
aslload.c asllookup.c aslopcodes.c aslopt.c asloptions.c
aslpredef.c aslprepkg.c aslsupport.l asltree.c aslutils.c
aslwalks.c aslxref.c dtcompile.c dtfield.c dtparser.y dtsubtable.c
dttable.c dtutils.c prparser.y prutils.c
src/sys/external/bsd/acpica/dist/debugger: dbcmds.c dbdisply.c dbexec.c
dbinput.c dbmethod.c dbnames.c dbtest.c dbutils.c
src/sys/external/bsd/acpica/dist/disassembler: dmbuffer.c dmcstyle.c
dmresrc.c dmresrcl.c dmresrcl2.c dmwalk.c
src/sys/external/bsd/acpica/dist/dispatcher: dscontrol.c dsopcode.c
dsutils.c
src/sys/external/bsd/acpica/dist/events: evregion.c evrgnini.c
evxface.c
src/sys/external/bsd/acpica/dist/executer: exconfig.c exdebug.c
exdump.c
src/sys/external/bsd/acpica/dist/hardware: hwesleep.c hwregs.c
hwsleep.c hwxfsleep.c
src/sys/external/bsd/acpica/dist/include: acapps.h acdebug.h acdisasm.h
acexcep.h acglobal.h acinterp.h aclocal.h acmacros.h acnamesp.h
acoutput.h acpiosxf.h acpixf.h acresrc.h actables.h actbl1.h
actypes.h acutils.h
src/sys/external/bsd/acpica/dist/include/platform: acgcc.h acnetbsd.h
src/sys/external/bsd/acpica/dist/namespace: nsaccess.c nsdump.c
nseval.c nsinit.c nsrepair2.c nsxfeval.c nsxfname.c
src/sys/external/bsd/acpica/dist/os_specific/service_layers:
oslinuxtbl.c
src/sys/external/bsd/acpica/dist/parser: psopcode.c psopinfo.c
src/sys/external/bsd/acpica/dist/resources: rsdump.c rsdumpinfo.c
rsutils.c rsxface.c
src/sys/external/bsd/acpica/dist/tables: tbdata.c tbfadt.c tbinstal.c
tbutils.c tbxface.c tbxfload.c tbxfroot.c
src/sys/external/bsd/acpica/dist/tools/acpidump: apfiles.c
src/sys/external/bsd/acpica/dist/tools/acpixtract: acpixtract.c
src/sys/external/bsd/acpica/dist/utilities: utcache.c utdebug.c
utdecode.c uteval.c utglobal.c utmisc.c utmutex.c utobject.c
utosi.c utprint.c uttrack.c utuuid.c

Log Message:
merge conflicts


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/external/bsd/acpica/dist/common/dmtbdump.c
cvs rdiff -u -r1.11 -r1.12 src/sys/external/bsd/acpica/dist/common/dmtbinfo.c
cvs rdiff -u -r1.7 -r1.8 \
src/sys/external/bsd/acpica/dist/compiler/aslanalyze.c \
src/sys/external/bsd/acpica/dist/compiler/aslcompiler.l \
src/sys/external/bsd/acpica/dist/compiler/aslfiles.c \
src/sys/external/bsd/acpica/dist/compiler/asllookup.c \
src/sys/external/bsd/acpica/dist/compiler/aslprepkg.c \
src/sys/external/bsd/acpica/dist/compiler/asltree.c \
src/sys/external/bsd/acpica/dist/compiler/dtcompile.c \
src/sys/external/bsd/acpica/dist/compiler/dtfield.c \
src/sys/external/bsd/acpica/dist/compiler/dtutils.c \
src/sys/external/bsd/acpica/dist/compiler/prutils.c
cvs rdiff -u -r1.9 -r1.10 \
src/sys/external/bsd/acpica/dist/compiler/aslcompile.c
cvs rdiff -u -r1.6 -r1.7 \
src/sys/external/bsd/acpica/dist/compiler/aslcompiler.h \
src/sys/external/bsd/acpica/dist/compiler/aslerror.c \
src/sys/external/bsd/acpica/dist/compiler/aslfileio.c \
src/sys/external/bsd/acpica/dist/compiler/aslload.c \
src/sys/external/bsd/acpica/dist/compiler/aslopcodes.c \
src/sys/external/bsd/acpica/dist/compiler/aslpredef.c \
src/sys/external/bsd/acpica/dist/compiler/aslsupport.l \
src/sys/external/bsd/acpica/dist/compiler/aslwalks.c \
src/sys/external/bsd/acpica/dist/compiler/dtsubtable.c
cvs rdiff -u -r1.2 -r1.3 src/sys/external/bsd/acpica/dist/compiler/aslopt.c \
src/sys/external/bsd/acpica/dist/compiler/asloptions.c
cvs rdiff -u -r1.15 -r1.16 \
src/sys/external/bsd/acpica/dist/compiler/aslutils.c
cvs rdiff -u -r1.8 -r1.9 src/sys/external/bsd/acpica/dist/compiler/aslxref.c \
src/sys/external/bsd/acpica/dist/compiler/dtparser.y \
src/sys/external/bsd/acpica/dist/compiler/dttable.c \
src/sys/external/bsd/acpica/dist/compiler/prparser.y
cvs rdiff -u -r1.10 -r1.11 src/sys/external/bsd/acpica/dist/debugger/dbcmds.c \
src/sys/external/bsd/acpica/dist/debugger/dbutils.c
cvs rdiff -u -r1.11 -r1.12 \
src/sys/external/bsd/acpica/dist/debugger/dbdisply.c \
src/sys/external/bsd/acpica/dist/debugger/dbexec.c
cvs rdiff -u -r1.12 -r1.13 \
src/sys/external/bsd/acpica/dist/debugger/dbinput.c
cvs rdiff -u -r1.7 -r1.8 src/sys/external/bsd/acpica/dist/debugger/dbmethod.c \
src/sys/external/bsd/acpica/dist/debugger/dbnames.c
cvs rdiff -u -r1.5 -r1.6 

CVS commit: src/lib/libcurses

2017-01-25 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Wed Jan 25 11:44:55 UTC 2017

Modified Files:
src/lib/libcurses: curses.3

Log Message:
Reference curses_slk(3).


To generate a diff of this commit:
cvs rdiff -u -r1.66 -r1.67 src/lib/libcurses/curses.3

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

Modified files:

Index: src/lib/libcurses/curses.3
diff -u src/lib/libcurses/curses.3:1.66 src/lib/libcurses/curses.3:1.67
--- src/lib/libcurses/curses.3:1.66	Sun Jan  8 13:49:21 2017
+++ src/lib/libcurses/curses.3	Wed Jan 25 11:44:55 2017
@@ -1,4 +1,4 @@
-.\"	$NetBSD: curses.3,v 1.66 2017/01/08 13:49:21 wiz Exp $
+.\"	$NetBSD: curses.3,v 1.67 2017/01/25 11:44:55 roy Exp $
 .\"
 .\" Copyright (c) 1985, 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\"
 .\" @(#)curses.3	8.1 (Berkeley) 6/4/93
 .\"
-.Dd January 5, 2017
+.Dd January 25, 2017
 .Dt CURSES 3
 .Os
 .Sh NAME
@@ -227,6 +227,22 @@ must be called before any of the other r
 .It set_term Ta Xr curses_screen 3
 .It setscrreg Ta Xr curses_scroll 3
 .It setterm Ta Xr curses_screen 3
+.It slk_attroff Ta Xr curses_slk 3
+.It slk_attr_off Ta Xr curses_slk 3
+.It slk_attron Ta Xr curses_slk 3
+.It slk_attr_on Ta Xr curses_slk 3
+.It slk_attrset Ta Xr curses_slk 3
+.It slk_attr_set Ta Xr curses_slk 3
+.It slk_clear Ta Xr curses_slk 3
+.It slk_color Ta Xr curses_slk 3
+.It slk_init Ta Xr curses_slk 3
+.It slk_label Ta Xr curses_slk 3
+.It slk_noutrefresh Ta Xr curses_slk 3
+.It slk_refresh Ta Xr curses_slk 3
+.It slk_restore Ta Xr curses_slk 3
+.It slk_set Ta Xr curses_slk 3
+.It slk_touch Ta Xr curses_slk 3
+.It slk_wset Ta Xr curses_slk 3
 .It standend Ta Xr curses_standout 3
 .It standout Ta Xr curses_standout 3
 .It start_color Ta Xr curses_color 3



CVS commit: src/lib/libcurses

2017-01-25 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Wed Jan 25 11:44:55 UTC 2017

Modified Files:
src/lib/libcurses: curses.3

Log Message:
Reference curses_slk(3).


To generate a diff of this commit:
cvs rdiff -u -r1.66 -r1.67 src/lib/libcurses/curses.3

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



CVS commit: src/sys/dev/pci/ixgbe

2017-01-25 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Jan 25 13:08:31 UTC 2017

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.c

Log Message:
 Call ixgbe_get_supported_physical_layer() before ixgbe_add_media_types() to
set new media types correctly.


To generate a diff of this commit:
cvs rdiff -u -r1.65 -r1.66 src/sys/dev/pci/ixgbe/ixgbe.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/pci/ixgbe/ixgbe.c
diff -u src/sys/dev/pci/ixgbe/ixgbe.c:1.65 src/sys/dev/pci/ixgbe/ixgbe.c:1.66
--- src/sys/dev/pci/ixgbe/ixgbe.c:1.65	Wed Jan 25 07:49:23 2017
+++ src/sys/dev/pci/ixgbe/ixgbe.c	Wed Jan 25 13:08:31 2017
@@ -59,7 +59,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 /*$FreeBSD: head/sys/dev/ixgbe/if_ix.c 302384 2016-07-07 03:39:18Z sbruno $*/
-/*$NetBSD: ixgbe.c,v 1.65 2017/01/25 07:49:23 msaitoh Exp $*/
+/*$NetBSD: ixgbe.c,v 1.66 2017/01/25 13:08:31 msaitoh Exp $*/
 
 #include "opt_inet.h"
 #include "opt_inet6.h"
@@ -4015,6 +4015,8 @@ out:
 
 	/* Adjust media types shown in ifconfig */
 	ifmedia_removeall(>media);
+	/* get_supported_phy_layer will call hw->phy.ops.identify_sfp() */
+	adapter->phy_layer = ixgbe_get_supported_physical_layer(hw);
 	ixgbe_add_media_types(adapter);
 	ifmedia_set(>media, IFM_ETHER | IFM_AUTO);
 
@@ -4036,8 +4038,6 @@ ixgbe_handle_msf(void *context)
 	bool negotiate;
 
 	IXGBE_CORE_LOCK(adapter);
-	/* get_supported_phy_layer will call hw->phy.ops.identify_sfp() */
-	adapter->phy_layer = ixgbe_get_supported_physical_layer(hw);
 
 	autoneg = hw->phy.autoneg_advertised;
 	if ((!autoneg) && (hw->mac.ops.get_link_capabilities))



CVS commit: src/sys/dev/pci/ixgbe

2017-01-25 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Jan 25 13:08:31 UTC 2017

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.c

Log Message:
 Call ixgbe_get_supported_physical_layer() before ixgbe_add_media_types() to
set new media types correctly.


To generate a diff of this commit:
cvs rdiff -u -r1.65 -r1.66 src/sys/dev/pci/ixgbe/ixgbe.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/acpi/acpica

2017-01-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jan 25 13:38:40 UTC 2017

Modified Files:
src/sys/dev/acpi/acpica: OsdMisc.c

Log Message:
implement new interfaces


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/dev/acpi/acpica/OsdMisc.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/acpi/acpica/OsdMisc.c
diff -u src/sys/dev/acpi/acpica/OsdMisc.c:1.15 src/sys/dev/acpi/acpica/OsdMisc.c:1.16
--- src/sys/dev/acpi/acpica/OsdMisc.c:1.15	Sat Jan  9 16:14:42 2016
+++ src/sys/dev/acpi/acpica/OsdMisc.c	Wed Jan 25 08:38:40 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: OsdMisc.c,v 1.15 2016/01/09 21:14:42 christos Exp $	*/
+/*	$NetBSD: OsdMisc.c,v 1.16 2017/01/25 13:38:40 christos Exp $	*/
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -36,13 +36,50 @@
  */
 
 /*
+ * Copyright (C) 2000 - 2017, Intel Corp.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions, and the following disclaimer,
+ *without modification.
+ * 2. Redistributions in binary form must reproduce at minimum a disclaimer
+ *substantially similar to the "NO WARRANTY" disclaimer below
+ *("Disclaimer") and any redistribution must be conditioned upon
+ *including a substantially similar Disclaimer requirement for further
+ *binary redistribution.
+ * 3. Neither the names of the above-listed copyright holders nor the names
+ *of any contributors may be used to endorse or promote products derived
+ *from this software without specific prior written permission.
+ *
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
+ * NO WARRANTY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGES.
+ */
+
+/*
  * OS Services Layer
  *
  * 6.10: Miscellaneous
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: OsdMisc.c,v 1.15 2016/01/09 21:14:42 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: OsdMisc.c,v 1.16 2017/01/25 13:38:40 christos Exp $");
 
 #include "opt_acpi.h"
 #include "opt_ddb.h"
@@ -59,6 +96,8 @@ __KERNEL_RCSID(0, "$NetBSD: OsdMisc.c,v 
 #include 
 
 #ifdef ACPI_DEBUG
+#include 
+#include 
 #include 
 #endif
 
@@ -189,6 +228,33 @@ AcpiOsPhysicalTableOverride (
 	return AE_SUPPORT;
 }
 
+/**
+ *
+ * FUNCTION:AcpiOsEnterSleep
+ * 
+ * PARAMETERS:  SleepState  - Which sleep state to enter
+ *  RegaValue   - Register A value
+ *  RegbValue   - Register B value
+ *
+ * RETURN:  Status
+ *
+ * DESCRIPTION: A hook before writing sleep registers to enter the sleep
+ *  state. Return AE_CTRL_TERMINATE to skip further sleep register
+ *  writes.
+ *
+ */
+ 
+ACPI_STATUS
+AcpiOsEnterSleep (
+UINT8   SleepState,
+UINT32  RegaValue,
+UINT32  RegbValue)  
+{
+
+return AE_OK;  
+}   
+
+
 /*
  * acpi_osd_debugger:
  *
@@ -198,7 +264,6 @@ void
 acpi_osd_debugger(void)
 {
 #ifdef ACPI_DEBUG
-	ACPI_PARSE_OBJECT obj;
 	label_t	acpi_jmpbuf;
 	label_t	*savejmp;
 
@@ -208,7 +273,7 @@ acpi_osd_debugger(void)
 	db_recover = _jmpbuf;
 
 	acpi_indebugger = 1;
-	AcpiDbUserCommands('A', );
+	AcpiDbUserCommands();
 	acpi_indebugger = 0;
 
 	db_recover = savejmp;
@@ -216,3 +281,140 @@ acpi_osd_debugger(void)
 	printf("ACPI: WARNING: ACPICA debugger not present.\n");
 #endif
 }
+
+#ifdef ACPI_DEBUG
+
+#define _COMPONENT  ACPI_CA_DEBUGGER
+ACPI_MODULE_NAME("osnetbsdbg")
+
+
+/**
+ *
+ * FUNCTION:AcpiOsWaitCommandReady
+ *
+ * PARAMETERS:  None
+ *
+ * RETURN:  Status
+ *
+ * DESCRIPTION: Negotiate with the debugger foreground thread (the user
+ *  thread) to wait 

CVS commit: src/sys/dev/acpi/acpica

2017-01-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jan 25 13:38:40 UTC 2017

Modified Files:
src/sys/dev/acpi/acpica: OsdMisc.c

Log Message:
implement new interfaces


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/dev/acpi/acpica/OsdMisc.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/ic

2017-01-25 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Wed Jan 25 15:51:07 UTC 2017

Modified Files:
src/sys/dev/ic: igsfb.c

Log Message:
igsfb(4): use WSDISPLAY_BORDER_COLOR for overscan color


To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 src/sys/dev/ic/igsfb.c

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



CVS commit: src/tests/kernel

2017-01-25 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Wed Jan 25 17:01:57 UTC 2017

Modified Files:
src/tests/kernel: t_ptrace_wait.c

Log Message:
Add io_read_auxv1 in t_ptrace_wait{,3,4,6,id,pid}

io_read_auxv1:
Verify PT_READ_AUXV called for tracee

Sponsored by 


To generate a diff of this commit:
cvs rdiff -u -r1.60 -r1.61 src/tests/kernel/t_ptrace_wait.c

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



CVS commit: src/tests/kernel

2017-01-25 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Wed Jan 25 17:01:57 UTC 2017

Modified Files:
src/tests/kernel: t_ptrace_wait.c

Log Message:
Add io_read_auxv1 in t_ptrace_wait{,3,4,6,id,pid}

io_read_auxv1:
Verify PT_READ_AUXV called for tracee

Sponsored by 


To generate a diff of this commit:
cvs rdiff -u -r1.60 -r1.61 src/tests/kernel/t_ptrace_wait.c

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

Modified files:

Index: src/tests/kernel/t_ptrace_wait.c
diff -u src/tests/kernel/t_ptrace_wait.c:1.60 src/tests/kernel/t_ptrace_wait.c:1.61
--- src/tests/kernel/t_ptrace_wait.c:1.60	Sat Jan 14 19:17:10 2017
+++ src/tests/kernel/t_ptrace_wait.c	Wed Jan 25 17:01:57 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_ptrace_wait.c,v 1.60 2017/01/14 19:17:10 kamil Exp $	*/
+/*	$NetBSD: t_ptrace_wait.c,v 1.61 2017/01/25 17:01:57 kamil Exp $	*/
 
 /*-
  * Copyright (c) 2016 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: t_ptrace_wait.c,v 1.60 2017/01/14 19:17:10 kamil Exp $");
+__RCSID("$NetBSD: t_ptrace_wait.c,v 1.61 2017/01/25 17:01:57 kamil Exp $");
 
 #include 
 #include 
@@ -37,6 +37,7 @@ __RCSID("$NetBSD: t_ptrace_wait.c,v 1.60
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -2407,6 +2408,72 @@ ATF_TC_BODY(io_write_d4, tc)
 	TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, , 0));
 }
 
+ATF_TC(io_read_auxv1);
+ATF_TC_HEAD(io_read_auxv1, tc)
+{
+	atf_tc_set_md_var(tc, "descr",
+	"Verify PT_READ_AUXV called for tracee");
+}
+
+ATF_TC_BODY(io_read_auxv1, tc)
+{
+	const int exitval = 5;
+	const int sigval = SIGSTOP;
+	pid_t child, wpid;
+#if defined(TWAIT_HAVE_STATUS)
+	int status;
+#endif
+	AuxInfo ai[100], *aip;
+	struct ptrace_io_desc io = {
+		.piod_op = PIOD_READ_AUXV,
+		.piod_offs = 0,
+		.piod_addr = ai,
+		.piod_len = sizeof(ai)
+	};
+
+	printf("Before forking process PID=%d\n", getpid());
+	ATF_REQUIRE((child = fork()) != -1);
+	if (child == 0) {
+		printf("Before calling PT_TRACE_ME from child %d\n", getpid());
+		FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1);
+
+		printf("Before raising %s from child\n", strsignal(sigval));
+		FORKEE_ASSERT(raise(sigval) == 0);
+
+		printf("Before exiting of the child process\n");
+		_exit(exitval);
+	}
+	printf("Parent process PID=%d, child's PID=%d\n", getpid(), child);
+
+	printf("Before calling %s() for the child\n", TWAIT_FNAME);
+	TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, , 0), child);
+
+	validate_status_stopped(status, sigval);
+
+	printf("Read new AUXV from tracee (PID=%d) by tracer (PID=%d)\n",
+	child, getpid());
+	ATF_REQUIRE(ptrace(PT_IO, child, , 0) != -1);
+
+	printf("Asserting that AUXV length (%zu) is > 0\n", io.piod_len);
+	ATF_REQUIRE(io.piod_len > 0);
+
+	for (aip = ai; aip->a_type != AT_NULL; aip++)
+		printf("a_type=%#llx a_v=%#llx\n",
+		(long long int)aip->a_type, (long long int)aip->a_v);
+
+	printf("Before resuming the child process where it left off and "
+	"without signal to be sent\n");
+	ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1);
+
+	printf("Before calling %s() for the child\n", TWAIT_FNAME);
+	TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, , 0), child);
+
+	validate_status_exited(status, exitval);
+
+	printf("Before calling %s() for the child\n", TWAIT_FNAME);
+	TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, , 0));
+}
+
 ATF_TC(read_d1);
 ATF_TC_HEAD(read_d1, tc)
 {
@@ -5667,6 +5734,8 @@ ATF_TP_ADD_TCS(tp)
 	ATF_TP_ADD_TC(tp, read_i3);
 	ATF_TP_ADD_TC(tp, read_i4);
 
+	ATF_TP_ADD_TC(tp, io_read_auxv1);
+
 	ATF_TP_ADD_TC_HAVE_GPREGS(tp, regs1);
 	ATF_TP_ADD_TC_HAVE_GPREGS(tp, regs2);
 	ATF_TP_ADD_TC_HAVE_GPREGS(tp, regs3);



CVS commit: src/sys/dev/ic

2017-01-25 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Wed Jan 25 15:51:07 UTC 2017

Modified Files:
src/sys/dev/ic: igsfb.c

Log Message:
igsfb(4): use WSDISPLAY_BORDER_COLOR for overscan color


To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 src/sys/dev/ic/igsfb.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/ic/igsfb.c
diff -u src/sys/dev/ic/igsfb.c:1.53 src/sys/dev/ic/igsfb.c:1.54
--- src/sys/dev/ic/igsfb.c:1.53	Thu Jul 14 04:00:45 2016
+++ src/sys/dev/ic/igsfb.c	Wed Jan 25 15:51:07 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: igsfb.c,v 1.53 2016/07/14 04:00:45 msaitoh Exp $ */
+/*	$NetBSD: igsfb.c,v 1.54 2017/01/25 15:51:07 jakllsch Exp $ */
 
 /*
  * Copyright (c) 2002, 2003 Valeriy E. Ushakov
@@ -31,7 +31,7 @@
  * Integraphics Systems IGA 168x and CyberPro series.
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: igsfb.c,v 1.53 2016/07/14 04:00:45 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: igsfb.c,v 1.54 2017/01/25 15:51:07 jakllsch Exp $");
 
 #include 
 #include 
@@ -389,10 +389,11 @@ igsfb_init_cmap(struct igsfb_devconfig *
 	/* propagate to the device */
 	igsfb_update_cmap(dc, 0, IGS_CMAP_SIZE);
 
-	/* set overscan color (XXX: use defattr's background?) */
-	igs_ext_write(iot, ioh, IGS_EXT_OVERSCAN_RED,   0);
-	igs_ext_write(iot, ioh, IGS_EXT_OVERSCAN_GREEN, 0);
-	igs_ext_write(iot, ioh, IGS_EXT_OVERSCAN_BLUE,  0);
+	/* set overscan color */
+	p = _cmap[WSDISPLAY_BORDER_COLOR * 3];
+	igs_ext_write(iot, ioh, IGS_EXT_OVERSCAN_RED,   p[0]);
+	igs_ext_write(iot, ioh, IGS_EXT_OVERSCAN_GREEN, p[1]);
+	igs_ext_write(iot, ioh, IGS_EXT_OVERSCAN_BLUE,  p[2]);
 }
 
 



CVS commit: src/sys/dev/ic

2017-01-25 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Wed Jan 25 16:11:54 UTC 2017

Modified Files:
src/sys/dev/ic: igsfb.c

Log Message:
Map coprocessor registers before igsfb_hw_setup(), they are needed for
setting up the video mode.


To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.55 src/sys/dev/ic/igsfb.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/ic/igsfb.c
diff -u src/sys/dev/ic/igsfb.c:1.54 src/sys/dev/ic/igsfb.c:1.55
--- src/sys/dev/ic/igsfb.c:1.54	Wed Jan 25 15:51:07 2017
+++ src/sys/dev/ic/igsfb.c	Wed Jan 25 16:11:54 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: igsfb.c,v 1.54 2017/01/25 15:51:07 jakllsch Exp $ */
+/*	$NetBSD: igsfb.c,v 1.55 2017/01/25 16:11:54 jakllsch Exp $ */
 
 /*
  * Copyright (c) 2002, 2003 Valeriy E. Ushakov
@@ -31,7 +31,7 @@
  * Integraphics Systems IGA 168x and CyberPro series.
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: igsfb.c,v 1.54 2017/01/25 15:51:07 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: igsfb.c,v 1.55 2017/01/25 16:11:54 jakllsch Exp $");
 
 #include 
 #include 
@@ -279,6 +279,20 @@ igsfb_init_video(struct igsfb_devconfig 
 		}
 	}
 
+	/*
+	 * Map graphic coprocessor for mode setting and accelerated rasops.
+	 */
+	if (dc->dc_id >= 0x2000) { /* XXX */
+		if (bus_space_map(dc->dc_iot,
+  dc->dc_iobase + IGS_COP_BASE_B, IGS_COP_SIZE,
+  dc->dc_ioflags,
+  >dc_coph) != 0)
+		{
+			printf("unable to map COP registers\n");
+			return 1;
+		}
+	}
+
 	igsfb_hw_setup(dc);
 
 	/*
@@ -289,6 +303,9 @@ igsfb_init_video(struct igsfb_devconfig 
 			  dc->dc_memflags | BUS_SPACE_MAP_LINEAR,
 			  >dc_fbh) != 0)
 	{
+		if (dc->dc_id >= 0x2000) { /* XXX */
+			bus_space_unmap(dc->dc_iot, dc->dc_coph, IGS_COP_SIZE);
+		}
 		bus_space_unmap(dc->dc_iot, dc->dc_ioh, IGS_REG_SIZE);
 		printf("unable to map framebuffer\n");
 		return 1;
@@ -305,6 +322,9 @@ igsfb_init_video(struct igsfb_devconfig 
 			  dc->dc_memflags | BUS_SPACE_MAP_LINEAR,
 			  >dc_crh) != 0)
 	{
+		if (dc->dc_id >= 0x2000) { /* XXX */
+			bus_space_unmap(dc->dc_iot, dc->dc_coph, IGS_COP_SIZE);
+		}
 		bus_space_unmap(dc->dc_iot, dc->dc_ioh, IGS_REG_SIZE);
 		bus_space_unmap(dc->dc_memt, dc->dc_fbh, dc->dc_fbsz);
 		printf("unable to map cursor sprite region\n");
@@ -336,18 +356,9 @@ igsfb_init_video(struct igsfb_devconfig 
 	dc->dc_curenb = 0;
 
 	/*
-	 * Map and init graphic coprocessor for accelerated rasops.
+	 * Init graphic coprocessor for accelerated rasops.
 	 */
 	if (dc->dc_id >= 0x2000) { /* XXX */
-		if (bus_space_map(dc->dc_iot,
-  dc->dc_iobase + IGS_COP_BASE_B, IGS_COP_SIZE,
-  dc->dc_ioflags,
-  >dc_coph) != 0)
-		{
-			printf("unable to map COP registers\n");
-			return 1;
-		}
-
 		/* XXX: hardcoded 8bpp */
 		bus_space_write_2(dc->dc_iot, dc->dc_coph,
   IGS_COP_SRC_MAP_WIDTH_REG,



CVS commit: src/sys/dev/ic

2017-01-25 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Wed Jan 25 16:11:54 UTC 2017

Modified Files:
src/sys/dev/ic: igsfb.c

Log Message:
Map coprocessor registers before igsfb_hw_setup(), they are needed for
setting up the video mode.


To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.55 src/sys/dev/ic/igsfb.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/wscons

2017-01-25 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Wed Jan 25 15:40:31 UTC 2017

Modified Files:
src/sys/dev/wscons: wsdisplay.c

Log Message:
Double size of WSDISPLAYIO_SFONT name buffer to 32 characters.

We've got a font known as "DejaVu Sans Mono", and that is 17 bytes
by the time it's NUL terminated.


To generate a diff of this commit:
cvs rdiff -u -r1.140 -r1.141 src/sys/dev/wscons/wsdisplay.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/wscons/wsdisplay.c
diff -u src/sys/dev/wscons/wsdisplay.c:1.140 src/sys/dev/wscons/wsdisplay.c:1.141
--- src/sys/dev/wscons/wsdisplay.c:1.140	Thu Jul  7 06:55:42 2016
+++ src/sys/dev/wscons/wsdisplay.c	Wed Jan 25 15:40:31 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: wsdisplay.c,v 1.140 2016/07/07 06:55:42 msaitoh Exp $ */
+/* $NetBSD: wsdisplay.c,v 1.141 2017/01/25 15:40:31 jakllsch Exp $ */
 
 /*
  * Copyright (c) 1996, 1997 Christopher G. Demetriou.  All rights reserved.
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: wsdisplay.c,v 1.140 2016/07/07 06:55:42 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wsdisplay.c,v 1.141 2017/01/25 15:40:31 jakllsch Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_wsdisplay_compat.h"
@@ -1223,7 +1223,7 @@ wsdisplay_internal_ioctl(struct wsdispla
 	u_long cmd, void *data, int flag, struct lwp *l)
 {
 	int error;
-	char namebuf[16];
+	char namebuf[32];
 	struct wsdisplay_font fd;
 #ifdef WSDISPLAY_SCROLLSUPPORT
 	struct wsdisplay_scroll_data *ksdp, *usdp;



CVS commit: src/sys/dev/wscons

2017-01-25 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Wed Jan 25 15:40:31 UTC 2017

Modified Files:
src/sys/dev/wscons: wsdisplay.c

Log Message:
Double size of WSDISPLAYIO_SFONT name buffer to 32 characters.

We've got a font known as "DejaVu Sans Mono", and that is 17 bytes
by the time it's NUL terminated.


To generate a diff of this commit:
cvs rdiff -u -r1.140 -r1.141 src/sys/dev/wscons/wsdisplay.c

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



CVS commit: src/doc

2017-01-25 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Thu Jan 26 01:04:24 UTC 2017

Modified Files:
src/doc: TODO.ptrace

Log Message:
Update TODO.ptrace

Drop:
 - add ATF tests for PIOD_READ_AUXV

Add new entry:
 - research what happens when a tracee masks signals (including SIGTRAP)
   and a breakpoint is triggered

Sponsored by 


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/doc/TODO.ptrace

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

Modified files:

Index: src/doc/TODO.ptrace
diff -u src/doc/TODO.ptrace:1.11 src/doc/TODO.ptrace:1.12
--- src/doc/TODO.ptrace:1.11	Sat Jan 14 01:36:28 2017
+++ src/doc/TODO.ptrace	Thu Jan 26 01:04:23 2017
@@ -1,4 +1,4 @@
-$NetBSD: TODO.ptrace,v 1.11 2017/01/14 01:36:28 kamil Exp $
+$NetBSD: TODO.ptrace,v 1.12 2017/01/26 01:04:23 kamil Exp $
 
 Items we (currently) plan to finish in the ptrace(2) field:
 
@@ -8,7 +8,6 @@ Items we (currently) plan to finish in t
  - add new ptrace(2) calls to lock (suspend) and unlock LWP within a process
  - add PT_DUMPCORE tests in the ATF framework
  - add ATF tests for PT_WRITE_I and PIOD_WRITE_I - test mprotect restrictions
- - add ATF tests for PIOD_READ_AUXV
  - once the API for hardware watchpoints will stabilize, document it
  - add tests for the procfs interface covering all functions available on the
same level as ptrace(2)
@@ -20,6 +19,8 @@ Items we (currently) plan to finish in t
  - remove exect(3) - there is no usecase for it
  - refactor pthread_dbg(3) to only query private pthread_t data, otherwise it
duplicates ptrace(2) interface and cannot cover all types of threads
+ - research what happens when a tracee masks signals (including SIGTRAP) and a
+   breakpoint is triggered
  - add ATF tests for SIGCHLD
  - add ATF tests for PT_SYSCALL and PT_SYSCALLEMU
 



CVS commit: src/doc

2017-01-25 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Thu Jan 26 01:04:24 UTC 2017

Modified Files:
src/doc: TODO.ptrace

Log Message:
Update TODO.ptrace

Drop:
 - add ATF tests for PIOD_READ_AUXV

Add new entry:
 - research what happens when a tracee masks signals (including SIGTRAP)
   and a breakpoint is triggered

Sponsored by 


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/doc/TODO.ptrace

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



CVS commit: src/lib/libc/sys

2017-01-25 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Wed Jan 25 17:12:56 UTC 2017

Modified Files:
src/lib/libc/sys: ptrace.2

Log Message:
Make the PIOD_READ_AUXV operation more clear

Describe how to set piod_offs.

Sponsored by 


To generate a diff of this commit:
cvs rdiff -u -r1.56 -r1.57 src/lib/libc/sys/ptrace.2

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

Modified files:

Index: src/lib/libc/sys/ptrace.2
diff -u src/lib/libc/sys/ptrace.2:1.56 src/lib/libc/sys/ptrace.2:1.57
--- src/lib/libc/sys/ptrace.2:1.56	Sun Jan 15 22:18:11 2017
+++ src/lib/libc/sys/ptrace.2	Wed Jan 25 17:12:56 2017
@@ -1,7 +1,7 @@
-.\"	$NetBSD: ptrace.2,v 1.56 2017/01/15 22:18:11 kamil Exp $
+.\"	$NetBSD: ptrace.2,v 1.57 2017/01/25 17:12:56 kamil Exp $
 .\"
 .\" This file is in the public domain.
-.Dd January 14, 2016
+.Dd January 25, 2016
 .Dt PTRACE 2
 .Os
 .Sh NAME
@@ -285,9 +285,16 @@ Possible values are:
 See the description of
 .Dv PT_READ_I
 for the difference between I and D spaces.
+.Pp
 The
 .Dv PIOD_READ_AUXV
 operation can be used to read from the ELF auxiliary vector.
+The
+.Fa piod_offs
+argument sets offset withing the tracee's vector.
+To read from the beginning of it, this value must be set to 0 and casted to
+.Dv (void *) .
+.Pp
 A pointer to the I/O descriptor is passed in the
 .Fa addr
 argument to



CVS commit: src/lib/libc/sys

2017-01-25 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Wed Jan 25 17:12:56 UTC 2017

Modified Files:
src/lib/libc/sys: ptrace.2

Log Message:
Make the PIOD_READ_AUXV operation more clear

Describe how to set piod_offs.

Sponsored by 


To generate a diff of this commit:
cvs rdiff -u -r1.56 -r1.57 src/lib/libc/sys/ptrace.2

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



CVS commit: src/sys/dev/ic

2017-01-25 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Wed Jan 25 17:31:55 UTC 2017

Modified Files:
src/sys/dev/ic: igsfb.c igsfb_subr.c

Log Message:
Improve/fix igsfb(4) support for 15BPP.

Use howmany(depth, NBBY) instead of (depth >> 3), so that 15 bits maps
to 2 bytes instead of 1.

While here, in a nearly-identical change, don't hard-code 8BPP into the
CyberPro blitter.


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 src/sys/dev/ic/igsfb.c
cvs rdiff -u -r1.12 -r1.13 src/sys/dev/ic/igsfb_subr.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/ic

2017-01-25 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Wed Jan 25 17:31:55 UTC 2017

Modified Files:
src/sys/dev/ic: igsfb.c igsfb_subr.c

Log Message:
Improve/fix igsfb(4) support for 15BPP.

Use howmany(depth, NBBY) instead of (depth >> 3), so that 15 bits maps
to 2 bytes instead of 1.

While here, in a nearly-identical change, don't hard-code 8BPP into the
CyberPro blitter.


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 src/sys/dev/ic/igsfb.c
cvs rdiff -u -r1.12 -r1.13 src/sys/dev/ic/igsfb_subr.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/ic/igsfb.c
diff -u src/sys/dev/ic/igsfb.c:1.55 src/sys/dev/ic/igsfb.c:1.56
--- src/sys/dev/ic/igsfb.c:1.55	Wed Jan 25 16:11:54 2017
+++ src/sys/dev/ic/igsfb.c	Wed Jan 25 17:31:55 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: igsfb.c,v 1.55 2017/01/25 16:11:54 jakllsch Exp $ */
+/*	$NetBSD: igsfb.c,v 1.56 2017/01/25 17:31:55 jakllsch Exp $ */
 
 /*
  * Copyright (c) 2002, 2003 Valeriy E. Ushakov
@@ -31,7 +31,7 @@
  * Integraphics Systems IGA 168x and CyberPro series.
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: igsfb.c,v 1.55 2017/01/25 16:11:54 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: igsfb.c,v 1.56 2017/01/25 17:31:55 jakllsch Exp $");
 
 #include 
 #include 
@@ -359,7 +359,6 @@ igsfb_init_video(struct igsfb_devconfig 
 	 * Init graphic coprocessor for accelerated rasops.
 	 */
 	if (dc->dc_id >= 0x2000) { /* XXX */
-		/* XXX: hardcoded 8bpp */
 		bus_space_write_2(dc->dc_iot, dc->dc_coph,
   IGS_COP_SRC_MAP_WIDTH_REG,
   dc->dc_width - 1);
@@ -369,7 +368,7 @@ igsfb_init_video(struct igsfb_devconfig 
 
 		bus_space_write_1(dc->dc_iot, dc->dc_coph,
   IGS_COP_MAP_FMT_REG,
-  IGS_COP_MAP_8BPP);
+  howmany(dc->dc_depth, NBBY) - 1);
 	}
 
 	/* make sure screen is not blanked */
@@ -635,7 +634,7 @@ igsfb_ioctl(void *v, void *vs, u_long cm
 		return 0;
 
 	case WSDISPLAYIO_LINEBYTES:
-		*(int *)data = dc->dc_width * (dc->dc_maxdepth >> 3);
+		*(int *)data = dc->dc_width * howmany(dc->dc_maxdepth, NBBY);
 		return 0;
 
 	case WSDISPLAYIO_SMODE:
@@ -1192,7 +1191,8 @@ igsfb_accel_wait(struct igsfb_devconfig 
 	int timo = 10;
 	uint8_t reg;
 
-	bus_space_write_1(t, h, IGS_COP_MAP_FMT_REG, (dc->dc_depth >> 3) - 1);
+	bus_space_write_1(t, h, IGS_COP_MAP_FMT_REG,
+	howmany(dc->dc_depth, NBBY) - 1);
 	while (timo--) {
 		reg = bus_space_read_1(t, h, IGS_COP_CTL_REG);
 		if ((reg & IGS_COP_CTL_BUSY) == 0)

Index: src/sys/dev/ic/igsfb_subr.c
diff -u src/sys/dev/ic/igsfb_subr.c:1.12 src/sys/dev/ic/igsfb_subr.c:1.13
--- src/sys/dev/ic/igsfb_subr.c:1.12	Wed Nov 18 21:59:38 2009
+++ src/sys/dev/ic/igsfb_subr.c	Wed Jan 25 17:31:55 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: igsfb_subr.c,v 1.12 2009/11/18 21:59:38 macallan Exp $ */
+/*	$NetBSD: igsfb_subr.c,v 1.13 2017/01/25 17:31:55 jakllsch Exp $ */
 
 /*
  * Copyright (c) 2002 Valeriy E. Ushakov
@@ -32,7 +32,7 @@
  * Integraphics Systems IGA 168x and CyberPro series.
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: igsfb_subr.c,v 1.12 2009/11/18 21:59:38 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: igsfb_subr.c,v 1.13 2017/01/25 17:31:55 jakllsch Exp $");
 
 #include 
 #include 
@@ -511,7 +511,7 @@ igsfb_set_mode(struct igsfb_devconfig *d
 			depth = 8;
 			seq_mode = IGS_EXT_SEQ_8BPP;
 	}
-	bytes_per_pixel = depth >> 3;
+	bytes_per_pixel = howmany(depth, NBBY);
 
 	hoffset = (mode->hdisplay >> 3) * bytes_per_pixel;
 	memfetch = hoffset + 1;
@@ -660,7 +660,7 @@ igsfb_set_mode(struct igsfb_devconfig *d
 	dc->dc_width = mode->hdisplay;
 	dc->dc_height = mode->vdisplay;
 	dc->dc_depth = depth;
-	dc->dc_stride = dc->dc_width * (depth >> 3);
+	dc->dc_stride = dc->dc_width * howmany(depth, NBBY);
 
 	igsfb_video_on(dc);
 }



CVS commit: src/sys/kern

2017-01-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jan 25 17:57:14 UTC 2017

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

Log Message:
es_arglen is already in bytes...


To generate a diff of this commit:
cvs rdiff -u -r1.440 -r1.441 src/sys/kern/kern_exec.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_exec.c
diff -u src/sys/kern/kern_exec.c:1.440 src/sys/kern/kern_exec.c:1.441
--- src/sys/kern/kern_exec.c:1.440	Sun Jan  8 19:31:30 2017
+++ src/sys/kern/kern_exec.c	Wed Jan 25 12:57:14 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_exec.c,v 1.440 2017/01/09 00:31:30 kamil Exp $	*/
+/*	$NetBSD: kern_exec.c,v 1.441 2017/01/25 17:57:14 christos Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -59,7 +59,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_exec.c,v 1.440 2017/01/09 00:31:30 kamil Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_exec.c,v 1.441 2017/01/25 17:57:14 christos Exp $");
 
 #include "opt_exec.h"
 #include "opt_execfmt.h"
@@ -1411,10 +1411,11 @@ calcargs(struct execve_data * restrict d
 	data->ed_argc +		/* char *argv[] */
 	1 +/* \0 */
 	data->ed_envc +		/* char *env[] */
-	1 +/* \0 */
-	epp->ep_esch->es_arglen;	/* auxinfo */
+	1;/* \0 */
 
-	return (nargenvptrs * ptrsz(epp)) + argenvstrlen;
+	return (nargenvptrs * ptrsz(epp))	/* pointers */
+	+ argenvstrlen			/* strings */
+	+ epp->ep_esch->es_arglen;		/* auxinfo */
 }
 
 static size_t
@@ -1665,9 +1666,8 @@ copyargs(struct lwp *l, struct exec_pack
 	argc +			/* char *argv[] */
 	1 +/* \0 */
 	envc +			/* char *env[] */
-	1 +/* \0 */
-	/* XXX auxinfo multiplied by ptr size? */
-	pack->ep_esch->es_arglen);	/* auxinfo */
+	1) +			/* \0 */
+	pack->ep_esch->es_arglen;	/* auxinfo */
 	sp = argp;
 
 	if ((error = copyout(, cpp++, sizeof(argc))) != 0) {



CVS commit: src/sys/kern

2017-01-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jan 25 17:55:47 UTC 2017

Modified Files:
src/sys/kern: core_elf32.c sys_ptrace_common.c

Log Message:
PR/51916: Kamil Rytarowski: Don't multiply es_arglen with ptrsz since it is
already in bytes and contains the maximum possible size:
ELF_AUX_ENTRIES * sizeof(auxv) + MAXPATHLEN + ALIGN


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/sys/kern/core_elf32.c
cvs rdiff -u -r1.10 -r1.11 src/sys/kern/sys_ptrace_common.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/core_elf32.c
diff -u src/sys/kern/core_elf32.c:1.50 src/sys/kern/core_elf32.c:1.51
--- src/sys/kern/core_elf32.c:1.50	Fri Jan  6 17:53:17 2017
+++ src/sys/kern/core_elf32.c	Wed Jan 25 12:55:47 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: core_elf32.c,v 1.50 2017/01/06 22:53:17 kamil Exp $	*/
+/*	$NetBSD: core_elf32.c,v 1.51 2017/01/25 17:55:47 christos Exp $	*/
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -40,7 +40,7 @@
  */
 
 #include 
-__KERNEL_RCSID(1, "$NetBSD: core_elf32.c,v 1.50 2017/01/06 22:53:17 kamil Exp $");
+__KERNEL_RCSID(1, "$NetBSD: core_elf32.c,v 1.51 2017/01/25 17:55:47 christos Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_coredump.h"
@@ -416,7 +416,7 @@ coredump_note_auxv(struct lwp *l, struct
 
 	size_t ptrsz = PROC_PTRSZ(p);
 	uauxv = (void *)((char *)pss.ps_envstr + (pss.ps_nenvstr + 1) * ptrsz);
-	size_t len = p->p_execsw->es_arglen * ptrsz;
+	size_t len = p->p_execsw->es_arglen;
 
 	kauxv = kmem_alloc(len, KM_SLEEP);
 	error = copyin_proc(p, uauxv, kauxv, len);

Index: src/sys/kern/sys_ptrace_common.c
diff -u src/sys/kern/sys_ptrace_common.c:1.10 src/sys/kern/sys_ptrace_common.c:1.11
--- src/sys/kern/sys_ptrace_common.c:1.10	Sat Jan 14 01:36:52 2017
+++ src/sys/kern/sys_ptrace_common.c	Wed Jan 25 12:55:47 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: sys_ptrace_common.c,v 1.10 2017/01/14 06:36:52 kamil Exp $	*/
+/*	$NetBSD: sys_ptrace_common.c,v 1.11 2017/01/25 17:55:47 christos Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -118,7 +118,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sys_ptrace_common.c,v 1.10 2017/01/14 06:36:52 kamil Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sys_ptrace_common.c,v 1.11 2017/01/25 17:55:47 christos Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ptrace.h"
@@ -619,7 +619,7 @@ do_ptrace(struct ptrace_methods *ptm, st
 		case PIOD_READ_AUXV:
 			req = PT_READ_D;
 			uio.uio_rw = UIO_READ;
-			tmp = t->p_execsw->es_arglen * PROC_PTRSZ(t);
+			tmp = t->p_execsw->es_arglen;
 			if (uio.uio_offset > tmp)
 return EIO;
 			if (uio.uio_resid > tmp - uio.uio_offset)



CVS commit: src/sys/kern

2017-01-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jan 25 17:56:45 UTC 2017

Modified Files:
src/sys/kern: exec_elf32.c exec_elf64.c

Log Message:
The argument length is in bytes; don't use howmany()


To generate a diff of this commit:
cvs rdiff -u -r1.141 -r1.142 src/sys/kern/exec_elf32.c
cvs rdiff -u -r1.6 -r1.7 src/sys/kern/exec_elf64.c

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



CVS commit: src/sys/kern

2017-01-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jan 25 17:57:14 UTC 2017

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

Log Message:
es_arglen is already in bytes...


To generate a diff of this commit:
cvs rdiff -u -r1.440 -r1.441 src/sys/kern/kern_exec.c

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



CVS commit: src/sys/kern

2017-01-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jan 25 17:56:45 UTC 2017

Modified Files:
src/sys/kern: exec_elf32.c exec_elf64.c

Log Message:
The argument length is in bytes; don't use howmany()


To generate a diff of this commit:
cvs rdiff -u -r1.141 -r1.142 src/sys/kern/exec_elf32.c
cvs rdiff -u -r1.6 -r1.7 src/sys/kern/exec_elf64.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/exec_elf32.c
diff -u src/sys/kern/exec_elf32.c:1.141 src/sys/kern/exec_elf32.c:1.142
--- src/sys/kern/exec_elf32.c:1.141	Tue Jul 22 04:18:33 2014
+++ src/sys/kern/exec_elf32.c	Wed Jan 25 12:56:45 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: exec_elf32.c,v 1.141 2014/07/22 08:18:33 maxv Exp $	*/
+/*	$NetBSD: exec_elf32.c,v 1.142 2017/01/25 17:56:45 christos Exp $	*/
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: exec_elf32.c,v 1.141 2014/07/22 08:18:33 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: exec_elf32.c,v 1.142 2017/01/25 17:56:45 christos Exp $");
 
 #define	ELFSIZE	32
 
@@ -40,8 +40,8 @@ __KERNEL_RCSID(0, "$NetBSD: exec_elf32.c
 
 #include 
 
-#define ELF32_AUXSIZE (howmany(ELF_AUX_ENTRIES * sizeof(Aux32Info), \
-sizeof(Elf32_Addr)) + MAXPATHLEN + ALIGN(1))
+#define ELF32_AUXSIZE (ELF_AUX_ENTRIES * sizeof(Aux32Info) \
++ MAXPATHLEN + ALIGN(1))
 
 #ifdef COREDUMP
 #define	DEP	"coredump"

Index: src/sys/kern/exec_elf64.c
diff -u src/sys/kern/exec_elf64.c:1.6 src/sys/kern/exec_elf64.c:1.7
--- src/sys/kern/exec_elf64.c:1.6	Tue Jul 22 04:18:33 2014
+++ src/sys/kern/exec_elf64.c	Wed Jan 25 12:56:45 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: exec_elf64.c,v 1.6 2014/07/22 08:18:33 maxv Exp $	*/
+/*	$NetBSD: exec_elf64.c,v 1.7 2017/01/25 17:56:45 christos Exp $	*/
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: exec_elf64.c,v 1.6 2014/07/22 08:18:33 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: exec_elf64.c,v 1.7 2017/01/25 17:56:45 christos Exp $");
 
 #define	ELFSIZE	64
 
@@ -40,8 +40,8 @@ __KERNEL_RCSID(0, "$NetBSD: exec_elf64.c
 
 #include 
 
-#define ELF64_AUXSIZE (howmany(ELF_AUX_ENTRIES * sizeof(Aux64Info), \
-sizeof(Elf64_Addr)) + MAXPATHLEN + ALIGN(1))
+#define ELF64_AUXSIZE (ELF_AUX_ENTRIES * sizeof(Aux64Info) \
++ MAXPATHLEN + ALIGN(1))
 
 #ifdef COREDUMP
 #define	DEP	"coredump"



CVS commit: src/sys/compat/netbsd32

2017-01-25 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Wed Jan 25 21:45:39 UTC 2017

Modified Files:
src/sys/compat/netbsd32: netbsd32_exec.h

Log Message:
Catch netbsd32_copyargs() up to changes in r1.441 src/sys/kern/kern_exec.c


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/compat/netbsd32/netbsd32_exec.h

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



CVS commit: src/sys/kern

2017-01-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Jan 26 07:54:05 UTC 2017

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

Log Message:
No COMPAT_NETBSD32 for rump


To generate a diff of this commit:
cvs rdiff -u -r1.200 -r1.201 src/sys/kern/kern_proc.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_proc.c
diff -u src/sys/kern/kern_proc.c:1.200 src/sys/kern/kern_proc.c:1.201
--- src/sys/kern/kern_proc.c:1.200	Thu Jan 26 03:54:54 2017
+++ src/sys/kern/kern_proc.c	Thu Jan 26 07:54:05 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_proc.c,v 1.200 2017/01/26 03:54:54 christos Exp $	*/
+/*	$NetBSD: kern_proc.c,v 1.201 2017/01/26 07:54:05 martin Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_proc.c,v 1.200 2017/01/26 03:54:54 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_proc.c,v 1.201 2017/01/26 07:54:05 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_kstack.h"
@@ -104,7 +104,7 @@ __KERNEL_RCSID(0, "$NetBSD: kern_proc.c,
 #include 
 #include 
 
-#ifndef COMPAT_NETBSD32
+#if !defined(COMPAT_NETBSD32) && !defined(_RUMPKERNEL)
 #define COMPAT_NETBSD32
 #endif
 #ifdef COMPAT_NETBSD32



CVS commit: src/sys/kern

2017-01-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Jan 26 07:54:05 UTC 2017

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

Log Message:
No COMPAT_NETBSD32 for rump


To generate a diff of this commit:
cvs rdiff -u -r1.200 -r1.201 src/sys/kern/kern_proc.c

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



CVS commit: src/sys/modules/compat_netbsd32

2017-01-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Jan 26 01:32:34 UTC 2017

Modified Files:
src/sys/modules/compat_netbsd32: Makefile

Log Message:
Define MODULAR so we can have syscalls autoload after the module autoloads.
XXX: This is toxic, and currently caused LOCKDEBUG crashes.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/modules/compat_netbsd32/Makefile

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

Modified files:

Index: src/sys/modules/compat_netbsd32/Makefile
diff -u src/sys/modules/compat_netbsd32/Makefile:1.19 src/sys/modules/compat_netbsd32/Makefile:1.20
--- src/sys/modules/compat_netbsd32/Makefile:1.19	Fri Sep 16 22:45:24 2016
+++ src/sys/modules/compat_netbsd32/Makefile	Wed Jan 25 20:32:34 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.19 2016/09/17 02:45:24 christos Exp $
+#	$NetBSD: Makefile,v 1.20 2017/01/26 01:32:34 christos Exp $
 
 .include "../Makefile.inc"
 .include "../Makefile.assym"
@@ -21,7 +21,7 @@ CPPFLAGS+=	-DCOMPAT_43
 CPPFLAGS+=	-DCOMPAT_NETBSD32
 CPPFLAGS+=	-DEXEC_ELF32 -DEXEC_ELF64
 CPPFLAGS+=	-DCOREDUMP -DNTP -DVMSWAP
-CPPFLAGS+=	-DNTP -DKTRACE
+CPPFLAGS+=	-DNTP -DKTRACE -DMODULAR
 
 .PATH:	${S}/compat/netbsd32
 SRCS+=	netbsd32_compat_09.c netbsd32_compat_10.c



CVS commit: src/sys/modules/compat_netbsd32

2017-01-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Jan 26 01:32:34 UTC 2017

Modified Files:
src/sys/modules/compat_netbsd32: Makefile

Log Message:
Define MODULAR so we can have syscalls autoload after the module autoloads.
XXX: This is toxic, and currently caused LOCKDEBUG crashes.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/modules/compat_netbsd32/Makefile

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



CVS commit: src/sys/kern

2017-01-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Jan 26 03:54:01 UTC 2017

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

Log Message:
don't return early holding a lock!


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/kern/sys_ptrace_common.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/sys_ptrace_common.c
diff -u src/sys/kern/sys_ptrace_common.c:1.11 src/sys/kern/sys_ptrace_common.c:1.12
--- src/sys/kern/sys_ptrace_common.c:1.11	Wed Jan 25 12:55:47 2017
+++ src/sys/kern/sys_ptrace_common.c	Wed Jan 25 22:54:01 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: sys_ptrace_common.c,v 1.11 2017/01/25 17:55:47 christos Exp $	*/
+/*	$NetBSD: sys_ptrace_common.c,v 1.12 2017/01/26 03:54:01 christos Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -118,7 +118,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sys_ptrace_common.c,v 1.11 2017/01/25 17:55:47 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sys_ptrace_common.c,v 1.12 2017/01/26 03:54:01 christos Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ptrace.h"
@@ -626,8 +626,6 @@ do_ptrace(struct ptrace_methods *ptm, st
 uio.uio_resid = tmp - uio.uio_offset;
 			piod.piod_len = iov.iov_len = uio.uio_resid;
 			error = process_auxv_offset(t, );
-			if (error)
-return error;
 			break;
 		default:
 			error = EINVAL;



CVS commit: src/sys/kern

2017-01-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Jan 26 03:54:01 UTC 2017

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

Log Message:
don't return early holding a lock!


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/kern/sys_ptrace_common.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/pad

2017-01-25 Thread Nathanial Sloss
Module Name:src
Committed By:   nat
Date:   Thu Jan 26 04:10:27 UTC 2017

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

Log Message:
Don't hold the thread_lock between successive calls to sc_intr as it
breaks mixing.

This will help passing the atf test.  Changes to audio.c to ensue this
will be in a followup commit.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sys/dev/pad/pad.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/pad/pad.c
diff -u src/sys/dev/pad/pad.c:1.26 src/sys/dev/pad/pad.c:1.27
--- src/sys/dev/pad/pad.c:1.26	Sat Oct 15 07:08:06 2016
+++ src/sys/dev/pad/pad.c	Thu Jan 26 04:10:27 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: pad.c,v 1.26 2016/10/15 07:08:06 nat Exp $ */
+/* $NetBSD: pad.c,v 1.27 2017/01/26 04:10:27 nat Exp $ */
 
 /*-
  * Copyright (c) 2007 Jared D. McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pad.c,v 1.26 2016/10/15 07:08:06 nat Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pad.c,v 1.27 2017/01/26 04:10:27 nat Exp $");
 
 #include 
 #include 
@@ -362,11 +362,11 @@ pad_read(dev_t dev, struct uio *uio, int
 
 	err = 0;
 
-	mutex_enter(>sc_lock);
-	intr = sc->sc_intr;
-	intrarg = sc->sc_intrarg;
-
 	while (uio->uio_resid > 0 && !err) {
+		mutex_enter(>sc_lock);
+		intr = sc->sc_intr;
+		intrarg = sc->sc_intrarg;
+
 		getmicrotime();
 		nowusec = (now.tv_sec * 100) + now.tv_usec;
 		lastusec = (sc->sc_last.tv_sec * 100) +
@@ -394,7 +394,6 @@ pad_read(dev_t dev, struct uio *uio, int
 
 			mutex_exit(>sc_lock);
 			err = uiomove(pb.pb_ptr, pb.pb_len, uio);
-			mutex_enter(>sc_lock);
 			continue;
 		}
 
@@ -407,16 +406,17 @@ pad_read(dev_t dev, struct uio *uio, int
 			intr = sc->sc_intr;
 			intrarg = sc->sc_intrarg;
 			err = 0;
+			mutex_exit(>sc_lock);
 			continue;
 		}
 		err = cv_wait_sig(>sc_condvar, >sc_lock);
-		if (err != 0)
+		if (err != 0) {
+			mutex_exit(>sc_lock);
 			break;
+		}
 
-		intr = sc->sc_intr;
-		intrarg = sc->sc_intrarg;
+		mutex_exit(>sc_lock);
 	}
-	mutex_exit(>sc_lock);
 
 	return err;
 }



CVS commit: src/sys/dev/pad

2017-01-25 Thread Nathanial Sloss
Module Name:src
Committed By:   nat
Date:   Thu Jan 26 04:10:27 UTC 2017

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

Log Message:
Don't hold the thread_lock between successive calls to sc_intr as it
breaks mixing.

This will help passing the atf test.  Changes to audio.c to ensue this
will be in a followup commit.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sys/dev/pad/pad.c

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



CVS commit: src/doc

2017-01-25 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Jan 26 04:24:20 UTC 2017

Modified Files:
src/doc: TODO.modules

Log Message:
Add comment about possibly prompting for "release" portion of module
path at boot-loader time.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/doc/TODO.modules

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

Modified files:

Index: src/doc/TODO.modules
diff -u src/doc/TODO.modules:1.10 src/doc/TODO.modules:1.11
--- src/doc/TODO.modules:1.10	Sat Jan 14 21:18:40 2017
+++ src/doc/TODO.modules	Thu Jan 26 04:24:20 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: TODO.modules,v 1.10 2017/01/14 21:18:40 pgoyette Exp $ */
+/* $NetBSD: TODO.modules,v 1.11 2017/01/26 04:24:20 pgoyette Exp $ */
 
 Some notes on the limitations of our current (as of 7.99.35) module
 subsystem.  This list was triggered by an Email exchange between
@@ -130,3 +130,8 @@ christos and pgoyette.
 Whatever new mechanism we arrive at will probably require changes to
 installation procedures and bootstrap code, and will need to handle
 both the new and old mechanisms for compatability.
+
+One additional option mentioned is to be able to specify, at boot
+loader time, an alternate value for the os-release portion of the
+default module path,  i.e. /stand/$MACHINE/$ALT-RELEASE/modules/
+



CVS commit: src/doc

2017-01-25 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Thu Jan 26 01:12:13 UTC 2017

Modified Files:
src/doc: TODO.ptrace

Log Message:
Update TODO.ptrace

Added:
 - reiterate over FreeBSD tests and add missing ones if applicable

Sponsored by 


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/doc/TODO.ptrace

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

Modified files:

Index: src/doc/TODO.ptrace
diff -u src/doc/TODO.ptrace:1.12 src/doc/TODO.ptrace:1.13
--- src/doc/TODO.ptrace:1.12	Thu Jan 26 01:04:23 2017
+++ src/doc/TODO.ptrace	Thu Jan 26 01:12:13 2017
@@ -1,10 +1,11 @@
-$NetBSD: TODO.ptrace,v 1.12 2017/01/26 01:04:23 kamil Exp $
+$NetBSD: TODO.ptrace,v 1.13 2017/01/26 01:12:13 kamil Exp $
 
 Items we (currently) plan to finish in the ptrace(2) field:
 
  - verify ppid of core dump generated with PT_DUMPCORE
it must point to the real parent, not tracer
  - adapt OpenBSD regress test (regress/sys/ptrace/ptrace.c) for the ATF context
+ - reiterate over FreeBSD tests and add missing ones if applicable
  - add new ptrace(2) calls to lock (suspend) and unlock LWP within a process
  - add PT_DUMPCORE tests in the ATF framework
  - add ATF tests for PT_WRITE_I and PIOD_WRITE_I - test mprotect restrictions



CVS commit: src/doc

2017-01-25 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Thu Jan 26 01:12:13 UTC 2017

Modified Files:
src/doc: TODO.ptrace

Log Message:
Update TODO.ptrace

Added:
 - reiterate over FreeBSD tests and add missing ones if applicable

Sponsored by 


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/doc/TODO.ptrace

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



CVS commit: src/sys/kern

2017-01-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Jan 26 03:54:54 UTC 2017

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

Log Message:
always compile in the COMPAT32 code; it is tiny and if we don't it breaks
the modules.


To generate a diff of this commit:
cvs rdiff -u -r1.199 -r1.200 src/sys/kern/kern_proc.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_proc.c
diff -u src/sys/kern/kern_proc.c:1.199 src/sys/kern/kern_proc.c:1.200
--- src/sys/kern/kern_proc.c:1.199	Mon Nov 14 03:55:51 2016
+++ src/sys/kern/kern_proc.c	Wed Jan 25 22:54:54 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_proc.c,v 1.199 2016/11/14 08:55:51 kre Exp $	*/
+/*	$NetBSD: kern_proc.c,v 1.200 2017/01/26 03:54:54 christos Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_proc.c,v 1.199 2016/11/14 08:55:51 kre Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_proc.c,v 1.200 2017/01/26 03:54:54 christos Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_kstack.h"
@@ -104,6 +104,9 @@ __KERNEL_RCSID(0, "$NetBSD: kern_proc.c,
 #include 
 #include 
 
+#ifndef COMPAT_NETBSD32
+#define COMPAT_NETBSD32
+#endif
 #ifdef COMPAT_NETBSD32
 #include 
 #endif



CVS commit: src/sys/kern

2017-01-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Jan 26 03:54:54 UTC 2017

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

Log Message:
always compile in the COMPAT32 code; it is tiny and if we don't it breaks
the modules.


To generate a diff of this commit:
cvs rdiff -u -r1.199 -r1.200 src/sys/kern/kern_proc.c

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



CVS commit: src/doc

2017-01-25 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Jan 26 04:24:20 UTC 2017

Modified Files:
src/doc: TODO.modules

Log Message:
Add comment about possibly prompting for "release" portion of module
path at boot-loader time.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/doc/TODO.modules

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



CVS commit: src/sys/arch/x86/x86

2017-01-25 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Thu Jan 26 01:36:35 UTC 2017

Modified Files:
src/sys/arch/x86/x86: x86_machdep.c

Log Message:
Fix compile failure on i386 with DEBUG_MEMLOAD.


To generate a diff of this commit:
cvs rdiff -u -r1.82 -r1.83 src/sys/arch/x86/x86/x86_machdep.c

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



CVS commit: src/sys/arch/x86/x86

2017-01-25 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Thu Jan 26 01:36:35 UTC 2017

Modified Files:
src/sys/arch/x86/x86: x86_machdep.c

Log Message:
Fix compile failure on i386 with DEBUG_MEMLOAD.


To generate a diff of this commit:
cvs rdiff -u -r1.82 -r1.83 src/sys/arch/x86/x86/x86_machdep.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/arch/x86/x86/x86_machdep.c
diff -u src/sys/arch/x86/x86/x86_machdep.c:1.82 src/sys/arch/x86/x86/x86_machdep.c:1.83
--- src/sys/arch/x86/x86/x86_machdep.c:1.82	Tue Jan 24 11:09:14 2017
+++ src/sys/arch/x86/x86/x86_machdep.c	Thu Jan 26 01:36:35 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: x86_machdep.c,v 1.82 2017/01/24 11:09:14 nonaka Exp $	*/
+/*	$NetBSD: x86_machdep.c,v 1.83 2017/01/26 01:36:35 nonaka Exp $	*/
 
 /*-
  * Copyright (c) 2002, 2006, 2007 YAMAMOTO Takashi,
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: x86_machdep.c,v 1.82 2017/01/24 11:09:14 nonaka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: x86_machdep.c,v 1.83 2017/01/26 01:36:35 nonaka Exp $");
 
 #include "opt_modular.h"
 #include "opt_physmem.h"
@@ -666,8 +666,8 @@ x86_parse_clusters(struct btinfo_common 
 			", size=0x%016" PRIx64 ", attr=0x%016" PRIx64
 			", type=%d(%s)\n",
 			addr, addr + size - 1,
-			(uint64_t)md->md_virt,
-			(uint64_t)md->md_virt + size - 1,
+			(uint64_t)(u_long)md->md_virt,
+			(uint64_t)(u_long)md->md_virt + size - 1,
 			size, md->md_attr, md->md_type,
 			efi_getmemtype_str(md->md_type));
 #endif



CVS commit: src/sys/dev

2017-01-25 Thread Nathanial Sloss
Module Name:src
Committed By:   nat
Date:   Thu Jan 26 04:15:38 UTC 2017

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

Log Message:
Use sc_pr the mixing ring in full not just the first block.

Audio will pass the atf test again.


To generate a diff of this commit:
cvs rdiff -u -r1.296 -r1.297 src/sys/dev/audio.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/audio.c
diff -u src/sys/dev/audio.c:1.296 src/sys/dev/audio.c:1.297
--- src/sys/dev/audio.c:1.296	Mon Jan 23 00:21:34 2017
+++ src/sys/dev/audio.c	Thu Jan 26 04:15:38 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: audio.c,v 1.296 2017/01/23 00:21:34 nat Exp $	*/
+/*	$NetBSD: audio.c,v 1.297 2017/01/26 04:15:38 nat Exp $	*/
 
 /*-
  * Copyright (c) 2016 Nathanial Sloss 
@@ -148,7 +148,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.296 2017/01/23 00:21:34 nat Exp $");
+__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.297 2017/01/26 04:15:38 nat Exp $");
 
 #include "audio.h"
 #if NAUDIO > 0
@@ -1975,8 +1975,6 @@ audio_open(dev_t dev, struct audio_softc
 	}
 	if (error)
 		goto bad;
-	vc->sc_mrr.blksize = sc->sc_vchan[0]->sc_mrr.blksize;
-	vc->sc_mpr.blksize = sc->sc_vchan[0]->sc_mpr.blksize;
 
 #ifdef DIAGNOSTIC
 	/*
@@ -3252,11 +3250,16 @@ audiostartp(struct audio_softc *sc, int 
 		mix_func(sc, >sc_mpr, n);
 
 		if (sc->sc_trigger_started == false) {
+			sc->sc_pr.s.inp = audio_stream_add_inp(>sc_pr.s,
+			sc->sc_pr.s.inp, vc->sc_mpr.blksize);
 			mix_write(sc);
 			audio_mix(sc);
 			vc = sc->sc_vchan[0];
-			vc->sc_mpr.s.outp = audio_stream_add_outp(>sc_mpr.s,
-			vc->sc_mpr.s.outp, vc->sc_mpr.blksize);
+			if (sc->hw_if->trigger_output == NULL) {
+vc->sc_mpr.s.outp =
+audio_stream_add_outp(>sc_mpr.s,
+  vc->sc_mpr.s.outp, vc->sc_mpr.blksize);
+			}
 			mix_write(sc);
 
 			cv_broadcast(>sc_condvar);
@@ -3379,10 +3382,14 @@ audio_pint(void *v)
 	if (sc->sc_dying == true)
 		return;
 
+	if (audio_stream_get_used(>sc_pr.s) < vc->sc_mpr.blksize)
+		goto wake_mix;
+
 	vc->sc_mpr.s.outp = audio_stream_add_outp(>sc_mpr.s,
 	vc->sc_mpr.s.outp, vc->sc_mpr.blksize);
 	mix_write(sc);
 
+wake_mix:
 	cv_broadcast(>sc_condvar);
 }
 
@@ -3544,6 +3551,9 @@ audio_mix(void *v)
 	if (sc->sc_saturate == true && sc->sc_opens > 1)
 		saturate_func(sc);
 
+	cb = >sc_pr;
+	cb->s.inp = audio_stream_add_inp(>s, cb->s.inp, cb->blksize);
+
 	kpreempt_disable();
 	if (sc->schedule_wih == true)
 		softint_schedule(sc->sc_sih_wr);
@@ -,11 +4454,11 @@ audiosetinfo(struct audio_softc *sc, str
 		pausechange = true;
 	}
 
-	if (SPECIFIED(ai->blocksize) || reset) {
+	if (SPECIFIED(ai->blocksize)) {
 		int pblksize, rblksize;
 
 		/* Block size specified explicitly. */
-		if (ai->blocksize == 0 || reset) {
+		if (ai->blocksize == 0) {
 			if (!cleared) {
 audio_clear_intr_unlocked(sc, n);
 cleared = true;
@@ -5199,33 +5209,61 @@ mix_write(void *arg)
 	stream_filter_t *filter;
 	stream_fetcher_t *fetcher;
 	stream_fetcher_t null_fetcher;
-	int cc, cc1, blksize, error;
-	uint8_t *inp;
+	int cc, cc1, cc2, blksize, error, used;
+	uint8_t *inp, *orig, *tocopy;
 
 	vc = sc->sc_vchan[0];
 	blksize = vc->sc_mpr.blksize;
 	cc = blksize;
 	error = 0;
 
-	cc1 = cc;
-	if (vc->sc_pustream->inp + cc > vc->sc_pustream->end)
-		cc1 = vc->sc_pustream->end - vc->sc_pustream->inp;
-	memcpy(vc->sc_pustream->inp, sc->sc_pr.s.start, cc1);
-	if (cc1 < cc) {
-		memcpy(vc->sc_pustream->start, sc->sc_pr.s.start + cc1,
-		cc - cc1);
-	}
-	memset(sc->sc_pr.s.start, 0, cc);
+	tocopy = vc->sc_pustream->inp;
+	orig = __UNCONST(sc->sc_pr.s.outp);
+	used = blksize;
+	while (used > 0) {
+		cc = used;
+		cc1 = vc->sc_pustream->end - tocopy;
+		cc2 = sc->sc_pr.s.end - orig;
+		if (cc2 < cc1)
+			cc = cc2;
+		else
+			cc = cc1;
+		if (cc > used)
+			cc = used;
+		memcpy(tocopy, orig, cc);
+		orig += cc;
+		tocopy += cc;
+
+		if (tocopy >= vc->sc_pustream->end)
+			tocopy = vc->sc_pustream->start;
+		if (orig >= sc->sc_pr.s.end)
+			orig = sc->sc_pr.s.start;
+
+		used -= cc;
+ 	}
 
 	inp = vc->sc_pustream->inp;
-	vc->sc_pustream->inp = audio_stream_add_inp(vc->sc_pustream, inp, cc);
+	vc->sc_pustream->inp = audio_stream_add_inp(vc->sc_pustream,
+	inp, blksize);
+
+	cc = blksize;
+	cc2 = sc->sc_pr.s.end - sc->sc_pr.s.inp;
+	if (cc2 < cc) {
+		memset(sc->sc_pr.s.inp, 0, cc2);
+		cc -= cc2;
+		memset(sc->sc_pr.s.start, 0, cc);
+	} else
+		memset(sc->sc_pr.s.inp, 0, cc);
+
+	sc->sc_pr.s.outp = audio_stream_add_outp(>sc_pr.s,
+	sc->sc_pr.s.outp, blksize);
 
 	if (vc->sc_npfilters > 0) {
 		null_fetcher.fetch_to = null_fetcher_fetch_to;
 		filter = vc->sc_pfilters[0];
 		filter->set_fetcher(filter, _fetcher);
 		fetcher = >sc_pfilters[vc->sc_npfilters - 1]->base;
-		fetcher->fetch_to(sc, fetcher, >sc_mpr.s, cc);
+		fetcher->fetch_to(sc, fetcher, >sc_mpr.s, blksize);
  	}
 
 	if (sc->hw_if->trigger_output && sc->sc_trigger_started == 

CVS commit: src/sys/dev

2017-01-25 Thread Nathanial Sloss
Module Name:src
Committed By:   nat
Date:   Thu Jan 26 04:15:38 UTC 2017

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

Log Message:
Use sc_pr the mixing ring in full not just the first block.

Audio will pass the atf test again.


To generate a diff of this commit:
cvs rdiff -u -r1.296 -r1.297 src/sys/dev/audio.c

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



CVS commit: src/sys/arch/x86/x86

2017-01-25 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Thu Jan 26 01:35:51 UTC 2017

Modified Files:
src/sys/arch/x86/x86: efi.c

Log Message:
Fix compile failure on i386 with PAE.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/x86/x86/efi.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/arch/x86/x86/efi.c
diff -u src/sys/arch/x86/x86/efi.c:1.5 src/sys/arch/x86/x86/efi.c:1.6
--- src/sys/arch/x86/x86/efi.c:1.5	Tue Jan 24 11:09:14 2017
+++ src/sys/arch/x86/x86/efi.c	Thu Jan 26 01:35:51 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: efi.c,v 1.5 2017/01/24 11:09:14 nonaka Exp $	*/
+/*	$NetBSD: efi.c,v 1.6 2017/01/26 01:35:51 nonaka Exp $	*/
 /*-
  * Copyright (c) 2016 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -25,7 +25,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: efi.c,v 1.5 2017/01/24 11:09:14 nonaka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: efi.c,v 1.6 2017/01/26 01:35:51 nonaka Exp $");
 #include 
 #include 
 #include 
@@ -151,7 +151,7 @@ efi_getcfgtblhead(void)
 	if (efi_cfgtblhead_va != NULL)
 		return efi_cfgtblhead_va;
 
-	pa = (paddr_t) efi_systbl_va->st_cfgtbl;
+	pa = (paddr_t)(u_long) efi_systbl_va->st_cfgtbl;
 	aprint_debug("efi: cfgtbl at pa %" PRIxPADDR "\n", pa);
 	va = efi_getva(pa);
 	aprint_debug("efi: cfgtbl mapped at va %" PRIxVADDR "\n", va);
@@ -210,7 +210,7 @@ efi_getcfgtblpa(const struct uuid * uuid
 	count = efi_systbl_va->st_entries;
 	for (; count; count--, ct++)
 		if (efi_uuideq(>ct_uuid, uuid))
-			return (paddr_t) ct->ct_data;
+			return (paddr_t)(u_long) ct->ct_data;
 
 	return 0;	/* Not found. */
 }



CVS commit: src/sys/arch/x86/x86

2017-01-25 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Thu Jan 26 01:35:51 UTC 2017

Modified Files:
src/sys/arch/x86/x86: efi.c

Log Message:
Fix compile failure on i386 with PAE.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/x86/x86/efi.c

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



CVS commit: src/sys

2017-01-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Jan 26 04:11:56 UTC 2017

Modified Files:
src/sys/kern: kern_lock.c kern_mutex.c kern_rwlock.c subr_lockdebug.c
src/sys/sys: lockdebug.h

Log Message:
For LOCKDEBUG:
Always provide the location of the caller of the lock as __func__, __LINE__.


To generate a diff of this commit:
cvs rdiff -u -r1.157 -r1.158 src/sys/kern/kern_lock.c
cvs rdiff -u -r1.63 -r1.64 src/sys/kern/kern_mutex.c
cvs rdiff -u -r1.45 -r1.46 src/sys/kern/kern_rwlock.c
cvs rdiff -u -r1.54 -r1.55 src/sys/kern/subr_lockdebug.c
cvs rdiff -u -r1.14 -r1.15 src/sys/sys/lockdebug.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/kern/kern_lock.c
diff -u src/sys/kern/kern_lock.c:1.157 src/sys/kern/kern_lock.c:1.158
--- src/sys/kern/kern_lock.c:1.157	Sat Apr 11 11:24:25 2015
+++ src/sys/kern/kern_lock.c	Wed Jan 25 23:11:56 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_lock.c,v 1.157 2015/04/11 15:24:25 skrll Exp $	*/
+/*	$NetBSD: kern_lock.c,v 1.158 2017/01/26 04:11:56 christos Exp $	*/
 
 /*-
  * Copyright (c) 2002, 2006, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_lock.c,v 1.157 2015/04/11 15:24:25 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_lock.c,v 1.158 2017/01/26 04:11:56 christos Exp $");
 
 #include 
 #include 
@@ -101,7 +101,7 @@ assert_sleepable(void)
  */
 
 #define	_KERNEL_LOCK_ABORT(msg)		\
-LOCKDEBUG_ABORT(kernel_lock, &_kernel_lock_ops, __func__, msg)
+LOCKDEBUG_ABORT(__func__, __LINE__, kernel_lock, &_kernel_lock_ops, msg)
 
 #ifdef LOCKDEBUG
 #define	_KERNEL_LOCK_ASSERT(cond)	\

Index: src/sys/kern/kern_mutex.c
diff -u src/sys/kern/kern_mutex.c:1.63 src/sys/kern/kern_mutex.c:1.64
--- src/sys/kern/kern_mutex.c:1.63	Thu Jul  7 02:55:43 2016
+++ src/sys/kern/kern_mutex.c	Wed Jan 25 23:11:56 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_mutex.c,v 1.63 2016/07/07 06:55:43 msaitoh Exp $	*/
+/*	$NetBSD: kern_mutex.c,v 1.64 2017/01/26 04:11:56 christos Exp $	*/
 
 /*-
  * Copyright (c) 2002, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -40,7 +40,7 @@
 #define	__MUTEX_PRIVATE
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_mutex.c,v 1.63 2016/07/07 06:55:43 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_mutex.c,v 1.64 2017/01/26 04:11:56 christos Exp $");
 
 #include 
 #include 
@@ -82,7 +82,7 @@ __KERNEL_RCSID(0, "$NetBSD: kern_mutex.c
 LOCKDEBUG_UNLOCKED(MUTEX_DEBUG_P(mtx), (mtx),		\
 (uintptr_t)__builtin_return_address(0), 0)
 #define	MUTEX_ABORT(mtx, msg)	\
-mutex_abort(mtx, __func__, msg)
+mutex_abort(__func__, __LINE__, mtx, msg)
 
 #if defined(LOCKDEBUG)
 
@@ -261,8 +261,8 @@ __strong_alias(mutex_spin_enter,mutex_ve
 __strong_alias(mutex_spin_exit,mutex_vector_exit);
 #endif
 
-static void		mutex_abort(kmutex_t *, const char *, const char *);
-static void		mutex_dump(volatile void *);
+static void	mutex_abort(const char *, size_t, kmutex_t *, const char *);
+static void	mutex_dump(volatile void *);
 
 lockops_t mutex_spin_lockops = {
 	"Mutex",
@@ -307,11 +307,11 @@ mutex_dump(volatile void *cookie)
  *	we ask the compiler to not inline it.
  */
 void __noinline
-mutex_abort(kmutex_t *mtx, const char *func, const char *msg)
+mutex_abort(const char *func, size_t line, kmutex_t *mtx, const char *msg)
 {
 
-	LOCKDEBUG_ABORT(mtx, (MUTEX_SPIN_P(mtx) ?
-	_spin_lockops : _adaptive_lockops), func, msg);
+	LOCKDEBUG_ABORT(func, line, mtx, (MUTEX_SPIN_P(mtx) ?
+	_spin_lockops : _adaptive_lockops), msg);
 }
 
 /*

Index: src/sys/kern/kern_rwlock.c
diff -u src/sys/kern/kern_rwlock.c:1.45 src/sys/kern/kern_rwlock.c:1.46
--- src/sys/kern/kern_rwlock.c:1.45	Fri Nov 28 03:28:17 2014
+++ src/sys/kern/kern_rwlock.c	Wed Jan 25 23:11:56 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_rwlock.c,v 1.45 2014/11/28 08:28:17 uebayasi Exp $	*/
+/*	$NetBSD: kern_rwlock.c,v 1.46 2017/01/26 04:11:56 christos Exp $	*/
 
 /*-
  * Copyright (c) 2002, 2006, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_rwlock.c,v 1.45 2014/11/28 08:28:17 uebayasi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_rwlock.c,v 1.46 2017/01/26 04:11:56 christos Exp $");
 
 #define	__RWLOCK_PRIVATE
 
@@ -73,7 +73,7 @@ __KERNEL_RCSID(0, "$NetBSD: kern_rwlock.
 #define	RW_DASSERT(rw, cond)		\
 do {	\
 	if (!(cond))			\
-		rw_abort(rw, __func__, "assertion failed: " #cond);	\
+		rw_abort(__func__, __LINE__, rw, "assertion failed: " #cond);\
 } while (/* CONSTCOND */ 0);
 
 #else	/* LOCKDEBUG */
@@ -94,7 +94,7 @@ do {	\
 #define	RW_ASSERT(rw, cond)		\
 do {	\
 	if (!(cond))			\
-		rw_abort(rw, __func__, "assertion failed: " #cond);	\
+		rw_abort(__func__, __LINE__, rw, "assertion failed: " #cond);\
 } while (/* CONSTCOND */ 0)
 
 #else
@@ -111,7 +111,7 @@ do {	\
 #define	RW_INHERITDEBUG(n, o)		/* nothing 

CVS commit: src/sys

2017-01-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Jan 26 04:11:56 UTC 2017

Modified Files:
src/sys/kern: kern_lock.c kern_mutex.c kern_rwlock.c subr_lockdebug.c
src/sys/sys: lockdebug.h

Log Message:
For LOCKDEBUG:
Always provide the location of the caller of the lock as __func__, __LINE__.


To generate a diff of this commit:
cvs rdiff -u -r1.157 -r1.158 src/sys/kern/kern_lock.c
cvs rdiff -u -r1.63 -r1.64 src/sys/kern/kern_mutex.c
cvs rdiff -u -r1.45 -r1.46 src/sys/kern/kern_rwlock.c
cvs rdiff -u -r1.54 -r1.55 src/sys/kern/subr_lockdebug.c
cvs rdiff -u -r1.14 -r1.15 src/sys/sys/lockdebug.h

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



CVS commit: src/sys/kern

2017-01-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jan 25 17:55:47 UTC 2017

Modified Files:
src/sys/kern: core_elf32.c sys_ptrace_common.c

Log Message:
PR/51916: Kamil Rytarowski: Don't multiply es_arglen with ptrsz since it is
already in bytes and contains the maximum possible size:
ELF_AUX_ENTRIES * sizeof(auxv) + MAXPATHLEN + ALIGN


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/sys/kern/core_elf32.c
cvs rdiff -u -r1.10 -r1.11 src/sys/kern/sys_ptrace_common.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/kern

2017-01-25 Thread Jonathan A. Kollasch
On Wed, Jan 25, 2017 at 12:57:14PM -0500, Christos Zoulas wrote:
> Module Name:  src
> Committed By: christos
> Date: Wed Jan 25 17:57:14 UTC 2017
> 
> Modified Files:
>   src/sys/kern: kern_exec.c
> 
> Log Message:
> es_arglen is already in bytes...
> 
> 
> To generate a diff of this commit:
> cvs rdiff -u -r1.440 -r1.441 src/sys/kern/kern_exec.c

This causes a NetBSD/shark 6.1.2 init(8) to unsuccessfully execute on a
-current kernel:

root file system type: nfs
kern.module.path=/stand/shark/7.99.59/modules
panic: init died (signal 6, exit 14)
Stopped in pid 1.1 (init) atnetbsd:cpu_Debugger+0x4:mov pc, r14
db> bt
0xf6086bec: netbsd:vpanic+0xc
0xf6086c04: netbsd:snprintf
0xf6086c7c: netbsd:exit1+0x5b0
0xf6086d14: netbsd:execve_runproc+0xdd0
0xf6086e9c: netbsd:execve1+0x44
0xf6086eb4: netbsd:sys_execve+0x20
0xf6086fac: netbsd:start_init+0x1f4
db>


CVS commit: src/sys/compat/netbsd32

2017-01-25 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Wed Jan 25 21:45:39 UTC 2017

Modified Files:
src/sys/compat/netbsd32: netbsd32_exec.h

Log Message:
Catch netbsd32_copyargs() up to changes in r1.441 src/sys/kern/kern_exec.c


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/compat/netbsd32/netbsd32_exec.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/compat/netbsd32/netbsd32_exec.h
diff -u src/sys/compat/netbsd32/netbsd32_exec.h:1.32 src/sys/compat/netbsd32/netbsd32_exec.h:1.33
--- src/sys/compat/netbsd32/netbsd32_exec.h:1.32	Fri Oct 24 21:07:55 2014
+++ src/sys/compat/netbsd32/netbsd32_exec.h	Wed Jan 25 21:45:39 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_exec.h,v 1.32 2014/10/24 21:07:55 christos Exp $	*/
+/*	$NetBSD: netbsd32_exec.h,v 1.33 2017/01/25 21:45:39 jakllsch Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -94,13 +94,12 @@ netbsd32_copyargs(struct lwp *l, struct 
 	int envc = arginfo->ps_nenvstr;
 	int error;
 
-	NETBSD32PTR32(dp, cpp + 
+	NETBSD32PTR32(dp, (char *)(cpp +
 	1 +/* int argc */
 	argc +			/* char *argv[] */
 	1 +/* \0 */
 	envc +			/* char *env[] */
-	1 +/* \0 */
-	/* XXX auxinfo multiplied by ptr size? */
+	1) +			/* \0 */
 	pack->ep_esch->es_arglen);	/* auxinfo */
 	sp = argp;