CVS commit: src/sys/arch/evbarm/conf

2019-09-06 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Fri Sep  6 21:09:11 UTC 2019

Modified Files:
src/sys/arch/evbarm/conf: std.generic64

Log Message:
Add __HAVE_GENERIC_CPU_INITCLOCKS


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/evbarm/conf/std.generic64

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



CVS commit: src/sys/arch/evbarm/conf

2019-09-06 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Fri Sep  6 21:09:11 UTC 2019

Modified Files:
src/sys/arch/evbarm/conf: std.generic64

Log Message:
Add __HAVE_GENERIC_CPU_INITCLOCKS


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/evbarm/conf/std.generic64

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/evbarm/conf/std.generic64
diff -u src/sys/arch/evbarm/conf/std.generic64:1.10 src/sys/arch/evbarm/conf/std.generic64:1.11
--- src/sys/arch/evbarm/conf/std.generic64:1.10	Wed Jul  3 19:45:14 2019
+++ src/sys/arch/evbarm/conf/std.generic64	Fri Sep  6 21:09:11 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: std.generic64,v 1.10 2019/07/03 19:45:14 jmcneill Exp $
+#	$NetBSD: std.generic64,v 1.11 2019/09/06 21:09:11 jmcneill Exp $
 #
 #	generic NetBSD/evbarm64 with FDT support
 
@@ -20,6 +20,7 @@ options 	MODULAR
 options 	MODULAR_DEFAULT_AUTOLOAD
 options 	PCI_NETBSD_CONFIGURE
 options 	_ARM32_NEED_BUS_DMA_BOUNCE
+options 	__HAVE_GENERIC_CPU_INITCLOCKS
 options 	__HAVE_PCI_CONF_HOOK
 options 	__HAVE_PCI_MSI_MSIX
 



CVS commit: src/sys/arch/aarch64/aarch64

2019-09-06 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Fri Sep  6 20:52:57 UTC 2019

Modified Files:
src/sys/arch/aarch64/aarch64: aarch64_machdep.c

Log Message:
Do not assume that DRAM is linear when creating KSEG mappings. Instead,
create L2 blocks to cover all ranges specified in the memory map.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/aarch64/aarch64/aarch64_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/aarch64/aarch64/aarch64_machdep.c
diff -u src/sys/arch/aarch64/aarch64/aarch64_machdep.c:1.28 src/sys/arch/aarch64/aarch64/aarch64_machdep.c:1.29
--- src/sys/arch/aarch64/aarch64/aarch64_machdep.c:1.28	Sun Jan 27 02:08:36 2019
+++ src/sys/arch/aarch64/aarch64/aarch64_machdep.c	Fri Sep  6 20:52:57 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: aarch64_machdep.c,v 1.28 2019/01/27 02:08:36 pgoyette Exp $ */
+/* $NetBSD: aarch64_machdep.c,v 1.29 2019/09/06 20:52:57 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(1, "$NetBSD: aarch64_machdep.c,v 1.28 2019/01/27 02:08:36 pgoyette Exp $");
+__KERNEL_RCSID(1, "$NetBSD: aarch64_machdep.c,v 1.29 2019/09/06 20:52:57 jmcneill Exp $");
 
 #include "opt_arm_debug.h"
 #include "opt_ddb.h"
@@ -112,12 +112,14 @@ int dumpsize = 0;   /* also 
 longdumplo = 0;
 
 void
-cpu_kernel_vm_init(uint64_t memory_start, uint64_t memory_size)
+cpu_kernel_vm_init(uint64_t memory_start __unused, uint64_t memory_size __unused)
 {
 	extern char __kernel_text[];
 	extern char _end[];
 	extern char __data_start[];
 	extern char __rodata_start[];
+	uint64_t start, end;
+	u_int blk;
 
 	vaddr_t kernstart = trunc_page((vaddr_t)__kernel_text);
 	vaddr_t kernend = round_page((vaddr_t)_end);
@@ -127,17 +129,23 @@ cpu_kernel_vm_init(uint64_t memory_start
 	vaddr_t rodata_start = (vaddr_t)__rodata_start;
 
 	/* add KSEG mappings of whole memory */
-	VPRINTF("Creating KSEG tables for 0x%016lx-0x%016lx\n",
-	memory_start, memory_start + memory_size);
 	const pt_entry_t ksegattr =
 	LX_BLKPAG_ATTR_NORMAL_WB |
 	LX_BLKPAG_AP_RW |
 	LX_BLKPAG_PXN |
 	LX_BLKPAG_UXN;
-	pmapboot_enter(AARCH64_PA_TO_KVA(memory_start), memory_start,
-	memory_size, L1_SIZE, ksegattr, PMAPBOOT_ENTER_NOOVERWRITE,
-	bootpage_alloc, NULL);
-	aarch64_tlbi_all();
+	for (blk = 0; blk < bootconfig.dramblocks; blk++) {
+		start = L2_TRUNC_BLOCK(bootconfig.dram[blk].address);
+		end = L2_ROUND_BLOCK(bootconfig.dram[blk].address +
+		(uint64_t)bootconfig.dram[blk].pages * PAGE_SIZE);
+
+		VPRINTF("Creating KSEG tables for 0x%016lx-0x%016lx (L2)\n",
+		start, end);
+		pmapboot_enter(AARCH64_PA_TO_KVA(start), start, 
+		end - start, L2_SIZE, ksegattr, PMAPBOOT_ENTER_NOOVERWRITE,
+		bootpage_alloc, NULL);
+		aarch64_tlbi_all();
+	}
 
 	/*
 	 * at this point, whole kernel image is mapped as "rwx".



CVS commit: src/sys/arch/aarch64/aarch64

2019-09-06 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Fri Sep  6 20:52:57 UTC 2019

Modified Files:
src/sys/arch/aarch64/aarch64: aarch64_machdep.c

Log Message:
Do not assume that DRAM is linear when creating KSEG mappings. Instead,
create L2 blocks to cover all ranges specified in the memory map.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/aarch64/aarch64/aarch64_machdep.c

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



CVS commit: [netbsd-9] src/doc

2019-09-06 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Sep  6 19:59:01 UTC 2019

Modified Files:
src/doc [netbsd-9]: CHANGES-9.0

Log Message:
Tickets #181 - #188


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.45 -r1.1.2.46 src/doc/CHANGES-9.0

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

Modified files:

Index: src/doc/CHANGES-9.0
diff -u src/doc/CHANGES-9.0:1.1.2.45 src/doc/CHANGES-9.0:1.1.2.46
--- src/doc/CHANGES-9.0:1.1.2.45	Thu Sep  5 09:12:12 2019
+++ src/doc/CHANGES-9.0	Fri Sep  6 19:59:00 2019
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-9.0,v 1.1.2.45 2019/09/05 09:12:12 martin Exp $
+# $NetBSD: CHANGES-9.0,v 1.1.2.46 2019/09/06 19:59:00 martin Exp $
 
 A complete list of changes from the initial NetBSD 9.0 branch on 2019-07-30
 until the 9.0 release:
@@ -2853,3 +2853,55 @@ sys/dev/pci/ixgbe/ixv.c1.129,1.130
 	Set IFM_1000_BX10 correctly.
 	[msaitoh, ticket #180]
 
+sys/kern/subr_ipi.c1.5
+
+	Add required memory barrier before IPI ack.
+	[ryo, ticket #181]
+
+external/gpl3/binutils/dist/bfd/ChangeLog	1.12
+external/gpl3/binutils/dist/bfd/elf32-arm.c	1.15
+external/gpl3/binutils/dist/include/ChangeLog	1.2
+external/gpl3/binutils/dist/include/elf/arm.h	1.2
+
+	Cherry pick upstream fix for PR port-arm/54159.
+	[rjs, ticket #182]
+
+sys/netinet6/in6.h1.96
+
+	Revert regression introduced in in6.h r. 1.95 which changed
+	layout and alignment of struct in6_addr.
+	THIS IS AN ABI BREAK - please make sure to update kernel and modules
+	in sync!
+	[kamil, ticket #183]
+
+external/bsd/compiler_rt/lib/clang/lib/netbsd/common.mk 1.3
+
+	Set NOLIBCSANITIZER for LLVM sanitizer runtimes.
+	[kamil, ticket #184]
+
+sys/arch/arm/sunxi/sunxi_rtc.c			1.5
+
+	Catch up with RTC-related DTS changes for the H3, H5, and A64 SoCs.
+	[thorpej, ticket #185]
+
+lib/libc/nameser/ns_name.c			1.12
+
+	Fix buffer overrun.
+	[maya, ticket #186]
+
+sys/arch/arm/sunxi/sunxi_mmc.c			1.37
+
+	Fix mmc module clock for some modes.
+	[bouyer, ticket #187]
+
+external/gpl3/gdb/dist/gdb/ChangeLog		1.2
+external/gpl3/gdb/dist/gdb/event-top.c		1.2
+external/gpl3/gdb/dist/gdb/inflow.c		1.2
+external/gpl3/gdb/dist/gdb/inflow.h		1.2
+external/gpl3/gdb/dist/gdb/ser-unix.c		1.2
+external/gpl3/gdb/dist/gdb/top.c		1.2
+
+	PR toolchain/54508: cherry-pick upstream GDB patch to fix SIGTTOU
+	handling.
+	[kamil, ticket #188]
+



CVS commit: [netbsd-9] src/doc

2019-09-06 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Sep  6 19:59:01 UTC 2019

Modified Files:
src/doc [netbsd-9]: CHANGES-9.0

Log Message:
Tickets #181 - #188


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.45 -r1.1.2.46 src/doc/CHANGES-9.0

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



CVS commit: [netbsd-9] src/external/gpl3/gdb/dist/gdb

2019-09-06 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Sep  6 19:57:32 UTC 2019

Modified Files:
src/external/gpl3/gdb/dist/gdb [netbsd-9]: ChangeLog event-top.c
inflow.c inflow.h ser-unix.c top.c

Log Message:
Pull up following revision(s) (requested by kamil in ticket #188):

external/gpl3/gdb/dist/gdb/ser-unix.c: revision 1.2
external/gpl3/gdb/dist/gdb/inflow.c: revision 1.2
external/gpl3/gdb/dist/gdb/ChangeLog: revision 1.2
external/gpl3/gdb/dist/gdb/inflow.h: revision 1.2
external/gpl3/gdb/dist/gdb/event-top.c: revision 1.2
external/gpl3/gdb/dist/gdb/top.c: revision 1.2

Cherry-pick upstream GDB patch to fix SIGTTOU handling

Fixes toolchain/54508 by Tobias Ulmer
commit 766f883622ef008230250aa5aecef9fb9b29f233

Author: Alan Hayward 
Date:   Tue May 28 10:07:54 2019 +0100

Suppress SIGTTOU when handling errors
Calls to error () can cause SIGTTOU to send gdb to the background.

For example, on an Arm build:
  (gdb) b main
  Breakpoint 1 at 0x10774: file 
/build/gdb/testsuite/../../../src/binutils-gdb/gdb/testsuite/gdb.base/watchpoint.c,
 line 174.
  (gdb) r
  Starting program: 
/build/gdb/testsuite/outputs/gdb.base/watchpoint/watchpoint
  [1]+  Stopped ../gdb 
./outputs/gdb.base/watchpoint/watchpoint
  localhost$ fg
  ../gdb ./outputs/gdb.base/watchpoint/watchpoint
  Cannot parse expression `.L1199 4@r4'.
  warning: Probes-based dynamic linker interface failed.
  Reverting to original interface.

The SIGTTOU is raised whilst inside a syscall during the call to tcdrain.

Fix is to use scoped_ignore_sigttou to ensure SIGTTOU is blocked.

In addition fix include comments - job_control is not included via 
terminal.h

gdb/ChangeLog:
* event-top.c: Remove include comment.
* inflow.c (class scoped_ignore_sigttou): Move from here...
* inflow.h (class scoped_ignore_sigttou): ...to here.
* ser-unix.c (hardwire_drain_output): Block SIGTTOU during drain.
* top.c:  Remove include comment.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.8 -r1.1.1.8.2.1 src/external/gpl3/gdb/dist/gdb/ChangeLog \
src/external/gpl3/gdb/dist/gdb/event-top.c \
src/external/gpl3/gdb/dist/gdb/ser-unix.c \
src/external/gpl3/gdb/dist/gdb/top.c
cvs rdiff -u -r1.1.1.7 -r1.1.1.7.2.1 src/external/gpl3/gdb/dist/gdb/inflow.c \
src/external/gpl3/gdb/dist/gdb/inflow.h

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



CVS commit: [netbsd-9] src/external/gpl3/gdb/dist/gdb

2019-09-06 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Sep  6 19:57:32 UTC 2019

Modified Files:
src/external/gpl3/gdb/dist/gdb [netbsd-9]: ChangeLog event-top.c
inflow.c inflow.h ser-unix.c top.c

Log Message:
Pull up following revision(s) (requested by kamil in ticket #188):

external/gpl3/gdb/dist/gdb/ser-unix.c: revision 1.2
external/gpl3/gdb/dist/gdb/inflow.c: revision 1.2
external/gpl3/gdb/dist/gdb/ChangeLog: revision 1.2
external/gpl3/gdb/dist/gdb/inflow.h: revision 1.2
external/gpl3/gdb/dist/gdb/event-top.c: revision 1.2
external/gpl3/gdb/dist/gdb/top.c: revision 1.2

Cherry-pick upstream GDB patch to fix SIGTTOU handling

Fixes toolchain/54508 by Tobias Ulmer
commit 766f883622ef008230250aa5aecef9fb9b29f233

Author: Alan Hayward 
Date:   Tue May 28 10:07:54 2019 +0100

Suppress SIGTTOU when handling errors
Calls to error () can cause SIGTTOU to send gdb to the background.

For example, on an Arm build:
  (gdb) b main
  Breakpoint 1 at 0x10774: file 
/build/gdb/testsuite/../../../src/binutils-gdb/gdb/testsuite/gdb.base/watchpoint.c,
 line 174.
  (gdb) r
  Starting program: 
/build/gdb/testsuite/outputs/gdb.base/watchpoint/watchpoint
  [1]+  Stopped ../gdb 
./outputs/gdb.base/watchpoint/watchpoint
  localhost$ fg
  ../gdb ./outputs/gdb.base/watchpoint/watchpoint
  Cannot parse expression `.L1199 4@r4'.
  warning: Probes-based dynamic linker interface failed.
  Reverting to original interface.

The SIGTTOU is raised whilst inside a syscall during the call to tcdrain.

Fix is to use scoped_ignore_sigttou to ensure SIGTTOU is blocked.

In addition fix include comments - job_control is not included via 
terminal.h

gdb/ChangeLog:
* event-top.c: Remove include comment.
* inflow.c (class scoped_ignore_sigttou): Move from here...
* inflow.h (class scoped_ignore_sigttou): ...to here.
* ser-unix.c (hardwire_drain_output): Block SIGTTOU during drain.
* top.c:  Remove include comment.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.8 -r1.1.1.8.2.1 src/external/gpl3/gdb/dist/gdb/ChangeLog \
src/external/gpl3/gdb/dist/gdb/event-top.c \
src/external/gpl3/gdb/dist/gdb/ser-unix.c \
src/external/gpl3/gdb/dist/gdb/top.c
cvs rdiff -u -r1.1.1.7 -r1.1.1.7.2.1 src/external/gpl3/gdb/dist/gdb/inflow.c \
src/external/gpl3/gdb/dist/gdb/inflow.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/gpl3/gdb/dist/gdb/ChangeLog
diff -u src/external/gpl3/gdb/dist/gdb/ChangeLog:1.1.1.8 src/external/gpl3/gdb/dist/gdb/ChangeLog:1.1.1.8.2.1
--- src/external/gpl3/gdb/dist/gdb/ChangeLog:1.1.1.8	Sun May 26 20:59:19 2019
+++ src/external/gpl3/gdb/dist/gdb/ChangeLog	Fri Sep  6 19:57:32 2019
@@ -1,3 +1,11 @@
+2019-05-28  Alan Hayward  
+
+	* event-top.c: Remove include comment.
+	* inflow.c (class scoped_ignore_sigttou): Move from here...
+	* inflow.h (class scoped_ignore_sigttou): ...to here.
+	* ser-unix.c (hardwire_drain_output): Block SIGTTOU during drain.
+	* top.c:  Remove include comment.
+
 2019-05-11  Joel Brobecker  
 
 	* version.in: Set GDB version number to 8.3.
@@ -2691,4 +2699,3 @@ fill-column: 74
 version-control: never
 coding: utf-8
 End:
-
Index: src/external/gpl3/gdb/dist/gdb/event-top.c
diff -u src/external/gpl3/gdb/dist/gdb/event-top.c:1.1.1.8 src/external/gpl3/gdb/dist/gdb/event-top.c:1.1.1.8.2.1
--- src/external/gpl3/gdb/dist/gdb/event-top.c:1.1.1.8	Sun May 26 20:59:21 2019
+++ src/external/gpl3/gdb/dist/gdb/event-top.c	Fri Sep  6 19:57:32 2019
@@ -24,7 +24,7 @@
 #include "inferior.h"
 #include "infrun.h"
 #include "target.h"
-#include "terminal.h"		/* for job_control */
+#include "terminal.h"
 #include "event-loop.h"
 #include "event-top.h"
 #include "interps.h"
