CVS commit: src
Module Name:src Committed By: christos Date: Thu Aug 9 08:30:29 UTC 2018 Modified Files: src: build.sh Log Message: Add some aliases (from phone) To generate a diff of this commit: cvs rdiff -u -r1.327 -r1.328 src/build.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/build.sh diff -u src/build.sh:1.327 src/build.sh:1.328 --- src/build.sh:1.327 Wed May 2 03:34:44 2018 +++ src/build.sh Thu Aug 9 04:30:29 2018 @@ -1,5 +1,5 @@ #! /usr/bin/env sh -# $NetBSD: build.sh,v 1.327 2018/05/02 07:34:44 pgoyette Exp $ +# $NetBSD: build.sh,v 1.328 2018/08/09 08:30:29 christos Exp $ # # Copyright (c) 2001-2011 The NetBSD Foundation, Inc. # All rights reserved. @@ -615,6 +615,7 @@ level of source directory" # valid_MACHINE_ARCH=' MACHINE=acorn32 MACHINE_ARCH=arm +MACHINE=acorn32 MACHINE_ARCH=earmv4 ALIAS=eacorn32 DEFAULT MACHINE=algor MACHINE_ARCH=mips64el ALIAS=algor64 MACHINE=algor MACHINE_ARCH=mipsel DEFAULT MACHINE=alpha MACHINE_ARCH=alpha @@ -633,6 +634,7 @@ MACHINE=cobalt MACHINE_ARCH=mipsel DEFA MACHINE=dreamcast MACHINE_ARCH=sh3el MACHINE=emips MACHINE_ARCH=mipseb MACHINE=epoc32 MACHINE_ARCH=arm +MACHINE=epoc32 MACHINE_ARCH=earmv4 ALIAS=eepoc32 DEFAULT MACHINE=evbarm MACHINE_ARCH=arm ALIAS=evboarm-el MACHINE=evbarm MACHINE_ARCH=armeb ALIAS=evboarm-eb MACHINE=evbarm MACHINE_ARCH=earm ALIAS=evbearm-el DEFAULT @@ -651,7 +653,7 @@ MACHINE=evbarm MACHINE_ARCH=earmv7 ALIA MACHINE=evbarm MACHINE_ARCH=earmv7eb ALIAS=evbearmv7-eb MACHINE=evbarm MACHINE_ARCH=earmv7hf ALIAS=evbearmv7hf-el MACHINE=evbarm MACHINE_ARCH=earmv7hfeb ALIAS=evbearmv7hf-eb -MACHINE=evbarm MACHINE_ARCH=aarch64 ALIAS=evbarm64-el DEFAULT +MACHINE=evbarm MACHINE_ARCH=aarch64 ALIAS=evbarm64-el ALIAS=evbarm64 DEFAULT MACHINE=evbarm MACHINE_ARCH=aarch64eb ALIAS=evbarm64-eb MACHINE=evbcf MACHINE_ARCH=coldfire MACHINE=evbmips MACHINE_ARCH= NO_DEFAULT @@ -1932,7 +1934,7 @@ createmakewrapper() eval cat <
CVS commit: src/crypto/external/bsd/openssh/dist
Module Name:src Committed By: christos Date: Thu Aug 9 08:32:41 UTC 2018 Modified Files: src/crypto/external/bsd/openssh/dist: monitor_wrap.c mux.c packet.c serverloop.c session.c Log Message: change some 255's to 254's to avoid being too aggressive blacklisting. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 \ src/crypto/external/bsd/openssh/dist/monitor_wrap.c \ src/crypto/external/bsd/openssh/dist/mux.c \ src/crypto/external/bsd/openssh/dist/serverloop.c cvs rdiff -u -r1.31 -r1.32 src/crypto/external/bsd/openssh/dist/packet.c cvs rdiff -u -r1.24 -r1.25 src/crypto/external/bsd/openssh/dist/session.c 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/openssh/dist/monitor_wrap.c diff -u src/crypto/external/bsd/openssh/dist/monitor_wrap.c:1.19 src/crypto/external/bsd/openssh/dist/monitor_wrap.c:1.20 --- src/crypto/external/bsd/openssh/dist/monitor_wrap.c:1.19 Fri Apr 6 14:59:00 2018 +++ src/crypto/external/bsd/openssh/dist/monitor_wrap.c Thu Aug 9 04:32:41 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: monitor_wrap.c,v 1.19 2018/04/06 18:59:00 christos Exp $ */ +/* $NetBSD: monitor_wrap.c,v 1.20 2018/08/09 08:32:41 christos Exp $ */ /* $OpenBSD: monitor_wrap.c,v 1.99 2018/03/03 03:15:51 djm Exp $ */ /* * Copyright 2002 Niels Provos @@ -27,7 +27,7 @@ */ #include "includes.h" -__RCSID("$NetBSD: monitor_wrap.c,v 1.19 2018/04/06 18:59:00 christos Exp $"); +__RCSID("$NetBSD: monitor_wrap.c,v 1.20 2018/08/09 08:32:41 christos Exp $"); #include #include #include @@ -149,7 +149,7 @@ mm_request_receive(int sock, Buffer *m) if (atomicio(read, sock, buf, sizeof(buf)) != sizeof(buf)) { if (errno == EPIPE) - cleanup_exit(255); + cleanup_exit(254); fatal("%s: read: %s", __func__, strerror(errno)); } msg_len = get_u32(buf); Index: src/crypto/external/bsd/openssh/dist/mux.c diff -u src/crypto/external/bsd/openssh/dist/mux.c:1.19 src/crypto/external/bsd/openssh/dist/mux.c:1.20 --- src/crypto/external/bsd/openssh/dist/mux.c:1.19 Sat Oct 7 15:39:19 2017 +++ src/crypto/external/bsd/openssh/dist/mux.c Thu Aug 9 04:32:41 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: mux.c,v 1.19 2017/10/07 19:39:19 christos Exp $ */ +/* $NetBSD: mux.c,v 1.20 2018/08/09 08:32:41 christos Exp $ */ /* $OpenBSD: mux.c,v 1.69 2017/09/20 05:19:00 dtucker Exp $ */ /* * Copyright (c) 2002-2008 Damien Miller @@ -32,7 +32,7 @@ */ #include "includes.h" -__RCSID("$NetBSD: mux.c,v 1.19 2017/10/07 19:39:19 christos Exp $"); +__RCSID("$NetBSD: mux.c,v 1.20 2018/08/09 08:32:41 christos Exp $"); #include #include #include @@ -1324,7 +1324,7 @@ muxserver_listen(struct ssh *ssh) return; } else { /* unix_listener() logs the error */ - cleanup_exit(255); + cleanup_exit(254); } } Index: src/crypto/external/bsd/openssh/dist/serverloop.c diff -u src/crypto/external/bsd/openssh/dist/serverloop.c:1.19 src/crypto/external/bsd/openssh/dist/serverloop.c:1.20 --- src/crypto/external/bsd/openssh/dist/serverloop.c:1.19 Fri Apr 6 14:59:00 2018 +++ src/crypto/external/bsd/openssh/dist/serverloop.c Thu Aug 9 04:32:41 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: serverloop.c,v 1.19 2018/04/06 18:59:00 christos Exp $ */ +/* $NetBSD: serverloop.c,v 1.20 2018/08/09 08:32:41 christos Exp $ */ /* $OpenBSD: serverloop.c,v 1.205 2018/03/03 03:15:51 djm Exp $ */ /* * Author: Tatu Ylonen @@ -37,7 +37,7 @@ */ #include "includes.h" -__RCSID("$NetBSD: serverloop.c,v 1.19 2018/04/06 18:59:00 christos Exp $"); +__RCSID("$NetBSD: serverloop.c,v 1.20 2018/08/09 08:32:41 christos Exp $"); #include /* MIN MAX */ #include @@ -331,7 +331,7 @@ process_input(struct ssh *ssh, fd_set *r "%.100s port %d: %.100s", ssh_remote_ipaddr(ssh), ssh_remote_port(ssh), strerror(errno)); -cleanup_exit(255); +cleanup_exit(254); } } else { /* Buffer any received data. */ @@ -428,7 +428,7 @@ server_loop2(struct ssh *ssh, Authctxt * if (received_sigterm) { logit("Exiting on signal %d", (int)received_sigterm); /* Clean up sessions, utmp, etc. */ - cleanup_exit(255); + cleanup_exit(254); } collect_children(ssh); Index: src/crypto/external/bsd/openssh/dist/packet.c diff -u src/crypto/external/bsd/openssh/dist/packet.c:1.31 src/crypto/external/bsd/openssh/dist/packet.c:1.32 --- src/crypto/external/bsd/openssh/dist/packet.c:1.31 Fri Apr 6 14:59:00 2018 +++ src/crypto/external/bsd/openssh/dist/packet.c Thu Aug 9 04:32:41 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: packet.c,v 1.31 2018/04/06 18:59:00 christos Exp $ */ +/* $NetBSD: packet.c,v 1.32 2018/08/09 08:32:41 christos Exp $ */ /* $OpenBSD: packet.c,v 1.269 2017/12/18 23:13:42 djm Exp $ */ /* * Author: Tatu Ylonen @@ -39,7 +39,7 @@ */ #include "includes.h" -__RCSID("$NetBSD: packet.c,v 1.31 2018/04/06 18:59:00 christos Exp $"); +__RCSID("$NetBSD: packet.c,v 1.32 2018/08
CVS commit: src/sys/fs/tmpfs
Module Name:src Committed By: christos Date: Thu Aug 9 08:43:56 UTC 2018 Modified Files: src/sys/fs/tmpfs: tmpfs_vfsops.c Log Message: FIx performance regression from rmind@: Just from a very quick look, it seems like a regression introduced with the vcache changes: the MP-safe flag is set too late and not inherited by the root vnode. To generate a diff of this commit: cvs rdiff -u -r1.72 -r1.73 src/sys/fs/tmpfs/tmpfs_vfsops.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/fs/tmpfs/tmpfs_vfsops.c diff -u src/sys/fs/tmpfs/tmpfs_vfsops.c:1.72 src/sys/fs/tmpfs/tmpfs_vfsops.c:1.73 --- src/sys/fs/tmpfs/tmpfs_vfsops.c:1.72 Wed May 31 22:45:13 2017 +++ src/sys/fs/tmpfs/tmpfs_vfsops.c Thu Aug 9 04:43:56 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: tmpfs_vfsops.c,v 1.72 2017/06/01 02:45:13 chs Exp $ */ +/* $NetBSD: tmpfs_vfsops.c,v 1.73 2018/08/09 08:43:56 christos Exp $ */ /* * Copyright (c) 2005, 2006, 2007 The NetBSD Foundation, Inc. @@ -42,7 +42,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: tmpfs_vfsops.c,v 1.72 2017/06/01 02:45:13 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tmpfs_vfsops.c,v 1.73 2018/08/09 08:43:56 christos Exp $"); #include #include @@ -182,6 +182,13 @@ tmpfs_mount(struct mount *mp, const char return 0; } + mp->mnt_flag |= MNT_LOCAL; + mp->mnt_stat.f_namemax = TMPFS_MAXNAMLEN; + mp->mnt_fs_bshift = PAGE_SHIFT; + mp->mnt_dev_bshift = DEV_BSHIFT; + mp->mnt_iflag |= IMNT_MPSAFE | IMNT_CAN_RWTORO; + vfs_getnewfsid(mp); + /* Allocate the tmpfs mount structure and fill it. */ tmp = kmem_zalloc(sizeof(tmpfs_mount_t), KM_SLEEP); tmp->tm_nodes_max = nodes; @@ -220,13 +227,6 @@ tmpfs_mount(struct mount *mp, const char tmp->tm_root = root; vrele(vp); - mp->mnt_flag |= MNT_LOCAL; - mp->mnt_stat.f_namemax = TMPFS_MAXNAMLEN; - mp->mnt_fs_bshift = PAGE_SHIFT; - mp->mnt_dev_bshift = DEV_BSHIFT; - mp->mnt_iflag |= IMNT_MPSAFE | IMNT_CAN_RWTORO; - vfs_getnewfsid(mp); - error = set_statvfs_info(path, UIO_USERSPACE, "tmpfs", UIO_SYSSPACE, mp->mnt_op->vfs_name, mp, curlwp); if (error) {
CVS commit: src/sys/arch/aarch64/include
Module Name:src Committed By: jmcneill Date: Thu Aug 9 10:27:17 UTC 2018 Modified Files: src/sys/arch/aarch64/include: armreg.h Log Message: Restore ICC_SRE_EL2 registers lost in previous commit To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/arch/aarch64/include/armreg.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/arch/aarch64/include/armreg.h diff -u src/sys/arch/aarch64/include/armreg.h:1.15 src/sys/arch/aarch64/include/armreg.h:1.16 --- src/sys/arch/aarch64/include/armreg.h:1.15 Wed Aug 8 19:00:53 2018 +++ src/sys/arch/aarch64/include/armreg.h Thu Aug 9 10:27:17 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: armreg.h,v 1.15 2018/08/08 19:00:53 jmcneill Exp $ */ +/* $NetBSD: armreg.h,v 1.16 2018/08/09 10:27:17 jmcneill Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -976,6 +976,12 @@ AARCH64REG_READ_INLINE2(icc_iar1_el1, s3 #define ICC_SRE_EL1_DFB __BIT(1) #define ICC_SRE_EL1_SRE __BIT(0) +// ICC_SRE_EL2: Interrupt Controller System Register Enable register +#define ICC_SRE_EL2_EN __BIT(3) +#define ICC_SRE_EL2_DIB __BIT(2) +#define ICC_SRE_EL2_DFB __BIT(1) +#define ICC_SRE_EL2_SRE __BIT(0) + // ICC_BPR[01]_EL1: Interrupt Controller Binary Point Register 0/1 #define ICC_BPR_EL1_BinaryPoint __BITS(2,0)
CVS commit: src/tests/lib/libc/misc
Module Name:src Committed By: christos Date: Thu Aug 9 12:45:15 UTC 2018 Modified Files: src/tests/lib/libc/misc: Makefile Log Message: Fix stack protector build. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libc/misc/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/lib/libc/misc/Makefile diff -u src/tests/lib/libc/misc/Makefile:1.1 src/tests/lib/libc/misc/Makefile:1.2 --- src/tests/lib/libc/misc/Makefile:1.1 Fri Aug 3 00:18:40 2018 +++ src/tests/lib/libc/misc/Makefile Thu Aug 9 08:45:15 2018 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 2018/08/03 04:18:40 kamil Exp $ +# $NetBSD: Makefile,v 1.2 2018/08/09 12:45:15 christos Exp $ .include @@ -24,5 +24,7 @@ CWARNFLAGS+= -Wno-return-type -Wno-stri CWARNFLAGS.clang+= -Wno-incompatible-pointer-types-discards-qualifiers CWARNFLAGS.clang+= -Wno-nullability-completeness .endif +COPTS.t_ubsan.c += -Wno-stack-protector +COPTS.t_ubsanxx.cpp += -Wno-stack-protector .include
CVS commit: [netbsd-8] src/crypto/external/bsd/openssl/dist/crypto
Module Name:src Committed By: martin Date: Thu Aug 9 13:21:36 UTC 2018 Modified Files: src/crypto/external/bsd/openssl/dist/crypto/evp [netbsd-8]: evp.h src/crypto/external/bsd/openssl/dist/crypto/x509 [netbsd-8]: x509_vfy.h Log Message: Pull up following revision(s) (requested by christos in ticket #967): crypto/external/bsd/openssl.old/dist/crypto/evp/evp.h: revision 1.6 crypto/external/bsd/openssl.old/dist/crypto/x509/x509_vfy.h: revision 1.2 (applied to crypto/external/bsd/openssl/) Add missing functions for racoon2 to compile under netbsd-8 >From Chuck Zmudzinski XXX: pullup-8 (to openssl not openssl.old) To generate a diff of this commit: cvs rdiff -u -r1.1.1.9.4.1 -r1.1.1.9.4.2 \ src/crypto/external/bsd/openssl/dist/crypto/evp/evp.h cvs rdiff -u -r1.2 -r1.2.6.1 \ src/crypto/external/bsd/openssl/dist/crypto/x509/x509_vfy.h 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/openssl/dist/crypto/evp/evp.h diff -u src/crypto/external/bsd/openssl/dist/crypto/evp/evp.h:1.1.1.9.4.1 src/crypto/external/bsd/openssl/dist/crypto/evp/evp.h:1.1.1.9.4.2 --- src/crypto/external/bsd/openssl/dist/crypto/evp/evp.h:1.1.1.9.4.1 Sat Jun 23 10:52:31 2018 +++ src/crypto/external/bsd/openssl/dist/crypto/evp/evp.h Thu Aug 9 13:21:36 2018 @@ -1559,6 +1559,14 @@ static inline RSA *EVP_PKEY_get0_RSA(EVP return pkey->pkey.rsa; } +static inline DSA *EVP_PKEY_get0_DSA(EVP_PKEY *pkey) +{ + if (pkey->type != EVP_PKEY_DSA) { + return NULL; + } + return pkey->pkey.dsa; +} + #endif Index: src/crypto/external/bsd/openssl/dist/crypto/x509/x509_vfy.h diff -u src/crypto/external/bsd/openssl/dist/crypto/x509/x509_vfy.h:1.2 src/crypto/external/bsd/openssl/dist/crypto/x509/x509_vfy.h:1.2.6.1 --- src/crypto/external/bsd/openssl/dist/crypto/x509/x509_vfy.h:1.2 Fri Oct 14 16:23:21 2016 +++ src/crypto/external/bsd/openssl/dist/crypto/x509/x509_vfy.h Thu Aug 9 13:21:36 2018 @@ -645,6 +645,15 @@ STACK_OF(POLICYQUALINFO) *X509_policy_no *node); const X509_POLICY_NODE *X509_policy_node_get0_parent(const X509_POLICY_NODE *node); +#if OPENSSL_API_COMPAT >= 0x1010L + +static inline X509 * +X509_STORE_CTX_get0_cert(X509_STORE_CTX *x) +{ + return X509_STORE_CTX_get_current_cert(x); +} + +#endif #ifdef __cplusplus }
CVS commit: [netbsd-8] src/sys/fs/tmpfs
Module Name:src Committed By: martin Date: Thu Aug 9 13:24:41 UTC 2018 Modified Files: src/sys/fs/tmpfs [netbsd-8]: tmpfs_vfsops.c Log Message: Pull up following revision(s) (requested by christos in ticket #968): sys/fs/tmpfs/tmpfs_vfsops.c: revision 1.73 Fix tmpfs performance regression from rmind@: Just from a very quick look, it seems like a regression introduced with the vcache changes: the MP-safe flag is set too late and not inherited by the root vnode. To generate a diff of this commit: cvs rdiff -u -r1.72 -r1.72.2.1 src/sys/fs/tmpfs/tmpfs_vfsops.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/fs/tmpfs/tmpfs_vfsops.c diff -u src/sys/fs/tmpfs/tmpfs_vfsops.c:1.72 src/sys/fs/tmpfs/tmpfs_vfsops.c:1.72.2.1 --- src/sys/fs/tmpfs/tmpfs_vfsops.c:1.72 Thu Jun 1 02:45:13 2017 +++ src/sys/fs/tmpfs/tmpfs_vfsops.c Thu Aug 9 13:24:41 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: tmpfs_vfsops.c,v 1.72 2017/06/01 02:45:13 chs Exp $ */ +/* $NetBSD: tmpfs_vfsops.c,v 1.72.2.1 2018/08/09 13:24:41 martin Exp $ */ /* * Copyright (c) 2005, 2006, 2007 The NetBSD Foundation, Inc. @@ -42,7 +42,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: tmpfs_vfsops.c,v 1.72 2017/06/01 02:45:13 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tmpfs_vfsops.c,v 1.72.2.1 2018/08/09 13:24:41 martin Exp $"); #include #include @@ -182,6 +182,13 @@ tmpfs_mount(struct mount *mp, const char return 0; } + mp->mnt_flag |= MNT_LOCAL; + mp->mnt_stat.f_namemax = TMPFS_MAXNAMLEN; + mp->mnt_fs_bshift = PAGE_SHIFT; + mp->mnt_dev_bshift = DEV_BSHIFT; + mp->mnt_iflag |= IMNT_MPSAFE | IMNT_CAN_RWTORO; + vfs_getnewfsid(mp); + /* Allocate the tmpfs mount structure and fill it. */ tmp = kmem_zalloc(sizeof(tmpfs_mount_t), KM_SLEEP); tmp->tm_nodes_max = nodes; @@ -220,13 +227,6 @@ tmpfs_mount(struct mount *mp, const char tmp->tm_root = root; vrele(vp); - mp->mnt_flag |= MNT_LOCAL; - mp->mnt_stat.f_namemax = TMPFS_MAXNAMLEN; - mp->mnt_fs_bshift = PAGE_SHIFT; - mp->mnt_dev_bshift = DEV_BSHIFT; - mp->mnt_iflag |= IMNT_MPSAFE | IMNT_CAN_RWTORO; - vfs_getnewfsid(mp); - error = set_statvfs_info(path, UIO_USERSPACE, "tmpfs", UIO_SYSSPACE, mp->mnt_op->vfs_name, mp, curlwp); if (error) {
CVS commit: [netbsd-8] src/doc
Module Name:src Committed By: martin Date: Thu Aug 9 13:25:35 UTC 2018 Modified Files: src/doc [netbsd-8]: CHANGES-8.1 Log Message: Tickets #967 and #968 To generate a diff of this commit: cvs rdiff -u -r1.1.2.8 -r1.1.2.9 src/doc/CHANGES-8.1 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.1 diff -u src/doc/CHANGES-8.1:1.1.2.8 src/doc/CHANGES-8.1:1.1.2.9 --- src/doc/CHANGES-8.1:1.1.2.8 Wed Aug 8 10:37:27 2018 +++ src/doc/CHANGES-8.1 Thu Aug 9 13:25:35 2018 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-8.1,v 1.1.2.8 2018/08/08 10:37:27 martin Exp $ +# $NetBSD: CHANGES-8.1,v 1.1.2.9 2018/08/09 13:25:35 martin Exp $ A complete list of changes from the NetBSD 8.0 release to the NetBSD 8.1 release: @@ -384,3 +384,15 @@ sys/external/bsd/dwc2/dist/dwc2_hcdqueue Fix woeful USB disk performance on ERLITE. [simonb, ticket #966] +crypto/external/bsd/openssl.old/dist/crypto/evp/evp.h 1.6 +crypto/external/bsd/openssl.old/dist/crypto/x509/x509_vfy.h 1.2 + (applied to crypto/external/bsd/openssl/) + + Add missing functions for racoon2 to compile under netbsd-8. + [christos, ticket #967] + +sys/fs/tmpfs/tmpfs_vfsops.c 1.73 + + Set the MP-safe flag for tmpfs early enough for the root vnode. + [christos, ticket #968] +
CVS commit: src/sys/fs/udf
Module Name:src Committed By: reinoud Date: Thu Aug 9 13:49:30 UTC 2018 Modified Files: src/sys/fs/udf: ecma167-udf.h Log Message: Sync with UDFclient To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/fs/udf/ecma167-udf.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/fs/udf/ecma167-udf.h diff -u src/sys/fs/udf/ecma167-udf.h:1.15 src/sys/fs/udf/ecma167-udf.h:1.16 --- src/sys/fs/udf/ecma167-udf.h:1.15 Wed Jul 25 19:56:56 2018 +++ src/sys/fs/udf/ecma167-udf.h Thu Aug 9 13:49:30 2018 @@ -1,8 +1,8 @@ -/* $NetBSD: ecma167-udf.h,v 1.15 2018/07/25 19:56:56 kamil Exp $ */ +/* $NetBSD: ecma167-udf.h,v 1.16 2018/08/09 13:49:30 reinoud Exp $ */ /*- - * Copyright (c) 2003, 2004, 2005, 2006, 2008, 2009 - * Reinoud Zandijk * + * Copyright (c) 2003, 2004, 2005, 2006, 2008, 2009, 2017, 2018 + * Reinoud Zandijk * Copyright (c) 2001, 2002 Scott Long * All rights reserved. * @@ -264,7 +264,10 @@ struct regid { struct icb_tag { uint32_t prev_num_dirs; uint16_t strat_type; - uint8_t strat_param[2]; + union { + uint8_t strat_param[2]; + uint16_t strat_param16; + }; uint16_t max_num_entries; uint8_t reserved; uint8_t file_type; @@ -682,7 +685,10 @@ struct impl_extattr_entry { struct extattr_entryhdr; uint32_t iu_l; struct regid imp_id; - uint8_t data[1]; + union { + uint8_t data[1]; + uint16_t data16; + }; } __packed;
CVS commit: [netbsd-7] src/lib/libcurses
Module Name:src Committed By: martin Date: Thu Aug 9 14:38:16 UTC 2018 Modified Files: src/lib/libcurses [netbsd-7]: addbytes.c Log Message: Pull up following revision(s) (requested by simonb in ticket #1627): lib/libcurses/addbytes.c: revision 1.48 Avoid curx going beyond end of window when adding a wide character to the last column. OK @blymn. To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.42.4.1 src/lib/libcurses/addbytes.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/libcurses/addbytes.c diff -u src/lib/libcurses/addbytes.c:1.42 src/lib/libcurses/addbytes.c:1.42.4.1 --- src/lib/libcurses/addbytes.c:1.42 Sun Nov 10 03:14:16 2013 +++ src/lib/libcurses/addbytes.c Thu Aug 9 14:38:16 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: addbytes.c,v 1.42 2013/11/10 03:14:16 christos Exp $ */ +/* $NetBSD: addbytes.c,v 1.42.4.1 2018/08/09 14:38:16 martin Exp $ */ /* * Copyright (c) 1987, 1993, 1994 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)addbytes.c 8.4 (Berkeley) 5/4/94"; #else -__RCSID("$NetBSD: addbytes.c,v 1.42 2013/11/10 03:14:16 christos Exp $"); +__RCSID("$NetBSD: addbytes.c,v 1.42.4.1 2018/08/09 14:38:16 martin Exp $"); #endif #endif/* not lint */ @@ -572,7 +572,7 @@ _cursesi_addwchar(WINDOW *win, __LINE ** if (newx > *(*lnp)->lastchp) *(*lnp)->lastchp = newx; __touchline(win, *y, sx, (int) win->maxx - 1); - win->curx = sx; + *x = win->curx = sx; } else { win->curx = *x;
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: martin Date: Thu Aug 9 14:39:22 UTC 2018 Modified Files: src/doc [netbsd-7]: CHANGES-7.2 Log Message: Ticket #1627 To generate a diff of this commit: cvs rdiff -u -r1.1.2.101 -r1.1.2.102 src/doc/CHANGES-7.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-7.2 diff -u src/doc/CHANGES-7.2:1.1.2.101 src/doc/CHANGES-7.2:1.1.2.102 --- src/doc/CHANGES-7.2:1.1.2.101 Wed Aug 8 10:18:41 2018 +++ src/doc/CHANGES-7.2 Thu Aug 9 14:39:22 2018 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.2,v 1.1.2.101 2018/08/08 10:18:41 martin Exp $ +# $NetBSD: CHANGES-7.2,v 1.1.2.102 2018/08/09 14:39:22 martin Exp $ A complete list of changes from the NetBSD 7.1 release to the NetBSD 7.2 release: @@ -5838,3 +5838,9 @@ sys/dev/usb/usbdi.h1.93,1.95 function usb_rem_task_wait. [riastradh, ticket #1626] +lib/libcurses/addbytes.c 1.48 + + Avoid curx going beyond end of window when adding a wide character + to the last column. + [simonb, ticket #1627] +
CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Thu Aug 9 16:27:23 UTC 2018 Modified Files: src/sys/dev/pci: if_wm.c Log Message: Fix two bugs for non-SERDES fiber. Tested on 82544EI(0x1009), 82545GM(0x1027), 82546GB(0x107a), 82571GB(0x105f), 82572EI(0x107e). Tested on SERDES 82580(0x150e (Winyao SERDES SFP)) and 82580(0x150e) as regression test: - Fix a bug that the link can't detect in link interrupt function for non-SERDES fiber. When the signal is detected & STATUS_LU == 0 & RXCW == 0, it's required to set CTRL_SLU and CTRL_FD bit. wm_check_for_link() is the function to do it. If a link status change interrupt occured, call wm_check_for_link() before checking current link staus. - Fix a bug that 82542 misunderstand fiber's signal detection. CTRL_SWDPIN(1) is used for fiber's signal and it's value is reversed only on 82543 and 82544. Simplify the code and move it into a new function wm_tbi_havesignal() and use it. To generate a diff of this commit: cvs rdiff -u -r1.583 -r1.584 src/sys/dev/pci/if_wm.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/if_wm.c diff -u src/sys/dev/pci/if_wm.c:1.583 src/sys/dev/pci/if_wm.c:1.584 --- src/sys/dev/pci/if_wm.c:1.583 Tue Jun 26 06:48:01 2018 +++ src/sys/dev/pci/if_wm.c Thu Aug 9 16:27:23 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: if_wm.c,v 1.583 2018/06/26 06:48:01 msaitoh Exp $ */ +/* $NetBSD: if_wm.c,v 1.584 2018/08/09 16:27:23 msaitoh Exp $ */ /* * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc. @@ -83,7 +83,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.583 2018/06/26 06:48:01 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.584 2018/08/09 16:27:23 msaitoh Exp $"); #ifdef _KERNEL_OPT #include "opt_net_mpsafe.h" @@ -842,6 +842,7 @@ static bool wm_sgmii_uses_mdio(struct wm static int wm_sgmii_readreg(device_t, int, int); static void wm_sgmii_writereg(device_t, int, int, int); /* TBI related */ +static bool wm_tbi_havesignal(struct wm_softc *, uint32_t); static void wm_tbi_mediainit(struct wm_softc *); static int wm_tbi_mediachange(struct ifnet *); static void wm_tbi_mediastatus(struct ifnet *, struct ifmediareq *); @@ -8755,6 +8756,7 @@ wm_linkintr_tbi(struct wm_softc *sc, uin status = CSR_READ(sc, WMREG_STATUS); if (icr & ICR_LSC) { + wm_check_for_link(sc); if (status & STATUS_LU) { DPRINTF(WM_DEBUG_LINK, ("%s: LINK: LSC -> up %s\n", device_xname(sc->sc_dev), @@ -10962,6 +10964,23 @@ wm_sgmii_writereg(device_t dev, int phy, /* TBI related */ +static bool +wm_tbi_havesignal(struct wm_softc *sc, uint32_t ctrl) +{ + bool sig; + + sig = ctrl & CTRL_SWDPIN(1); + + /* + * On 82543 and 82544, the CTRL_SWDPIN(1) bit will be 0 if the optics + * detect a signal, 1 if they don't. + */ + if ((sc->sc_type == WM_T_82543) || (sc->sc_type == WM_T_82544)) + sig = !sig; + + return sig; +} + /* * wm_tbi_mediainit: * @@ -11053,9 +11072,11 @@ wm_tbi_mediachange(struct ifnet *ifp) { struct wm_softc *sc = ifp->if_softc; struct ifmedia_entry *ife = sc->sc_mii.mii_media.ifm_cur; - uint32_t status; + uint32_t status, ctrl; + bool signal; int i; + KASSERT(sc->sc_mediatype != WM_MEDIATYPE_COPPER); if (sc->sc_mediatype == WM_MEDIATYPE_SERDES) { /* XXX need some work for >= 82571 and < 82575 */ if (sc->sc_type < WM_T_82575) @@ -11085,14 +11106,13 @@ wm_tbi_mediachange(struct ifnet *ifp) CSR_WRITE_FLUSH(sc); delay(1000); - i = CSR_READ(sc, WMREG_CTRL) & CTRL_SWDPIN(1); - DPRINTF(WM_DEBUG_LINK,("%s: i = 0x%x\n", device_xname(sc->sc_dev),i)); + ctrl = CSR_READ(sc, WMREG_CTRL); + signal = wm_tbi_havesignal(sc, ctrl); - /* - * On 82544 chips and later, the CTRL_SWDPIN(1) bit will be set if the - * optics detect a signal, 0 if they don't. - */ - if (((i != 0) && (sc->sc_type > WM_T_82544)) || (i == 0)) { + DPRINTF(WM_DEBUG_LINK, ("%s: signal = %d\n", device_xname(sc->sc_dev), + signal)); + + if (signal) { /* Have signal; wait for the link to come up. */ for (i = 0; i < WM_LINKUP_TIMEOUT; i++) { delay(1); @@ -11198,7 +11218,10 @@ wm_check_for_link(struct wm_softc *sc) uint32_t rxcw; uint32_t ctrl; uint32_t status; - uint32_t sig; + bool signal; + + DPRINTF(WM_DEBUG_LINK, ("%s: %s called\n", + device_xname(sc->sc_dev), __func__)); if (sc->sc_mediatype == WM_MEDIATYPE_SERDES) { /* XXX need some work for >= 82571 */ @@ -11211,13 +11234,11 @@ wm_check_for_link(struct wm_softc *sc) rxcw = CSR_READ(sc, WMREG_RXCW); ctrl = CSR_READ(sc, WMREG_CTRL); status = CSR_READ(sc, WMREG_STATUS); - - sig = (sc->sc_type > WM_T_82544) ? CTRL_SWDPIN(1) : 0; - + signal = wm_tbi_havesignal(sc, ctrl); + DPRINTF(WM_DEBUG_LINK, - ("%s: %s: sig = %d, status_lu = %d, rxcw_c = %d\n", - device_xname(sc->sc_dev), __func__, - ((ctrl & CTRL_SWDPIN(1)) == sig), + ("%s: %s: signal = %d, status_lu = %d, rxcw_c = %d\n", + device_xname(sc->sc_
CVS commit: src/sys/arch/xen/xen
Module Name:src Committed By: maxv Date: Thu Aug 9 17:26:00 UTC 2018 Modified Files: src/sys/arch/xen/xen: xennetback_xenbus.c Log Message: style a bit To generate a diff of this commit: cvs rdiff -u -r1.65 -r1.66 src/sys/arch/xen/xen/xennetback_xenbus.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/xen/xen/xennetback_xenbus.c diff -u src/sys/arch/xen/xen/xennetback_xenbus.c:1.65 src/sys/arch/xen/xen/xennetback_xenbus.c:1.66 --- src/sys/arch/xen/xen/xennetback_xenbus.c:1.65 Tue Jun 26 06:48:00 2018 +++ src/sys/arch/xen/xen/xennetback_xenbus.c Thu Aug 9 17:26:00 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: xennetback_xenbus.c,v 1.65 2018/06/26 06:48:00 msaitoh Exp $ */ +/* $NetBSD: xennetback_xenbus.c,v 1.66 2018/08/09 17:26:00 maxv Exp $ */ /* * Copyright (c) 2006 Manuel Bouyer. @@ -25,7 +25,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: xennetback_xenbus.c,v 1.65 2018/06/26 06:48:00 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: xennetback_xenbus.c,v 1.66 2018/08/09 17:26:00 maxv Exp $"); #include "opt_xen.h" @@ -61,6 +61,10 @@ __KERNEL_RCSID(0, "$NetBSD: xennetback_x #include +/* + * Backend network device driver for Xen. + */ + #ifdef XENDEBUG_NET #define XENPRINTF(x) printf x #else @@ -83,19 +87,17 @@ struct xni_pkt { struct xnetback_instance *pkt_xneti; /* pointer back to our softc */ }; -static inline void xni_pkt_unmap(struct xni_pkt *, vaddr_t); - - /* pools for xni_pkt */ struct pool xni_pkt_pool; /* ratecheck(9) for pool allocation failures */ struct timeval xni_pool_errintvl = { 30, 0 }; /* 30s, each */ -/* - * Backend network device driver for Xen - */ /* state of a xnetback instance */ -typedef enum {CONNECTED, DISCONNECTING, DISCONNECTED} xnetback_state_t; +typedef enum { + CONNECTED, + DISCONNECTING, + DISCONNECTED +} xnetback_state_t; /* we keep the xnetback instances in a linked list */ struct xnetback_instance { @@ -157,6 +159,7 @@ static struct xenbus_backend_driver xvif * transmit at once). */ #define NB_XMIT_PAGES_BATCH 64 + /* * We will transfer a mapped page to the remote domain, and remap another * page in place immediately. For this we keep a list of pages available. @@ -167,6 +170,7 @@ static unsigned long mcl_pages[NB_XMIT_P int mcl_pages_alloc; /* current index in mcl_pages */ static int xennetback_get_mcl_page(paddr_t *); static void xennetback_get_new_mcl_pages(void); + /* * If we can't transfer the mbuf directly, we have to copy it to a page which * will be transferred to the remote domain. We use a pool_cache @@ -371,6 +375,7 @@ xennetback_xenbus_create(struct xenbus_d goto fail; } return 0; + abort_xbt: xenbus_transaction_end(xbt, 1); fail: @@ -454,7 +459,7 @@ xennetback_connect(struct xnetback_insta u_long revtchn, rx_copy; struct xenbus_device *xbusd = xneti->xni_xbusd; - /* read comunication informations */ + /* read communication information */ err = xenbus_read_ul(NULL, xbusd->xbusd_otherend, "tx-ring-ref", &tx_ring_ref, 10); if (err) { @@ -668,17 +673,18 @@ xnetif_lookup(domid_t dom , uint32_t han return found; } -/* get a page to remplace a mbuf cluster page given to a domain */ +/* get a page to replace a mbuf cluster page given to a domain */ static int xennetback_get_mcl_page(paddr_t *map) { - if (mcl_pages_alloc < 0) + if (mcl_pages_alloc < 0) { /* * we exhausted our allocation. We can't allocate new ones yet * because the current pages may not have been loaned to * the remote domain yet. We have to let the caller do this. */ return -1; + } *map = ((paddr_t)mcl_pages[mcl_pages_alloc]) << PAGE_SHIFT; mcl_pages_alloc--; @@ -861,9 +867,12 @@ xennetback_evthandler(void *arg) continue; /* packet is not for us */ } } + #ifdef notyet -a lot of work is needed in the tcp stack to handle read-only ext storage -so always copy for now. + /* + * A lot of work is needed in the tcp stack to handle read-only + * ext storage so always copy for now. + */ if (((req_cons + 1) & (NET_TX_RING_SIZE - 1)) == (xneti->xni_txring.rsp_prod_pvt & (NET_TX_RING_SIZE - 1))) #else @@ -1436,10 +1445,11 @@ static void xennetback_ifwatchdog(struct ifnet * ifp) { /* - * We can get to the following condition: - * transmit stalls because the ring is full when the ifq is full too. - * In this case (as, unfortunably, we don't get an interrupt from xen - * on transmit) noting will ever call xennetback_ifstart() again. + * We can get to the following condition: transmit stalls because the + * ring is full when the ifq is full too. + * + * In this case (as, unfortunately, we don't get an interrupt from xen + * on transmit) nothing will ever call xennetback_ifstart() again. * Here we abuse the watchdog to get out of this condition. */ XENPRINTF(("xennetback_ifwatchdog\n"));
CVS commit: src/sys/arch/xen/xen
Module Name:src Committed By: maxv Date: Thu Aug 9 17:32:44 UTC 2018 Modified Files: src/sys/arch/xen/xen: xennetback_xenbus.c Log Message: Use an independent pool, don't steal pages from mcl_cache. This was a bad hack. No particular functional change, since the (MCLBYTES != PAGE_SIZE) condition is already true. To generate a diff of this commit: cvs rdiff -u -r1.66 -r1.67 src/sys/arch/xen/xen/xennetback_xenbus.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/xen/xen/xennetback_xenbus.c diff -u src/sys/arch/xen/xen/xennetback_xenbus.c:1.66 src/sys/arch/xen/xen/xennetback_xenbus.c:1.67 --- src/sys/arch/xen/xen/xennetback_xenbus.c:1.66 Thu Aug 9 17:26:00 2018 +++ src/sys/arch/xen/xen/xennetback_xenbus.c Thu Aug 9 17:32:44 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: xennetback_xenbus.c,v 1.66 2018/08/09 17:26:00 maxv Exp $ */ +/* $NetBSD: xennetback_xenbus.c,v 1.67 2018/08/09 17:32:44 maxv Exp $ */ /* * Copyright (c) 2006 Manuel Bouyer. @@ -25,7 +25,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: xennetback_xenbus.c,v 1.66 2018/08/09 17:26:00 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: xennetback_xenbus.c,v 1.67 2018/08/09 17:32:44 maxv Exp $"); #include "opt_xen.h" @@ -173,13 +173,9 @@ static void xennetback_get_new_mcl_pages /* * If we can't transfer the mbuf directly, we have to copy it to a page which - * will be transferred to the remote domain. We use a pool_cache - * for this, or the mbuf cluster pool cache if MCLBYTES == PAGE_SIZE + * will be transferred to the remote domain. We use a pool_cache for this. */ -#if MCLBYTES != PAGE_SIZE pool_cache_t xmit_pages_cache; -#endif -pool_cache_t xmit_pages_cachep; /* arrays used in xennetback_ifstart(), too large to allocate on stack */ /* XXXSMP */ @@ -227,13 +223,8 @@ xvifattach(int n) /* initialise pools */ pool_init(&xni_pkt_pool, sizeof(struct xni_pkt), 0, 0, 0, "xnbpkt", NULL, IPL_VM); -#if MCLBYTES != PAGE_SIZE xmit_pages_cache = pool_cache_init(PAGE_SIZE, 0, 0, 0, "xnbxm", NULL, IPL_VM, NULL, NULL, NULL); - xmit_pages_cachep = xmit_pages_cache; -#else - xmit_pages_cachep = mcl_cache; -#endif SLIST_INIT(&xnetback_instances); mutex_init(&xnetback_lock, MUTEX_DEFAULT, IPL_NONE); @@ -1048,8 +1039,7 @@ xennetback_ifsoftstart_transfer(void *ar } else { /* we have to copy the packet */ xmit_va = (vaddr_t)pool_cache_get_paddr( -xmit_pages_cachep, -PR_NOWAIT, &xmit_pa); +xmit_pages_cache, PR_NOWAIT, &xmit_pa); if (__predict_false(xmit_va == 0)) break; /* out of memory */ @@ -1185,7 +1175,7 @@ xennetback_ifsoftstart_transfer(void *ar m_freem(mbufs_sent[j]); } for (j = 0; j < nppitems; j++) { -pool_cache_put_paddr(xmit_pages_cachep, +pool_cache_put_paddr(xmit_pages_cache, (void *)pages_pool_free[j].va, pages_pool_free[j].pa); }
CVS commit: src/sys
Module Name:src Committed By: maxv Date: Thu Aug 9 17:43:55 UTC 2018 Modified Files: src/sys/kern: uipc_mbuf.c src/sys/sys: mbuf.h Log Message: Localify mcl_cache. To generate a diff of this commit: cvs rdiff -u -r1.217 -r1.218 src/sys/kern/uipc_mbuf.c cvs rdiff -u -r1.208 -r1.209 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.217 src/sys/kern/uipc_mbuf.c:1.218 --- src/sys/kern/uipc_mbuf.c:1.217 Wed Jul 18 07:06:40 2018 +++ src/sys/kern/uipc_mbuf.c Thu Aug 9 17:43:55 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: uipc_mbuf.c,v 1.217 2018/07/18 07:06:40 msaitoh Exp $ */ +/* $NetBSD: uipc_mbuf.c,v 1.218 2018/08/09 17:43:55 maxv Exp $ */ /* * Copyright (c) 1999, 2001 The NetBSD Foundation, Inc. @@ -62,7 +62,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uipc_mbuf.c,v 1.217 2018/07/18 07:06:40 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uipc_mbuf.c,v 1.218 2018/08/09 17:43:55 maxv Exp $"); #ifdef _KERNEL_OPT #include "opt_mbuftrace.h" @@ -89,7 +89,7 @@ __KERNEL_RCSID(0, "$NetBSD: uipc_mbuf.c, #include pool_cache_t mb_cache; /* mbuf cache */ -pool_cache_t mcl_cache; /* mbuf cluster cache */ +static pool_cache_t mcl_cache; /* mbuf cluster cache */ struct mbstat mbstat; int max_linkhdr; Index: src/sys/sys/mbuf.h diff -u src/sys/sys/mbuf.h:1.208 src/sys/sys/mbuf.h:1.209 --- src/sys/sys/mbuf.h:1.208 Tue Jul 17 05:52:07 2018 +++ src/sys/sys/mbuf.h Thu Aug 9 17:43:54 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: mbuf.h,v 1.208 2018/07/17 05:52:07 msaitoh Exp $ */ +/* $NetBSD: mbuf.h,v 1.209 2018/08/09 17:43:54 maxv Exp $ */ /* * Copyright (c) 1996, 1997, 1999, 2001, 2007 The NetBSD Foundation, Inc. @@ -773,7 +773,6 @@ extern int max_datalen; /* MHLEN - max_ extern const int msize; /* mbuf base size */ extern const int mclbytes; /* mbuf cluster size */ extern pool_cache_t mb_cache; -extern pool_cache_t mcl_cache; #ifdef MBUFTRACE LIST_HEAD(mownerhead, mowner); extern struct mownerhead mowners;
CVS commit: src/sys/dev/usb
Module Name:src Committed By: jakllsch Date: Thu Aug 9 18:17:39 UTC 2018 Modified Files: src/sys/dev/usb: ehci.c Log Message: fix DIAGNOSTIC build by not copying ub_usepolling to stack before use To generate a diff of this commit: cvs rdiff -u -r1.260 -r1.261 src/sys/dev/usb/ehci.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/usb/ehci.c diff -u src/sys/dev/usb/ehci.c:1.260 src/sys/dev/usb/ehci.c:1.261 --- src/sys/dev/usb/ehci.c:1.260 Thu Aug 9 06:26:47 2018 +++ src/sys/dev/usb/ehci.c Thu Aug 9 18:17:39 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: ehci.c,v 1.260 2018/08/09 06:26:47 mrg Exp $ */ +/* $NetBSD: ehci.c,v 1.261 2018/08/09 18:17:39 jakllsch Exp $ */ /* * Copyright (c) 2004-2012 The NetBSD Foundation, Inc. @@ -53,7 +53,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.260 2018/08/09 06:26:47 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.261 2018/08/09 18:17:39 jakllsch Exp $"); #include "ohci.h" #include "uhci.h" @@ -1037,9 +1037,8 @@ ehci_idone(struct ehci_xfer *ex, ex_comp ehci_soft_qtd_t *sqtd, *fsqtd, *lsqtd; uint32_t status = 0, nstatus = 0; int actlen = 0; - bool polling = sc->sc_bus.ub_usepolling; - KASSERT(polling || mutex_owned(&sc->sc_lock)); + KASSERT(sc->sc_bus.ub_usepolling || mutex_owned(&sc->sc_lock)); DPRINTF("ex=%#jx", (uintptr_t)ex, 0, 0, 0);
CVS commit: src/sys/fs/udf
Module Name:src Committed By: reinoud Date: Thu Aug 9 20:30:26 UTC 2018 Modified Files: src/sys/fs/udf: udf_subr.c Log Message: Fix length calculation To generate a diff of this commit: cvs rdiff -u -r1.142 -r1.143 src/sys/fs/udf/udf_subr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/fs/udf/udf_subr.c diff -u src/sys/fs/udf/udf_subr.c:1.142 src/sys/fs/udf/udf_subr.c:1.143 --- src/sys/fs/udf/udf_subr.c:1.142 Wed Jul 25 11:09:22 2018 +++ src/sys/fs/udf/udf_subr.c Thu Aug 9 20:30:26 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: udf_subr.c,v 1.142 2018/07/25 11:09:22 reinoud Exp $ */ +/* $NetBSD: udf_subr.c,v 1.143 2018/08/09 20:30:26 reinoud Exp $ */ /* * Copyright (c) 2006, 2008 Reinoud Zandijk @@ -29,7 +29,7 @@ #include #ifndef lint -__KERNEL_RCSID(0, "$NetBSD: udf_subr.c,v 1.142 2018/07/25 11:09:22 reinoud Exp $"); +__KERNEL_RCSID(0, "$NetBSD: udf_subr.c,v 1.143 2018/08/09 20:30:26 reinoud Exp $"); #endif /* not lint */ @@ -2623,7 +2623,7 @@ udf_update_lvid_from_vat_extattr(struct return error; /* paranoia */ - if (a_l != sizeof(*implext) -1 + udf_rw32(implext->iu_l) + sizeof(lvext)) { + if (a_l != sizeof(*implext) -2 + udf_rw32(implext->iu_l) + sizeof(lvext)) { DPRINTF(VOLUMES, ("VAT LVExtension size doesn't compute\n")); return EINVAL; }
CVS commit: src/sys/dev/usb
Module Name:src Committed By: prlw1 Date: Thu Aug 9 21:16:43 UTC 2018 Modified Files: src/sys/dev/usb: ohci.c uhci.c Log Message: Sprinkle __diagused To generate a diff of this commit: cvs rdiff -u -r1.282 -r1.283 src/sys/dev/usb/ohci.c cvs rdiff -u -r1.281 -r1.282 src/sys/dev/usb/uhci.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/usb/ohci.c diff -u src/sys/dev/usb/ohci.c:1.282 src/sys/dev/usb/ohci.c:1.283 --- src/sys/dev/usb/ohci.c:1.282 Thu Aug 9 06:26:47 2018 +++ src/sys/dev/usb/ohci.c Thu Aug 9 21:16:43 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: ohci.c,v 1.282 2018/08/09 06:26:47 mrg Exp $ */ +/* $NetBSD: ohci.c,v 1.283 2018/08/09 21:16:43 prlw1 Exp $ */ /* * Copyright (c) 1998, 2004, 2005, 2012 The NetBSD Foundation, Inc. @@ -41,7 +41,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.282 2018/08/09 06:26:47 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.283 2018/08/09 21:16:43 prlw1 Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -1389,7 +1389,7 @@ ohci_softintr(void *v) int len, cc; int i, j, actlen, iframes, uedir; ohci_physaddr_t done; - bool polling = sc->sc_bus.ub_usepolling; + bool polling __diagused= sc->sc_bus.ub_usepolling; KASSERT(polling || mutex_owned(&sc->sc_lock)); Index: src/sys/dev/usb/uhci.c diff -u src/sys/dev/usb/uhci.c:1.281 src/sys/dev/usb/uhci.c:1.282 --- src/sys/dev/usb/uhci.c:1.281 Thu Aug 9 06:26:47 2018 +++ src/sys/dev/usb/uhci.c Thu Aug 9 21:16:43 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: uhci.c,v 1.281 2018/08/09 06:26:47 mrg Exp $ */ +/* $NetBSD: uhci.c,v 1.282 2018/08/09 21:16:43 prlw1 Exp $ */ /* * Copyright (c) 1998, 2004, 2011, 2012 The NetBSD Foundation, Inc. @@ -42,7 +42,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uhci.c,v 1.281 2018/08/09 06:26:47 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uhci.c,v 1.282 2018/08/09 21:16:43 prlw1 Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -1555,7 +1555,7 @@ uhci_idone(struct uhci_xfer *ux, ux_comp struct uhci_pipe *upipe = UHCI_PIPE2UPIPE(xfer->ux_pipe); uhci_soft_td_t *std; uint32_t status = 0, nstatus; - bool polling = sc->sc_bus.ub_usepolling; + bool polling __diagused = sc->sc_bus.ub_usepolling; int actlen; KASSERT(polling || mutex_owned(&sc->sc_lock));
CVS commit: src/sys/dev/usb
Module Name:src Committed By: prlw1 Date: Thu Aug 9 21:23:23 UTC 2018 Modified Files: src/sys/dev/usb: ohci.c Log Message: whitespace To generate a diff of this commit: cvs rdiff -u -r1.283 -r1.284 src/sys/dev/usb/ohci.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/usb/ohci.c diff -u src/sys/dev/usb/ohci.c:1.283 src/sys/dev/usb/ohci.c:1.284 --- src/sys/dev/usb/ohci.c:1.283 Thu Aug 9 21:16:43 2018 +++ src/sys/dev/usb/ohci.c Thu Aug 9 21:23:23 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: ohci.c,v 1.283 2018/08/09 21:16:43 prlw1 Exp $ */ +/* $NetBSD: ohci.c,v 1.284 2018/08/09 21:23:23 prlw1 Exp $ */ /* * Copyright (c) 1998, 2004, 2005, 2012 The NetBSD Foundation, Inc. @@ -41,7 +41,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.283 2018/08/09 21:16:43 prlw1 Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.284 2018/08/09 21:23:23 prlw1 Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -1389,7 +1389,7 @@ ohci_softintr(void *v) int len, cc; int i, j, actlen, iframes, uedir; ohci_physaddr_t done; - bool polling __diagused= sc->sc_bus.ub_usepolling; + bool polling __diagused = sc->sc_bus.ub_usepolling; KASSERT(polling || mutex_owned(&sc->sc_lock));
CVS commit: src/doc
Module Name:src Committed By: sevan Date: Thu Aug 9 23:13:31 UTC 2018 Modified Files: src/doc: 3RDPARTY Log Message: Add homepage & current version info for elftoolchain. To generate a diff of this commit: cvs rdiff -u -r1.1538 -r1.1539 src/doc/3RDPARTY 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.1538 src/doc/3RDPARTY:1.1539 --- src/doc/3RDPARTY:1.1538 Mon Aug 6 22:45:29 2018 +++ src/doc/3RDPARTY Thu Aug 9 23:13:31 2018 @@ -1,4 +1,4 @@ -# $NetBSD: 3RDPARTY,v 1.1538 2018/08/06 22:45:29 sevan Exp $ +# $NetBSD: 3RDPARTY,v 1.1539 2018/08/09 23:13:31 sevan Exp $ # # This file contains a list of the software that has been integrated into # NetBSD where we are not the primary maintainer. @@ -1609,10 +1609,10 @@ Notes: Package: elftoolchain (libelf/libdwarf) Version: FreeBSD-2016-02-19-r295822 -Current Vers: FreeBSD--YY-ZZ +Current Vers: 0.7.1 Maintainer: Joseph Koshi Archive Site: none -Home Page: none +Home Page: http://elftoolchain.sourceforge.net Mailing List: none Responsible: christos License: BSD-like (2-clause)
CVS commit: src/doc
Module Name:src Committed By: sevan Date: Fri Aug 10 00:19:09 UTC 2018 Modified Files: src/doc: 3RDPARTY Log Message: Update current versions of less, libarchive, libpcap. Update libarchive home page. To generate a diff of this commit: cvs rdiff -u -r1.1539 -r1.1540 src/doc/3RDPARTY 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.1539 src/doc/3RDPARTY:1.1540 --- src/doc/3RDPARTY:1.1539 Thu Aug 9 23:13:31 2018 +++ src/doc/3RDPARTY Fri Aug 10 00:19:09 2018 @@ -1,4 +1,4 @@ -# $NetBSD: 3RDPARTY,v 1.1539 2018/08/09 23:13:31 sevan Exp $ +# $NetBSD: 3RDPARTY,v 1.1540 2018/08/10 00:19:09 sevan Exp $ # # This file contains a list of the software that has been integrated into # NetBSD where we are not the primary maintainer. @@ -694,7 +694,7 @@ directory. Package: less Version: less-458 -Current Vers: less-481 +Current Vers: less-530 Maintainer: Mark Nudelman Archive Site: http://www.greenwoodsoftware.com/less/download.html Home Page: http://www.greenwoodsoftware.com/less/ @@ -710,10 +710,10 @@ Talk to mrg before importing any new ver Package: libarchive Version: 3.3.2pre -Current Vers: 3.3.1 +Current Vers: 3.3.2 Maintainer: kient...@freebsd.org, jo...@netbsd.org Archive Site: https://github.com/libarchive/libarchive/downloads -Home Page: http://libarchive.github.com/ +Home Page: http://www.libarchive.org Responsible: joerg License: BSD (2-clause) Location: external/bsd/libarchive/dist @@ -778,7 +778,7 @@ import. Talk to haad before importing ne Package: libpcap Version: 1.8.1 -Current Vers: 1.8.1 +Current Vers: 1.9.0 Maintainer: tcpdump-work...@tcpdump.org Archive Site: http://www.tcpdump.org/release/ Home Page: http://www.tcpdump.org/
CVS commit: src/sys/external/bsd/dwc2
Module Name:src Committed By: rin Date: Fri Aug 10 04:24:46 UTC 2018 Modified Files: src/sys/external/bsd/dwc2: dwc2.c Log Message: Fix debug build. Also make formats more consistent with others in DPRINTF added in the previous commit. To generate a diff of this commit: cvs rdiff -u -r1.52 -r1.53 src/sys/external/bsd/dwc2/dwc2.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/dwc2/dwc2.c diff -u src/sys/external/bsd/dwc2/dwc2.c:1.52 src/sys/external/bsd/dwc2/dwc2.c:1.53 --- src/sys/external/bsd/dwc2/dwc2.c:1.52 Thu Aug 9 06:26:47 2018 +++ src/sys/external/bsd/dwc2/dwc2.c Fri Aug 10 04:24:46 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: dwc2.c,v 1.52 2018/08/09 06:26:47 mrg Exp $ */ +/* $NetBSD: dwc2.c,v 1.53 2018/08/10 04:24:46 rin Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: dwc2.c,v 1.52 2018/08/09 06:26:47 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dwc2.c,v 1.53 2018/08/10 04:24:46 rin Exp $"); #include "opt_usb.h" @@ -324,7 +324,7 @@ dwc2_timeout(void *addr) struct dwc2_softc *sc = DWC2_XFER2SC(xfer); struct usbd_device *dev = xfer->ux_pipe->up_dev; - DPRINTF("dxfer=%p\n", dxfer); + DPRINTF("xfer=%p\n", xfer); mutex_enter(&sc->sc_lock); if (!sc->sc_dying && xfer->ux_status == USBD_IN_PROGRESS) @@ -450,7 +450,7 @@ dwc2_abort_xfer(struct usbd_xfer *xfer, KASSERTMSG((status == USBD_CANCELLED || status == USBD_TIMEOUT), "invalid status for abort: %d", (int)status); - DPRINTF("xfer %pjx pipe %pjx status %jd", xfer, xfer->ux_pipe, status); + DPRINTF("xfer %p pipe %p status 0x%08x", xfer, xfer->ux_pipe, status); KASSERT(mutex_owned(&sc->sc_lock)); ASSERT_SLEEPABLE(); @@ -492,8 +492,7 @@ dwc2_abort_xfer(struct usbd_xfer *xfer, * software that we're done. */ if (sc->sc_dying) { - DPRINTFN(4, "xfer %#jx dying %ju", (uintptr_t)xfer, - xfer->ux_status, 0, 0); + DPRINTFN(4, "xfer %p dying 0x%08x", xfer, xfer->ux_status); goto dying; }
CVS commit: src/sys/arch/arm/broadcom
Module Name:src Committed By: rin Date: Fri Aug 10 04:44:16 UTC 2018 Modified Files: src/sys/arch/arm/broadcom: bcm283x_platform.c Log Message: * Convert bus address to physical address in xxx_bs_mmap(), as done in xxx_bs_map(). * Reuse bs_map and bs_mmap in arm_generic_bs_tag in order to - set pmap flags properly for aarch64 - dedup codes OK ryo To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/arch/arm/broadcom/bcm283x_platform.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/broadcom/bcm283x_platform.c diff -u src/sys/arch/arm/broadcom/bcm283x_platform.c:1.11 src/sys/arch/arm/broadcom/bcm283x_platform.c:1.12 --- src/sys/arch/arm/broadcom/bcm283x_platform.c:1.11 Sun Aug 5 14:02:35 2018 +++ src/sys/arch/arm/broadcom/bcm283x_platform.c Fri Aug 10 04:44:15 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: bcm283x_platform.c,v 1.11 2018/08/05 14:02:35 skrll Exp $ */ +/* $NetBSD: bcm283x_platform.c,v 1.12 2018/08/10 04:44:15 rin Exp $ */ /*- * Copyright (c) 2017 Jared D. McNeill @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: bcm283x_platform.c,v 1.11 2018/08/05 14:02:35 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bcm283x_platform.c,v 1.12 2018/08/10 04:44:15 rin Exp $"); #include "opt_arm_debug.h" #include "opt_bcm283x.h" @@ -134,125 +134,83 @@ struct bus_space bcm2835_a4x_bs_tag; struct bus_space bcm2836_bs_tag; struct bus_space bcm2836_a4x_bs_tag; -int bcm283x_bs_map(void *, bus_addr_t, bus_size_t, int, bus_space_handle_t *); -paddr_t bcm283x_bs_mmap(void *, bus_addr_t, off_t, int, int); -paddr_t bcm283x_a4x_bs_mmap(void *, bus_addr_t, off_t, int, int); +static paddr_t bcm2835_bus_to_phys(bus_addr_t); +static paddr_t bcm2836_bus_to_phys(bus_addr_t); -int -bcm283x_bs_map(void *t, bus_addr_t ba, bus_size_t size, int flag, -bus_space_handle_t *bshp) +static paddr_t +bcm2835_bus_to_phys(bus_addr_t ba) { - u_long startpa, endpa, pa; - vaddr_t va; - - /* Convert BA to PA */ - pa = ba & ~BCM2835_BUSADDR_CACHE_MASK; - startpa = trunc_page(pa); - endpa = round_page(pa + size); - - /* XXX use extent manager to check duplicate mapping */ - - va = uvm_km_alloc(kernel_map, endpa - startpa, 0, - UVM_KMF_VAONLY | UVM_KMF_NOWAIT | UVM_KMF_COLORMATCH); - if (!va) - return ENOMEM; - - *bshp = (bus_space_handle_t)(va + (pa - startpa)); - - int pmapflags; - if (flag & BUS_SPACE_MAP_PREFETCHABLE) - pmapflags = PMAP_WRITE_COMBINE; - else if (flag & BUS_SPACE_MAP_CACHEABLE) - pmapflags = 0; - else - pmapflags = PMAP_NOCACHE; - for (pa = startpa; pa < endpa; pa += PAGE_SIZE, va += PAGE_SIZE) { - pmap_kenter_pa(va, pa, VM_PROT_READ | VM_PROT_WRITE, pmapflags); - } - pmap_update(pmap_kernel()); + /* Attempt to find the PA device mapping */ + if (ba >= BCM2835_PERIPHERALS_BASE_BUS && + ba < BCM2835_PERIPHERALS_BASE_BUS + BCM2835_PERIPHERALS_SIZE) + return BCM2835_PERIPHERALS_BUS_TO_PHYS(ba); - return 0; + return ba & ~BCM2835_BUSADDR_CACHE_MASK; } -paddr_t -bcm283x_bs_mmap(void *t, bus_addr_t bpa, off_t offset, int prot, int flags) +static paddr_t +bcm2836_bus_to_phys(bus_addr_t ba) { - /* Convert BA to PA */ - const paddr_t pa = bpa & ~BCM2835_BUSADDR_CACHE_MASK; - paddr_t bus_flags = 0; - - if (flags & BUS_SPACE_MAP_PREFETCHABLE) - bus_flags |= ARM_MMAP_WRITECOMBINE; - - return arm_btop(pa + offset) | bus_flags; -} -paddr_t -bcm283x_a4x_bs_mmap(void *t, bus_addr_t bpa, off_t offset, int prot, int flags) -{ - /* Convert BA to PA */ - const paddr_t pa = bpa & ~BCM2835_BUSADDR_CACHE_MASK; - paddr_t bus_flags = 0; + /* Attempt to find the PA device mapping */ + if (ba >= BCM2835_PERIPHERALS_BASE_BUS && + ba < BCM2835_PERIPHERALS_BASE_BUS + BCM2835_PERIPHERALS_SIZE) + return BCM2836_PERIPHERALS_BUS_TO_PHYS(ba); - if (flags & BUS_SPACE_MAP_PREFETCHABLE) - bus_flags |= ARM_MMAP_WRITECOMBINE; + if (ba >= BCM2836_ARM_LOCAL_BASE && + ba < BCM2836_ARM_LOCAL_BASE + BCM2836_ARM_LOCAL_SIZE) + return ba; - return arm_btop(pa + 4 * offset) | bus_flags; + return ba & ~BCM2835_BUSADDR_CACHE_MASK; } int bcm2835_bs_map(void *t, bus_addr_t ba, bus_size_t size, int flag, bus_space_handle_t *bshp) { - const struct pmap_devmap *pd; - bool match = false; - u_long pa; + const paddr_t pa = bcm2835_bus_to_phys(ba); - /* Attempt to find the PA device mapping */ - if (ba >= BCM2835_PERIPHERALS_BASE_BUS && - ba < BCM2835_PERIPHERALS_BASE_BUS + BCM2835_PERIPHERALS_SIZE) { - match = true; - pa = BCM2835_PERIPHERALS_BUS_TO_PHYS(ba); - } + return bus_space_map(&arm_generic_bs_tag, pa, size, flag, bshp); +} - if (match && (pd = pmap_devmap_find_pa(pa, size)) != NULL) { - /* Device was statically mapped. */ - *bshp = pd->pd_va + (pa - pd->pd_pa); - return 0; - } +paddr_t +bcm2835_bs_mmap(void *t, bus_addr_t ba, off_t offset, int prot, int flags) +{ + const paddr_t pa = bcm2835_bus_to_phys(ba); - return bcm283x_bs_map(t,
CVS commit: src/sys/arch/xen/xen
Module Name:src Committed By: maxv Date: Fri Aug 10 06:23:12 UTC 2018 Modified Files: src/sys/arch/xen/xen: if_xennet_xenbus.c Log Message: Don't unconditionally call pmap_extract_ma, it is part of XENNET_DEBUG. This call costs us. To generate a diff of this commit: cvs rdiff -u -r1.77 -r1.78 src/sys/arch/xen/xen/if_xennet_xenbus.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/xen/xen/if_xennet_xenbus.c diff -u src/sys/arch/xen/xen/if_xennet_xenbus.c:1.77 src/sys/arch/xen/xen/if_xennet_xenbus.c:1.78 --- src/sys/arch/xen/xen/if_xennet_xenbus.c:1.77 Tue Jun 26 06:48:00 2018 +++ src/sys/arch/xen/xen/if_xennet_xenbus.c Fri Aug 10 06:23:12 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: if_xennet_xenbus.c,v 1.77 2018/06/26 06:48:00 msaitoh Exp $ */ +/* $NetBSD: if_xennet_xenbus.c,v 1.78 2018/08/10 06:23:12 maxv Exp $ */ /* * Copyright (c) 2006 Manuel Bouyer. @@ -84,7 +84,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_xennet_xenbus.c,v 1.77 2018/06/26 06:48:00 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_xennet_xenbus.c,v 1.78 2018/08/10 06:23:12 maxv Exp $"); #include "opt_xen.h" #include "opt_nfs_boot.h" @@ -131,6 +131,7 @@ __KERNEL_RCSID(0, "$NetBSD: if_xennet_xe #undef XENNET_DEBUG_DUMP #undef XENNET_DEBUG + #ifdef XENNET_DEBUG #define XEDB_FOLLOW 0x01 #define XEDB_INIT 0x02 @@ -1171,7 +1172,7 @@ xennet_softstart(void *arg) struct mbuf *m, *new_m; netif_tx_request_t *txreq; RING_IDX req_prod; - paddr_t pa, pa2; + paddr_t pa; struct xennet_txreq *req; int notify; int do_notify = 0; @@ -1290,9 +1291,13 @@ xennet_softstart(void *arg) "mbuf %p, buf %p/%p/%p, size %d\n", req->txreq_id, m, mtod(m, void *), (void *)pa, (void *)xpmap_ptom_masked(pa), m->m_pkthdr.len)); +#ifdef XENNET_DEBUG + paddr_t pa2; pmap_extract_ma(pmap_kernel(), mtod(m, vaddr_t), &pa2); DPRINTFN(XEDB_MBUF, ("xennet_start pa %p ma %p/%p\n", (void *)pa, (void *)xpmap_ptom_masked(pa), (void *)pa2)); +#endif + #ifdef XENNET_DEBUG_DUMP xennet_hex_dump(mtod(m, u_char *), m->m_pkthdr.len, "s", req->txreq_id);
CVS commit: src/sys
Module Name:src Committed By: maxv Date: Fri Aug 10 06:46:09 UTC 2018 Modified Files: src/sys/arch/powerpc/booke/dev: pq3etsec.c src/sys/dist/pf/net: pf_ioctl.c src/sys/external/bsd/ipf/netinet: ip_fil_netbsd.c src/sys/net: if_loop.c src/sys/net/npf: npf_mbuf.c src/sys/netinet6: in6.h in6_offload.c in6_offload.h ip6_output.c Log Message: Rename ip6_undefer_csum -> in6_undefer_cksum in6_delayed_cksum -> in6_undefer_cksum_tcpudp The two previous names were inconsistent and misleading. Put the two functions into in6_offload.c. Add comments to explain what we're doing. Same as IPv4. To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36 src/sys/arch/powerpc/booke/dev/pq3etsec.c cvs rdiff -u -r1.54 -r1.55 src/sys/dist/pf/net/pf_ioctl.c cvs rdiff -u -r1.29 -r1.30 src/sys/external/bsd/ipf/netinet/ip_fil_netbsd.c cvs rdiff -u -r1.104 -r1.105 src/sys/net/if_loop.c cvs rdiff -u -r1.19 -r1.20 src/sys/net/npf/npf_mbuf.c cvs rdiff -u -r1.91 -r1.92 src/sys/netinet6/in6.h cvs rdiff -u -r1.8 -r1.9 src/sys/netinet6/in6_offload.c cvs rdiff -u -r1.7 -r1.8 src/sys/netinet6/in6_offload.h cvs rdiff -u -r1.211 -r1.212 src/sys/netinet6/ip6_output.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/powerpc/booke/dev/pq3etsec.c diff -u src/sys/arch/powerpc/booke/dev/pq3etsec.c:1.35 src/sys/arch/powerpc/booke/dev/pq3etsec.c:1.36 --- src/sys/arch/powerpc/booke/dev/pq3etsec.c:1.35 Wed Jul 11 05:25:45 2018 +++ src/sys/arch/powerpc/booke/dev/pq3etsec.c Fri Aug 10 06:46:08 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: pq3etsec.c,v 1.35 2018/07/11 05:25:45 maxv Exp $ */ +/* $NetBSD: pq3etsec.c,v 1.36 2018/08/10 06:46:08 maxv Exp $ */ /*- * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc. * All rights reserved. @@ -41,7 +41,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: pq3etsec.c,v 1.35 2018/07/11 05:25:45 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pq3etsec.c,v 1.36 2018/08/10 06:46:08 maxv Exp $"); #include #include @@ -2095,7 +2095,7 @@ pq3etsec_tx_offload( #endif } else if (csum_flags & M_CSUM_IP6) { #ifdef INET6 -ip6_undefer_csum(m, ETHER_HDR_LEN, +in6_undefer_cksum(m, ETHER_HDR_LEN, csum_flags & M_CSUM_IP6); #else panic("%s: impossible M_CSUM flags %#x", Index: src/sys/dist/pf/net/pf_ioctl.c diff -u src/sys/dist/pf/net/pf_ioctl.c:1.54 src/sys/dist/pf/net/pf_ioctl.c:1.55 --- src/sys/dist/pf/net/pf_ioctl.c:1.54 Wed Jul 11 11:13:16 2018 +++ src/sys/dist/pf/net/pf_ioctl.c Fri Aug 10 06:46:08 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: pf_ioctl.c,v 1.54 2018/07/11 11:13:16 kre Exp $ */ +/* $NetBSD: pf_ioctl.c,v 1.55 2018/08/10 06:46:08 maxv Exp $ */ /* $OpenBSD: pf_ioctl.c,v 1.182 2007/06/24 11:17:13 mcbride Exp $ */ /* @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pf_ioctl.c,v 1.54 2018/07/11 11:13:16 kre Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pf_ioctl.c,v 1.55 2018/08/10 06:46:08 maxv Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -3344,7 +3344,7 @@ pfil6_wrapper(void *arg, struct mbuf **m */ if (dir == PFIL_OUT) { if ((*mp)->m_pkthdr.csum_flags & (M_CSUM_TCPv6|M_CSUM_UDPv6)) { - in6_delayed_cksum(*mp); + in6_undefer_cksum_tcpudp(*mp); (*mp)->m_pkthdr.csum_flags &= ~(M_CSUM_TCPv6|M_CSUM_UDPv6); } Index: src/sys/external/bsd/ipf/netinet/ip_fil_netbsd.c diff -u src/sys/external/bsd/ipf/netinet/ip_fil_netbsd.c:1.29 src/sys/external/bsd/ipf/netinet/ip_fil_netbsd.c:1.30 --- src/sys/external/bsd/ipf/netinet/ip_fil_netbsd.c:1.29 Wed Jul 11 05:25:46 2018 +++ src/sys/external/bsd/ipf/netinet/ip_fil_netbsd.c Fri Aug 10 06:46:08 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: ip_fil_netbsd.c,v 1.29 2018/07/11 05:25:46 maxv Exp $ */ +/* $NetBSD: ip_fil_netbsd.c,v 1.30 2018/08/10 06:46:08 maxv Exp $ */ /* * Copyright (C) 2012 by Darren Reed. @@ -8,7 +8,7 @@ #if !defined(lint) #if defined(__NetBSD__) #include -__KERNEL_RCSID(0, "$NetBSD: ip_fil_netbsd.c,v 1.29 2018/07/11 05:25:46 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ip_fil_netbsd.c,v 1.30 2018/08/10 06:46:08 maxv Exp $"); #else static const char sccsid[] = "@(#)ip_fil.c 2.41 6/5/96 (C) 1993-2000 Darren Reed"; static const char rcsid[] = "@(#)Id: ip_fil_netbsd.c,v 1.1.1.2 2012/07/22 13:45:17 darrenr Exp"; @@ -257,7 +257,7 @@ ipf_check_wrapper6(void *arg, struct mbu if (dir == PFIL_OUT) { if ((*mp)->m_pkthdr.csum_flags & (M_CSUM_TCPv6|M_CSUM_UDPv6)) { # if (__NetBSD_Version__ > 399000600) - in6_delayed_cksum(*mp); + in6_undefer_cksum_tcpudp(*mp); # endif (*mp)->m_pkthdr.csum_flags &= ~(M_CSUM_TCPv6| M_CSUM_UDPv6); Index: src/sys/net/if_loop.c diff -u src/sys/net/if_loop.c:1.104 src/sys/net/if_loop.c:1.105 --- src/sys/net/if_loop.c:1.104 Wed Jul 11 05:25:45 2018 +++ src/sys/net/if_loop.c Fri Aug 10 06:46:09 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: if_loop.c,v 1.104 2018/07/11 05:25:45 maxv Exp $ */ +/*
CVS commit: src/sys/netinet6
Module Name:src Committed By: maxv Date: Fri Aug 10 06:55:04 UTC 2018 Modified Files: src/sys/netinet6: in6_offload.c in6_offload.h Log Message: Remove the callback and localify. Same as IPv4. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/netinet6/in6_offload.c cvs rdiff -u -r1.8 -r1.9 src/sys/netinet6/in6_offload.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_offload.c diff -u src/sys/netinet6/in6_offload.c:1.9 src/sys/netinet6/in6_offload.c:1.10 --- src/sys/netinet6/in6_offload.c:1.9 Fri Aug 10 06:46:09 2018 +++ src/sys/netinet6/in6_offload.c Fri Aug 10 06:55:04 2018 @@ -1,6 +1,6 @@ -/* $NetBSD: in6_offload.c,v 1.9 2018/08/10 06:46:09 maxv Exp $ */ +/* $NetBSD: in6_offload.c,v 1.10 2018/08/10 06:55:04 maxv Exp $ */ -/*- +/* * Copyright (c)2006 YAMAMOTO Takashi, * All rights reserved. * @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: in6_offload.c,v 1.9 2018/08/10 06:46:09 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: in6_offload.c,v 1.10 2018/08/10 06:55:04 maxv Exp $"); #include #include @@ -43,47 +43,13 @@ __KERNEL_RCSID(0, "$NetBSD: in6_offload. #include #include -struct ip6_tso_output_args { - struct ifnet *ifp; - struct ifnet *origifp; - const struct sockaddr_in6 *dst; - struct rtentry *rt; -}; - -static int ip6_tso_output_callback(void *, struct mbuf *); - -static int -ip6_tso_output_callback(void *vp, struct mbuf *m) -{ - struct ip6_tso_output_args *args = vp; - - return ip6_if_output(args->ifp, args->origifp, m, args->dst, args->rt); -} - -int -ip6_tso_output(struct ifnet *ifp, struct ifnet *origifp, struct mbuf *m, -const struct sockaddr_in6 *dst, struct rtentry *rt) -{ - struct ip6_tso_output_args args; - - args.ifp = ifp; - args.origifp = origifp; - args.dst = dst; - args.rt = rt; - - return tcp6_segment(m, ip6_tso_output_callback, &args); -} - /* - * tcp6_segment: handle M_CSUM_TSOv6 by software. - * - * => always consume m. - * => call output_func with output_arg for each segments. + * Handle M_CSUM_TSOv6 in software. Split the TCP payload in chunks of + * size MSS, and send them. */ - -int -tcp6_segment(struct mbuf *m, int (*output_func)(void *, struct mbuf *), -void *output_arg) +static int +tcp6_segment(struct ifnet *ifp, struct ifnet *origifp, struct mbuf *m, +const struct sockaddr_in6 *dst, struct rtentry *rt) { int mss; int iphlen; @@ -173,7 +139,7 @@ tcp6_segment(struct mbuf *m, int (*outpu th->th_sum = 0; th->th_sum = in6_cksum(n, IPPROTO_TCP, iphlen, thlen + mss); - error = (*output_func)(output_arg, n); + error = ip6_if_output(ifp, origifp, n, dst, rt); if (error) { goto quit; } @@ -193,6 +159,13 @@ quit: return error; } +int +ip6_tso_output(struct ifnet *ifp, struct ifnet *origifp, struct mbuf *m, +const struct sockaddr_in6 *dst, struct rtentry *rt) +{ + return tcp6_segment(ifp, origifp, m, dst, rt); +} + /* * Compute now in software the IP and TCP/UDP checksums. Cancel the * hardware offloading. Index: src/sys/netinet6/in6_offload.h diff -u src/sys/netinet6/in6_offload.h:1.8 src/sys/netinet6/in6_offload.h:1.9 --- src/sys/netinet6/in6_offload.h:1.8 Fri Aug 10 06:46:09 2018 +++ src/sys/netinet6/in6_offload.h Fri Aug 10 06:55:04 2018 @@ -1,6 +1,6 @@ -/* $NetBSD: in6_offload.h,v 1.8 2018/08/10 06:46:09 maxv Exp $ */ +/* $NetBSD: in6_offload.h,v 1.9 2018/08/10 06:55:04 maxv Exp $ */ -/*- +/* * Copyright (c)2005, 2006 YAMAMOTO Takashi, * All rights reserved. * @@ -26,14 +26,12 @@ * SUCH DAMAGE. */ -/* - * subroutines to do software-only equivalent of h/w offloading. - */ - #if !defined(_NETINET6_IN6_OFFLOAD_H_) #define _NETINET6_IN6_OFFLOAD_H_ -int tcp6_segment(struct mbuf *, int (*)(void *, struct mbuf *), void *); +/* + * Subroutines to do software-only equivalent of h/w offloading. + */ int ip6_tso_output(struct ifnet *, struct ifnet *, struct mbuf *, const struct sockaddr_in6 *, struct rtentry *); void in6_undefer_cksum(struct mbuf *, size_t, int);