CVS commit: [pgoyette-compat] src/sys/compat
Module Name:src Committed By: pgoyette Date: Mon Apr 16 03:41:34 UTC 2018 Modified Files: src/sys/compat/common [pgoyette-compat]: compat_40_mod.c compat_50_mod.c compat_mod.h if_40.h uipc_syscalls_40.c uipc_syscalls_50.c src/sys/compat/sys [pgoyette-compat]: sockio.h Log Message: Rename if_[45]0_{init,fini} entry points to more appropriate and more consistent uipc_syscalls_[45]0_{init,fini} and remove some multiple declarations. To generate a diff of this commit: cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/sys/compat/common/compat_40_mod.c cvs rdiff -u -r1.1.2.7 -r1.1.2.8 src/sys/compat/common/compat_50_mod.c cvs rdiff -u -r1.1.42.18 -r1.1.42.19 src/sys/compat/common/compat_mod.h cvs rdiff -u -r1.1.2.2 -r1.1.2.3 src/sys/compat/common/if_40.h cvs rdiff -u -r1.15.2.8 -r1.15.2.9 src/sys/compat/common/uipc_syscalls_40.c cvs rdiff -u -r1.3.56.5 -r1.3.56.6 src/sys/compat/common/uipc_syscalls_50.c cvs rdiff -u -r1.10.58.4 -r1.10.58.5 src/sys/compat/sys/sockio.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/common/compat_40_mod.c diff -u src/sys/compat/common/compat_40_mod.c:1.1.2.1 src/sys/compat/common/compat_40_mod.c:1.1.2.2 --- src/sys/compat/common/compat_40_mod.c:1.1.2.1 Tue Mar 27 07:29:43 2018 +++ src/sys/compat/common/compat_40_mod.c Mon Apr 16 03:41:34 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: compat_40_mod.c,v 1.1.2.1 2018/03/27 07:29:43 pgoyette Exp $ */ +/* $NetBSD: compat_40_mod.c,v 1.1.2.2 2018/04/16 03:41:34 pgoyette Exp $ */ /*- * Copyright (c) 2018 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: compat_40_mod.c,v 1.1.2.1 2018/03/27 07:29:43 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: compat_40_mod.c,v 1.1.2.2 2018/04/16 03:41:34 pgoyette Exp $"); #include #include @@ -56,7 +56,7 @@ compat_40_init(void) error = vfs_syscalls_40_init(); if (error != 0) return error; - if_40_init(); + uipc_syscalls_40_init(); sysmon_power_40_init(); return error; @@ -68,10 +68,10 @@ compat_40_fini(void) int error = 0; sysmon_power_40_fini(); - if_40_fini(); + uipc_syscalls_40_fini(); error = vfs_syscalls_40_fini(); if (error != 0) { - if_40_init(); + uipc_syscalls_40_init(); sysmon_power_40_init(); } Index: src/sys/compat/common/compat_50_mod.c diff -u src/sys/compat/common/compat_50_mod.c:1.1.2.7 src/sys/compat/common/compat_50_mod.c:1.1.2.8 --- src/sys/compat/common/compat_50_mod.c:1.1.2.7 Sat Mar 24 23:52:19 2018 +++ src/sys/compat/common/compat_50_mod.c Mon Apr 16 03:41:34 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: compat_50_mod.c,v 1.1.2.7 2018/03/24 23:52:19 pgoyette Exp $ */ +/* $NetBSD: compat_50_mod.c,v 1.1.2.8 2018/04/16 03:41:34 pgoyette Exp $ */ /*- * Copyright (c) 2018 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: compat_50_mod.c,v 1.1.2.7 2018/03/24 23:52:19 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: compat_50_mod.c,v 1.1.2.8 2018/04/16 03:41:34 pgoyette Exp $"); #include #include @@ -79,7 +79,7 @@ compat_50_init(void) goto err3; uvm_50_init(); - if_50_init(); + uipc_syscalls_50_init(); clockctl_50_init(); if_spppsubr_50_init(); cryptodev_50_init(); @@ -112,7 +112,7 @@ compat_50_fini(void) cryptodev_50_fini(); if_spppsubr_50_fini(); clockctl_50_fini(); - if_50_fini(); + uipc_syscalls_50_fini(); uvm_50_fini(); error = vfs_syscalls_50_fini(); @@ -142,7 +142,7 @@ compat_50_fini(void) vfs_syscalls_50_init(); err1: uvm_50_init(); - if_50_init(); + uipc_syscalls_50_init(); clockctl_50_init(); if_spppsubr_50_init(); cryptodev_50_init(); Index: src/sys/compat/common/compat_mod.h diff -u src/sys/compat/common/compat_mod.h:1.1.42.18 src/sys/compat/common/compat_mod.h:1.1.42.19 --- src/sys/compat/common/compat_mod.h:1.1.42.18 Tue Apr 3 08:29:44 2018 +++ src/sys/compat/common/compat_mod.h Mon Apr 16 03:41:34 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: compat_mod.h,v 1.1.42.18 2018/04/03 08:29:44 pgoyette Exp $ */ +/* $NetBSD: compat_mod.h,v 1.1.42.19 2018/04/16 03:41:34 pgoyette Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -75,15 +75,15 @@ void uvm_50_init(void); void uvm_50_fini(void); int vfs_syscalls_50_init(void); int vfs_syscalls_50_fini(void); -void if_50_init(void); -void if_50_fini(void); +void uipc_syscalls_50_init(void); +void uipc_syscalls_50_fini(void); #endif #ifdef COMPAT_40 int compat_40_init(void); int compat_40_fini(void); -void if_40_init(void); -void if_40_fini(void); +void uipc_syscalls_40_init(void); +void uipc_syscalls_40_fini(void); int vfs_syscalls_40_init(void); int vfs_syscalls_40_fini(void); void sysmon_power_40_init(void); Index: src/sys/compat/common/if_40.h diff -u src/sys/compat/common/if_40.h:1.1.2.2 src/sys/compat/common/if_40.h:1.1.2.3 --- src/sys/compat/common/if_40.h:1.1.2.2 Tue Mar 6 23:31:29 2018 +++
CVS commit: src/sys/arch/x86/pci
Module Name:src Committed By: nonaka Date: Mon Apr 16 03:21:43 UTC 2018 Modified Files: src/sys/arch/x86/pci: if_vmx.c Log Message: vmx(4): Fix calculation of interface statistics counter. To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/sys/arch/x86/pci/if_vmx.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/pci/if_vmx.c diff -u src/sys/arch/x86/pci/if_vmx.c:1.21 src/sys/arch/x86/pci/if_vmx.c:1.22 --- src/sys/arch/x86/pci/if_vmx.c:1.21 Mon Feb 12 17:01:22 2018 +++ src/sys/arch/x86/pci/if_vmx.c Mon Apr 16 03:21:43 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: if_vmx.c,v 1.21 2018/02/12 17:01:22 maxv Exp $ */ +/* $NetBSD: if_vmx.c,v 1.22 2018/04/16 03:21:43 nonaka Exp $ */ /* $OpenBSD: if_vmx.c,v 1.16 2014/01/22 06:04:17 brad Exp $ */ /* @@ -19,7 +19,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_vmx.c,v 1.21 2018/02/12 17:01:22 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_vmx.c,v 1.22 2018/04/16 03:21:43 nonaka Exp $"); #include #include @@ -2892,20 +2892,26 @@ vmxnet3_ioctl(struct ifnet *ifp, u_long splx(s); break; case SIOCGIFDATA: + ifp->if_ipackets = 0; + ifp->if_iqdrops = 0; + ifp->if_ierrors = 0; for (int i = 0; i < sc->vmx_nrxqueues; i++) { - ifp->if_ipackets = + ifp->if_ipackets += sc->vmx_rxq[i].vxrxq_stats.vmrxs_ipackets; - ifp->if_iqdrops = + ifp->if_iqdrops += sc->vmx_rxq[i].vxrxq_stats.vmrxs_iqdrops; - ifp->if_ierrors = + ifp->if_ierrors += sc->vmx_rxq[i].vxrxq_stats.vmrxs_ierrors; } + ifp->if_opackets = 0; + ifp->if_obytes = 0; + ifp->if_omcasts = 0; for (int i = 0; i < sc->vmx_ntxqueues; i++) { - ifp->if_opackets = + ifp->if_opackets += sc->vmx_txq[i].vxtxq_stats.vmtxs_opackets; - ifp->if_obytes = + ifp->if_obytes += sc->vmx_txq[i].vxtxq_stats.vmtxs_obytes; - ifp->if_omcasts = + ifp->if_omcasts += sc->vmx_txq[i].vxtxq_stats.vmtxs_omcasts; } /* FALLTHROUGH */
CVS commit: [pgoyette-compat] src/crypto/external/bsd/openssh/dist
Module Name:src Committed By: pgoyette Date: Mon Apr 16 02:03:04 UTC 2018 Added Files: src/crypto/external/bsd/openssh/dist [pgoyette-compat]: xmss_wots.c Log Message: Missed in previous 'sync with HEAD' To generate a diff of this commit: cvs rdiff -u -r0 -r1.2.2.2 src/crypto/external/bsd/openssh/dist/xmss_wots.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/crypto/external/bsd/openssh/dist/xmss_wots.c diff -u /dev/null src/crypto/external/bsd/openssh/dist/xmss_wots.c:1.2.2.2 --- /dev/null Mon Apr 16 02:03:04 2018 +++ src/crypto/external/bsd/openssh/dist/xmss_wots.c Mon Apr 16 02:03:04 2018 @@ -0,0 +1,189 @@ +/* $NetBSD: xmss_wots.c,v 1.2.2.2 2018/04/16 02:03:04 pgoyette Exp $ */ +/* $OpenBSD: xmss_wots.c,v 1.2 2018/02/26 03:56:44 dtucker Exp $ */ +/* +wots.c version 20160722 +Andreas Hülsing +Joost Rijneveld +Public domain. +*/ +#include "includes.h" +__RCSID("$NetBSD: xmss_wots.c,v 1.2.2.2 2018/04/16 02:03:04 pgoyette Exp $"); + +#include +#include +#include +#include "xmss_commons.h" +#include "xmss_hash.h" +#include "xmss_wots.h" +#include "xmss_hash_address.h" + + +/* libm-free version of log2() for wots */ +static inline int +wots_log2(uint32_t v) +{ + int b; + + for (b = sizeof (v) * CHAR_BIT - 1; b >= 0; b--) { +if ((1U << b) & v) { + return b; +} + } + return 0; +} + +void +wots_set_params(wots_params *params, int n, int w) +{ + params->n = n; + params->w = w; + params->log_w = wots_log2(params->w); + params->len_1 = (CHAR_BIT * n) / params->log_w; + params->len_2 = (wots_log2(params->len_1 * (w - 1)) / params->log_w) + 1; + params->len = params->len_1 + params->len_2; + params->keysize = params->len * params->n; +} + +/** + * Helper method for pseudorandom key generation + * Expands an n-byte array into a len*n byte array + * this is done using PRF + */ +static void expand_seed(unsigned char *outseeds, const unsigned char *inseed, const wots_params *params) +{ + uint32_t i = 0; + unsigned char ctr[32]; + for(i = 0; i < params->len; i++){ +to_byte(ctr, i, 32); +prf((outseeds + (i*params->n)), ctr, inseed, params->n); + } +} + +/** + * Computes the chaining function. + * out and in have to be n-byte arrays + * + * interpretes in as start-th value of the chain + * addr has to contain the address of the chain + */ +static void gen_chain(unsigned char *out, const unsigned char *in, unsigned int start, unsigned int steps, const wots_params *params, const unsigned char *pub_seed, uint32_t addr[8]) +{ + uint32_t i, j; + for (j = 0; j < params->n; j++) +out[j] = in[j]; + + for (i = start; i < (start+steps) && i < params->w; i++) { +setHashADRS(addr, i); +hash_f(out, out, pub_seed, addr, params->n); + } +} + +/** + * base_w algorithm as described in draft. + * + * + */ +static void base_w(int *output, const int out_len, const unsigned char *input, const wots_params *params) +{ + int in = 0; + int out = 0; + uint32_t total = 0; + int bits = 0; + int consumed = 0; + + for (consumed = 0; consumed < out_len; consumed++) { +if (bits == 0) { + total = input[in]; + in++; + bits += 8; +} +bits -= params->log_w; +output[out] = (total >> bits) & (params->w - 1); +out++; + } +} + +void wots_pkgen(unsigned char *pk, const unsigned char *sk, const wots_params *params, const unsigned char *pub_seed, uint32_t addr[8]) +{ + uint32_t i; + expand_seed(pk, sk, params); + for (i=0; i < params->len; i++) { +setChainADRS(addr, i); +gen_chain(pk+i*params->n, pk+i*params->n, 0, params->w-1, params, pub_seed, addr); + } +} + + +int wots_sign(unsigned char *sig, const unsigned char *msg, const unsigned char *sk, const wots_params *params, const unsigned char *pub_seed, uint32_t addr[8]) +{ + //int basew[params->len]; + int csum = 0; + uint32_t i = 0; + int *basew = calloc(params->len, sizeof(int)); + if (basew == NULL) +return -1; + + base_w(basew, params->len_1, msg, params); + + for (i=0; i < params->len_1; i++) { +csum += params->w - 1 - basew[i]; + } + + csum = csum << (8 - ((params->len_2 * params->log_w) % 8)); + + int len_2_bytes = ((params->len_2 * params->log_w) + 7) / 8; + + unsigned char csum_bytes[len_2_bytes]; + to_byte(csum_bytes, csum, len_2_bytes); + + int csum_basew[params->len_2]; + base_w(csum_basew, params->len_2, csum_bytes, params); + + for (i = 0; i < params->len_2; i++) { +basew[params->len_1 + i] = csum_basew[i]; + } + + expand_seed(sig, sk, params); + + for (i = 0; i < params->len; i++) { +setChainADRS(addr, i); +gen_chain(sig+i*params->n, sig+i*params->n, 0, basew[i], params, pub_seed, addr); + } + free(basew); + return 0; +} + +int wots_pkFromSig(unsigned char *pk, const unsigned char *sig, const unsigned char *msg, const wots_params *params, const unsigned char *pub_seed, uint32_t addr[8]) +{ + int csum = 0; + uint32_t i = 0; +
CVS commit: src/crypto/external/bsd/netpgp/dist/src/lib
Module Name:src Committed By: sevan Date: Sun Apr 15 23:00:36 UTC 2018 Modified Files: src/crypto/external/bsd/netpgp/dist/src/lib: libnetpgp.3 Log Message: Break down explanation of netpgp_init to make it easier to extend. Document how the userid is obtained. To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 \ src/crypto/external/bsd/netpgp/dist/src/lib/libnetpgp.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/bsd/netpgp/dist/src/lib/libnetpgp.3 diff -u src/crypto/external/bsd/netpgp/dist/src/lib/libnetpgp.3:1.20 src/crypto/external/bsd/netpgp/dist/src/lib/libnetpgp.3:1.21 --- src/crypto/external/bsd/netpgp/dist/src/lib/libnetpgp.3:1.20 Wed Apr 4 21:39:35 2018 +++ src/crypto/external/bsd/netpgp/dist/src/lib/libnetpgp.3 Sun Apr 15 23:00:36 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: libnetpgp.3,v 1.20 2018/04/04 21:39:35 sevan Exp $ +.\" $NetBSD: libnetpgp.3,v 1.21 2018/04/15 23:00:36 sevan Exp $ .\" .\" Copyright (c) 2009,2010 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd April 3, 2018 +.Dd April 15, 2018 .Dt LIBNETPGP 3 .Os .Sh NAME @@ -172,12 +172,13 @@ Normal operation sees the .Nm process be initialised using the .Fn netpgp_init -function, which will set up the public and private keyrings, and set the -user identity to the +function, which will set up the public and private keyrings, as well as set the +user identity in the .Ar userid -argument passed stored in the +member of the .Dv netpgp_t -structure, and set using the +structure. +These are set using the .Fn netpgp_setvar function. If no public key ring file is set, initial values will be taken from those @@ -189,6 +190,13 @@ initial values will be taken from those in the .Pa .gnupg/secring.gpg file in the user's home directory. +The user identity is obtained from the +.Ev userid +environment variable, or failing that, the value of the +.Dq default-key +setting from +.Pa .gnupg/gpg.conf +file in the user's home directory is used. The .Fn netpgp_init function returns 1 on success, 0 on failure.
CVS commit: src/sys/compat/sys
Module Name:src Committed By: pgoyette Date: Sun Apr 15 22:13:36 UTC 2018 Modified Files: src/sys/compat/sys: sockio.h Log Message: Remove unnecessary __BEGIN_DECLS ... __END_DECLS at Christos's suggestion. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/compat/sys/sockio.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/sys/sockio.h diff -u src/sys/compat/sys/sockio.h:1.11 src/sys/compat/sys/sockio.h:1.12 --- src/sys/compat/sys/sockio.h:1.11 Thu Apr 12 18:50:13 2018 +++ src/sys/compat/sys/sockio.h Sun Apr 15 22:13:36 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: sockio.h,v 1.11 2018/04/12 18:50:13 christos Exp $ */ +/* $NetBSD: sockio.h,v 1.12 2018/04/15 22:13:36 pgoyette Exp $ */ /*- * Copyright (c) 1982, 1986, 1990, 1993, 1994 @@ -183,7 +183,6 @@ struct oifdatareq { #ifdef _KERNEL -__BEGIN_DECLS extern int (*vec_compat_ifconf)(struct lwp *, u_long, void *); extern int (*vec_compat_ifdatareq)(struct lwp *, u_long, void *); @@ -191,7 +190,6 @@ void uipc_syscalls_40_init(void); void uipc_syscalls_40_fini(void); void uipc_syscalls_50_init(void); void uipc_syscalls_50_fini(void); -__END_DECLS #endif
CVS commit: src/tools
Module Name:src Committed By: christos Date: Sun Apr 15 21:50:39 UTC 2018 Modified Files: src/tools: Makefile.gnuhost Log Message: do the bracket nesting only for clang for now. To generate a diff of this commit: cvs rdiff -u -r1.45 -r1.46 src/tools/Makefile.gnuhost Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tools/Makefile.gnuhost diff -u src/tools/Makefile.gnuhost:1.45 src/tools/Makefile.gnuhost:1.46 --- src/tools/Makefile.gnuhost:1.45 Fri Apr 13 02:15:26 2018 +++ src/tools/Makefile.gnuhost Sun Apr 15 17:50:38 2018 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.gnuhost,v 1.45 2018/04/13 06:15:26 snj Exp $ +# $NetBSD: Makefile.gnuhost,v 1.46 2018/04/15 21:50:38 christos Exp $ # # Rules used when building a GNU host package. Expects MODULE to be set. # @@ -18,13 +18,18 @@ .include # Disable use of pre-compiled headers on Darwin. -# GCC build exceeds the macOS clang default bracket nesting level of 256. BUILD_OSTYPE!= uname -s .if ${BUILD_OSTYPE} == "Darwin" HOST_CFLAGS+=-O2 -no-cpp-precomp -HOST_CFLAGS+=-O2 -no-cpp-precomp -fbracket-depth=512 +.endif + +# GCC build exceeds the clang default bracket nesting level of 256. +HOST_COMPILER_CLANG != if ${HOST_CC} --version 2>&1 | grep -q -s clang; then echo yes; else echo no; fi +.if ${HOST_COMPILER_CLANG} == "yes" +HOST_CFLAGS+= -fbracket-depth=512 HOST_CXXFLAGS+= -fbracket-depth=512 .endif + MAKE_PROGRAM?= ${MAKE} .for i in 3 2
CVS commit: src/share/mk
Module Name:src Committed By: christos Date: Sun Apr 15 20:08:13 UTC 2018 Modified Files: src/share/mk: bsd.own.mk Log Message: switch x86 to binutils-2.30 To generate a diff of this commit: cvs rdiff -u -r1.1056 -r1.1057 src/share/mk/bsd.own.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.own.mk diff -u src/share/mk/bsd.own.mk:1.1056 src/share/mk/bsd.own.mk:1.1057 --- src/share/mk/bsd.own.mk:1.1056 Sat Apr 14 19:14:12 2018 +++ src/share/mk/bsd.own.mk Sun Apr 15 16:08:13 2018 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.own.mk,v 1.1056 2018/04/14 23:14:12 christos Exp $ +# $NetBSD: bsd.own.mk,v 1.1057 2018/04/15 20:08:13 christos Exp $ # This needs to be before bsd.init.mk .if defined(BSD_MK_COMPAT_FILE) @@ -162,7 +162,12 @@ EXTERNAL_GDB_SUBDIR= /does/not/exist # # What binutils is used? # +.if ${MACHINE_ARCH} == "x86_64" || \ +${MACHINE_ARCH} == "i386" +HAVE_BINUTILS?= 230 +.else HAVE_BINUTILS?= 227 +.endif .if ${HAVE_BINUTILS} == 230 EXTERNAL_BINUTILS_SUBDIR= binutils
CVS commit: src/external/gpl3/binutils
Module Name:src Committed By: christos Date: Sun Apr 15 20:06:05 UTC 2018 Modified Files: src/external/gpl3/binutils/dist: config.guess config.sub configure configure.ac src/external/gpl3/binutils/dist/bfd: ChangeLog Makefile.am Makefile.in aoutx.h archive.c archures.c bfd-in2.h bfd.c coff-alpha.c coffcode.h config.bfd configure configure.ac configure.host cpu-mips.c cpu-or1k.c cpu-riscv.c dwarf2.c elf-bfd.h elf-eh-frame.c elf.c elf32-arm.c elf32-avr.c elf32-hppa.c elf32-i386.c elf32-m68k.c elf32-or1k.c elf32-ppc.c elf32-sh.c elf32-vax.c elf64-alpha.c elf64-mips.c elf64-ppc.c elf64-x86-64.c elflink.c elfn32-mips.c elfnn-riscv.c elfxx-mips.c elfxx-riscv.c elfxx-riscv.h elfxx-sparc.c libbfd.h linker.c reloc.c syms.c targets.c version.h src/external/gpl3/binutils/dist/bfd/doc: Makefile.in bfdt.texi bfdver.texi reloc.texi src/external/gpl3/binutils/dist/binutils: ChangeLog Makefile.in NEWS ar.c arsup.c bucomm.c configure objcopy.c readelf.c strings.c src/external/gpl3/binutils/dist/binutils/doc: Makefile.am Makefile.in addr2line.1 ar.1 binutils.info binutils.texi cxxfilt.man dlltool.1 elfedit.1 nlmconv.1 nm.1 objcopy.1 objdump.1 ranlib.1 readelf.1 size.1 strings.1 strip.1 windmc.1 windres.1 src/external/gpl3/binutils/dist/cpu: or1kcommon.cpu src/external/gpl3/binutils/dist/gas: ChangeLog Makefile.am Makefile.in atof-generic.c configure configure.ac configure.tgt remap.c write.c src/external/gpl3/binutils/dist/gas/config: atof-vax.c obj-elf.c tc-alpha.c tc-arm.c tc-m68k.c tc-mips.c tc-mips.h tc-or1k.c tc-or1k.h tc-ppc.c tc-riscv.c tc-riscv.h tc-sparc.c tc-vax.c tc-vax.h vax-inst.h src/external/gpl3/binutils/dist/gas/doc: Makefile.am Makefile.in as.1 as.info as.texinfo c-mips.texi c-ppc.texi src/external/gpl3/binutils/dist/gold: Makefile.am src/external/gpl3/binutils/dist/gprof: corefile.c gprof.1 gprof.c gprof.info src/external/gpl3/binutils/dist/include: bfdlink.h dis-asm.h objalloc.h src/external/gpl3/binutils/dist/include/elf: common.h internal.h mips.h or1k.h ppc.h riscv.h src/external/gpl3/binutils/dist/include/opcode: hppa.h mips.h ppc.h riscv-opc.h riscv.h src/external/gpl3/binutils/dist/ld: ChangeLog Makefile.am Makefile.in configure configure.ac configure.host configure.tgt genscripts.sh ld.texinfo ldctor.c ldemul.c ldemul.h ldexp.c ldgram.c ldgram.h ldlang.c ldlang.h ldlex.c ldlex.h ldlex.l ldmain.c ldmain.h lexsup.c src/external/gpl3/binutils/dist/ld/emulparams: elf32bmipn32-defs.sh elf32lriscv-defs.sh elf64lriscv-defs.sh elf_i386.sh hppalinux.sh shelf_nbsd.sh src/external/gpl3/binutils/dist/ld/emultempl: aarch64elf.em armelf.em beos.em elf32.em genelf.em mmo.em pe.em pep.em riscvelf.em spuelf.em xtensaelf.em src/external/gpl3/binutils/dist/ld/scripttempl: elf.sc sh.sc src/external/gpl3/binutils/dist/libiberty: Makefile.in configure configure.ac floatformat.c make-temp-file.c objalloc.c src/external/gpl3/binutils/dist/opcodes: ChangeLog Makefile.am Makefile.in cgen.sh configure disassemble.c mips-dis.c mips-opc.c or1k-asm.c or1k-desc.c or1k-desc.h or1k-dis.c or1k-ibld.c or1k-opc.c or1k-opc.h or1k-opinst.c ppc-dis.c ppc-opc.c riscv-dis.c riscv-opc.c sparc-dis.c src/external/gpl3/binutils/lib/libbfd: Makefile src/external/gpl3/binutils/lib/libbfd/arch/i386: bfd.h bfd_stdint.h bfdver.h config.h defs.mk src/external/gpl3/binutils/lib/libbfd/arch/x86_64: bfd.h bfd_stdint.h bfdver.h config.h defs.mk src/external/gpl3/binutils/lib/libiberty/arch/i386: config.h defs.mk src/external/gpl3/binutils/lib/libiberty/arch/x86_64: config.h defs.mk src/external/gpl3/binutils/lib/libopcodes: Makefile src/external/gpl3/binutils/lib/libopcodes/arch/i386: config.h src/external/gpl3/binutils/lib/libopcodes/arch/x86_64: config.h defs.mk src/external/gpl3/binutils/usr.bin/common/arch/i386: config.h defs.mk src/external/gpl3/binutils/usr.bin/common/arch/x86_64: config.h defs.mk src/external/gpl3/binutils/usr.bin/gas/arch/i386: config.h src/external/gpl3/binutils/usr.bin/gas/arch/x86_64: config.h defs.mk src/external/gpl3/binutils/usr.bin/gprof/arch/i386: gconfig.h src/external/gpl3/binutils/usr.bin/gprof/arch/x86_64: defs.mk gconfig.h src/external/gpl3/binutils/usr.bin/ld/arch/i386: config.h src/external/gpl3/binutils/usr.bin/ld/arch/x86_64: config.h defs.mk Removed Files:
CVS commit: src/doc
Module Name:src Committed By: christos Date: Sun Apr 15 19:48:44 UTC 2018 Modified Files: src/doc: 3RDPARTY CHANGES Log Message: update for file-5.33 To generate a diff of this commit: cvs rdiff -u -r1.1515 -r1.1516 src/doc/3RDPARTY cvs rdiff -u -r1.2380 -r1.2381 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.1515 src/doc/3RDPARTY:1.1516 --- src/doc/3RDPARTY:1.1515 Sat Apr 7 18:41:55 2018 +++ src/doc/3RDPARTY Sun Apr 15 15:48:44 2018 @@ -1,4 +1,4 @@ -# $NetBSD: 3RDPARTY,v 1.1515 2018/04/07 22:41:55 christos Exp $ +# $NetBSD: 3RDPARTY,v 1.1516 2018/04/15 19:48:44 christos Exp $ # # This file contains a list of the software that has been integrated into # NetBSD where we are not the primary maintainer. @@ -425,8 +425,8 @@ Notes: Please use "expat" as the vendor tag for CVS imports. Package: file -Version: 5.32 -Current Vers: 5.32 +Version: 5.33 +Current Vers: 5.33 Maintainer: Christos Zoulas <chris...@zoulas.com> Archive Site: ftp://ftp.astron.com/pub/file/ Home Page: http://www.darwinsys.com/file/ Index: src/doc/CHANGES diff -u src/doc/CHANGES:1.2380 src/doc/CHANGES:1.2381 --- src/doc/CHANGES:1.2380 Fri Apr 13 04:01:23 2018 +++ src/doc/CHANGES Sun Apr 15 15:48:44 2018 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2380 $> +# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2381 $> # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -142,3 +142,4 @@ Changes from NetBSD 8.0 to NetBSD 9.0: ichsmb(4): Add Intel 300 series chipset support. [msaitoh 20180409] wm(4): Enable I219 support. [msaitoh 20180413] puc(4): Add Intel 300 series chipset support. [msaitoh 20180413] + file(1): Upgraded to 5.33. [christos 20180415]
CVS commit: src/distrib/sets/lists
Module Name:src Committed By: christos Date: Sun Apr 15 19:47:30 UTC 2018 Modified Files: src/distrib/sets/lists/base: shl.mi src/distrib/sets/lists/debug: shl.mi Log Message: bump libmagic for file-5.33 To generate a diff of this commit: cvs rdiff -u -r1.833 -r1.834 src/distrib/sets/lists/base/shl.mi cvs rdiff -u -r1.194 -r1.195 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.833 src/distrib/sets/lists/base/shl.mi:1.834 --- src/distrib/sets/lists/base/shl.mi:1.833 Fri Apr 6 15:00:08 2018 +++ src/distrib/sets/lists/base/shl.mi Sun Apr 15 15:47:30 2018 @@ -1,4 +1,4 @@ -# $NetBSD: shl.mi,v 1.833 2018/04/06 19:00:08 christos Exp $ +# $NetBSD: shl.mi,v 1.834 2018/04/15 19:47:30 christos Exp $ # # Note: Don't delete entries from here - mark them as "obsolete" instead, # unless otherwise stated below. @@ -399,8 +399,8 @@ ./usr/lib/libm.so.0base-sys-shlib compatfile ./usr/lib/libm.so.0.12base-sys-shlib compatfile ./usr/lib/libmagic.sobase-sys-shlib compatfile -./usr/lib/libmagic.so.5base-sys-shlib compatfile -./usr/lib/libmagic.so.5.2 base-sys-shlib compatfile +./usr/lib/libmagic.so.6base-sys-shlib compatfile +./usr/lib/libmagic.so.6.0 base-sys-shlib compatfile ./usr/lib/libmenu.sobase-sys-shlib compatfile ./usr/lib/libmenu.so.6base-sys-shlib compatfile ./usr/lib/libmenu.so.6.0 base-sys-shlib compatfile Index: src/distrib/sets/lists/debug/shl.mi diff -u src/distrib/sets/lists/debug/shl.mi:1.194 src/distrib/sets/lists/debug/shl.mi:1.195 --- src/distrib/sets/lists/debug/shl.mi:1.194 Fri Apr 6 15:00:08 2018 +++ src/distrib/sets/lists/debug/shl.mi Sun Apr 15 15:47:30 2018 @@ -1,4 +1,4 @@ -# $NetBSD: shl.mi,v 1.194 2018/04/06 19:00:08 christos Exp $ +# $NetBSD: shl.mi,v 1.195 2018/04/15 19:47:30 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 @@ -138,7 +138,7 @@ ./usr/libdata/debug/usr/lib/liblzf.so.1.0.debug comp-sys-debug debug,compatfile ./usr/libdata/debug/usr/lib/liblzma.so.2.0.debug comp-sys-debug debug,compatfile ./usr/libdata/debug/usr/lib/libm.so.0.12.debug comp-sys-debug debug,compatfile -./usr/libdata/debug/usr/lib/libmagic.so.5.2.debug comp-sys-debug debug,compatfile +./usr/libdata/debug/usr/lib/libmagic.so.6.0.debug comp-sys-debug debug,compatfile ./usr/libdata/debug/usr/lib/libmenu.so.6.0.debug comp-sys-debug debug,compatfile ./usr/libdata/debug/usr/lib/libmj.so.1.0.debug comp-crypto-debug debug,compatfile ./usr/libdata/debug/usr/lib/libmpc.so.2.0.debug comp-obsolete debug,compatfile,obsolete
CVS import: src/external/bsd/file/dist
Module Name:src Committed By: christos Date: Sun Apr 15 19:32:50 UTC 2018 Update of /cvsroot/src/external/bsd/file/dist In directory ivanova.netbsd.org:/tmp/cvs-serv792 Log Message: 2018-04-15 14:52 Christos Zoulas* release 5.33 2018-02-24 14:50 Christos Zoulas * extend the support for ${x?:} expansions for magic descriptions 2018-02-21 16:25 Christos Zoulas * add support for ${x?:} in mime types to handle pie binaries. 2017-11-03 9:23 Christos Zoulas * add support for negative offsets (offsets from the end of file) 2017-09-26 8:22 Christos Zoulas * close the file on error when writing magic (Steve Grubb) 2017-09-24 12:02 Christos Zoulas * seccomp support (Paul Moore) 2017-09-02 11:53 Christos Zoulas * release 5.32 2017-08-28 16:37 Christos Zoulas * Always reset state in {file,buffer}_apprentice (Krzysztof Wilczynski) 2017-08-27 03:55 Christos Zoulas * Fix always true condition (Thomas Jarosch) 2017-05-24 17:30 Christos Zoulas * pickier parsing of numeric values in magic files. 2017-05-23 17:55 Christos Zoulas * PR/615 add magic_getflags() Status: Vendor Tag: CHRISTOS Release Tags: FILE5_33 U src/external/bsd/file/dist/acinclude.m4 C src/external/bsd/file/dist/install-sh C src/external/bsd/file/dist/configure.ac U src/external/bsd/file/dist/INSTALL U src/external/bsd/file/dist/ltmain.sh C src/external/bsd/file/dist/configure C src/external/bsd/file/dist/ChangeLog U src/external/bsd/file/dist/AUTHORS C src/external/bsd/file/dist/config.h.in C src/external/bsd/file/dist/config.guess C src/external/bsd/file/dist/depcomp C src/external/bsd/file/dist/missing U src/external/bsd/file/dist/README U src/external/bsd/file/dist/TODO U src/external/bsd/file/dist/Makefile.am C src/external/bsd/file/dist/config.sub U src/external/bsd/file/dist/COPYING C src/external/bsd/file/dist/compile U src/external/bsd/file/dist/NEWS U src/external/bsd/file/dist/MAINT C src/external/bsd/file/dist/Makefile.in C src/external/bsd/file/dist/aclocal.m4 U src/external/bsd/file/dist/magic/Localstuff C src/external/bsd/file/dist/magic/Makefile.am C src/external/bsd/file/dist/magic/Makefile.in U src/external/bsd/file/dist/magic/Header U src/external/bsd/file/dist/magic/magdir/securitycerts U src/external/bsd/file/dist/magic/magdir/amigaos C src/external/bsd/file/dist/magic/magdir/apple U src/external/bsd/file/dist/magic/magdir/diamond U src/external/bsd/file/dist/magic/magdir/ocaml U src/external/bsd/file/dist/magic/magdir/inform U src/external/bsd/file/dist/magic/magdir/kerberos U src/external/bsd/file/dist/magic/magdir/lecter U src/external/bsd/file/dist/magic/magdir/intel U src/external/bsd/file/dist/magic/magdir/gnumeric U src/external/bsd/file/dist/magic/magdir/music U src/external/bsd/file/dist/magic/magdir/geos U src/external/bsd/file/dist/magic/magdir/database U src/external/bsd/file/dist/magic/magdir/coff U src/external/bsd/file/dist/magic/magdir/pascal U src/external/bsd/file/dist/magic/magdir/oasis U src/external/bsd/file/dist/magic/magdir/compress U src/external/bsd/file/dist/magic/magdir/sc U src/external/bsd/file/dist/magic/magdir/wordprocessors U src/external/bsd/file/dist/magic/magdir/ctags U src/external/bsd/file/dist/magic/magdir/sun U src/external/bsd/file/dist/magic/magdir/mozilla U src/external/bsd/file/dist/magic/magdir/adi U src/external/bsd/file/dist/magic/magdir/grace U src/external/bsd/file/dist/magic/magdir/aout U src/external/bsd/file/dist/magic/magdir/ssl U src/external/bsd/file/dist/magic/magdir/sniffer U src/external/bsd/file/dist/magic/magdir/tex U src/external/bsd/file/dist/magic/magdir/varied.script U src/external/bsd/file/dist/magic/magdir/lisp U src/external/bsd/file/dist/magic/magdir/encore U src/external/bsd/file/dist/magic/magdir/citrus U src/external/bsd/file/dist/magic/magdir/gpu U src/external/bsd/file/dist/magic/magdir/os2 U src/external/bsd/file/dist/magic/magdir/macos U src/external/bsd/file/dist/magic/magdir/dump U src/external/bsd/file/dist/magic/magdir/c64 U src/external/bsd/file/dist/magic/magdir/interleaf U src/external/bsd/file/dist/magic/magdir/polyml U src/external/bsd/file/dist/magic/magdir/xilinx U src/external/bsd/file/dist/magic/magdir/timezone U src/external/bsd/file/dist/magic/magdir/apl U src/external/bsd/file/dist/magic/magdir/assembler U src/external/bsd/file/dist/magic/magdir/vicar U src/external/bsd/file/dist/magic/magdir/ibm370 U src/external/bsd/file/dist/magic/magdir/vorbis U src/external/bsd/file/dist/magic/magdir/sgi U src/external/bsd/file/dist/magic/magdir/hp U src/external/bsd/file/dist/magic/magdir/msvc U
CVS commit: src/sys/arch/arm/sunxi
Module Name:src Committed By: jmcneill Date: Sun Apr 15 18:24:52 UTC 2018 Modified Files: src/sys/arch/arm/sunxi: sunxi_mmc.c Log Message: Simplify interrupt handling by only enabling interrupts for events that we actually need. After we've consumed the event, mask the interrupt. To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 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.21 src/sys/arch/arm/sunxi/sunxi_mmc.c:1.22 --- src/sys/arch/arm/sunxi/sunxi_mmc.c:1.21 Mon Mar 19 08:57:57 2018 +++ src/sys/arch/arm/sunxi/sunxi_mmc.c Sun Apr 15 18:24:52 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: sunxi_mmc.c,v 1.21 2018/03/19 08:57:57 ryo Exp $ */ +/* $NetBSD: sunxi_mmc.c,v 1.22 2018/04/15 18:24:52 jmcneill 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.21 2018/03/19 08:57:57 ryo Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sunxi_mmc.c,v 1.22 2018/04/15 18:24:52 jmcneill Exp $"); #include #include @@ -555,7 +555,7 @@ static int sunxi_mmc_intr(void *priv) { struct sunxi_mmc_softc *sc = priv; - uint32_t idst, rint; + uint32_t idst, rint, imask; mutex_enter(>sc_intr_lock); idst = MMC_READ(sc, SUNXI_MMC_IDST); @@ -565,17 +565,20 @@ sunxi_mmc_intr(void *priv) return 0; } MMC_WRITE(sc, SUNXI_MMC_IDST, idst); - MMC_WRITE(sc, SUNXI_MMC_RINT, rint); + MMC_WRITE(sc, SUNXI_MMC_RINT, rint & ~SUNXI_MMC_INT_SDIO_INT); DPRINTF(sc->sc_dev, "mmc intr idst=%08X rint=%08X\n", idst, rint); if (idst != 0) { + MMC_WRITE(sc, SUNXI_MMC_IDIE, 0); sc->sc_idma_idst |= idst; cv_broadcast(>sc_idst_cv); } if ((rint & ~SUNXI_MMC_INT_SDIO_INT) != 0) { + imask = MMC_READ(sc, SUNXI_MMC_IMASK); + MMC_WRITE(sc, SUNXI_MMC_IMASK, imask & ~SUNXI_MMC_INT_SDIO_INT); sc->sc_intr_rint |= (rint & ~SUNXI_MMC_INT_SDIO_INT); cv_broadcast(>sc_intr_cv); } @@ -629,12 +632,14 @@ static int sunxi_mmc_host_reset(sdmmc_chipset_handle_t sch) { struct sunxi_mmc_softc *sc = sch; + uint32_t gctrl; int retry = 1000; DPRINTF(sc->sc_dev, "host reset\n"); - MMC_WRITE(sc, SUNXI_MMC_GCTRL, - MMC_READ(sc, SUNXI_MMC_GCTRL) | SUNXI_MMC_GCTRL_RESET); + gctrl = MMC_READ(sc, SUNXI_MMC_GCTRL); + gctrl |= SUNXI_MMC_GCTRL_RESET; + MMC_WRITE(sc, SUNXI_MMC_GCTRL, gctrl); while (--retry > 0) { if (!(MMC_READ(sc, SUNXI_MMC_GCTRL) & SUNXI_MMC_GCTRL_RESET)) break; @@ -643,12 +648,15 @@ sunxi_mmc_host_reset(sdmmc_chipset_handl MMC_WRITE(sc, SUNXI_MMC_TIMEOUT, 0x); - MMC_WRITE(sc, SUNXI_MMC_IMASK, - SUNXI_MMC_INT_CMD_DONE | SUNXI_MMC_INT_ERROR | - SUNXI_MMC_INT_DATA_OVER | SUNXI_MMC_INT_AUTO_CMD_DONE); + MMC_WRITE(sc, SUNXI_MMC_IMASK, 0); - MMC_WRITE(sc, SUNXI_MMC_GCTRL, - MMC_READ(sc, SUNXI_MMC_GCTRL) | SUNXI_MMC_GCTRL_INTEN); + MMC_WRITE(sc, SUNXI_MMC_RINT, 0x); + + gctrl = MMC_READ(sc, SUNXI_MMC_GCTRL); + gctrl |= SUNXI_MMC_GCTRL_INTEN; + gctrl &= ~SUNXI_MMC_GCTRL_WAIT_MEM_ACCESS_DONE; + gctrl &= ~SUNXI_MMC_GCTRL_ACCESS_BY_AHB; + MMC_WRITE(sc, SUNXI_MMC_GCTRL, gctrl); return 0; } @@ -965,24 +973,23 @@ sunxi_mmc_dma_prepare(struct sunxi_mmc_s sc->sc_idma_idst = 0; + MMC_WRITE(sc, SUNXI_MMC_DLBA, desc_paddr); + MMC_WRITE(sc, SUNXI_MMC_FTRGLEVEL, sc->sc_config->dma_ftrglevel); + val = MMC_READ(sc, SUNXI_MMC_GCTRL); val |= SUNXI_MMC_GCTRL_DMAEN; - val |= SUNXI_MMC_GCTRL_INTEN; MMC_WRITE(sc, SUNXI_MMC_GCTRL, val); val |= SUNXI_MMC_GCTRL_DMARESET; MMC_WRITE(sc, SUNXI_MMC_GCTRL, val); + MMC_WRITE(sc, SUNXI_MMC_DMAC, SUNXI_MMC_DMAC_SOFTRESET); - MMC_WRITE(sc, SUNXI_MMC_DMAC, - SUNXI_MMC_DMAC_IDMA_ON|SUNXI_MMC_DMAC_FIX_BURST); - val = MMC_READ(sc, SUNXI_MMC_IDIE); - val &= ~(SUNXI_MMC_IDST_RECEIVE_INT|SUNXI_MMC_IDST_TRANSMIT_INT); if (ISSET(cmd->c_flags, SCF_CMD_READ)) - val |= SUNXI_MMC_IDST_RECEIVE_INT; + val = SUNXI_MMC_IDST_RECEIVE_INT; else - val |= SUNXI_MMC_IDST_TRANSMIT_INT; + val = 0; MMC_WRITE(sc, SUNXI_MMC_IDIE, val); - MMC_WRITE(sc, SUNXI_MMC_DLBA, desc_paddr); - MMC_WRITE(sc, SUNXI_MMC_FTRGLEVEL, sc->sc_config->dma_ftrglevel); + MMC_WRITE(sc, SUNXI_MMC_DMAC, + SUNXI_MMC_DMAC_IDMA_ON|SUNXI_MMC_DMAC_FIX_BURST); return 0; } @@ -990,6 +997,8 @@ sunxi_mmc_dma_prepare(struct sunxi_mmc_s static void sunxi_mmc_dma_complete(struct sunxi_mmc_softc *sc, struct sdmmc_command *cmd) { + MMC_WRITE(sc, SUNXI_MMC_DMAC, 0); + bus_dmamap_sync(sc->sc_dmat, sc->sc_idma_map, 0, sc->sc_idma_size, BUS_DMASYNC_POSTWRITE); @@ -1011,6 +1020,7 @@ sunxi_mmc_exec_command(sdmmc_chipset_han { struct sunxi_mmc_softc *sc = sch; uint32_t cmdval = SUNXI_MMC_CMD_START; + uint32_t imask, oimask; const bool poll = (cmd->c_flags & SCF_POLL) != 0; int retry; @@ -1030,6 +1040,9 @@
CVS commit: src/sys/sys
Module Name:src Committed By: maxv Date: Sun Apr 15 17:26:39 UTC 2018 Modified Files: src/sys/sys: mbuf.h Log Message: clarify To generate a diff of this commit: cvs rdiff -u -r1.186 -r1.187 src/sys/sys/mbuf.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/sys/mbuf.h diff -u src/sys/sys/mbuf.h:1.186 src/sys/sys/mbuf.h:1.187 --- src/sys/sys/mbuf.h:1.186 Sun Apr 15 07:35:49 2018 +++ src/sys/sys/mbuf.h Sun Apr 15 17:26:39 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: mbuf.h,v 1.186 2018/04/15 07:35:49 maxv Exp $ */ +/* $NetBSD: mbuf.h,v 1.187 2018/04/15 17:26:39 maxv Exp $ */ /* * Copyright (c) 1996, 1997, 1999, 2001, 2007 The NetBSD Foundation, Inc. @@ -254,7 +254,9 @@ struct pkthdr { #define M_EXT_MAXPAGES ((65536 / MIN_PAGE_SIZE) + 1) #endif -/* description of external storage mapped into mbuf, valid if M_EXT set */ +/* + * Description of external storage mapped into mbuf, valid if M_EXT set. + */ struct _m_ext_storage { unsigned int ext_refcnt; int ext_flags; @@ -263,19 +265,18 @@ struct _m_ext_storage { (struct mbuf *, void *, size_t, void *); void *ext_arg; /* argument for ext_free */ size_t ext_size; /* size of buffer, for ext_free */ + union { - paddr_t extun_paddr; /* physical address (M_EXT_CLUSTER) */ - /* pages (M_EXT_PAGES) */ - /* - * XXX This is gross, but it doesn't really matter; this is - * XXX overlaid on top of the mbuf data area. - */ + /* M_EXT_CLUSTER: physical address */ + paddr_t extun_paddr; #ifdef M_EXT_MAXPAGES + /* M_EXT_PAGES: pages */ struct vm_page *extun_pgs[M_EXT_MAXPAGES]; #endif } ext_un; #define ext_paddr ext_un.extun_paddr #define ext_pgs ext_un.extun_pgs + #ifdef DEBUG const char *ext_ofile; const char *ext_nfile; @@ -297,12 +298,12 @@ struct _m_ext { */ #define MBUF_DEFINE(name, mhlen, mlen) \ struct name { \ - struct m_hdr m_hdr; \ + struct m_hdr m_hdr; \ union { \ struct { \ -struct pkthdr MH_pkthdr; \ +struct pkthdr MH_pkthdr; \ union { \ - struct _m_ext MH_ext; \ + struct _m_ext MH_ext; \ char MH_databuf[(mhlen)]; \ } MH_dat;\ } MH; \
CVS commit: src
Module Name:src Committed By: jakllsch Date: Sun Apr 15 17:22:03 UTC 2018 Modified Files: src: UPDATING Log Message: Add a note about potential tools build failure due to yesterday's binutils sources juggling. To generate a diff of this commit: cvs rdiff -u -r1.292 -r1.293 src/UPDATING Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/UPDATING diff -u src/UPDATING:1.292 src/UPDATING:1.293 --- src/UPDATING:1.292 Sun Mar 11 11:18:06 2018 +++ src/UPDATING Sun Apr 15 17:22:03 2018 @@ -1,4 +1,4 @@ -$NetBSD: UPDATING,v 1.292 2018/03/11 11:18:06 mrg Exp $ +$NetBSD: UPDATING,v 1.293 2018/04/15 17:22:03 jakllsch Exp $ This file (UPDATING) is intended to be a brief reference to recent changes that might cause problems in the build process, and a guide for @@ -19,6 +19,11 @@ See also: BUILDING, build.sh, Makefile. Recent changes: ^^^ +20180414: + Existing binutils was migrated to binutils.old. Manual + removal of tools/binutils objects directory may be required + to fix tools build failure. + 20180311: bdftopcf was updated and may need cleaning in the src/external/mit/xorg/tools/bdftopcf subdirectory if there are
CVS commit: src/tools/gcc
Module Name:src Committed By: christos Date: Sun Apr 15 15:13:37 UTC 2018 Modified Files: src/tools/gcc: mknative.common Log Message: fix the variable name for then non-gmake case. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/tools/gcc/mknative.common Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tools/gcc/mknative.common diff -u src/tools/gcc/mknative.common:1.15 src/tools/gcc/mknative.common:1.16 --- src/tools/gcc/mknative.common:1.15 Tue Nov 28 22:32:28 2017 +++ src/tools/gcc/mknative.common Sun Apr 15 11:13:37 2018 @@ -1,4 +1,4 @@ -# $NetBSD: mknative.common,v 1.15 2017/11/29 03:32:28 christos Exp $ +# $NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp $ # # from: NetBSD: mknative,v 1.12 2003/03/05 06:17:17 mrg Exp # @@ -37,12 +37,12 @@ _x_: EOF ;; *) - $MAKE -B -f - _x_ <$_TOP/$1.tmp || \ bomb "cannot create $1" grep '$''NetBSD' $0 | sed 's,[ #$],,g;s,.*,/* Generated from: & */,' >>$_TOP/$1.tmp - echo '$NetBSD: mknative.common,v 1.15 2017/11/29 03:32:28 christos Exp $' | sed 's,[#$],,g;s,.*,/* Generated from: & */,' >>$_TOP/$1.tmp + echo '$NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp $' | sed 's,[#$],,g;s,.*,/* Generated from: & */,' >>$_TOP/$1.tmp echo '' >>$_TOP/$1.tmp writefile $1 } @@ -77,7 +77,7 @@ write_mk() echo '# This file is automatically generated. DO NOT EDIT!' >$_TOP/$1.tmp || \ bomb "cannot create $1" grep '$''NetBSD' $0 | sed 's,[ #$],,g;s,.*,# Generated from: &,' >>$_TOP/$1.tmp - echo '$NetBSD: mknative.common,v 1.15 2017/11/29 03:32:28 christos Exp $' | sed 's,[#$],,g;s,.*,# Generated from: &,' >>$_TOP/$1.tmp + echo '$NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp $' | sed 's,[#$],,g;s,.*,# Generated from: &,' >>$_TOP/$1.tmp echo '#' >>$_TOP/$1.tmp writefile $1 }
CVS commit: src/sys/netinet6
Module Name:src Committed By: maxv Date: Sun Apr 15 08:31:18 UTC 2018 Modified Files: src/sys/netinet6: ip6_input.c Log Message: Remove useless DIAGNOSTIC block, the caller already ensures the assumptions, and here we're not doing anything (it should be a panic rather than a printf). To generate a diff of this commit: cvs rdiff -u -r1.197 -r1.198 src/sys/netinet6/ip6_input.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/netinet6/ip6_input.c diff -u src/sys/netinet6/ip6_input.c:1.197 src/sys/netinet6/ip6_input.c:1.198 --- src/sys/netinet6/ip6_input.c:1.197 Sun Apr 15 07:35:49 2018 +++ src/sys/netinet6/ip6_input.c Sun Apr 15 08:31:18 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: ip6_input.c,v 1.197 2018/04/15 07:35:49 maxv Exp $ */ +/* $NetBSD: ip6_input.c,v 1.198 2018/04/15 08:31:18 maxv Exp $ */ /* $KAME: ip6_input.c,v 1.188 2001/03/29 05:34:31 itojun Exp $ */ /* @@ -62,7 +62,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ip6_input.c,v 1.197 2018/04/15 07:35:49 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ip6_input.c,v 1.198 2018/04/15 08:31:18 maxv Exp $"); #ifdef _KERNEL_OPT #include "opt_gateway.h" @@ -1318,18 +1318,6 @@ ip6_pullexthdr(struct mbuf *m, size_t of size_t elen; struct mbuf *n; -#ifdef DIAGNOSTIC - switch (nxt) { - case IPPROTO_DSTOPTS: - case IPPROTO_ROUTING: - case IPPROTO_HOPOPTS: - case IPPROTO_AH: /* is it possible? */ - break; - default: - printf("ip6_pullexthdr: invalid nxt=%d\n", nxt); - } -#endif - m_copydata(m, off, sizeof(ip6e), (void *)); if (nxt == IPPROTO_AH) elen = (ip6e.ip6e_len + 2) << 2;
CVS commit: src/sbin/ping6
Module Name:src Committed By: maxv Date: Sun Apr 15 08:27:21 UTC 2018 Modified Files: src/sbin/ping6: ping6.c Log Message: typo in comment To generate a diff of this commit: cvs rdiff -u -r1.93 -r1.94 src/sbin/ping6/ping6.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/ping6/ping6.c diff -u src/sbin/ping6/ping6.c:1.93 src/sbin/ping6/ping6.c:1.94 --- src/sbin/ping6/ping6.c:1.93 Sun Dec 18 01:30:54 2016 +++ src/sbin/ping6/ping6.c Sun Apr 15 08:27:21 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: ping6.c,v 1.93 2016/12/18 01:30:54 dholland Exp $ */ +/* $NetBSD: ping6.c,v 1.94 2018/04/15 08:27:21 maxv Exp $ */ /* $KAME: ping6.c,v 1.164 2002/11/16 14:05:37 itojun Exp $ */ /* @@ -77,7 +77,7 @@ static char sccsid[] = "@(#)ping.c 8.1 ( #else #include #ifndef lint -__RCSID("$NetBSD: ping6.c,v 1.93 2016/12/18 01:30:54 dholland Exp $"); +__RCSID("$NetBSD: ping6.c,v 1.94 2018/04/15 08:27:21 maxv Exp $"); #endif #endif @@ -686,7 +686,7 @@ main(int argc, char *argv[]) } /* - * let the kerel pass extension headers of incoming packets, + * let the kernel pass extension headers of incoming packets, * for privileged socket options */ if ((options & F_VERBOSE) != 0) {
CVS commit: src/sys
Module Name:src Committed By: maxv Date: Sun Apr 15 07:35:49 UTC 2018 Modified Files: src/sys/kern: uipc_mbuf.c src/sys/netinet: ip_input.c src/sys/netinet6: ip6_input.c src/sys/netipsec: ipsec_input.c src/sys/sys: mbuf.h Log Message: Introduce a m_verify_packet function, that verifies the mbuf chain of a packet to ensure it is not malformed. Call this function in "points of interest", that are the IPv4/IPv6/IPsec entry points. There could be more. We use M_VERIFY_PACKET(m), declared under DIAGNOSTIC only. This function should not be called everywhere, especially not in places that temporarily manipulate (and clobber) the mbuf structure; once they're done they put the mbuf back in a correct format. To generate a diff of this commit: cvs rdiff -u -r1.187 -r1.188 src/sys/kern/uipc_mbuf.c cvs rdiff -u -r1.379 -r1.380 src/sys/netinet/ip_input.c cvs rdiff -u -r1.196 -r1.197 src/sys/netinet6/ip6_input.c cvs rdiff -u -r1.62 -r1.63 src/sys/netipsec/ipsec_input.c cvs rdiff -u -r1.185 -r1.186 src/sys/sys/mbuf.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/uipc_mbuf.c diff -u src/sys/kern/uipc_mbuf.c:1.187 src/sys/kern/uipc_mbuf.c:1.188 --- src/sys/kern/uipc_mbuf.c:1.187 Tue Apr 10 16:12:30 2018 +++ src/sys/kern/uipc_mbuf.c Sun Apr 15 07:35:49 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: uipc_mbuf.c,v 1.187 2018/04/10 16:12:30 maxv Exp $ */ +/* $NetBSD: uipc_mbuf.c,v 1.188 2018/04/15 07:35:49 maxv Exp $ */ /* * Copyright (c) 1999, 2001 The NetBSD Foundation, Inc. @@ -62,7 +62,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uipc_mbuf.c,v 1.187 2018/04/10 16:12:30 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uipc_mbuf.c,v 1.188 2018/04/15 07:35:49 maxv Exp $"); #ifdef _KERNEL_OPT #include "opt_mbuftrace.h" @@ -1888,6 +1888,67 @@ m_claim(struct mbuf *m, struct mowner *m } #endif /* defined(MBUFTRACE) */ +#ifdef DIAGNOSTIC +/* + * Verify that the mbuf chain is not malformed. Used only for diagnostic. + * Panics on error. + */ +void +m_verify_packet(struct mbuf *m) +{ + struct mbuf *n = m; + char *low, *high, *dat; + int totlen = 0, len; + + if (__predict_false((m->m_flags & M_PKTHDR) == 0)) { + panic("%s: mbuf doesn't have M_PKTHDR", __func__); + } + + while (n != NULL) { + if (__predict_false(n->m_type == MT_FREE)) { + panic("%s: mbuf already freed (n = %p)", __func__, n); + } + if (__predict_false((n != m) && (n->m_flags & M_PKTHDR) != 0)) { + panic("%s: M_PKTHDR set on secondary mbuf", __func__); + } + if (__predict_false(n->m_nextpkt != NULL)) { + panic("%s: m_nextpkt not null (m_nextpkt = %p)", + __func__, n->m_nextpkt); + } + + dat = n->m_data; + len = n->m_len; + + if (n->m_flags & M_EXT) { + low = n->m_ext.ext_buf; + high = low + n->m_ext.ext_size; + } else if (n->m_flags & M_PKTHDR) { + low = n->m_pktdat; + high = low + MHLEN; + } else { + low = n->m_dat; + high = low + MLEN; + } + if (__predict_false(dat + len <= dat)) { + panic("%s: incorrect length (len = %d)", __func__, len); + } + if (__predict_false((dat < low) || (dat + len > high))) { + panic("%s: m_data not in packet" + "(dat = %p, len = %d, low = %p, high = %p)", + __func__, dat, len, low, high); + } + + totlen += len; + n = n->m_next; + } + + if (__predict_false(totlen != m->m_pkthdr.len)) { + panic("%s: inconsistent mbuf length (%d != %d)", __func__, + totlen, m->m_pkthdr.len); + } +} +#endif + /* * Release a reference to the mbuf external storage. * Index: src/sys/netinet/ip_input.c diff -u src/sys/netinet/ip_input.c:1.379 src/sys/netinet/ip_input.c:1.380 --- src/sys/netinet/ip_input.c:1.379 Wed Apr 11 08:11:20 2018 +++ src/sys/netinet/ip_input.c Sun Apr 15 07:35:49 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: ip_input.c,v 1.379 2018/04/11 08:11:20 maxv Exp $ */ +/* $NetBSD: ip_input.c,v 1.380 2018/04/15 07:35:49 maxv Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -91,7 +91,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ip_input.c,v 1.379 2018/04/11 08:11:20 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ip_input.c,v 1.380 2018/04/15 07:35:49 maxv Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -766,6 +766,8 @@ ours: hlen = ip->ip_hl << 2; } + M_VERIFY_PACKET(m); + #ifdef IPSEC /* * Enforce IPsec policy checking if we are seeing last header. Index: src/sys/netinet6/ip6_input.c diff -u src/sys/netinet6/ip6_input.c:1.196 src/sys/netinet6/ip6_input.c:1.197 --- src/sys/netinet6/ip6_input.c:1.196 Wed Apr 11 07:55:19 2018 +++ src/sys/netinet6/ip6_input.c Sun Apr 15 07:35:49 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: ip6_input.c,v 1.196 2018/04/11 07:55:19 maxv Exp $ */ +/* $NetBSD: ip6_input.c,v 1.197 2018/04/15 07:35:49 maxv Exp $ */ /* $KAME: ip6_input.c,v 1.188 2001/03/29 05:34:31 itojun Exp $ */ /* @@ -62,7 +62,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ip6_input.c,v
CVS commit: [pgoyette-compat] src/sys/compat
Module Name:src Committed By: pgoyette Date: Sun Apr 15 06:23:31 UTC 2018 Modified Files: src/sys/compat/common [pgoyette-compat]: uipc_syscalls_40.c src/sys/compat/sys [pgoyette-compat]: sockio.h Log Message: Make compat_ifconf() and compat_ifdatareq() static To generate a diff of this commit: cvs rdiff -u -r1.15.2.6 -r1.15.2.7 src/sys/compat/common/uipc_syscalls_40.c cvs rdiff -u -r1.10.58.2 -r1.10.58.3 src/sys/compat/sys/sockio.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/common/uipc_syscalls_40.c diff -u src/sys/compat/common/uipc_syscalls_40.c:1.15.2.6 src/sys/compat/common/uipc_syscalls_40.c:1.15.2.7 --- src/sys/compat/common/uipc_syscalls_40.c:1.15.2.6 Thu Apr 12 22:33:41 2018 +++ src/sys/compat/common/uipc_syscalls_40.c Sun Apr 15 06:23:31 2018 @@ -1,9 +1,9 @@ -/* $NetBSD: uipc_syscalls_40.c,v 1.15.2.6 2018/04/12 22:33:41 pgoyette Exp $ */ +/* $NetBSD: uipc_syscalls_40.c,v 1.15.2.7 2018/04/15 06:23:31 pgoyette Exp $ */ /* written by Pavel Cahyna, 2006. Public domain. */ #include -__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls_40.c,v 1.15.2.6 2018/04/12 22:33:41 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls_40.c,v 1.15.2.7 2018/04/15 06:23:31 pgoyette Exp $"); /* * System call interface to the socket abstraction. @@ -31,7 +31,7 @@ __KERNEL_RCSID(0, "$NetBSD: uipc_syscall * other information. */ /*ARGSUSED*/ -int +static int compat_ifconf(u_long cmd, void *data) { struct oifconf *ifc = data; Index: src/sys/compat/sys/sockio.h diff -u src/sys/compat/sys/sockio.h:1.10.58.2 src/sys/compat/sys/sockio.h:1.10.58.3 --- src/sys/compat/sys/sockio.h:1.10.58.2 Thu Apr 12 22:33:41 2018 +++ src/sys/compat/sys/sockio.h Sun Apr 15 06:23:31 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: sockio.h,v 1.10.58.2 2018/04/12 22:33:41 pgoyette Exp $ */ +/* $NetBSD: sockio.h,v 1.10.58.3 2018/04/15 06:23:31 pgoyette Exp $ */ /*- * Copyright (c) 1982, 1986, 1990, 1993, 1994 @@ -186,11 +186,6 @@ struct oifdatareq { void if_50_init(void); void if_50_fini(void); -__BEGIN_DECLS -int compat_ifconf(u_long, void *); -int compat_ifdatareq(struct lwp *, u_long, void *); -__END_DECLS - #endif #endif /* _COMPAT_SYS_SOCKIO_H_ */