Index: src/external/gpl3/gdb/dist/gdb/ser-unix.c
diff -u src/external/gpl3/gdb/dist/gdb/ser-unix.c:1.1.1.8 src/external/gpl3/gdb/dist/gdb/ser-unix.c:1.1.1.8.2.1
--- src/external/gpl3/gdb/dist/gdb/ser-unix.c:1.1.1.8	Sun May 26 20:59:24 2019
+++ src/external/gpl3/gdb/dist/gdb/ser-unix.c	Fri Sep  6 19:57:32 2019
@@ -32,6 +32,7 @@
 #include "gdbcmd.h"
 #include "common/filestuff.h"
 #include 
+#include "inflow.h"
 
 struct hardwire_ttystate
   {
@@ -164,6 +165,9 @@ hardwire_print_tty_state (struct serial 
 static int
 hardwire_drain_output (struct serial *scb)
 {
+  /* Ignore SIGTTOU which may occur during the drain.  */
+  scoped_ignore_sigttou ignore_sigttou;
+
   return tcdrain (scb->fd);
 }
 
Index: src/external/gpl3/gdb/dist/gdb/top.c
diff -u src/external/gpl3/gdb/dist/gdb/top.c:1.1.1.8 src/external/gpl3/gdb/dist/gdb/top.c:1.1.1.8.2.1
--- src/external/gpl3/gdb/dist/gdb/top.c:1.1.1.8	Sun May 26 20:59:38 2019
+++ src/external/gpl3/gdb/dist/gdb/top.c	Fri Sep  6 19:57:32 2019
@@ -34,7 +34,7 @@
 #include "expression.h"
 #incl

CVS commit: [netbsd-9] src/sys/arch/arm/sunxi

2019-09-06 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Sep  6 19:54:23 UTC 2019

Modified Files:
src/sys/arch/arm/sunxi [netbsd-9]: sunxi_mmc.c

Log Message:
Pull up following revision(s) (requested by bouyer in ticket #187):

sys/arch/arm/sunxi/sunxi_mmc.c: revision 1.37

The mmc module clock needs to be doubled only for 8bits DDR mode on old
timing hardware.

This makes the lime2-eemc works in 4bits DDR52 mode.


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.33.2.1 src/sys/arch/arm/sunxi/sunxi_mmc.c

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



CVS commit: [netbsd-9] src/sys/arch/arm/sunxi

2019-09-06 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Sep  6 19:54:23 UTC 2019

Modified Files:
src/sys/arch/arm/sunxi [netbsd-9]: sunxi_mmc.c

Log Message:
Pull up following revision(s) (requested by bouyer in ticket #187):

sys/arch/arm/sunxi/sunxi_mmc.c: revision 1.37

The mmc module clock needs to be doubled only for 8bits DDR mode on old
timing hardware.

This makes the lime2-eemc works in 4bits DDR52 mode.


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.33.2.1 src/sys/arch/arm/sunxi/sunxi_mmc.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/arm/sunxi/sunxi_mmc.c
diff -u src/sys/arch/arm/sunxi/sunxi_mmc.c:1.33 src/sys/arch/arm/sunxi/sunxi_mmc.c:1.33.2.1
--- src/sys/arch/arm/sunxi/sunxi_mmc.c:1.33	Mon May 27 23:27:01 2019
+++ src/sys/arch/arm/sunxi/sunxi_mmc.c	Fri Sep  6 19:54:23 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: sunxi_mmc.c,v 1.33 2019/05/27 23:27:01 jmcneill Exp $ */
+/* $NetBSD: sunxi_mmc.c,v 1.33.2.1 2019/09/06 19:54:23 martin Exp $ */
 
 /*-
  * Copyright (c) 2014-2017 Jared McNeill 
@@ -29,7 +29,7 @@
 #include "opt_sunximmc.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sunxi_mmc.c,v 1.33 2019/05/27 23:27:01 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sunxi_mmc.c,v 1.33.2.1 2019/09/06 19:54:23 martin Exp $");
 
 #include 
 #include 
@@ -480,7 +480,7 @@ free:
 }
 
 static int
-sunxi_mmc_set_clock(struct sunxi_mmc_softc *sc, u_int freq, bool ddr)
+sunxi_mmc_set_clock(struct sunxi_mmc_softc *sc, u_int freq, bool ddr, bool dbl)
 {
 	const struct sunxi_mmc_delay *delays;
 	int error, timing = SUNXI_MMC_TIMING_400K;
@@ -506,7 +506,7 @@ sunxi_mmc_set_clock(struct sunxi_mmc_sof
 			return EINVAL;
 	}
 
-	error = clk_set_rate(sc->sc_clk_mmc, (freq * 1000) << ddr);
+	error = clk_set_rate(sc->sc_clk_mmc, (freq * 1000) << dbl);
 	if (error != 0)
 		return error;
 
@@ -554,7 +554,7 @@ sunxi_mmc_attach_i(device_t self)
 
 	sunxi_mmc_host_reset(sc);
 	sunxi_mmc_bus_width(sc, 1);
-	sunxi_mmc_set_clock(sc, 400, false);
+	sunxi_mmc_set_clock(sc, 400, false, false);
 
 	if (sc->sc_pwrseq)
 		fdtbus_mmc_pwrseq_post_power_on(sc->sc_pwrseq);
@@ -815,6 +815,7 @@ sunxi_mmc_bus_clock(sdmmc_chipset_handle
 	struct sunxi_mmc_softc *sc = sch;
 	uint32_t clkcr, gctrl, ntsr;
 	const u_int flags = sc->sc_config->flags;
+	bool dbl = 0;
 
 	clkcr = MMC_READ(sc, SUNXI_MMC_CLKCR);
 	if (clkcr & SUNXI_MMC_CLKCR_CARDCLKON) {
@@ -832,9 +833,15 @@ sunxi_mmc_bus_clock(sdmmc_chipset_handle
 	}
 
 	if (freq) {
+		/* For 8bits ddr in old timing modes, and all ddr in new
+		 * timing modes, the module clock has to be 2x the card clock.
+		 */
+		if (ddr && ((flags & SUNXI_MMC_FLAG_NEW_TIMINGS) ||
+		sc->sc_mmc_width == 8))
+			dbl = 1;
 
 		clkcr &= ~SUNXI_MMC_CLKCR_DIV;
-		clkcr |= __SHIFTIN(ddr, SUNXI_MMC_CLKCR_DIV);
+		clkcr |= __SHIFTIN(dbl, SUNXI_MMC_CLKCR_DIV);
 		MMC_WRITE(sc, SUNXI_MMC_CLKCR, clkcr);
 
 		if (flags & SUNXI_MMC_FLAG_NEW_TIMINGS) {
@@ -856,7 +863,7 @@ sunxi_mmc_bus_clock(sdmmc_chipset_handle
 			gctrl &= ~SUNXI_MMC_GCTRL_DDR_MODE;
 		MMC_WRITE(sc, SUNXI_MMC_GCTRL, gctrl);
 
-		if (sunxi_mmc_set_clock(sc, freq, ddr) != 0)
+		if (sunxi_mmc_set_clock(sc, freq, ddr, dbl) != 0)
 			return 1;
 
 		clkcr |= SUNXI_MMC_CLKCR_CARDCLKON;



CVS commit: [netbsd-9] src/lib/libc/nameser

2019-09-06 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Sep  6 19:51:54 UTC 2019

Modified Files:
src/lib/libc/nameser [netbsd-9]: ns_name.c

Log Message:
Pull up following revision(s) (requested by maya in ticket #186):

lib/libc/nameser/ns_name.c: revision 1.12

Since we advance cp after the bounds check, we need to test for bounds
again before using it. Discovered via fuzzing, reported by enh at google, via:

https://android-review.googlesource.com/c/platform/bionic/+/1093130


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.11.28.1 src/lib/libc/nameser/ns_name.c

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/nameser/ns_name.c
diff -u src/lib/libc/nameser/ns_name.c:1.11 src/lib/libc/nameser/ns_name.c:1.11.28.1
--- src/lib/libc/nameser/ns_name.c:1.11	Fri Mar  7 01:07:01 2014
+++ src/lib/libc/nameser/ns_name.c	Fri Sep  6 19:51:54 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: ns_name.c,v 1.11 2014/03/07 01:07:01 christos Exp $	*/
+/*	$NetBSD: ns_name.c,v 1.11.28.1 2019/09/06 19:51:54 martin Exp $	*/
 
 /*
  * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
@@ -22,7 +22,7 @@
 #ifdef notdef
 static const char rcsid[] = "Id: ns_name.c,v 1.11 2009/01/23 19:59:16 each Exp";
 #else
-__RCSID("$NetBSD: ns_name.c,v 1.11 2014/03/07 01:07:01 christos Exp $");
+__RCSID("$NetBSD: ns_name.c,v 1.11.28.1 2019/09/06 19:51:54 martin Exp $");
 #endif
 #endif
 
@@ -696,7 +696,7 @@ ns_name_skip(const u_char **ptrptr, cons
 {
 	const u_char *cp;
 	u_int n;
-	int l;
+	int l = 0;
 
 	cp = *ptrptr;
 	while (cp < eom && (n = *cp++) != 0) {
@@ -706,7 +706,7 @@ ns_name_skip(const u_char **ptrptr, cons
 			cp += n;
 			continue;
 		case NS_TYPE_ELT: /*%< EDNS0 extended label */
-			if ((l = labellen(cp - 1)) < 0) {
+			if (cp < eom && (l = labellen(cp - 1)) < 0) {
 errno = EMSGSIZE; /*%< XXX */
 return (-1);
 			}



CVS commit: [netbsd-9] src/lib/libc/nameser

2019-09-06 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Sep  6 19:51:54 UTC 2019

Modified Files:
src/lib/libc/nameser [netbsd-9]: ns_name.c

Log Message:
Pull up following revision(s) (requested by maya in ticket #186):

lib/libc/nameser/ns_name.c: revision 1.12

Since we advance cp after the bounds check, we need to test for bounds
again before using it. Discovered via fuzzing, reported by enh at google, via:

https://android-review.googlesource.com/c/platform/bionic/+/1093130


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.11.28.1 src/lib/libc/nameser/ns_name.c

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



CVS commit: [netbsd-9] src/sys/arch/arm/sunxi

2019-09-06 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Sep  6 19:48:09 UTC 2019

Modified Files:
src/sys/arch/arm/sunxi [netbsd-9]: sunxi_rtc.c

Log Message:
Pull up following revision(s) (requested by thorpej in ticket #185):

sys/arch/arm/sunxi/sunxi_rtc.c: revision 1.5

Catch up with RTC-related DTS changes for the H3, H5, and A64 SoCs.
mujo AT SDF.ORG, and verified on Pinebook by Jun Ebihara.
XXX pullup-9


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.4.4.1 src/sys/arch/arm/sunxi/sunxi_rtc.c

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



CVS commit: [netbsd-9] src/sys/arch/arm/sunxi

2019-09-06 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Sep  6 19:48:09 UTC 2019

Modified Files:
src/sys/arch/arm/sunxi [netbsd-9]: sunxi_rtc.c

Log Message:
Pull up following revision(s) (requested by thorpej in ticket #185):

sys/arch/arm/sunxi/sunxi_rtc.c: revision 1.5

Catch up with RTC-related DTS changes for the H3, H5, and A64 SoCs.
mujo AT SDF.ORG, and verified on Pinebook by Jun Ebihara.
XXX pullup-9


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.4.4.1 src/sys/arch/arm/sunxi/sunxi_rtc.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/arm/sunxi/sunxi_rtc.c
diff -u src/sys/arch/arm/sunxi/sunxi_rtc.c:1.4 src/sys/arch/arm/sunxi/sunxi_rtc.c:1.4.4.1
--- src/sys/arch/arm/sunxi/sunxi_rtc.c:1.4	Mon Jul 16 23:11:47 2018
+++ src/sys/arch/arm/sunxi/sunxi_rtc.c	Fri Sep  6 19:48:09 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: sunxi_rtc.c,v 1.4 2018/07/16 23:11:47 christos Exp $ */
+/* $NetBSD: sunxi_rtc.c,v 1.4.4.1 2019/09/06 19:48:09 martin Exp $ */
 
 /*-
  * Copyright (c) 2014-2017 Jared McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sunxi_rtc.c,v 1.4 2018/07/16 23:11:47 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sunxi_rtc.c,v 1.4.4.1 2019/09/06 19:48:09 martin Exp $");
 
 #include 
 #include 
@@ -130,6 +130,8 @@ static const struct of_compat_data compa
 	{ "allwinner,sun4i-a10-rtc",		(uintptr_t)&sun4i_rtc_config },
 	{ "allwinner,sun6i-a31-rtc",		(uintptr_t)&sun6i_rtc_config },
 	{ "allwinner,sun7i-a20-rtc",		(uintptr_t)&sun7i_rtc_config },
+	{ "allwinner,sun8i-h3-rtc",		(uintptr_t)&sun6i_rtc_config },
+	{ "allwinner,sun50i-h5-rtc",		(uintptr_t)&sun6i_rtc_config },
 	{ NULL }
 };
 



CVS commit: [netbsd-9] src/external/bsd/compiler_rt/lib/clang/lib/netbsd

2019-09-06 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Sep  6 19:45:53 UTC 2019

Modified Files:
src/external/bsd/compiler_rt/lib/clang/lib/netbsd [netbsd-9]: common.mk

Log Message:
Pull up following revision(s) (requested by kamil in ticket #184):

external/bsd/compiler_rt/lib/clang/lib/netbsd/common.mk: revision 1.3

Set NOLIBCSANITIZER for LLVM sanitizer runtimes
Do not sanitize sanitizer runtimes.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.3 -r1.1.2.4 \
src/external/bsd/compiler_rt/lib/clang/lib/netbsd/common.mk

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



CVS commit: [netbsd-9] src/external/bsd/compiler_rt/lib/clang/lib/netbsd

2019-09-06 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Sep  6 19:45:53 UTC 2019

Modified Files:
src/external/bsd/compiler_rt/lib/clang/lib/netbsd [netbsd-9]: common.mk

Log Message:
Pull up following revision(s) (requested by kamil in ticket #184):

external/bsd/compiler_rt/lib/clang/lib/netbsd/common.mk: revision 1.3

Set NOLIBCSANITIZER for LLVM sanitizer runtimes
Do not sanitize sanitizer runtimes.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.3 -r1.1.2.4 \
src/external/bsd/compiler_rt/lib/clang/lib/netbsd/common.mk

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/compiler_rt/lib/clang/lib/netbsd/common.mk
diff -u src/external/bsd/compiler_rt/lib/clang/lib/netbsd/common.mk:1.1.2.3 src/external/bsd/compiler_rt/lib/clang/lib/netbsd/common.mk:1.1.2.4
--- src/external/bsd/compiler_rt/lib/clang/lib/netbsd/common.mk:1.1.2.3	Mon Aug 19 15:43:54 2019
+++ src/external/bsd/compiler_rt/lib/clang/lib/netbsd/common.mk	Fri Sep  6 19:45:53 2019
@@ -1,2 +1,3 @@
 CLANG_VER=	7.0.0
 NODEBUG=	# defined
+NOLIBCSANITIZER=# defined



CVS commit: [netbsd-9] src/sys/netinet6

2019-09-06 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Sep  6 19:43:00 UTC 2019

Modified Files:
src/sys/netinet6 [netbsd-9]: in6.h

Log Message:
Pull up following revision(s) (requested by kamil in ticket #183):

sys/netinet6/in6.h: revision 1.96

Revert regression introduced in in6.h r. 1.95

revision 1.95
date: 2019-05-28 05:56:46 +0200;  author: kamil;  state: Exp;  lines: +2 -2;  
commitid: YrUzDYl5zfcjiVoB;
Decorate struct in6_addr with the __packed attribute
This avoids undefined behavior when accessing misaligned pointers.
Detected by kUBSan.
Patch by Akul Pillai.


This change caused regression in at least qemu and addresses potential binary 
ABI breakage.

Fixes PR/54523 by 


To generate a diff of this commit:
cvs rdiff -u -r1.95 -r1.95.2.1 src/sys/netinet6/in6.h

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

Modified files:

Index: src/sys/netinet6/in6.h
diff -u src/sys/netinet6/in6.h:1.95 src/sys/netinet6/in6.h:1.95.2.1
--- src/sys/netinet6/in6.h:1.95	Tue May 28 03:56:46 2019
+++ src/sys/netinet6/in6.h	Fri Sep  6 19:43:00 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: in6.h,v 1.95 2019/05/28 03:56:46 kamil Exp $	*/
+/*	$NetBSD: in6.h,v 1.95.2.1 2019/09/06 19:43:00 martin Exp $	*/
 /*	$KAME: in6.h,v 1.83 2001/03/29 02:55:07 jinmei Exp $	*/
 
 /*
@@ -126,7 +126,7 @@ struct in6_addr {
 		__uint16_t  __u6_addr16[8];
 		uint32_t  __u6_addr32[4];
 	} __u6_addr;			/* 128-bit IP6 address */
-} __packed;
+};
 
 #define s6_addr   __u6_addr.__u6_addr8
 #ifdef _KERNEL	/* XXX nonstandard */



CVS commit: [netbsd-9] src/sys/netinet6

2019-09-06 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Sep  6 19:43:00 UTC 2019

Modified Files:
src/sys/netinet6 [netbsd-9]: in6.h

Log Message:
Pull up following revision(s) (requested by kamil in ticket #183):

sys/netinet6/in6.h: revision 1.96

Revert regression introduced in in6.h r. 1.95

revision 1.95
date: 2019-05-28 05:56:46 +0200;  author: kamil;  state: Exp;  lines: +2 -2;  
commitid: YrUzDYl5zfcjiVoB;
Decorate struct in6_addr with the __packed attribute
This avoids undefined behavior when accessing misaligned pointers.
Detected by kUBSan.
Patch by Akul Pillai.


This change caused regression in at least qemu and addresses potential binary 
ABI breakage.

Fixes PR/54523 by 


To generate a diff of this commit:
cvs rdiff -u -r1.95 -r1.95.2.1 src/sys/netinet6/in6.h

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



CVS commit: [netbsd-9] src/external/gpl3/binutils/dist

2019-09-06 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Sep  6 19:40:31 UTC 2019

Modified Files:
src/external/gpl3/binutils/dist/bfd [netbsd-9]: ChangeLog elf32-arm.c
src/external/gpl3/binutils/dist/include [netbsd-9]: ChangeLog
src/external/gpl3/binutils/dist/include/elf [netbsd-9]: arm.h

Log Message:
Pull up following revision(s) (requested by rjs in ticket #182):

external/gpl3/binutils/dist/include/ChangeLog: revision 1.2
external/gpl3/binutils/dist/bfd/elf32-arm.c: revision 1.15
external/gpl3/binutils/dist/include/elf/arm.h: revision 1.2
external/gpl3/binutils/dist/bfd/ChangeLog: revision 1.12

Fix to PR port-arm/54159.

From:
http://mail-index.netbsd.org/tech-toolchain/2019/08/26/msg003596.html

Pullup -9


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.11.2.1 src/external/gpl3/binutils/dist/bfd/ChangeLog
cvs rdiff -u -r1.14 -r1.14.2.1 \
src/external/gpl3/binutils/dist/bfd/elf32-arm.c
cvs rdiff -u -r1.1.1.8 -r1.1.1.8.2.1 \
src/external/gpl3/binutils/dist/include/ChangeLog
cvs rdiff -u -r1.1.1.7 -r1.1.1.7.2.1 \
src/external/gpl3/binutils/dist/include/elf/arm.h

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



CVS commit: [netbsd-9] src/external/gpl3/binutils/dist

2019-09-06 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Sep  6 19:40:31 UTC 2019

Modified Files:
src/external/gpl3/binutils/dist/bfd [netbsd-9]: ChangeLog elf32-arm.c
src/external/gpl3/binutils/dist/include [netbsd-9]: ChangeLog
src/external/gpl3/binutils/dist/include/elf [netbsd-9]: arm.h

Log Message:
Pull up following revision(s) (requested by rjs in ticket #182):

external/gpl3/binutils/dist/include/ChangeLog: revision 1.2
external/gpl3/binutils/dist/bfd/elf32-arm.c: revision 1.15
external/gpl3/binutils/dist/include/elf/arm.h: revision 1.2
external/gpl3/binutils/dist/bfd/ChangeLog: revision 1.12

Fix to PR port-arm/54159.

From:
http://mail-index.netbsd.org/tech-toolchain/2019/08/26/msg003596.html

Pullup -9


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.11.2.1 src/external/gpl3/binutils/dist/bfd/ChangeLog
cvs rdiff -u -r1.14 -r1.14.2.1 \
src/external/gpl3/binutils/dist/bfd/elf32-arm.c
cvs rdiff -u -r1.1.1.8 -r1.1.1.8.2.1 \
src/external/gpl3/binutils/dist/include/ChangeLog
cvs rdiff -u -r1.1.1.7 -r1.1.1.7.2.1 \
src/external/gpl3/binutils/dist/include/elf/arm.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/gpl3/binutils/dist/bfd/ChangeLog
diff -u src/external/gpl3/binutils/dist/bfd/ChangeLog:1.11 src/external/gpl3/binutils/dist/bfd/ChangeLog:1.11.2.1
--- src/external/gpl3/binutils/dist/bfd/ChangeLog:1.11	Wed Nov  7 01:13:51 2018
+++ src/external/gpl3/binutils/dist/bfd/ChangeLog	Fri Sep  6 19:40:31 2019
@@ -1,3 +1,11 @@
+2019-08-22  Alan Modra  
+
+	* elf32-arm.c (cmse_scan): Don't use ARM_GET_SYM_CMSE_SPCL,
+	instead recognize CMSE_PREFIX in symbol name.
+	(elf32_arm_gc_mark_extra_sections): Likewise.
+	(elf32_arm_filter_cmse_symbols): Don't test ARM_GET_SYM_CMSE_SPCL.
+	(elf32_arm_swap_symbol_in): Don't invoke ARM_SET_SYM_CMSE_SPCL.
+
 2018-07-18  Nick Clifton  
 
 	2.31.1 Release point.

Index: src/external/gpl3/binutils/dist/bfd/elf32-arm.c
diff -u src/external/gpl3/binutils/dist/bfd/elf32-arm.c:1.14 src/external/gpl3/binutils/dist/bfd/elf32-arm.c:1.14.2.1
--- src/external/gpl3/binutils/dist/bfd/elf32-arm.c:1.14	Sun May  5 21:49:53 2019
+++ src/external/gpl3/binutils/dist/bfd/elf32-arm.c	Fri Sep  6 19:40:31 2019
@@ -5930,12 +5930,12 @@ cmse_scan (bfd *input_bfd, struct elf32_
   if (i < ext_start)
 	{
 	  cmse_sym = &local_syms[i];
-	  /* Not a special symbol.  */
-	  if (!ARM_GET_SYM_CMSE_SPCL (cmse_sym->st_target_internal))
-	continue;
 	  sym_name = bfd_elf_string_from_elf_section (input_bfd,
 		  symtab_hdr->sh_link,
 		  cmse_sym->st_name);
+	  if (!sym_name || !CONST_STRNEQ (sym_name, CMSE_PREFIX))
+	continue;
+
 	  /* Special symbol with local binding.  */
 	  cmse_invalid = TRUE;
 	}
@@ -5943,9 +5943,7 @@ cmse_scan (bfd *input_bfd, struct elf32_
 	{
 	  cmse_hash = elf32_arm_hash_entry (sym_hashes[i - ext_start]);
 	  sym_name = (char *) cmse_hash->root.root.root.string;
-
-	  /* Not a special symbol.  */
-	  if (!ARM_GET_SYM_CMSE_SPCL (cmse_hash->root.target_internal))
+	  if (!CONST_STRNEQ (sym_name, CMSE_PREFIX))
 	continue;
 
 	  /* Special symbol has incorrect binding or type.  */
@@ -15713,7 +15711,8 @@ elf32_arm_gc_mark_extra_sections (struct
 
 		  /* Assume it is a special symbol.  If not, cmse_scan will
 		 warn about it and user can do something about it.  */
-		  if (ARM_GET_SYM_CMSE_SPCL (cmse_hash->root.target_internal))
+		  if (CONST_STRNEQ (cmse_hash->root.root.root.string,
+CMSE_PREFIX))
 		{
 		  cmse_sec = cmse_hash->root.root.u.def.section;
 		  if (!cmse_sec->gc_mark
@@ -18303,9 +18302,6 @@ elf32_arm_filter_cmse_symbols (bfd *abfd
 	  || cmse_hash->root.type != STT_FUNC)
 	continue;
 
-  if (!ARM_GET_SYM_CMSE_SPCL (cmse_hash->root.target_internal))
-	continue;
-
   syms[dst_count++] = sym;
 }
   free (cmse_name);
@@ -19628,9 +19624,6 @@ elf32_arm_swap_symbol_in (bfd * abfd,
 			  const void *pshn,
 			  Elf_Internal_Sym *dst)
 {
-  Elf_Internal_Shdr *symtab_hdr;
-  const char *name = NULL;
-
   if (!bfd_elf32_swap_symbol_in (abfd, psrc, pshn, dst))
 return FALSE;
   dst->st_target_internal = 0;
@@ -19659,13 +19652,6 @@ elf32_arm_swap_symbol_in (bfd * abfd,
   else
 ARM_SET_SYM_BRANCH_TYPE (dst->st_target_internal, ST_BRANCH_UNKNOWN);
 
-  /* Mark CMSE special symbols.  */
-  symtab_hdr = & elf_symtab_hdr (abfd);
-  if (symtab_hdr->sh_size && dst->st_size != 0)
-name = bfd_elf_sym_name (abfd, symtab_hdr, dst, NULL);
-  if (name && CONST_STRNEQ (name, CMSE_PREFIX))
-ARM_SET_SYM_CMSE_SPCL (dst->st_target_internal);
-
   return TRUE;
 }
 

Index: src/external/gpl3/binutils/dist/include/ChangeLog
diff -u src/external/gpl3/binutils/dist/include/ChangeLog:1.1.1.8 src/external/gpl3/binutils/dist/include/ChangeLog:1.1.1.8.2.1
--- src/external/gpl3/binutils/dist/include/ChangeLog:1.1.1.8	Tue Nov  6 21:18:33 

CVS commit: [netbsd-9] src/sys/kern

2019-09-06 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Sep  6 19:37:51 UTC 2019

Modified Files:
src/sys/kern [netbsd-9]: subr_ipi.c

Log Message:
Pull up following revision(s) (requested by ryo in ticket #181):

sys/kern/subr_ipi.c: revision 1.5

Requires memory barrier before IPI ack.
Problem was seen on the aarch64 cpus.
Fixes PR/54009


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.4.4.1 src/sys/kern/subr_ipi.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/subr_ipi.c
diff -u src/sys/kern/subr_ipi.c:1.4 src/sys/kern/subr_ipi.c:1.4.4.1
--- src/sys/kern/subr_ipi.c:1.4	Sat Apr  6 02:59:05 2019
+++ src/sys/kern/subr_ipi.c	Fri Sep  6 19:37:51 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: subr_ipi.c,v 1.4 2019/04/06 02:59:05 thorpej Exp $	*/
+/*	$NetBSD: subr_ipi.c,v 1.4.4.1 2019/09/06 19:37:51 martin Exp $	*/
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: subr_ipi.c,v 1.4 2019/04/06 02:59:05 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_ipi.c,v 1.4.4.1 2019/09/06 19:37:51 martin Exp $");
 
 #include 
 #include 
@@ -331,6 +331,9 @@ ipi_msg_cpu_handler(void *arg __unused)
 		msg->func(msg->arg);
 
 		/* Ack the request. */
+#ifndef __HAVE_ATOMIC_AS_MEMBAR
+		membar_producer();
+#endif
 		atomic_dec_uint(&msg->_pending);
 	}
 }



CVS commit: [netbsd-9] src/sys/kern

2019-09-06 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Sep  6 19:37:51 UTC 2019

Modified Files:
src/sys/kern [netbsd-9]: subr_ipi.c

Log Message:
Pull up following revision(s) (requested by ryo in ticket #181):

sys/kern/subr_ipi.c: revision 1.5

Requires memory barrier before IPI ack.
Problem was seen on the aarch64 cpus.
Fixes PR/54009


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

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



CVS commit: src/usr.bin/fstat

2019-09-06 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Fri Sep  6 19:05:05 UTC 2019

Modified Files:
src/usr.bin/fstat: fstat.1

Log Message:
Use \(em.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/usr.bin/fstat/fstat.1

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



CVS commit: src/usr.bin/fstat

2019-09-06 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Fri Sep  6 19:05:05 UTC 2019

Modified Files:
src/usr.bin/fstat: fstat.1

Log Message:
Use \(em.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/usr.bin/fstat/fstat.1

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

Modified files:

Index: src/usr.bin/fstat/fstat.1
diff -u src/usr.bin/fstat/fstat.1:1.35 src/usr.bin/fstat/fstat.1:1.36
--- src/usr.bin/fstat/fstat.1:1.35	Fri Sep  6 17:08:22 2019
+++ src/usr.bin/fstat/fstat.1	Fri Sep  6 19:05:04 2019
@@ -1,4 +1,4 @@
-.\"	$NetBSD: fstat.1,v 1.35 2019/09/06 17:08:22 christos Exp $
+.\"	$NetBSD: fstat.1,v 1.36 2019/09/06 19:05:04 wiz Exp $
 .\"
 .\" Copyright (c) 1987, 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -144,7 +144,7 @@ the file is not an inode, but rather a s
 .Tn FIFO ,
 or there is an error.
 In this case the remainder of the line doesn't
-correspond to the remaining headers -- the format of the line
+correspond to the remaining headers \(em the format of the line
 is described later under
 .Sx SOCKETS .
 .It Li MOUNT



CVS commit: src/usr.bin/fstat

2019-09-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Sep  6 17:08:22 UTC 2019

Modified Files:
src/usr.bin/fstat: fstat.1 fstat.c fstat.h misc.c

Log Message:
Add -O to print offsets; align columns properly.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/usr.bin/fstat/fstat.1
cvs rdiff -u -r1.112 -r1.113 src/usr.bin/fstat/fstat.c
cvs rdiff -u -r1.9 -r1.10 src/usr.bin/fstat/fstat.h
cvs rdiff -u -r1.21 -r1.22 src/usr.bin/fstat/misc.c

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

Modified files:

Index: src/usr.bin/fstat/fstat.1
diff -u src/usr.bin/fstat/fstat.1:1.34 src/usr.bin/fstat/fstat.1:1.35
--- src/usr.bin/fstat/fstat.1:1.34	Mon Jul  3 17:34:57 2017
+++ src/usr.bin/fstat/fstat.1	Fri Sep  6 13:08:22 2019
@@ -1,4 +1,4 @@
-.\"	$NetBSD: fstat.1,v 1.34 2017/07/03 21:34:57 wiz Exp $
+.\"	$NetBSD: fstat.1,v 1.35 2019/09/06 17:08:22 christos Exp $
 .\"
 .\" Copyright (c) 1987, 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\"
 .\" from: @(#)fstat.1	8.3 (Berkeley) 2/25/94
 .\"
-.Dd December 15, 2013
+.Dd September 6, 2019
 .Dt FSTAT 1
 .Os
 .Sh NAME
@@ -37,7 +37,7 @@
 .Nd display status of open files
 .Sh SYNOPSIS
 .Nm
-.Op Fl Afnv
+.Op Fl AfnOv
 .Op Fl M Ar core
 .Op Fl N Ar system
 .Op Fl p Ar pid
@@ -54,7 +54,7 @@ If no options are specified,
 reports on all open files in the system.
 .Pp
 Options:
-.Bl -tag -width Ds
+.Bl -tag -width XX
 .It Fl A
 Add an output column with the address of the kernel object (vnode or file),
 that can be matched with
@@ -72,12 +72,15 @@ resides, type
 Please see the
 .Sx BUGS
 section for issues with this option.
-.It Fl M
-Extract values associated with the name list from the specified core
+.It Fl M Ar core
+Extract values associated with the name list from the specified
+.Ar core
 instead of the default
 .Pa /dev/kmem .
-.It Fl N
-Extract the name list from the specified system instead of the default
+.It Fl N Ar system
+Extract the name list from the specified
+.Ar system
+instead of the default
 .Pa /netbsd .
 .It Fl n
 Numerical format.
@@ -88,10 +91,14 @@ device number that the special device re
 in
 .Pa /dev ;
 and print the mode of the file in octal instead of symbolic form.
-.It Fl p
-Report all files open by the specified process.
-.It Fl u
-Report all files open by the specified user.
+.It Fl O
+Report file offsets instead of sizes.
+.It Fl p Ar process
+Report all files open by the specified
+.Ar process .
+.It Fl u Ar user
+Report all files open by the specified
+.Ar user .
 .It Fl v
 Verbose mode.
 Print error messages upon failures to locate particular
@@ -161,9 +168,11 @@ using a symbolic format (see
 .Xr strmode 3 ) ;
 otherwise, the mode is printed
 as an octal number.
-.It Li SZ\&|DV
+.It Li SZ\&|DV or OFFS
 If the file is not a character or block special file, prints the size of
-the file in bytes.
+the file in bytes (or the offset if the
+.Fl O
+is specified).
 Otherwise, if the
 .Fl n
 flag is not specified, prints

Index: src/usr.bin/fstat/fstat.c
diff -u src/usr.bin/fstat/fstat.c:1.112 src/usr.bin/fstat/fstat.c:1.113
--- src/usr.bin/fstat/fstat.c:1.112	Sat Feb  2 22:19:29 2019
+++ src/usr.bin/fstat/fstat.c	Fri Sep  6 13:08:22 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: fstat.c,v 1.112 2019/02/03 03:19:29 mrg Exp $	*/
+/*	$NetBSD: fstat.c,v 1.113 2019/09/06 17:08:22 christos Exp $	*/
 
 /*-
  * Copyright (c) 1988, 1993
@@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 19
 #if 0
 static char sccsid[] = "@(#)fstat.c	8.3 (Berkeley) 5/2/95";
 #else
-__RCSID("$NetBSD: fstat.c,v 1.112 2019/02/03 03:19:29 mrg Exp $");
+__RCSID("$NetBSD: fstat.c,v 1.113 2019/09/06 17:08:22 christos Exp $");
 #endif
 #endif /* not lint */
 
@@ -134,6 +134,7 @@ static int 	fsflg,	/* show files on same
 static int 	checkfile; /* true if restricting to particular files or filesystems */
 static int	nflg;	/* (numerical) display f.s. and rdev as dev_t */
 static int	Aflg;	/* prefix with address of file structure */
+static int	Oflg;	/* print offset instead of size */
 int	vflg;	/* display errors in locating kernel data objects etc... */
 
 static fdfile_t **ofiles; /* buffer of pointers to file structures */
@@ -171,12 +172,12 @@ static const char *inet6_addrstr(char *,
 uint16_t, bool);
 #endif
 static const char *at_addrstr(char *, size_t, const struct sockaddr_at *);
-static void	socktrans(struct socket *, int);
+static void	socktrans(struct file *, struct socket *, int);
 static void	misctrans(struct file *, int);
 static int	ufs_filestat(struct vnode *, struct filestat *);
 static void	usage(void) __dead;
 static const char   *vfilestat(struct vnode *, struct filestat *);
-static void	vtrans(struct vnode *, int, int, long);
+static void	vtrans(struct file *, struct vnode *, int, int, long);
 static void	ftrans(fdfile_t *, int);
 static void	ptrans(struct file *, struct pipe *, int);
 static void	kdriver_in

CVS commit: src/usr.bin/fstat

2019-09-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Sep  6 17:08:22 UTC 2019

Modified Files:
src/usr.bin/fstat: fstat.1 fstat.c fstat.h misc.c

Log Message:
Add -O to print offsets; align columns properly.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/usr.bin/fstat/fstat.1
cvs rdiff -u -r1.112 -r1.113 src/usr.bin/fstat/fstat.c
cvs rdiff -u -r1.9 -r1.10 src/usr.bin/fstat/fstat.h
cvs rdiff -u -r1.21 -r1.22 src/usr.bin/fstat/misc.c

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



CVS commit: src/bin/stty

2019-09-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Sep  6 16:28:53 UTC 2019

Modified Files:
src/bin/stty: stty.c

Log Message:
Don't fail when the line discipline ioctl fails (since it secondary
like the other tty ioctls that we only warn about). Do the main
ioctl (tcgetattr) first, since that provides a better error message
(ENOTTY instead of EINVAL).


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/bin/stty/stty.c

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



CVS commit: src/bin/stty

2019-09-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Sep  6 16:28:53 UTC 2019

Modified Files:
src/bin/stty: stty.c

Log Message:
Don't fail when the line discipline ioctl fails (since it secondary
like the other tty ioctls that we only warn about). Do the main
ioctl (tcgetattr) first, since that provides a better error message
(ENOTTY instead of EINVAL).


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/bin/stty/stty.c

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

Modified files:

Index: src/bin/stty/stty.c
diff -u src/bin/stty/stty.c:1.23 src/bin/stty/stty.c:1.24
--- src/bin/stty/stty.c:1.23	Thu Sep 12 15:47:23 2013
+++ src/bin/stty/stty.c	Fri Sep  6 12:28:53 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: stty.c,v 1.23 2013/09/12 19:47:23 christos Exp $ */
+/* $NetBSD: stty.c,v 1.24 2019/09/06 16:28:53 christos Exp $ */
 
 /*-
  * Copyright (c) 1989, 1991, 1993, 1994
@@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1989, 19
 #if 0
 static char sccsid[] = "@(#)stty.c	8.3 (Berkeley) 4/2/94";
 #else
-__RCSID("$NetBSD: stty.c,v 1.23 2013/09/12 19:47:23 christos Exp $");
+__RCSID("$NetBSD: stty.c,v 1.24 2019/09/06 16:28:53 christos Exp $");
 #endif
 #endif /* not lint */
 
@@ -97,10 +97,10 @@ main(int argc, char *argv[])
 args:	argc -= optind;
 	argv += optind;
 
-	if (ioctl(i.fd, TIOCGLINED, i.ldisc) < 0)
-		err(1, "TIOCGLINED");
 	if (tcgetattr(i.fd, &i.t) < 0)
 		err(1, "tcgetattr");
+	if (ioctl(i.fd, TIOCGLINED, i.ldisc) < 0)
+		warn("TIOCGLINED");
 	if (ioctl(i.fd, TIOCGWINSZ, &i.win) < 0)
 		warn("TIOCGWINSZ");
 	if (ioctl(i.fd, TIOCGQSIZE, &i.queue) < 0)



CVS commit: src/external/gpl3/gdb/dist/gdb

2019-09-06 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Fri Sep  6 14:37:00 UTC 2019

Modified Files:
src/external/gpl3/gdb/dist/gdb: ChangeLog event-top.c inflow.c inflow.h
ser-unix.c top.c

Log Message:
Cherry-pick upstream GDB patch to fix SIGTTOU handling

Fixes toolchain/54508 by Tobias Ulmer

commit 766f883622ef008230250aa5aecef9fb9b29f233
Author: Alan Hayward 
Date:   Tue May 28 10:07:54 2019 +0100

Suppress SIGTTOU when handling errors

Calls to error () can cause SIGTTOU to send gdb to the background.

For example, on an Arm build:
  (gdb) b main
  Breakpoint 1 at 0x10774: file 
/build/gdb/testsuite/../../../src/binutils-gdb/gdb/testsuite/gdb.base/watchpoint.c,
 line 174.
  (gdb) r
  Starting program: 
/build/gdb/testsuite/outputs/gdb.base/watchpoint/watchpoint

  [1]+  Stopped ../gdb 
./outputs/gdb.base/watchpoint/watchpoint
  localhost$ fg
  ../gdb ./outputs/gdb.base/watchpoint/watchpoint
  Cannot parse expression `.L1199 4@r4'.
  warning: Probes-based dynamic linker interface failed.
  Reverting to original interface.

The SIGTTOU is raised whilst inside a syscall during the call to tcdrain.
Fix is to use scoped_ignore_sigttou to ensure SIGTTOU is blocked.

In addition fix include comments - job_control is not included via 
terminal.h

gdb/ChangeLog:

* event-top.c: Remove include comment.
* inflow.c (class scoped_ignore_sigttou): Move from here...
* inflow.h (class scoped_ignore_sigttou): ...to here.
* ser-unix.c (hardwire_drain_output): Block SIGTTOU during drain.
* top.c:  Remove include comment.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.8 -r1.2 src/external/gpl3/gdb/dist/gdb/ChangeLog \
src/external/gpl3/gdb/dist/gdb/event-top.c \
src/external/gpl3/gdb/dist/gdb/ser-unix.c \
src/external/gpl3/gdb/dist/gdb/top.c
cvs rdiff -u -r1.1.1.7 -r1.2 src/external/gpl3/gdb/dist/gdb/inflow.c \
src/external/gpl3/gdb/dist/gdb/inflow.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/gpl3/gdb/dist/gdb/ChangeLog
diff -u src/external/gpl3/gdb/dist/gdb/ChangeLog:1.1.1.8 src/external/gpl3/gdb/dist/gdb/ChangeLog:1.2
--- src/external/gpl3/gdb/dist/gdb/ChangeLog:1.1.1.8	Sun May 26 20:59:19 2019
+++ src/external/gpl3/gdb/dist/gdb/ChangeLog	Fri Sep  6 14:37:00 2019
@@ -1,3 +1,11 @@
+2019-05-28  Alan Hayward  
+
+	* event-top.c: Remove include comment.
+	* inflow.c (class scoped_ignore_sigttou): Move from here...
+	* inflow.h (class scoped_ignore_sigttou): ...to here.
+	* ser-unix.c (hardwire_drain_output): Block SIGTTOU during drain.
+	* top.c:  Remove include comment.
+
 2019-05-11  Joel Brobecker  
 
 	* version.in: Set GDB version number to 8.3.
@@ -2691,4 +2699,3 @@ fill-column: 74
 version-control: never
 coding: utf-8
 End:
-
Index: src/external/gpl3/gdb/dist/gdb/event-top.c
diff -u src/external/gpl3/gdb/dist/gdb/event-top.c:1.1.1.8 src/external/gpl3/gdb/dist/gdb/event-top.c:1.2
--- src/external/gpl3/gdb/dist/gdb/event-top.c:1.1.1.8	Sun May 26 20:59:21 2019
+++ src/external/gpl3/gdb/dist/gdb/event-top.c	Fri Sep  6 14:37:00 2019
@@ -24,7 +24,7 @@
 #include "inferior.h"
 #include "infrun.h"
 #include "target.h"
-#include "terminal.h"		/* for job_control */
+#include "terminal.h"
 #include "event-loop.h"
 #include "event-top.h"
 #include "interps.h"
Index: src/external/gpl3/gdb/dist/gdb/ser-unix.c
diff -u src/external/gpl3/gdb/dist/gdb/ser-unix.c:1.1.1.8 src/external/gpl3/gdb/dist/gdb/ser-unix.c:1.2
--- src/external/gpl3/gdb/dist/gdb/ser-unix.c:1.1.1.8	Sun May 26 20:59:24 2019
+++ src/external/gpl3/gdb/dist/gdb/ser-unix.c	Fri Sep  6 14:37:00 2019
@@ -32,6 +32,7 @@
 #include "gdbcmd.h"
 #include "common/filestuff.h"
 #include 
+#include "inflow.h"
 
 struct hardwire_ttystate
   {
@@ -164,6 +165,9 @@ hardwire_print_tty_state (struct serial 
 static int
 hardwire_drain_output (struct serial *scb)
 {
+  /* Ignore SIGTTOU which may occur during the drain.  */
+  scoped_ignore_sigttou ignore_sigttou;
+
   return tcdrain (scb->fd);
 }
 
Index: src/external/gpl3/gdb/dist/gdb/top.c
diff -u src/external/gpl3/gdb/dist/gdb/top.c:1.1.1.8 src/external/gpl3/gdb/dist/gdb/top.c:1.2
--- src/external/gpl3/gdb/dist/gdb/top.c:1.1.1.8	Sun May 26 20:59:38 2019
+++ src/external/gpl3/gdb/dist/gdb/top.c	Fri Sep  6 14:37:00 2019
@@ -34,7 +34,7 @@
 #include "expression.h"
 #include "value.h"
 #include "language.h"
-#include "terminal.h"		/* For job_control.  */
+#include "terminal.h"
 #include "common/job-control.h"
 #include "annotate.h"
 #include "completer.h"

Index: src/external/gpl3/gdb/dist/gdb/inflow.c
diff -u src/external/gpl3/gdb/dist/gdb/inflow.c:1.1.1.7 src/external/gpl3/gdb/dist/gdb/inflow.c:1.2
--- src/external/gpl3/gdb/dist/gdb/inflow.c:1.1.1.7	Sun May 26 20:59:25 2019
+++ src/external/gpl3/gdb/dist/gdb/inflow.c	Fri Sep  6 14:37:00 2

CVS commit: src/external/gpl3/gdb/dist/gdb

2019-09-06 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Fri Sep  6 14:37:00 UTC 2019

Modified Files:
src/external/gpl3/gdb/dist/gdb: ChangeLog event-top.c inflow.c inflow.h
ser-unix.c top.c

Log Message:
Cherry-pick upstream GDB patch to fix SIGTTOU handling

Fixes toolchain/54508 by Tobias Ulmer

commit 766f883622ef008230250aa5aecef9fb9b29f233
Author: Alan Hayward 
Date:   Tue May 28 10:07:54 2019 +0100

Suppress SIGTTOU when handling errors

Calls to error () can cause SIGTTOU to send gdb to the background.

For example, on an Arm build:
  (gdb) b main
  Breakpoint 1 at 0x10774: file 
/build/gdb/testsuite/../../../src/binutils-gdb/gdb/testsuite/gdb.base/watchpoint.c,
 line 174.
  (gdb) r
  Starting program: 
/build/gdb/testsuite/outputs/gdb.base/watchpoint/watchpoint

  [1]+  Stopped ../gdb 
./outputs/gdb.base/watchpoint/watchpoint
  localhost$ fg
  ../gdb ./outputs/gdb.base/watchpoint/watchpoint
  Cannot parse expression `.L1199 4@r4'.
  warning: Probes-based dynamic linker interface failed.
  Reverting to original interface.

The SIGTTOU is raised whilst inside a syscall during the call to tcdrain.
Fix is to use scoped_ignore_sigttou to ensure SIGTTOU is blocked.

In addition fix include comments - job_control is not included via 
terminal.h

gdb/ChangeLog:

* event-top.c: Remove include comment.
* inflow.c (class scoped_ignore_sigttou): Move from here...
* inflow.h (class scoped_ignore_sigttou): ...to here.
* ser-unix.c (hardwire_drain_output): Block SIGTTOU during drain.
* top.c:  Remove include comment.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.8 -r1.2 src/external/gpl3/gdb/dist/gdb/ChangeLog \
src/external/gpl3/gdb/dist/gdb/event-top.c \
src/external/gpl3/gdb/dist/gdb/ser-unix.c \
src/external/gpl3/gdb/dist/gdb/top.c
cvs rdiff -u -r1.1.1.7 -r1.2 src/external/gpl3/gdb/dist/gdb/inflow.c \
src/external/gpl3/gdb/dist/gdb/inflow.h

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



CVS commit: [netbsd-7-0] src/lib/libc/nameser

2019-09-06 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Sep  6 13:53:31 UTC 2019

Modified Files:
src/lib/libc/nameser [netbsd-7-0]: ns_name.c

Log Message:
Pull up following revision(s) (requested by maya in ticket #1706):

lib/libc/nameser/ns_name.c: revision 1.12

Since we advance cp after the bounds check, we need to test for bounds
again before using it. Discovered via fuzzing, reported by enh at google, via:

https://android-review.googlesource.com/c/platform/bionic/+/1093130


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.11.6.1 src/lib/libc/nameser/ns_name.c

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



CVS commit: [netbsd-7-0] src/lib/libc/nameser

2019-09-06 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Sep  6 13:53:31 UTC 2019

Modified Files:
src/lib/libc/nameser [netbsd-7-0]: ns_name.c

Log Message:
Pull up following revision(s) (requested by maya in ticket #1706):

lib/libc/nameser/ns_name.c: revision 1.12

Since we advance cp after the bounds check, we need to test for bounds
again before using it. Discovered via fuzzing, reported by enh at google, via:

https://android-review.googlesource.com/c/platform/bionic/+/1093130


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.11.6.1 src/lib/libc/nameser/ns_name.c

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/nameser/ns_name.c
diff -u src/lib/libc/nameser/ns_name.c:1.11 src/lib/libc/nameser/ns_name.c:1.11.6.1
--- src/lib/libc/nameser/ns_name.c:1.11	Fri Mar  7 01:07:01 2014
+++ src/lib/libc/nameser/ns_name.c	Fri Sep  6 13:53:31 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: ns_name.c,v 1.11 2014/03/07 01:07:01 christos Exp $	*/
+/*	$NetBSD: ns_name.c,v 1.11.6.1 2019/09/06 13:53:31 martin Exp $	*/
 
 /*
  * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
@@ -22,7 +22,7 @@
 #ifdef notdef
 static const char rcsid[] = "Id: ns_name.c,v 1.11 2009/01/23 19:59:16 each Exp";
 #else
-__RCSID("$NetBSD: ns_name.c,v 1.11 2014/03/07 01:07:01 christos Exp $");
+__RCSID("$NetBSD: ns_name.c,v 1.11.6.1 2019/09/06 13:53:31 martin Exp $");
 #endif
 #endif
 
@@ -696,7 +696,7 @@ ns_name_skip(const u_char **ptrptr, cons
 {
 	const u_char *cp;
 	u_int n;
-	int l;
+	int l = 0;
 
 	cp = *ptrptr;
 	while (cp < eom && (n = *cp++) != 0) {
@@ -706,7 +706,7 @@ ns_name_skip(const u_char **ptrptr, cons
 			cp += n;
 			continue;
 		case NS_TYPE_ELT: /*%< EDNS0 extended label */
-			if ((l = labellen(cp - 1)) < 0) {
+			if (cp < eom && (l = labellen(cp - 1)) < 0) {
 errno = EMSGSIZE; /*%< XXX */
 return (-1);
 			}



CVS commit: [netbsd-7-1] src/doc

2019-09-06 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Sep  6 13:52:36 UTC 2019

Modified Files:
src/doc [netbsd-7-1]: CHANGES-7.1.3

Log Message:
Ticket #1706


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.56 -r1.1.2.57 src/doc/CHANGES-7.1.3

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



CVS commit: [netbsd-7-1] src/doc

2019-09-06 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Sep  6 13:52:36 UTC 2019

Modified Files:
src/doc [netbsd-7-1]: CHANGES-7.1.3

Log Message:
Ticket #1706


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.56 -r1.1.2.57 src/doc/CHANGES-7.1.3

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

Modified files:

Index: src/doc/CHANGES-7.1.3
diff -u src/doc/CHANGES-7.1.3:1.1.2.56 src/doc/CHANGES-7.1.3:1.1.2.57
--- src/doc/CHANGES-7.1.3:1.1.2.56	Tue Sep  3 12:29:08 2019
+++ src/doc/CHANGES-7.1.3	Fri Sep  6 13:52:36 2019
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.1.3,v 1.1.2.56 2019/09/03 12:29:08 martin Exp $
+# $NetBSD: CHANGES-7.1.3,v 1.1.2.57 2019/09/06 13:52:36 martin Exp $
 
 A complete list of changes from the NetBSD 7.1.2 release to the NetBSD 7.1.3
 release:
@@ -576,3 +576,8 @@ sys/sys/cprng.h	1.13-1.15
 	Switch from NIST CTR_DRBG with AES to NIST Hash_DRBG with SHA-256.
 	[riastradh, ticket #1705]
 
+lib/libc/nameser/ns_name.c			1.12
+
+	Fix buffer overrun.
+	[maya, ticket #1706]
+



CVS commit: [netbsd-7-1] src/lib/libc/nameser

2019-09-06 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Sep  6 13:51:20 UTC 2019

Modified Files:
src/lib/libc/nameser [netbsd-7-1]: ns_name.c

Log Message:
Pull up following revision(s) (requested by maya in ticket #1706):

lib/libc/nameser/ns_name.c: revision 1.12

Since we advance cp after the bounds check, we need to test for bounds
again before using it. Discovered via fuzzing, reported by enh at google, via:

https://android-review.googlesource.com/c/platform/bionic/+/1093130


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.11.14.1 src/lib/libc/nameser/ns_name.c

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



CVS commit: [netbsd-7-1] src/lib/libc/nameser

2019-09-06 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Sep  6 13:51:20 UTC 2019

Modified Files:
src/lib/libc/nameser [netbsd-7-1]: ns_name.c

Log Message:
Pull up following revision(s) (requested by maya in ticket #1706):

lib/libc/nameser/ns_name.c: revision 1.12

Since we advance cp after the bounds check, we need to test for bounds
again before using it. Discovered via fuzzing, reported by enh at google, via:

https://android-review.googlesource.com/c/platform/bionic/+/1093130


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.11.14.1 src/lib/libc/nameser/ns_name.c

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/nameser/ns_name.c
diff -u src/lib/libc/nameser/ns_name.c:1.11 src/lib/libc/nameser/ns_name.c:1.11.14.1
--- src/lib/libc/nameser/ns_name.c:1.11	Fri Mar  7 01:07:01 2014
+++ src/lib/libc/nameser/ns_name.c	Fri Sep  6 13:51:20 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: ns_name.c,v 1.11 2014/03/07 01:07:01 christos Exp $	*/
+/*	$NetBSD: ns_name.c,v 1.11.14.1 2019/09/06 13:51:20 martin Exp $	*/
 
 /*
  * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
@@ -22,7 +22,7 @@
 #ifdef notdef
 static const char rcsid[] = "Id: ns_name.c,v 1.11 2009/01/23 19:59:16 each Exp";
 #else
-__RCSID("$NetBSD: ns_name.c,v 1.11 2014/03/07 01:07:01 christos Exp $");
+__RCSID("$NetBSD: ns_name.c,v 1.11.14.1 2019/09/06 13:51:20 martin Exp $");
 #endif
 #endif
 
@@ -696,7 +696,7 @@ ns_name_skip(const u_char **ptrptr, cons
 {
 	const u_char *cp;
 	u_int n;
-	int l;
+	int l = 0;
 
 	cp = *ptrptr;
 	while (cp < eom && (n = *cp++) != 0) {
@@ -706,7 +706,7 @@ ns_name_skip(const u_char **ptrptr, cons
 			cp += n;
 			continue;
 		case NS_TYPE_ELT: /*%< EDNS0 extended label */
-			if ((l = labellen(cp - 1)) < 0) {
+			if (cp < eom && (l = labellen(cp - 1)) < 0) {
 errno = EMSGSIZE; /*%< XXX */
 return (-1);
 			}



CVS commit: [netbsd-7] src/doc

2019-09-06 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Sep  6 13:50:56 UTC 2019

Modified Files:
src/doc [netbsd-7]: CHANGES-7.3

Log Message:
Ticket #1706


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.60 -r1.1.2.61 src/doc/CHANGES-7.3

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



CVS commit: [netbsd-7] src/doc

2019-09-06 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Sep  6 13:50:56 UTC 2019

Modified Files:
src/doc [netbsd-7]: CHANGES-7.3

Log Message:
Ticket #1706


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.60 -r1.1.2.61 src/doc/CHANGES-7.3

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

Modified files:

Index: src/doc/CHANGES-7.3
diff -u src/doc/CHANGES-7.3:1.1.2.60 src/doc/CHANGES-7.3:1.1.2.61
--- src/doc/CHANGES-7.3:1.1.2.60	Tue Sep  3 12:21:49 2019
+++ src/doc/CHANGES-7.3	Fri Sep  6 13:50:56 2019
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.3,v 1.1.2.60 2019/09/03 12:21:49 martin Exp $
+# $NetBSD: CHANGES-7.3,v 1.1.2.61 2019/09/06 13:50:56 martin Exp $
 
 A complete list of changes from the NetBSD 7.2 release to the NetBSD 7.3
 release:
@@ -666,3 +666,8 @@ sys/sys/cprng.h	1.13-1.15
 	Switch from NIST CTR_DRBG with AES to NIST Hash_DRBG with SHA-256.
 	[riastradh, ticket #1705]
 
+lib/libc/nameser/ns_name.c			1.12
+
+	Fix buffer overrun.
+	[maya, ticket #1706]
+



CVS commit: [netbsd-7] src/lib/libc/nameser

2019-09-06 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Sep  6 13:50:03 UTC 2019

Modified Files:
src/lib/libc/nameser [netbsd-7]: ns_name.c

Log Message:
Pull up following revision(s) (requested by maya in ticket #1706):

lib/libc/nameser/ns_name.c: revision 1.12

Since we advance cp after the bounds check, we need to test for bounds
again before using it. Discovered via fuzzing, reported by enh at google, via:

https://android-review.googlesource.com/c/platform/bionic/+/1093130


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.11.4.1 src/lib/libc/nameser/ns_name.c

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/nameser/ns_name.c
diff -u src/lib/libc/nameser/ns_name.c:1.11 src/lib/libc/nameser/ns_name.c:1.11.4.1
--- src/lib/libc/nameser/ns_name.c:1.11	Fri Mar  7 01:07:01 2014
+++ src/lib/libc/nameser/ns_name.c	Fri Sep  6 13:50:03 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: ns_name.c,v 1.11 2014/03/07 01:07:01 christos Exp $	*/
+/*	$NetBSD: ns_name.c,v 1.11.4.1 2019/09/06 13:50:03 martin Exp $	*/
 
 /*
  * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
@@ -22,7 +22,7 @@
 #ifdef notdef
 static const char rcsid[] = "Id: ns_name.c,v 1.11 2009/01/23 19:59:16 each Exp";
 #else
-__RCSID("$NetBSD: ns_name.c,v 1.11 2014/03/07 01:07:01 christos Exp $");
+__RCSID("$NetBSD: ns_name.c,v 1.11.4.1 2019/09/06 13:50:03 martin Exp $");
 #endif
 #endif
 
@@ -696,7 +696,7 @@ ns_name_skip(const u_char **ptrptr, cons
 {
 	const u_char *cp;
 	u_int n;
-	int l;
+	int l = 0;
 
 	cp = *ptrptr;
 	while (cp < eom && (n = *cp++) != 0) {
@@ -706,7 +706,7 @@ ns_name_skip(const u_char **ptrptr, cons
 			cp += n;
 			continue;
 		case NS_TYPE_ELT: /*%< EDNS0 extended label */
-			if ((l = labellen(cp - 1)) < 0) {
+			if (cp < eom && (l = labellen(cp - 1)) < 0) {
 errno = EMSGSIZE; /*%< XXX */
 return (-1);
 			}



CVS commit: [netbsd-7] src/lib/libc/nameser

2019-09-06 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Sep  6 13:50:03 UTC 2019

Modified Files:
src/lib/libc/nameser [netbsd-7]: ns_name.c

Log Message:
Pull up following revision(s) (requested by maya in ticket #1706):

lib/libc/nameser/ns_name.c: revision 1.12

Since we advance cp after the bounds check, we need to test for bounds
again before using it. Discovered via fuzzing, reported by enh at google, via:

https://android-review.googlesource.com/c/platform/bionic/+/1093130


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.11.4.1 src/lib/libc/nameser/ns_name.c

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



CVS commit: [netbsd-8] src/doc

2019-09-06 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Sep  6 13:48:43 UTC 2019

Modified Files:
src/doc [netbsd-8]: CHANGES-8.2

Log Message:
Ticket #1368


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.34 -r1.1.2.35 src/doc/CHANGES-8.2

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

Modified files:

Index: src/doc/CHANGES-8.2
diff -u src/doc/CHANGES-8.2:1.1.2.34 src/doc/CHANGES-8.2:1.1.2.35
--- src/doc/CHANGES-8.2:1.1.2.34	Thu Sep  5 09:07:42 2019
+++ src/doc/CHANGES-8.2	Fri Sep  6 13:48:43 2019
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-8.2,v 1.1.2.34 2019/09/05 09:07:42 martin Exp $
+# $NetBSD: CHANGES-8.2,v 1.1.2.35 2019/09/06 13:48:43 martin Exp $
 
 A complete list of changes from the NetBSD 8.1 release to the NetBSD 8.2
 release:
@@ -870,3 +870,8 @@ sys/dev/pci/ixgbe/ixv.c1.129-1.130
 	- Fix typo in comment. Found by Wataru Ashihara.
 	[msaitoh, ticket #1367]
 
+lib/libc/nameser/ns_name.c			1.12
+
+	Fix buffer overrun.
+	[maya, ticket #1368]
+



CVS commit: [netbsd-8] src/doc

2019-09-06 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Sep  6 13:48:43 UTC 2019

Modified Files:
src/doc [netbsd-8]: CHANGES-8.2

Log Message:
Ticket #1368


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.34 -r1.1.2.35 src/doc/CHANGES-8.2

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



CVS commit: [netbsd-8] src/lib/libc/nameser

2019-09-06 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Sep  6 13:46:49 UTC 2019

Modified Files:
src/lib/libc/nameser [netbsd-8]: ns_name.c

Log Message:
Pull up following revision(s) (requested by maya in ticket #1368):

lib/libc/nameser/ns_name.c: revision 1.12

Since we advance cp after the bounds check, we need to test for bounds
again before using it. Discovered via fuzzing, reported by enh at google, via:

https://android-review.googlesource.com/c/platform/bionic/+/1093130


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.11.18.1 src/lib/libc/nameser/ns_name.c

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



CVS commit: [netbsd-8] src/lib/libc/nameser

2019-09-06 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Sep  6 13:46:49 UTC 2019

Modified Files:
src/lib/libc/nameser [netbsd-8]: ns_name.c

Log Message:
Pull up following revision(s) (requested by maya in ticket #1368):

lib/libc/nameser/ns_name.c: revision 1.12

Since we advance cp after the bounds check, we need to test for bounds
again before using it. Discovered via fuzzing, reported by enh at google, via:

https://android-review.googlesource.com/c/platform/bionic/+/1093130


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.11.18.1 src/lib/libc/nameser/ns_name.c

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/nameser/ns_name.c
diff -u src/lib/libc/nameser/ns_name.c:1.11 src/lib/libc/nameser/ns_name.c:1.11.18.1
--- src/lib/libc/nameser/ns_name.c:1.11	Fri Mar  7 01:07:01 2014
+++ src/lib/libc/nameser/ns_name.c	Fri Sep  6 13:46:49 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: ns_name.c,v 1.11 2014/03/07 01:07:01 christos Exp $	*/
+/*	$NetBSD: ns_name.c,v 1.11.18.1 2019/09/06 13:46:49 martin Exp $	*/
 
 /*
  * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
@@ -22,7 +22,7 @@
 #ifdef notdef
 static const char rcsid[] = "Id: ns_name.c,v 1.11 2009/01/23 19:59:16 each Exp";
 #else
-__RCSID("$NetBSD: ns_name.c,v 1.11 2014/03/07 01:07:01 christos Exp $");
+__RCSID("$NetBSD: ns_name.c,v 1.11.18.1 2019/09/06 13:46:49 martin Exp $");
 #endif
 #endif
 
@@ -696,7 +696,7 @@ ns_name_skip(const u_char **ptrptr, cons
 {
 	const u_char *cp;
 	u_int n;
-	int l;
+	int l = 0;
 
 	cp = *ptrptr;
 	while (cp < eom && (n = *cp++) != 0) {
@@ -706,7 +706,7 @@ ns_name_skip(const u_char **ptrptr, cons
 			cp += n;
 			continue;
 		case NS_TYPE_ELT: /*%< EDNS0 extended label */
-			if ((l = labellen(cp - 1)) < 0) {
+			if (cp < eom && (l = labellen(cp - 1)) < 0) {
 errno = EMSGSIZE; /*%< XXX */
 return (-1);
 			}



CVS commit: [netbsd-8] src/sys/dev/pci/ixgbe

2019-09-06 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Sep  6 13:44:36 UTC 2019

Modified Files:
src/sys/dev/pci/ixgbe [netbsd-8]: ixgbe.c

Log Message:
Apply patch, requested by msaitoh in ticket #1367:

fix mistake in previous.


To generate a diff of this commit:
cvs rdiff -u -r1.88.2.33 -r1.88.2.34 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: [netbsd-8] src/sys/dev/pci/ixgbe

2019-09-06 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Sep  6 13:44:36 UTC 2019

Modified Files:
src/sys/dev/pci/ixgbe [netbsd-8]: ixgbe.c

Log Message:
Apply patch, requested by msaitoh in ticket #1367:

fix mistake in previous.


To generate a diff of this commit:
cvs rdiff -u -r1.88.2.33 -r1.88.2.34 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.88.2.33 src/sys/dev/pci/ixgbe/ixgbe.c:1.88.2.34
--- src/sys/dev/pci/ixgbe/ixgbe.c:1.88.2.33	Thu Sep  5 09:06:07 2019
+++ src/sys/dev/pci/ixgbe/ixgbe.c	Fri Sep  6 13:44:36 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe.c,v 1.88.2.33 2019/09/05 09:06:07 martin Exp $ */
+/* $NetBSD: ixgbe.c,v 1.88.2.34 2019/09/06 13:44:36 martin Exp $ */
 
 /**
 
@@ -1397,6 +1397,7 @@ static void
 ixgbe_add_media_types(struct adapter *adapter)
 {
 	struct ixgbe_hw *hw = &adapter->hw;
+	device_t	dev = adapter->dev;
 	u64		layer;
 
 	layer = adapter->phy_layer;



CVS commit: src/distrib/sets/lists

2019-09-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Sep  6 11:12:07 UTC 2019

Modified Files:
src/distrib/sets/lists/base: shl.mi
src/distrib/sets/lists/debug: shl.mi

Log Message:
fix more bind bump.


To generate a diff of this commit:
cvs rdiff -u -r1.869 -r1.870 src/distrib/sets/lists/base/shl.mi
cvs rdiff -u -r1.227 -r1.228 src/distrib/sets/lists/debug/shl.mi

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



CVS commit: src/distrib/sets/lists

2019-09-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Sep  6 11:12:07 UTC 2019

Modified Files:
src/distrib/sets/lists/base: shl.mi
src/distrib/sets/lists/debug: shl.mi

Log Message:
fix more bind bump.


To generate a diff of this commit:
cvs rdiff -u -r1.869 -r1.870 src/distrib/sets/lists/base/shl.mi
cvs rdiff -u -r1.227 -r1.228 src/distrib/sets/lists/debug/shl.mi

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

Modified files:

Index: src/distrib/sets/lists/base/shl.mi
diff -u src/distrib/sets/lists/base/shl.mi:1.869 src/distrib/sets/lists/base/shl.mi:1.870
--- src/distrib/sets/lists/base/shl.mi:1.869	Thu Sep  5 15:37:46 2019
+++ src/distrib/sets/lists/base/shl.mi	Fri Sep  6 07:12:06 2019
@@ -1,4 +1,4 @@
-# $NetBSD: shl.mi,v 1.869 2019/09/05 19:37:46 christos Exp $
+# $NetBSD: shl.mi,v 1.870 2019/09/06 11:12:06 christos Exp $
 #
 # Note:	Don't delete entries from here - mark them as "obsolete" instead,
 #	unless otherwise stated below.
@@ -259,8 +259,8 @@
 ./usr/lib/libdm.so.0base-sys-shlib		compatfile
 ./usr/lib/libdm.so.0.0base-sys-shlib		compatfile
 ./usr/lib/libdns.sobase-bind-shlib		compatfile
-./usr/lib/libdns.so.12base-bind-shlib		compatfile
-./usr/lib/libdns.so.12.0			base-bind-shlib		compatfile
+./usr/lib/libdns.so.13base-bind-shlib		compatfile
+./usr/lib/libdns.so.13.0			base-bind-shlib		compatfile
 ./usr/lib/libdns_sd.sobase-mdns-shlib		compatfile,mdns
 ./usr/lib/libdns_sd.so.0			base-mdns-shlib		compatfile,mdns
 ./usr/lib/libdns_sd.so.0.0			base-mdns-shlib		compatfile,mdns
@@ -340,8 +340,8 @@
 ./usr/lib/libisc.so.13base-bind-shlib		compatfile
 ./usr/lib/libisc.so.13.0			base-bind-shlib		compatfile
 ./usr/lib/libisccc.sobase-bind-shlib		compatfile
-./usr/lib/libisccc.so.12			base-bind-shlib		compatfile
-./usr/lib/libisccc.so.12.0			base-bind-shlib		compatfile
+./usr/lib/libisccc.so.13			base-bind-shlib		compatfile
+./usr/lib/libisccc.so.13.0			base-bind-shlib		compatfile
 ./usr/lib/libisccfg.sobase-bind-shlib		compatfile
 ./usr/lib/libisccfg.so.13			base-bind-shlib		compatfile
 ./usr/lib/libisccfg.so.13.0			base-bind-shlib		compatfile

Index: src/distrib/sets/lists/debug/shl.mi
diff -u src/distrib/sets/lists/debug/shl.mi:1.227 src/distrib/sets/lists/debug/shl.mi:1.228
--- src/distrib/sets/lists/debug/shl.mi:1.227	Thu Sep  5 15:37:46 2019
+++ src/distrib/sets/lists/debug/shl.mi	Fri Sep  6 07:12:06 2019
@@ -1,4 +1,4 @@
-# $NetBSD: shl.mi,v 1.227 2019/09/05 19:37:46 christos Exp $
+# $NetBSD: shl.mi,v 1.228 2019/09/06 11:12:06 christos Exp $
 ./usr/lib/libbfd_g.a		comp-c-debuglib	debuglib,compatfile,binutils
 ./usr/libdata/debug/lib		base-sys-usr	debug,dynamicroot,compatdir
 ./usr/libdata/debug/lib/libblacklist.so.0.0.debug		comp-sys-debug	debug,dynamicroot
@@ -88,7 +88,7 @@
 ./usr/libdata/debug/usr/lib/libdes.so.14.0.debug			comp-crypto-debug	debug,compatfile,openssl=11
 ./usr/libdata/debug/usr/lib/libdevmapper.so.1.0.debug		comp-lvm-debug	debug,compatfile,lvm
 ./usr/libdata/debug/usr/lib/libdm.so.0.0.debug 			comp-sys-debug	debug,compatfile
-./usr/libdata/debug/usr/lib/libdns.so.12.0.debug 		comp-bind-debug debug,compatfile
+./usr/libdata/debug/usr/lib/libdns.so.13.0.debug 		comp-bind-debug debug,compatfile
 ./usr/libdata/debug/usr/lib/libdns_sd.so.0.0.debug		comp-mdns-debug	debug,compatfile,mdns
 ./usr/libdata/debug/usr/lib/libdtrace.so.3.0.debug		comp-sys-debug	debug,compatfile,dtrace
 ./usr/libdata/debug/usr/lib/libdwarf.so.2.0.debug		comp-sys-debug	debug,compatfile
@@ -118,7 +118,7 @@
 ./usr/libdata/debug/usr/lib/libirs.so.13.0.debug		comp-bind-debug	debug,compatfile
 ./usr/libdata/debug/usr/lib/libisc.so.13.0.debug		comp-bind-debug	debug,compatfile
 ./usr/libdata/debug/usr/lib/libisc.so.6.0.debug			comp-obsolete	debug,compatfile,obsolete
-./usr/libdata/debug/usr/lib/libisccc.so.12.0.debug		comp-bind-debug	debug,compatfile
+./usr/libdata/debug/usr/lib/libisccc.so.13.0.debug		comp-bind-debug	debug,compatfile
 ./usr/libdata/debug/usr/lib/libisccc.so.6.0.debug		comp-obsolete	debug,compatfile,obsolete
 ./usr/libdata/debug/usr/lib/libisccfg.so.13.0.debug		comp-bind-debug	debug,compatfile
 ./usr/libdata/debug/usr/lib/libisccfg.so.6.0.debug		comp-obsolete	debug,compatfile,obsolete



CVS commit: src/sys/kern

2019-09-06 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Fri Sep  6 09:19:06 UTC 2019

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

Log Message:
Reorder for clarity, and localify pool_allocator_big[], should not be used
outside.


To generate a diff of this commit:
cvs rdiff -u -r1.257 -r1.258 src/sys/kern/subr_pool.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

2019-09-06 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Fri Sep  6 09:19:06 UTC 2019

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

Log Message:
Reorder for clarity, and localify pool_allocator_big[], should not be used
outside.


To generate a diff of this commit:
cvs rdiff -u -r1.257 -r1.258 src/sys/kern/subr_pool.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/subr_pool.c
diff -u src/sys/kern/subr_pool.c:1.257 src/sys/kern/subr_pool.c:1.258
--- src/sys/kern/subr_pool.c:1.257	Mon Aug 26 10:35:35 2019
+++ src/sys/kern/subr_pool.c	Fri Sep  6 09:19:06 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: subr_pool.c,v 1.257 2019/08/26 10:35:35 maxv Exp $	*/
+/*	$NetBSD: subr_pool.c,v 1.258 2019/09/06 09:19:06 maxv Exp $	*/
 
 /*
  * Copyright (c) 1997, 1999, 2000, 2002, 2007, 2008, 2010, 2014, 2015, 2018
@@ -33,7 +33,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: subr_pool.c,v 1.257 2019/08/26 10:35:35 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_pool.c,v 1.258 2019/09/06 09:19:06 maxv Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ddb.h"
@@ -130,10 +130,37 @@ static bool pool_cache_put_quarantine(po
 #define pc_has_dtor(pc) \
 	(pc->pc_dtor != (void (*)(void *, void *))nullop)
 
+/*
+ * Pool backend allocators.
+ *
+ * Each pool has a backend allocator that handles allocation, deallocation,
+ * and any additional draining that might be needed.
+ *
+ * We provide two standard allocators:
+ *
+ *	pool_allocator_kmem - the default when no allocator is specified
+ *
+ *	pool_allocator_nointr - used for pools that will not be accessed
+ *	in interrupt context.
+ */
+void *pool_page_alloc(struct pool *, int);
+void pool_page_free(struct pool *, void *);
+
 static void *pool_page_alloc_meta(struct pool *, int);
 static void pool_page_free_meta(struct pool *, void *);
 
-/* allocator for pool metadata */
+struct pool_allocator pool_allocator_kmem = {
+	.pa_alloc = pool_page_alloc,
+	.pa_free = pool_page_free,
+	.pa_pagesz = 0
+};
+
+struct pool_allocator pool_allocator_nointr = {
+	.pa_alloc = pool_page_alloc,
+	.pa_free = pool_page_free,
+	.pa_pagesz = 0
+};
+
 struct pool_allocator pool_allocator_meta = {
 	.pa_alloc = pool_page_alloc_meta,
 	.pa_free = pool_page_free_meta,
@@ -141,7 +168,49 @@ struct pool_allocator pool_allocator_met
 };
 
 #define POOL_ALLOCATOR_BIG_BASE 13
-extern struct pool_allocator pool_allocator_big[];
+static struct pool_allocator pool_allocator_big[] = {
+	{
+		.pa_alloc = pool_page_alloc,
+		.pa_free = pool_page_free,
+		.pa_pagesz = 1 << (POOL_ALLOCATOR_BIG_BASE + 0),
+	},
+	{
+		.pa_alloc = pool_page_alloc,
+		.pa_free = pool_page_free,
+		.pa_pagesz = 1 << (POOL_ALLOCATOR_BIG_BASE + 1),
+	},
+	{
+		.pa_alloc = pool_page_alloc,
+		.pa_free = pool_page_free,
+		.pa_pagesz = 1 << (POOL_ALLOCATOR_BIG_BASE + 2),
+	},
+	{
+		.pa_alloc = pool_page_alloc,
+		.pa_free = pool_page_free,
+		.pa_pagesz = 1 << (POOL_ALLOCATOR_BIG_BASE + 3),
+	},
+	{
+		.pa_alloc = pool_page_alloc,
+		.pa_free = pool_page_free,
+		.pa_pagesz = 1 << (POOL_ALLOCATOR_BIG_BASE + 4),
+	},
+	{
+		.pa_alloc = pool_page_alloc,
+		.pa_free = pool_page_free,
+		.pa_pagesz = 1 << (POOL_ALLOCATOR_BIG_BASE + 5),
+	},
+	{
+		.pa_alloc = pool_page_alloc,
+		.pa_free = pool_page_free,
+		.pa_pagesz = 1 << (POOL_ALLOCATOR_BIG_BASE + 6),
+	},
+	{
+		.pa_alloc = pool_page_alloc,
+		.pa_free = pool_page_free,
+		.pa_pagesz = 1 << (POOL_ALLOCATOR_BIG_BASE + 7),
+	}
+};
+
 static int pool_bigidx(size_t);
 
 /* # of seconds to retain page after last use */
@@ -2740,77 +2809,6 @@ pool_cache_transfer(pool_cache_t pc)
 	splx(s);
 }
 
-/*
- * Pool backend allocators.
- *
- * Each pool has a backend allocator that handles allocation, deallocation,
- * and any additional draining that might be needed.
- *
- * We provide two standard allocators:
- *
- *	pool_allocator_kmem - the default when no allocator is specified
- *
- *	pool_allocator_nointr - used for pools that will not be accessed
- *	in interrupt context.
- */
-void	*pool_page_alloc(struct pool *, int);
-void	pool_page_free(struct pool *, void *);
-
-struct pool_allocator pool_allocator_kmem = {
-	.pa_alloc = pool_page_alloc,
-	.pa_free = pool_page_free,
-	.pa_pagesz = 0
-};
-
-struct pool_allocator pool_allocator_nointr = {
-	.pa_alloc = pool_page_alloc,
-	.pa_free = pool_page_free,
-	.pa_pagesz = 0
-};
-
-struct pool_allocator pool_allocator_big[] = {
-	{
-		.pa_alloc = pool_page_alloc,
-		.pa_free = pool_page_free,
-		.pa_pagesz = 1 << (POOL_ALLOCATOR_BIG_BASE + 0),
-	},
-	{
-		.pa_alloc = pool_page_alloc,
-		.pa_free = pool_page_free,
-		.pa_pagesz = 1 << (POOL_ALLOCATOR_BIG_BASE + 1),
-	},
-	{
-		.pa_alloc = pool_page_alloc,
-		.pa_free = pool_page_free,
-		.pa_pagesz = 1 << (POOL_ALLOCATOR_BIG_BASE + 2),
-	},
-	{
-		.pa_alloc = pool_page_alloc,
-		.pa_free = pool_page_free,
-		.pa_pagesz = 1 << (POOL_ALLOCATOR_BIG_BASE + 3),
-	},
-	{
-		.pa_alloc = pool_page_alloc,
-		.pa_free = po