CVS commit: src/sys/uvm
Module Name:src Committed By: maya Date: Sun Feb 5 07:25:49 UTC 2017 Modified Files: src/sys/uvm: uvm_page.c Log Message: Fix off by one. ok cherry To generate a diff of this commit: cvs rdiff -u -r1.191 -r1.192 src/sys/uvm/uvm_page.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/uvm/uvm_page.c diff -u src/sys/uvm/uvm_page.c:1.191 src/sys/uvm/uvm_page.c:1.192 --- src/sys/uvm/uvm_page.c:1.191 Fri Dec 23 09:36:55 2016 +++ src/sys/uvm/uvm_page.c Sun Feb 5 07:25:49 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_page.c,v 1.191 2016/12/23 09:36:55 skrll Exp $ */ +/* $NetBSD: uvm_page.c,v 1.192 2017/02/05 07:25:49 maya Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -66,7 +66,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uvm_page.c,v 1.191 2016/12/23 09:36:55 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uvm_page.c,v 1.192 2017/02/05 07:25:49 maya Exp $"); #include "opt_ddb.h" #include "opt_uvm.h" @@ -1867,7 +1867,7 @@ uvm_page_printall(void (*pr)(const char uvm_physseg_valid_p(i); i = uvm_physseg_get_next(i)) { for (pfn = uvm_physseg_get_start(i); - pfn <= uvm_physseg_get_end(i); + pfn < uvm_physseg_get_end(i); pfn++) { pg = PHYS_TO_VM_PAGE(ptoa(pfn));
CVS commit: [netbsd-6] src/doc
Module Name:src Committed By: snj Date: Sun Feb 5 07:10:10 UTC 2017 Modified Files: src/doc [netbsd-6]: CHANGES-6.2 Log Message: 1429-1432 To generate a diff of this commit: cvs rdiff -u -r1.1.2.269 -r1.1.2.270 src/doc/CHANGES-6.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-6.2 diff -u src/doc/CHANGES-6.2:1.1.2.269 src/doc/CHANGES-6.2:1.1.2.270 --- src/doc/CHANGES-6.2:1.1.2.269 Sun Jan 15 23:53:13 2017 +++ src/doc/CHANGES-6.2 Sun Feb 5 07:10:10 2017 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.2,v 1.1.2.269 2017/01/15 23:53:13 snj Exp $ +# $NetBSD: CHANGES-6.2,v 1.1.2.270 2017/02/05 07:10:10 snj Exp $ A complete list of changes from the 6.1 release until the 6.2 release: @@ -15432,3 +15432,27 @@ sys/dev/scsipi/scsi_disk.h 1.32 scsi_disk_pages while there. PR bin/29165. [flxd, ticket #1418] +sys/net/if_arcsubr.c1.76 via patch +sys/net/if_ecosubr.c1.50 via patch +sys/net/if_ethersubr.c1.236 via patch +sys/net/if_fddisubr.c1.104 via patch +sys/net/if_tokensubr.c1.80 via patch + + Don't leak an mbuf in the ARP reply. + [maxv, ticket #1429] + +crypto/external/bsd/openssl/dist/crypto/evp/e_rc4_hmac_md5.c patch + + Fix CVE-2017-3731. + [spz, ticket #1430] + +sys/arch/amd64/amd64/copy.S patch + + suword: Don't allow 4 bytes to overflow beyond the userland space. + [maxv, ticket #1431] + +sys/netinet/if_arp.c1.238, 1.239 via patch + + Add checks on the ARP header + [maxv, ticket #1432] +
CVS commit: src/sys/arch/amd64/amd64
Module Name:src Committed By: maya Date: Sun Feb 5 06:26:07 UTC 2017 Modified Files: src/sys/arch/amd64/amd64: machdep.c Log Message: Remove duplicate check. uvm_physseg_valid_p(upm) == false is also our for loop exit condition, and will never happen. NFC To generate a diff of this commit: cvs rdiff -u -r1.248 -r1.249 src/sys/arch/amd64/amd64/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/amd64/amd64/machdep.c diff -u src/sys/arch/amd64/amd64/machdep.c:1.248 src/sys/arch/amd64/amd64/machdep.c:1.249 --- src/sys/arch/amd64/amd64/machdep.c:1.248 Sun Feb 5 06:13:53 2017 +++ src/sys/arch/amd64/amd64/machdep.c Sun Feb 5 06:26:06 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.248 2017/02/05 06:13:53 maya Exp $ */ +/* $NetBSD: machdep.c,v 1.249 2017/02/05 06:26:06 maya Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2000, 2006, 2007, 2008, 2011 @@ -111,7 +111,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.248 2017/02/05 06:13:53 maya Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.249 2017/02/05 06:26:06 maya Exp $"); /* #define XENDEBUG_LOW */ @@ -803,9 +803,6 @@ sparse_dump_mark(void) upm = uvm_physseg_get_next(upm)) { paddr_t pfn; - if (uvm_physseg_valid_p(upm) == false) - break; - /* * We assume that seg->start to seg->end are * uvm_page_physload()ed
CVS commit: [netbsd-6-1] src/doc
Module Name:src Committed By: snj Date: Sun Feb 5 06:15:28 UTC 2017 Modified Files: src/doc [netbsd-6-1]: CHANGES-6.1.6 Log Message: tickets 1429-1432 To generate a diff of this commit: cvs rdiff -u -r1.1.2.78 -r1.1.2.79 src/doc/CHANGES-6.1.6 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-6.1.6 diff -u src/doc/CHANGES-6.1.6:1.1.2.78 src/doc/CHANGES-6.1.6:1.1.2.79 --- src/doc/CHANGES-6.1.6:1.1.2.78 Sun Nov 13 06:45:09 2016 +++ src/doc/CHANGES-6.1.6 Sun Feb 5 06:15:28 2017 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.1.6,v 1.1.2.78 2016/11/13 06:45:09 snj Exp $ +# $NetBSD: CHANGES-6.1.6,v 1.1.2.79 2017/02/05 06:15:28 snj Exp $ A complete list of changes from the NetBSD 6.1.5 release to the NetBSD 6.1.6 release: @@ -9073,3 +9073,27 @@ external/gpl3/gcc/dist/gcc/cp/cfns.h pa Fix build with gcc5. [pgoyette, ticket #1417] +sys/net/if_arcsubr.c1.76 via patch +sys/net/if_ecosubr.c1.50 via patch +sys/net/if_ethersubr.c1.236 via patch +sys/net/if_fddisubr.c1.104 via patch +sys/net/if_tokensubr.c1.80 via patch + + Don't leak an mbuf in the ARP reply. + [maxv, ticket #1429] + +crypto/external/bsd/openssl/dist/crypto/evp/e_rc4_hmac_md5.c patch + + Fix CVE-2017-3731. + [spz, ticket #1430] + +sys/arch/amd64/amd64/copy.S patch + + suword: Don't allow 4 bytes to overflow beyond the userland space. + [maxv, ticket #1431] + +sys/netinet/if_arp.c1.238, 1.239 via patch + + Add checks on the ARP header + [maxv, ticket #1432] +
CVS commit: src/sys/arch/amd64/amd64
Module Name:src Committed By: maya Date: Sun Feb 5 06:13:53 UTC 2017 Modified Files: src/sys/arch/amd64/amd64: machdep.c Log Message: Fix off by one. Fixes PR port-amd64/51944: sparse core dumps do not work To generate a diff of this commit: cvs rdiff -u -r1.247 -r1.248 src/sys/arch/amd64/amd64/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/amd64/amd64/machdep.c diff -u src/sys/arch/amd64/amd64/machdep.c:1.247 src/sys/arch/amd64/amd64/machdep.c:1.248 --- src/sys/arch/amd64/amd64/machdep.c:1.247 Sun Feb 5 06:12:33 2017 +++ src/sys/arch/amd64/amd64/machdep.c Sun Feb 5 06:13:53 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.247 2017/02/05 06:12:33 maya Exp $ */ +/* $NetBSD: machdep.c,v 1.248 2017/02/05 06:13:53 maya Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2000, 2006, 2007, 2008, 2011 @@ -111,7 +111,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.247 2017/02/05 06:12:33 maya Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.248 2017/02/05 06:13:53 maya Exp $"); /* #define XENDEBUG_LOW */ @@ -811,7 +811,7 @@ sparse_dump_mark(void) * uvm_page_physload()ed */ for (pfn = uvm_physseg_get_start(upm); - pfn <= uvm_physseg_get_end(upm); + pfn < uvm_physseg_get_end(upm); pfn++) { pg = PHYS_TO_VM_PAGE(ptoa(pfn));
CVS commit: src/sys/arch/amd64/amd64
Module Name:src Committed By: maya Date: Sun Feb 5 06:12:33 UTC 2017 Modified Files: src/sys/arch/amd64/amd64: machdep.c Log Message: Match the iterator in sys/uvm/uvm_page.c:1866. NFC. No matching KASSERT - this case is covered by the above if (uvm_physseg_valid_p(upm) == false) break; To generate a diff of this commit: cvs rdiff -u -r1.246 -r1.247 src/sys/arch/amd64/amd64/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/amd64/amd64/machdep.c diff -u src/sys/arch/amd64/amd64/machdep.c:1.246 src/sys/arch/amd64/amd64/machdep.c:1.247 --- src/sys/arch/amd64/amd64/machdep.c:1.246 Mon Dec 26 17:54:06 2016 +++ src/sys/arch/amd64/amd64/machdep.c Sun Feb 5 06:12:33 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.246 2016/12/26 17:54:06 cherry Exp $ */ +/* $NetBSD: machdep.c,v 1.247 2017/02/05 06:12:33 maya Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2000, 2006, 2007, 2008, 2011 @@ -111,7 +111,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.246 2016/12/26 17:54:06 cherry Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.247 2017/02/05 06:12:33 maya Exp $"); /* #define XENDEBUG_LOW */ @@ -806,17 +806,15 @@ sparse_dump_mark(void) if (uvm_physseg_valid_p(upm) == false) break; - const paddr_t startpfn = uvm_physseg_get_start(upm); - const paddr_t endpfn = uvm_physseg_get_end(upm); - - KASSERT(startpfn != -1 && endpfn != -1); - /* * We assume that seg->start to seg->end are * uvm_page_physload()ed */ - for (pfn = startpfn; pfn <= endpfn; pfn++) { + for (pfn = uvm_physseg_get_start(upm); + pfn <= uvm_physseg_get_end(upm); + pfn++) { pg = PHYS_TO_VM_PAGE(ptoa(pfn)); + if (pg->uanon || (pg->pqflags & PQ_FREE) || (pg->uobject && pg->uobject->pgops)) { p = VM_PAGE_TO_PHYS(pg) / PAGE_SIZE;
CVS commit: [netbsd-6-0] src/doc
Module Name:src Committed By: snj Date: Sun Feb 5 06:11:37 UTC 2017 Modified Files: src/doc [netbsd-6-0]: CHANGES-6.0.7 Log Message: tickets 1429-1432 To generate a diff of this commit: cvs rdiff -u -r1.1.2.80 -r1.1.2.81 src/doc/CHANGES-6.0.7 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-6.0.7 diff -u src/doc/CHANGES-6.0.7:1.1.2.80 src/doc/CHANGES-6.0.7:1.1.2.81 --- src/doc/CHANGES-6.0.7:1.1.2.80 Sun Nov 13 06:42:48 2016 +++ src/doc/CHANGES-6.0.7 Sun Feb 5 06:11:37 2017 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.0.7,v 1.1.2.80 2016/11/13 06:42:48 snj Exp $ +# $NetBSD: CHANGES-6.0.7,v 1.1.2.81 2017/02/05 06:11:37 snj Exp $ A complete list of changes from the NetBSD 6.0.6 release to the NetBSD 6.0.7 release: @@ -9353,3 +9353,27 @@ external/gpl3/gcc/dist/gcc/cp/cfns.h pa Fix build with gcc5. [pgoyette, ticket #1417] +sys/net/if_arcsubr.c1.76 via patch +sys/net/if_ecosubr.c1.50 via patch +sys/net/if_ethersubr.c1.236 via patch +sys/net/if_fddisubr.c1.104 via patch +sys/net/if_tokensubr.c1.80 via patch + + Don't leak an mbuf in the ARP reply. + [maxv, ticket #1429] + +crypto/external/bsd/openssl/dist/crypto/evp/e_rc4_hmac_md5.c patch + + Fix CVE-2017-3731. + [spz, ticket #1430] + +sys/arch/amd64/amd64/copy.S patch + + suword: Don't allow 4 bytes to overflow beyond the userland space. + [maxv, ticket #1431] + +sys/netinet/if_arp.c1.238, 1.239 via patch + + Add checks on the ARP header + [maxv, ticket #1432] +
CVS commit: [netbsd-6] src/sys/netinet
Module Name:src Committed By: snj Date: Sun Feb 5 06:07:36 UTC 2017 Modified Files: src/sys/netinet [netbsd-6]: if_arp.c Log Message: Pull up following revision(s) (requested by maxv in ticket #1432): sys/netinet/if_arp.c: 1.238, 1.239 via patch Make sure the protocol address length equals that of IPv4. Also, make sure the hardware address length equals that of the interface we received the packet on. Otherwise a packet could easily set them both to zero and make the kernel read beyond the allocated mbuf, which is terrible. Note: for the latter we drop the packet instead of replying, since it is malformed. Note: I also added an ugly hack in CARP, since it apparently expects at least six bytes. -- Add some checks, mostly same as in_arpinput. To generate a diff of this commit: cvs rdiff -u -r1.154.2.2 -r1.154.2.3 src/sys/netinet/if_arp.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/netinet/if_arp.c diff -u src/sys/netinet/if_arp.c:1.154.2.2 src/sys/netinet/if_arp.c:1.154.2.3 --- src/sys/netinet/if_arp.c:1.154.2.2 Sun Nov 15 17:51:52 2015 +++ src/sys/netinet/if_arp.c Sun Feb 5 06:07:36 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: if_arp.c,v 1.154.2.2 2015/11/15 17:51:52 bouyer Exp $ */ +/* $NetBSD: if_arp.c,v 1.154.2.3 2017/02/05 06:07:36 snj Exp $ */ /*- * Copyright (c) 1998, 2000, 2008 The NetBSD Foundation, Inc. @@ -68,7 +68,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_arp.c,v 1.154.2.2 2015/11/15 17:51:52 bouyer Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_arp.c,v 1.154.2.3 2017/02/05 06:07:36 snj Exp $"); #include "opt_ddb.h" #include "opt_inet.h" @@ -975,6 +975,9 @@ in_arpinput(struct mbuf *m) break; } + if (ah->ar_pln != sizeof(struct in_addr)) + goto out; + memcpy(, ar_spa(ah), sizeof (isaddr)); memcpy(, ar_tpa(ah), sizeof (itaddr)); @@ -1005,7 +1008,10 @@ in_arpinput(struct mbuf *m) ((ia->ia_ifp->if_flags & (IFF_UP|IFF_RUNNING)) == (IFF_UP|IFF_RUNNING))) { index++; + + /* XXX: ar_hln? */ if (ia->ia_ifp == m->m_pkthdr.rcvif && + (ah->ar_hln >= 6) && carp_iamatch(ia, ar_sha(ah), , index)) { break; @@ -1037,6 +1043,14 @@ in_arpinput(struct mbuf *m) } #endif + if (ah->ar_hln != ifp->if_addrlen) { + ARP_STATINC(ARP_STAT_RCVBADLEN); + log(LOG_WARNING, + "arp from %s: addr len: new %d, i/f %d (ignored)\n", + in_fmtaddr(isaddr), ah->ar_hln, ifp->if_addrlen); + goto out; + } + if (ia == NULL) { INADDR_TO_IA(isaddr, ia); while ((ia != NULL) && ia->ia_ifp != m->m_pkthdr.rcvif) @@ -1131,14 +1145,7 @@ in_arpinput(struct mbuf *m) "arp from %s: new addr len %d, was %d\n", in_fmtaddr(isaddr), ah->ar_hln, sdl->sdl_alen); } - if (ifp->if_addrlen != ah->ar_hln) { - ARP_STATINC(ARP_STAT_RCVBADLEN); - log(LOG_WARNING, - "arp from %s: addr len: new %d, i/f %d (ignored)\n", - in_fmtaddr(isaddr), ah->ar_hln, - ifp->if_addrlen); - goto reply; - } + #if NTOKEN > 0 /* * XXX uses m_data and assumes the complete answer including @@ -1437,6 +1444,10 @@ in_revarpinput(struct mbuf *m) tha = ar_tha(ah); if (tha == NULL) goto out; + if (ah->ar_pln != sizeof(struct in_addr)) + goto out; + if (ah->ar_hln != ifp->if_sadl->sdl_alen) + goto out; if (memcmp(tha, CLLADDR(ifp->if_sadl), ifp->if_sadl->sdl_alen)) goto out; memcpy(_ip, ar_spa(ah), sizeof(srv_ip));
CVS commit: [netbsd-6-1] src/sys/netinet
Module Name:src Committed By: snj Date: Sun Feb 5 06:07:15 UTC 2017 Modified Files: src/sys/netinet [netbsd-6-1]: if_arp.c Log Message: Pull up following revision(s) (requested by maxv in ticket #1432): sys/netinet/if_arp.c: 1.238, 1.239 via patch Make sure the protocol address length equals that of IPv4. Also, make sure the hardware address length equals that of the interface we received the packet on. Otherwise a packet could easily set them both to zero and make the kernel read beyond the allocated mbuf, which is terrible. Note: for the latter we drop the packet instead of replying, since it is malformed. Note: I also added an ugly hack in CARP, since it apparently expects at least six bytes. -- Add some checks, mostly same as in_arpinput. To generate a diff of this commit: cvs rdiff -u -r1.154.16.1 -r1.154.16.2 src/sys/netinet/if_arp.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/netinet/if_arp.c diff -u src/sys/netinet/if_arp.c:1.154.16.1 src/sys/netinet/if_arp.c:1.154.16.2 --- src/sys/netinet/if_arp.c:1.154.16.1 Wed Jun 18 09:34:27 2014 +++ src/sys/netinet/if_arp.c Sun Feb 5 06:07:15 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: if_arp.c,v 1.154.16.1 2014/06/18 09:34:27 msaitoh Exp $ */ +/* $NetBSD: if_arp.c,v 1.154.16.2 2017/02/05 06:07:15 snj Exp $ */ /*- * Copyright (c) 1998, 2000, 2008 The NetBSD Foundation, Inc. @@ -68,7 +68,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_arp.c,v 1.154.16.1 2014/06/18 09:34:27 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_arp.c,v 1.154.16.2 2017/02/05 06:07:15 snj Exp $"); #include "opt_ddb.h" #include "opt_inet.h" @@ -974,6 +974,9 @@ in_arpinput(struct mbuf *m) break; } + if (ah->ar_pln != sizeof(struct in_addr)) + goto out; + memcpy(, ar_spa(ah), sizeof (isaddr)); memcpy(, ar_tpa(ah), sizeof (itaddr)); @@ -1004,7 +1007,10 @@ in_arpinput(struct mbuf *m) ((ia->ia_ifp->if_flags & (IFF_UP|IFF_RUNNING)) == (IFF_UP|IFF_RUNNING))) { index++; + + /* XXX: ar_hln? */ if (ia->ia_ifp == m->m_pkthdr.rcvif && + (ah->ar_hln >= 6) && carp_iamatch(ia, ar_sha(ah), , index)) { break; @@ -1036,6 +1042,14 @@ in_arpinput(struct mbuf *m) } #endif + if (ah->ar_hln != ifp->if_addrlen) { + ARP_STATINC(ARP_STAT_RCVBADLEN); + log(LOG_WARNING, + "arp from %s: addr len: new %d, i/f %d (ignored)\n", + in_fmtaddr(isaddr), ah->ar_hln, ifp->if_addrlen); + goto out; + } + if (ia == NULL) { INADDR_TO_IA(isaddr, ia); while ((ia != NULL) && ia->ia_ifp != m->m_pkthdr.rcvif) @@ -1130,14 +1144,7 @@ in_arpinput(struct mbuf *m) "arp from %s: new addr len %d, was %d\n", in_fmtaddr(isaddr), ah->ar_hln, sdl->sdl_alen); } - if (ifp->if_addrlen != ah->ar_hln) { - ARP_STATINC(ARP_STAT_RCVBADLEN); - log(LOG_WARNING, - "arp from %s: addr len: new %d, i/f %d (ignored)\n", - in_fmtaddr(isaddr), ah->ar_hln, - ifp->if_addrlen); - goto reply; - } + #if NTOKEN > 0 /* * XXX uses m_data and assumes the complete answer including @@ -1433,6 +1440,10 @@ in_revarpinput(struct mbuf *m) tha = ar_tha(ah); if (tha == NULL) goto out; + if (ah->ar_pln != sizeof(struct in_addr)) + goto out; + if (ah->ar_hln != ifp->if_sadl->sdl_alen) + goto out; if (memcmp(tha, CLLADDR(ifp->if_sadl), ifp->if_sadl->sdl_alen)) goto out; memcpy(_ip, ar_spa(ah), sizeof(srv_ip));
CVS commit: [netbsd-6-0] src/sys/netinet
Module Name:src Committed By: snj Date: Sun Feb 5 06:06:41 UTC 2017 Modified Files: src/sys/netinet [netbsd-6-0]: if_arp.c Log Message: Pull up following revision(s) (requested by maxv in ticket #1432): sys/netinet/if_arp.c: 1.238, 1.239 via patch Make sure the protocol address length equals that of IPv4. Also, make sure the hardware address length equals that of the interface we received the packet on. Otherwise a packet could easily set them both to zero and make the kernel read beyond the allocated mbuf, which is terrible. Note: for the latter we drop the packet instead of replying, since it is malformed. Note: I also added an ugly hack in CARP, since it apparently expects at least six bytes. -- Add some checks, mostly same as in_arpinput. To generate a diff of this commit: cvs rdiff -u -r1.154.8.1 -r1.154.8.2 src/sys/netinet/if_arp.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/netinet/if_arp.c diff -u src/sys/netinet/if_arp.c:1.154.8.1 src/sys/netinet/if_arp.c:1.154.8.2 --- src/sys/netinet/if_arp.c:1.154.8.1 Wed Jun 18 09:35:40 2014 +++ src/sys/netinet/if_arp.c Sun Feb 5 06:06:41 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: if_arp.c,v 1.154.8.1 2014/06/18 09:35:40 msaitoh Exp $ */ +/* $NetBSD: if_arp.c,v 1.154.8.2 2017/02/05 06:06:41 snj Exp $ */ /*- * Copyright (c) 1998, 2000, 2008 The NetBSD Foundation, Inc. @@ -68,7 +68,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_arp.c,v 1.154.8.1 2014/06/18 09:35:40 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_arp.c,v 1.154.8.2 2017/02/05 06:06:41 snj Exp $"); #include "opt_ddb.h" #include "opt_inet.h" @@ -974,6 +974,9 @@ in_arpinput(struct mbuf *m) break; } + if (ah->ar_pln != sizeof(struct in_addr)) + goto out; + memcpy(, ar_spa(ah), sizeof (isaddr)); memcpy(, ar_tpa(ah), sizeof (itaddr)); @@ -1004,7 +1007,10 @@ in_arpinput(struct mbuf *m) ((ia->ia_ifp->if_flags & (IFF_UP|IFF_RUNNING)) == (IFF_UP|IFF_RUNNING))) { index++; + + /* XXX: ar_hln? */ if (ia->ia_ifp == m->m_pkthdr.rcvif && + (ah->ar_hln >= 6) && carp_iamatch(ia, ar_sha(ah), , index)) { break; @@ -1036,6 +1042,14 @@ in_arpinput(struct mbuf *m) } #endif + if (ah->ar_hln != ifp->if_addrlen) { + ARP_STATINC(ARP_STAT_RCVBADLEN); + log(LOG_WARNING, + "arp from %s: addr len: new %d, i/f %d (ignored)\n", + in_fmtaddr(isaddr), ah->ar_hln, ifp->if_addrlen); + goto out; + } + if (ia == NULL) { INADDR_TO_IA(isaddr, ia); while ((ia != NULL) && ia->ia_ifp != m->m_pkthdr.rcvif) @@ -1130,14 +1144,7 @@ in_arpinput(struct mbuf *m) "arp from %s: new addr len %d, was %d\n", in_fmtaddr(isaddr), ah->ar_hln, sdl->sdl_alen); } - if (ifp->if_addrlen != ah->ar_hln) { - ARP_STATINC(ARP_STAT_RCVBADLEN); - log(LOG_WARNING, - "arp from %s: addr len: new %d, i/f %d (ignored)\n", - in_fmtaddr(isaddr), ah->ar_hln, - ifp->if_addrlen); - goto reply; - } + #if NTOKEN > 0 /* * XXX uses m_data and assumes the complete answer including @@ -1433,6 +1440,10 @@ in_revarpinput(struct mbuf *m) tha = ar_tha(ah); if (tha == NULL) goto out; + if (ah->ar_pln != sizeof(struct in_addr)) + goto out; + if (ah->ar_hln != ifp->if_sadl->sdl_alen) + goto out; if (memcmp(tha, CLLADDR(ifp->if_sadl), ifp->if_sadl->sdl_alen)) goto out; memcpy(_ip, ar_spa(ah), sizeof(srv_ip));
CVS commit: [netbsd-6] src/sys/arch/amd64/amd64
Module Name:src Committed By: snj Date: Sun Feb 5 06:01:05 UTC 2017 Modified Files: src/sys/arch/amd64/amd64 [netbsd-6]: copy.S Log Message: Apply patch (requested by maxv in ticket #1431): suword: Don't allow 4 bytes to overflow beyond the userland space. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.18.14.1 src/sys/arch/amd64/amd64/copy.S 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/amd64/amd64/copy.S diff -u src/sys/arch/amd64/amd64/copy.S:1.18 src/sys/arch/amd64/amd64/copy.S:1.18.14.1 --- src/sys/arch/amd64/amd64/copy.S:1.18 Wed Jul 7 01:13:29 2010 +++ src/sys/arch/amd64/amd64/copy.S Sun Feb 5 06:01:05 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: copy.S,v 1.18 2010/07/07 01:13:29 chs Exp $ */ +/* $NetBSD: copy.S,v 1.18.14.1 2017/02/05 06:01:05 snj Exp $ */ /* * Copyright (c) 2001 Wasabi Systems, Inc. @@ -413,7 +413,7 @@ ENTRY(fubyte) ENTRY(suword) DEFERRED_SWITCH_CHECK - movq $VM_MAXUSER_ADDRESS-4,%r11 + movq $VM_MAXUSER_ADDRESS-8,%r11 cmpq %r11,%rdi ja _C_LABEL(fusuaddrfault)
CVS commit: [netbsd-6-1] src/sys/arch/amd64/amd64
Module Name:src Committed By: snj Date: Sun Feb 5 05:59:59 UTC 2017 Modified Files: src/sys/arch/amd64/amd64 [netbsd-6-1]: copy.S Log Message: Apply patch (requested by maxv in ticket #1431): suword: Don't allow 4 bytes to overflow beyond the userland space. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.18.28.1 src/sys/arch/amd64/amd64/copy.S 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/amd64/amd64/copy.S diff -u src/sys/arch/amd64/amd64/copy.S:1.18 src/sys/arch/amd64/amd64/copy.S:1.18.28.1 --- src/sys/arch/amd64/amd64/copy.S:1.18 Wed Jul 7 01:13:29 2010 +++ src/sys/arch/amd64/amd64/copy.S Sun Feb 5 05:59:59 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: copy.S,v 1.18 2010/07/07 01:13:29 chs Exp $ */ +/* $NetBSD: copy.S,v 1.18.28.1 2017/02/05 05:59:59 snj Exp $ */ /* * Copyright (c) 2001 Wasabi Systems, Inc. @@ -413,7 +413,7 @@ ENTRY(fubyte) ENTRY(suword) DEFERRED_SWITCH_CHECK - movq $VM_MAXUSER_ADDRESS-4,%r11 + movq $VM_MAXUSER_ADDRESS-8,%r11 cmpq %r11,%rdi ja _C_LABEL(fusuaddrfault)
CVS commit: [netbsd-6-0] src/sys/arch/amd64/amd64
Module Name:src Committed By: snj Date: Sun Feb 5 05:59:33 UTC 2017 Modified Files: src/sys/arch/amd64/amd64 [netbsd-6-0]: copy.S Log Message: Apply patch (requested by maxv in ticket #1431): suword: Don't allow 4 bytes to overflow beyond the userland space. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.18.20.1 src/sys/arch/amd64/amd64/copy.S 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/amd64/amd64/copy.S diff -u src/sys/arch/amd64/amd64/copy.S:1.18 src/sys/arch/amd64/amd64/copy.S:1.18.20.1 --- src/sys/arch/amd64/amd64/copy.S:1.18 Wed Jul 7 01:13:29 2010 +++ src/sys/arch/amd64/amd64/copy.S Sun Feb 5 05:59:33 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: copy.S,v 1.18 2010/07/07 01:13:29 chs Exp $ */ +/* $NetBSD: copy.S,v 1.18.20.1 2017/02/05 05:59:33 snj Exp $ */ /* * Copyright (c) 2001 Wasabi Systems, Inc. @@ -413,7 +413,7 @@ ENTRY(fubyte) ENTRY(suword) DEFERRED_SWITCH_CHECK - movq $VM_MAXUSER_ADDRESS-4,%r11 + movq $VM_MAXUSER_ADDRESS-8,%r11 cmpq %r11,%rdi ja _C_LABEL(fusuaddrfault)
CVS commit: [netbsd-6-1] src/crypto/external/bsd/openssl/dist/crypto/evp
Module Name:src Committed By: snj Date: Sun Feb 5 05:53:04 UTC 2017 Modified Files: src/crypto/external/bsd/openssl/dist/crypto/evp [netbsd-6-1]: e_rc4_hmac_md5.c Log Message: Apply patch (requested by spz in ticket #1355): Fix CVE-2017-3731. To generate a diff of this commit: cvs rdiff -u -r1.1.1.1.2.2.6.2 -r1.1.1.1.2.2.6.3 \ src/crypto/external/bsd/openssl/dist/crypto/evp/e_rc4_hmac_md5.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/openssl/dist/crypto/evp/e_rc4_hmac_md5.c diff -u src/crypto/external/bsd/openssl/dist/crypto/evp/e_rc4_hmac_md5.c:1.1.1.1.2.2.6.2 src/crypto/external/bsd/openssl/dist/crypto/evp/e_rc4_hmac_md5.c:1.1.1.1.2.2.6.3 --- src/crypto/external/bsd/openssl/dist/crypto/evp/e_rc4_hmac_md5.c:1.1.1.1.2.2.6.2 Sun Jul 12 18:44:35 2015 +++ src/crypto/external/bsd/openssl/dist/crypto/evp/e_rc4_hmac_md5.c Sun Feb 5 05:53:04 2017 @@ -267,6 +267,8 @@ static int rc4_hmac_md5_ctrl(EVP_CIPHER_ len = p[arg - 2] << 8 | p[arg - 1]; if (!ctx->encrypt) { +if (len < MD5_DIGEST_LENGTH) +return -1; len -= MD5_DIGEST_LENGTH; p[arg - 2] = len >> 8; p[arg - 1] = len;
CVS commit: [netbsd-6] src/crypto/external/bsd/openssl/dist/crypto/evp
Module Name:src Committed By: snj Date: Sun Feb 5 05:53:27 UTC 2017 Modified Files: src/crypto/external/bsd/openssl/dist/crypto/evp [netbsd-6]: e_rc4_hmac_md5.c Log Message: Apply patch (requested by spz in ticket #1355): Fix CVE-2017-3731. To generate a diff of this commit: cvs rdiff -u -r1.1.1.1.2.4 -r1.1.1.1.2.5 \ src/crypto/external/bsd/openssl/dist/crypto/evp/e_rc4_hmac_md5.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/openssl/dist/crypto/evp/e_rc4_hmac_md5.c diff -u src/crypto/external/bsd/openssl/dist/crypto/evp/e_rc4_hmac_md5.c:1.1.1.1.2.4 src/crypto/external/bsd/openssl/dist/crypto/evp/e_rc4_hmac_md5.c:1.1.1.1.2.5 --- src/crypto/external/bsd/openssl/dist/crypto/evp/e_rc4_hmac_md5.c:1.1.1.1.2.4 Sun Jul 12 18:39:14 2015 +++ src/crypto/external/bsd/openssl/dist/crypto/evp/e_rc4_hmac_md5.c Sun Feb 5 05:53:27 2017 @@ -267,6 +267,8 @@ static int rc4_hmac_md5_ctrl(EVP_CIPHER_ len = p[arg - 2] << 8 | p[arg - 1]; if (!ctx->encrypt) { +if (len < MD5_DIGEST_LENGTH) +return -1; len -= MD5_DIGEST_LENGTH; p[arg - 2] = len >> 8; p[arg - 1] = len;
CVS commit: [netbsd-6-0] src/crypto/external/bsd/openssl/dist/crypto/evp
Module Name:src Committed By: snj Date: Sun Feb 5 05:52:42 UTC 2017 Modified Files: src/crypto/external/bsd/openssl/dist/crypto/evp [netbsd-6-0]: e_rc4_hmac_md5.c Log Message: Apply patch (requested by spz in ticket #1355): Fix CVE-2017-3731. To generate a diff of this commit: cvs rdiff -u -r1.1.1.1.2.2.4.2 -r1.1.1.1.2.2.4.3 \ src/crypto/external/bsd/openssl/dist/crypto/evp/e_rc4_hmac_md5.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/openssl/dist/crypto/evp/e_rc4_hmac_md5.c diff -u src/crypto/external/bsd/openssl/dist/crypto/evp/e_rc4_hmac_md5.c:1.1.1.1.2.2.4.2 src/crypto/external/bsd/openssl/dist/crypto/evp/e_rc4_hmac_md5.c:1.1.1.1.2.2.4.3 --- src/crypto/external/bsd/openssl/dist/crypto/evp/e_rc4_hmac_md5.c:1.1.1.1.2.2.4.2 Sun Jul 12 18:40:55 2015 +++ src/crypto/external/bsd/openssl/dist/crypto/evp/e_rc4_hmac_md5.c Sun Feb 5 05:52:41 2017 @@ -267,6 +267,8 @@ static int rc4_hmac_md5_ctrl(EVP_CIPHER_ len = p[arg - 2] << 8 | p[arg - 1]; if (!ctx->encrypt) { +if (len < MD5_DIGEST_LENGTH) +return -1; len -= MD5_DIGEST_LENGTH; p[arg - 2] = len >> 8; p[arg - 1] = len;
CVS commit: [netbsd-6] src/sys/net
Module Name:src Committed By: snj Date: Sun Feb 5 05:48:00 UTC 2017 Modified Files: src/sys/net [netbsd-6]: if_arcsubr.c if_ecosubr.c if_ethersubr.c if_fddisubr.c if_tokensubr.c Log Message: Pull up following revision(s) (requested by maxv in ticket #1429): sys/net/if_arcsubr.c: revision 1.76 via patch sys/net/if_ecosubr.c: revision 1.50 via patch sys/net/if_ethersubr.c: revision 1.236 via patch sys/net/if_fddisubr.c: revision 1.104 via patch sys/net/if_tokensubr.c: revision 1.80 via patch Don't forget to free the mbuf when we decide not to reply to an ARP request. This obviously is a terrible bug, since it allows a remote sender to DoS the system with specially-crafted requests sent in a loop. To generate a diff of this commit: cvs rdiff -u -r1.63.14.1 -r1.63.14.2 src/sys/net/if_arcsubr.c cvs rdiff -u -r1.36.4.1 -r1.36.4.2 src/sys/net/if_ecosubr.c cvs rdiff -u -r1.188.8.4 -r1.188.8.5 src/sys/net/if_ethersubr.c cvs rdiff -u -r1.81.14.1 -r1.81.14.2 src/sys/net/if_fddisubr.c cvs rdiff -u -r1.61 -r1.61.8.1 src/sys/net/if_tokensubr.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/net/if_arcsubr.c diff -u src/sys/net/if_arcsubr.c:1.63.14.1 src/sys/net/if_arcsubr.c:1.63.14.2 --- src/sys/net/if_arcsubr.c:1.63.14.1 Tue Oct 23 16:19:47 2012 +++ src/sys/net/if_arcsubr.c Sun Feb 5 05:48:00 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: if_arcsubr.c,v 1.63.14.1 2012/10/23 16:19:47 riz Exp $ */ +/* $NetBSD: if_arcsubr.c,v 1.63.14.2 2017/02/05 05:48:00 snj Exp $ */ /* * Copyright (c) 1994, 1995 Ignatios Souvatzis @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_arcsubr.c,v 1.63.14.1 2012/10/23 16:19:47 riz Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_arcsubr.c,v 1.63.14.2 2017/02/05 05:48:00 snj Exp $"); #include "opt_inet.h" @@ -196,8 +196,10 @@ arc_output(struct ifnet *ifp, struct mbu adst = arcbroadcastaddr; else { uint8_t *tha = ar_tha(arph); - if (tha == NULL) + if (tha == NULL) { +m_freem(m); return 0; + } adst = *tha; } Index: src/sys/net/if_ecosubr.c diff -u src/sys/net/if_ecosubr.c:1.36.4.1 src/sys/net/if_ecosubr.c:1.36.4.2 --- src/sys/net/if_ecosubr.c:1.36.4.1 Sun Dec 7 15:09:32 2014 +++ src/sys/net/if_ecosubr.c Sun Feb 5 05:48:00 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: if_ecosubr.c,v 1.36.4.1 2014/12/07 15:09:32 martin Exp $ */ +/* $NetBSD: if_ecosubr.c,v 1.36.4.2 2017/02/05 05:48:00 snj Exp $ */ /*- * Copyright (c) 2001 Ben Harris @@ -58,7 +58,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_ecosubr.c,v 1.36.4.1 2014/12/07 15:09:32 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_ecosubr.c,v 1.36.4.2 2017/02/05 05:48:00 snj Exp $"); #include "opt_inet.h" #include "opt_pfil_hooks.h" @@ -242,8 +242,10 @@ eco_output(struct ifnet *ifp, struct mbu case AF_ARP: ah = mtod(m, struct arphdr *); - if (ntohs(ah->ar_pro) != ETHERTYPE_IP) - return EAFNOSUPPORT; + if (ntohs(ah->ar_pro) != ETHERTYPE_IP) { + error = EAFNOSUPPORT; + goto bad; + } ehdr.eco_port = ECO_PORT_IP; switch (ntohs(ah->ar_op)) { case ARPOP_REQUEST: @@ -253,7 +255,8 @@ eco_output(struct ifnet *ifp, struct mbu ehdr.eco_control = ECO_CTL_ARP_REPLY; break; default: - return EOPNOTSUPP; + error = EOPNOTSUPP; + goto bad; } if (m->m_flags & M_BCAST) @@ -261,8 +264,10 @@ eco_output(struct ifnet *ifp, struct mbu ECO_ADDR_LEN); else { tha = ar_tha(ah); - if (tha == NULL) + if (tha == NULL) { +m_freem(m); return 0; + } memcpy(ehdr.eco_dhost, tha, ECO_ADDR_LEN); } Index: src/sys/net/if_ethersubr.c diff -u src/sys/net/if_ethersubr.c:1.188.8.4 src/sys/net/if_ethersubr.c:1.188.8.5 --- src/sys/net/if_ethersubr.c:1.188.8.4 Tue Jun 3 15:34:00 2014 +++ src/sys/net/if_ethersubr.c Sun Feb 5 05:48:00 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: if_ethersubr.c,v 1.188.8.4 2014/06/03 15:34:00 msaitoh Exp $ */ +/* $NetBSD: if_ethersubr.c,v 1.188.8.5 2017/02/05 05:48:00 snj Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -61,7 +61,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_ethersubr.c,v 1.188.8.4 2014/06/03 15:34:00 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_ethersubr.c,v 1.188.8.5 2017/02/05 05:48:00 snj Exp $"); #include "opt_inet.h" #include "opt_atalk.h" @@ -307,6 +307,7 @@ ether_output(struct ifnet * const ifp0, if (tha == NULL) { /* fake with ARPHDR_IEEE1394 */ +m_freem(m); return 0; } memcpy(edst, tha, sizeof(edst)); Index: src/sys/net/if_fddisubr.c diff -u src/sys/net/if_fddisubr.c:1.81.14.1 src/sys/net/if_fddisubr.c:1.81.14.2 --- src/sys/net/if_fddisubr.c:1.81.14.1 Wed Oct 31 16:07:46 2012 +++ src/sys/net/if_fddisubr.c Sun Feb 5 05:48:00 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: if_fddisubr.c,v 1.81.14.1 2012/10/31 16:07:46 riz Exp $ */ +/* $NetBSD: if_fddisubr.c,v 1.81.14.2
CVS commit: [netbsd-6-1] src/sys/net
Module Name:src Committed By: snj Date: Sun Feb 5 05:47:28 UTC 2017 Modified Files: src/sys/net [netbsd-6-1]: if_arcsubr.c if_ecosubr.c if_ethersubr.c if_fddisubr.c if_tokensubr.c Log Message: Pull up following revision(s) (requested by maxv in ticket #1429): sys/net/if_arcsubr.c: revision 1.76 via patch sys/net/if_ecosubr.c: revision 1.50 via patch sys/net/if_ethersubr.c: revision 1.236 via patch sys/net/if_fddisubr.c: revision 1.104 via patch sys/net/if_tokensubr.c: revision 1.80 via patch Don't forget to free the mbuf when we decide not to reply to an ARP request. This obviously is a terrible bug, since it allows a remote sender to DoS the system with specially-crafted requests sent in a loop. To generate a diff of this commit: cvs rdiff -u -r1.63.14.1 -r1.63.14.1.2.1 src/sys/net/if_arcsubr.c cvs rdiff -u -r1.36 -r1.36.18.1 src/sys/net/if_ecosubr.c cvs rdiff -u -r1.188.8.3.2.1 -r1.188.8.3.2.2 src/sys/net/if_ethersubr.c cvs rdiff -u -r1.81.14.1 -r1.81.14.1.2.1 src/sys/net/if_fddisubr.c cvs rdiff -u -r1.61 -r1.61.18.1 src/sys/net/if_tokensubr.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/net/if_arcsubr.c diff -u src/sys/net/if_arcsubr.c:1.63.14.1 src/sys/net/if_arcsubr.c:1.63.14.1.2.1 --- src/sys/net/if_arcsubr.c:1.63.14.1 Tue Oct 23 16:19:47 2012 +++ src/sys/net/if_arcsubr.c Sun Feb 5 05:47:28 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: if_arcsubr.c,v 1.63.14.1 2012/10/23 16:19:47 riz Exp $ */ +/* $NetBSD: if_arcsubr.c,v 1.63.14.1.2.1 2017/02/05 05:47:28 snj Exp $ */ /* * Copyright (c) 1994, 1995 Ignatios Souvatzis @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_arcsubr.c,v 1.63.14.1 2012/10/23 16:19:47 riz Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_arcsubr.c,v 1.63.14.1.2.1 2017/02/05 05:47:28 snj Exp $"); #include "opt_inet.h" @@ -196,8 +196,10 @@ arc_output(struct ifnet *ifp, struct mbu adst = arcbroadcastaddr; else { uint8_t *tha = ar_tha(arph); - if (tha == NULL) + if (tha == NULL) { +m_freem(m); return 0; + } adst = *tha; } Index: src/sys/net/if_ecosubr.c diff -u src/sys/net/if_ecosubr.c:1.36 src/sys/net/if_ecosubr.c:1.36.18.1 --- src/sys/net/if_ecosubr.c:1.36 Sun Nov 20 12:15:38 2011 +++ src/sys/net/if_ecosubr.c Sun Feb 5 05:47:28 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: if_ecosubr.c,v 1.36 2011/11/20 12:15:38 kiyohara Exp $ */ +/* $NetBSD: if_ecosubr.c,v 1.36.18.1 2017/02/05 05:47:28 snj Exp $ */ /*- * Copyright (c) 2001 Ben Harris @@ -58,7 +58,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_ecosubr.c,v 1.36 2011/11/20 12:15:38 kiyohara Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_ecosubr.c,v 1.36.18.1 2017/02/05 05:47:28 snj Exp $"); #include "opt_inet.h" #include "opt_pfil_hooks.h" @@ -242,8 +242,10 @@ eco_output(struct ifnet *ifp, struct mbu case AF_ARP: ah = mtod(m, struct arphdr *); - if (ntohs(ah->ar_pro) != ETHERTYPE_IP) - return EAFNOSUPPORT; + if (ntohs(ah->ar_pro) != ETHERTYPE_IP) { + error = EAFNOSUPPORT; + goto bad; + } ehdr.eco_port = ECO_PORT_IP; switch (ntohs(ah->ar_op)) { case ARPOP_REQUEST: @@ -253,7 +255,8 @@ eco_output(struct ifnet *ifp, struct mbu ehdr.eco_control = ECO_CTL_ARP_REPLY; break; default: - return EOPNOTSUPP; + error = EOPNOTSUPP; + goto bad; } if (m->m_flags & M_BCAST) @@ -261,8 +264,10 @@ eco_output(struct ifnet *ifp, struct mbu ECO_ADDR_LEN); else { tha = ar_tha(ah); - if (tha == NULL) + if (tha == NULL) { +m_freem(m); return 0; + } memcpy(ehdr.eco_dhost, tha, ECO_ADDR_LEN); } Index: src/sys/net/if_ethersubr.c diff -u src/sys/net/if_ethersubr.c:1.188.8.3.2.1 src/sys/net/if_ethersubr.c:1.188.8.3.2.2 --- src/sys/net/if_ethersubr.c:1.188.8.3.2.1 Wed Jun 18 09:34:27 2014 +++ src/sys/net/if_ethersubr.c Sun Feb 5 05:47:28 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: if_ethersubr.c,v 1.188.8.3.2.1 2014/06/18 09:34:27 msaitoh Exp $ */ +/* $NetBSD: if_ethersubr.c,v 1.188.8.3.2.2 2017/02/05 05:47:28 snj Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -61,7 +61,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_ethersubr.c,v 1.188.8.3.2.1 2014/06/18 09:34:27 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_ethersubr.c,v 1.188.8.3.2.2 2017/02/05 05:47:28 snj Exp $"); #include "opt_inet.h" #include "opt_atalk.h" @@ -307,6 +307,7 @@ ether_output(struct ifnet * const ifp0, if (tha == NULL) { /* fake with ARPHDR_IEEE1394 */ +m_freem(m); return 0; } memcpy(edst, tha, sizeof(edst)); Index: src/sys/net/if_fddisubr.c diff -u src/sys/net/if_fddisubr.c:1.81.14.1 src/sys/net/if_fddisubr.c:1.81.14.1.2.1 --- src/sys/net/if_fddisubr.c:1.81.14.1 Wed Oct 31 16:07:46 2012 +++ src/sys/net/if_fddisubr.c Sun Feb 5 05:47:28 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: if_fddisubr.c,v 1.81.14.1 2012/10/31 16:07:46 riz Exp
CVS commit: [netbsd-6-0] src/sys/net
Module Name:src Committed By: snj Date: Sun Feb 5 05:46:51 UTC 2017 Modified Files: src/sys/net [netbsd-6-0]: if_arcsubr.c if_ecosubr.c if_ethersubr.c if_fddisubr.c if_tokensubr.c Log Message: Pull up following revision(s) (requested by maxv in ticket #1429): sys/net/if_arcsubr.c: revision 1.76 via patch sys/net/if_ecosubr.c: revision 1.50 via patch sys/net/if_ethersubr.c: revision 1.236 via patch sys/net/if_fddisubr.c: revision 1.104 via patch sys/net/if_tokensubr.c: revision 1.80 via patch Don't forget to free the mbuf when we decide not to reply to an ARP request. This obviously is a terrible bug, since it allows a remote sender to DoS the system with specially-crafted requests sent in a loop. To generate a diff of this commit: cvs rdiff -u -r1.63 -r1.63.20.1 src/sys/net/if_arcsubr.c cvs rdiff -u -r1.36 -r1.36.10.1 src/sys/net/if_ecosubr.c cvs rdiff -u -r1.188.8.2.4.1 -r1.188.8.2.4.2 src/sys/net/if_ethersubr.c cvs rdiff -u -r1.81 -r1.81.20.1 src/sys/net/if_fddisubr.c cvs rdiff -u -r1.61 -r1.61.14.1 src/sys/net/if_tokensubr.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/net/if_arcsubr.c diff -u src/sys/net/if_arcsubr.c:1.63 src/sys/net/if_arcsubr.c:1.63.20.1 --- src/sys/net/if_arcsubr.c:1.63 Mon Apr 5 07:22:22 2010 +++ src/sys/net/if_arcsubr.c Sun Feb 5 05:46:51 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: if_arcsubr.c,v 1.63 2010/04/05 07:22:22 joerg Exp $ */ +/* $NetBSD: if_arcsubr.c,v 1.63.20.1 2017/02/05 05:46:51 snj Exp $ */ /* * Copyright (c) 1994, 1995 Ignatios Souvatzis @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_arcsubr.c,v 1.63 2010/04/05 07:22:22 joerg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_arcsubr.c,v 1.63.20.1 2017/02/05 05:46:51 snj Exp $"); #include "opt_inet.h" @@ -196,8 +196,10 @@ arc_output(struct ifnet *ifp, struct mbu adst = arcbroadcastaddr; else { uint8_t *tha = ar_tha(arph); - if (tha == NULL) + if (tha == NULL) { +m_freem(m); return 0; + } adst = *tha; } Index: src/sys/net/if_ecosubr.c diff -u src/sys/net/if_ecosubr.c:1.36 src/sys/net/if_ecosubr.c:1.36.10.1 --- src/sys/net/if_ecosubr.c:1.36 Sun Nov 20 12:15:38 2011 +++ src/sys/net/if_ecosubr.c Sun Feb 5 05:46:51 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: if_ecosubr.c,v 1.36 2011/11/20 12:15:38 kiyohara Exp $ */ +/* $NetBSD: if_ecosubr.c,v 1.36.10.1 2017/02/05 05:46:51 snj Exp $ */ /*- * Copyright (c) 2001 Ben Harris @@ -58,7 +58,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_ecosubr.c,v 1.36 2011/11/20 12:15:38 kiyohara Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_ecosubr.c,v 1.36.10.1 2017/02/05 05:46:51 snj Exp $"); #include "opt_inet.h" #include "opt_pfil_hooks.h" @@ -242,8 +242,10 @@ eco_output(struct ifnet *ifp, struct mbu case AF_ARP: ah = mtod(m, struct arphdr *); - if (ntohs(ah->ar_pro) != ETHERTYPE_IP) - return EAFNOSUPPORT; + if (ntohs(ah->ar_pro) != ETHERTYPE_IP) { + error = EAFNOSUPPORT; + goto bad; + } ehdr.eco_port = ECO_PORT_IP; switch (ntohs(ah->ar_op)) { case ARPOP_REQUEST: @@ -253,7 +255,8 @@ eco_output(struct ifnet *ifp, struct mbu ehdr.eco_control = ECO_CTL_ARP_REPLY; break; default: - return EOPNOTSUPP; + error = EOPNOTSUPP; + goto bad; } if (m->m_flags & M_BCAST) @@ -261,8 +264,10 @@ eco_output(struct ifnet *ifp, struct mbu ECO_ADDR_LEN); else { tha = ar_tha(ah); - if (tha == NULL) + if (tha == NULL) { +m_freem(m); return 0; + } memcpy(ehdr.eco_dhost, tha, ECO_ADDR_LEN); } Index: src/sys/net/if_ethersubr.c diff -u src/sys/net/if_ethersubr.c:1.188.8.2.4.1 src/sys/net/if_ethersubr.c:1.188.8.2.4.2 --- src/sys/net/if_ethersubr.c:1.188.8.2.4.1 Wed Jun 18 09:35:39 2014 +++ src/sys/net/if_ethersubr.c Sun Feb 5 05:46:51 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: if_ethersubr.c,v 1.188.8.2.4.1 2014/06/18 09:35:39 msaitoh Exp $ */ +/* $NetBSD: if_ethersubr.c,v 1.188.8.2.4.2 2017/02/05 05:46:51 snj Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -61,7 +61,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_ethersubr.c,v 1.188.8.2.4.1 2014/06/18 09:35:39 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_ethersubr.c,v 1.188.8.2.4.2 2017/02/05 05:46:51 snj Exp $"); #include "opt_inet.h" #include "opt_atalk.h" @@ -307,6 +307,7 @@ ether_output(struct ifnet * const ifp0, if (tha == NULL) { /* fake with ARPHDR_IEEE1394 */ +m_freem(m); return 0; } memcpy(edst, tha, sizeof(edst)); Index: src/sys/net/if_fddisubr.c diff -u src/sys/net/if_fddisubr.c:1.81 src/sys/net/if_fddisubr.c:1.81.20.1 --- src/sys/net/if_fddisubr.c:1.81 Mon Apr 5 07:22:23 2010 +++ src/sys/net/if_fddisubr.c Sun Feb 5 05:46:51 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: if_fddisubr.c,v 1.81 2010/04/05 07:22:23 joerg Exp $ */ +/* $NetBSD: if_fddisubr.c,v 1.81.20.1 2017/02/05
CVS import: src/external/bsd/tcpdump/dist
Module Name:src Committed By: spz Date: Sun Feb 5 03:07:24 UTC 2017 Update of /cvsroot/src/external/bsd/tcpdump/dist In directory ivanova.netbsd.org:/tmp/cvs-serv8326 Log Message: Update of tcpdump to version 4.9.0 This update fixes the following vulnerabilities: CVE-2016-7922 CVE-2016-7923 CVE-2016-7924 CVE-2016-7925 CVE-2016-7926 CVE-2016-7927 CVE-2016-7928 CVE-2016-7929 CVE-2016-7930 CVE-2016-7931 CVE-2016-7932 CVE-2016-7933 CVE-2016-7934 CVE-2016-7935 CVE-2016-7936 CVE-2016-7937 CVE-2016-7938 CVE-2016-7939 CVE-2016-7940 CVE-2016-7973 CVE-2016-7974 CVE-2016-7975 CVE-2016-7983 CVE-2016-7984 CVE-2016-7985 CVE-2016-7986 CVE-2016-7992 CVE-2016-7993 CVE-2016-8574 CVE-2016-8575 CVE-2017-5202 CVE-2017-5203 CVE-2017-5204 CVE-2017-5205 CVE-2017-5341 CVE-2017-5342 CVE-2017-5482 CVE-2017-5483 CVE-2017-5484 CVE-2017-5485 CVE-2017-5486 (all buffer overflows in various parts of tcpdump) Upstream Changelog: General updates: Improve separation frontend/backend (tcpdump/libnetdissect) Don't require IPv6 library support in order to support IPv6 addresses Introduce data types to use for integral values in packet structures Fix display of timestamps with -tt, -ttt and -t options Fix some heap overflows found with American Fuzzy Lop by Hanno Boeck and others (More information in the log with CVE-2016-* and CVE-2017-*) Change the way protocols print link-layer addresses (Fix heap overflows in CALM-FAST and GeoNetworking printers) Pass correct caplen value to ether_print() and some other functions Fix lookup_nsap() to match what isonsap_string() expects Clean up relative time stamp printing (Fix an array overflow) Fix some alignment issues with GCC on Solaris 10 SPARC Add some ND_TTEST_/ND_TCHECK_ macros to simplify writing bounds checks Add a fn_printztn() which returns the number of bytes processed Add nd_init() and nd_cleanup() functions. Improve libsmi support Add CONTRIBUTING file Add a summary comment in all printers Compile with more warning options in devel mode if supported (-Wcast-qual, ...) Fix some leaks found by Valgrind/Memcheck Fix a bunch of de-constifications Squelch some Coverity warnings and some compiler warnings Update Coverity and Travis-CI setup Update Visual Studio files Frontend: Fix capsicum support to work with zerocopy buffers in bpf Try opening interfaces by name first, then by name-as-index Work around pcap_create() failures fetching time stamp type lists Fix a segmentation fault with 'tcpdump -J' Improve addrtostr6() bounds checking Add exit_tcpdump() function Don't drop CAP_SYS_CHROOT before chrooting Fixes issue where statistics not reported when -G and -W options used New printers supporting: Generic Protocol Extension for VXLAN (VXLAN-GPE) Home Networking Control Protocol (HNCP), RFCs 7787 and 7788 Locator/Identifier Separation Protocol (LISP), type 3 and type 4 packets Marvell Extended Distributed Switch Architecture header (MEDSA) Network Service Header (NSH) REdis Serialization Protocol (RESP) Updated printers: 802.11: Beginnings of 11ac radiotap support 802.11: Check the Protected bit for management frames 802.11: Do bounds checking on last_presentp before dereferencing it (Fix a heap overflow) 802.11: Fix the radiotap printer to handle the special bits correctly 802.11: If we have the MCS field, it's 11n 802.11: Only print unknown frame type or subtype messages once 802.11: Radiotap dBm values get printed as dB; Update a test output accordingly 802.11: Source and destination addresses were backwards AH: Add a bounds check AH: Report to our caller that dissection failed if a bounds check fails AP1394: Print src > dst, not dst > src ARP: Don't assume the target hardware address is <= 6 octets long (Fix a heap overflow) ATALK: Add bounds and length checks (Fix heap overflows) ATM: Add some bounds checks (Fix a heap overflow) ATM: Fix an incorrect bounds check BFD: Update specification from draft to RFC 5880 BFD: Update to print optional authentication field BGP: Add decoding of ADD-PATH capability BGP: Add support for the AIGP attribute (RFC7311) BGP: Print LARGE_COMMUNITY Path Attribute BGP: Update BGP numbers from IANA; Print minor values for FSM notification BOOTP: Add a bounds check Babel: Add decoder for source-specific extension CDP: Filter out non-printable characters CFM: Fixes to match the IEEE standard, additional bounds and length checks CSLIP: Add more bounds checks (Fix a heap overflow) ClassicalIPoATM: Add a bounds check on LLC+SNAP header (Fix a heap overflow) DHCP: Fix MUDURL and TZ options DHCPv6: Process MUDURL and TZ options DHCPv6: Update Status Codes with RFCs/IANA names DNS: Represent the "DNSSEC OK" bit as "DO" instead of "OK". Add a test case
CVS commit: src/libexec/httpd
Module Name:src Committed By: mrg Date: Sun Feb 5 01:55:03 UTC 2017 Modified Files: src/libexec/httpd: bozohttpd.c Log Message: uh, this is actually called 20170201 :-) To generate a diff of this commit: cvs rdiff -u -r1.85 -r1.86 src/libexec/httpd/bozohttpd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/libexec/httpd/bozohttpd.c diff -u src/libexec/httpd/bozohttpd.c:1.85 src/libexec/httpd/bozohttpd.c:1.86 --- src/libexec/httpd/bozohttpd.c:1.85 Tue Jan 31 14:36:09 2017 +++ src/libexec/httpd/bozohttpd.c Sun Feb 5 01:55:03 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: bozohttpd.c,v 1.85 2017/01/31 14:36:09 mrg Exp $ */ +/* $NetBSD: bozohttpd.c,v 1.86 2017/02/05 01:55:03 mrg Exp $ */ /* $eterna: bozohttpd.c,v 1.178 2011/11/18 09:21:15 mrg Exp $ */ @@ -109,7 +109,7 @@ #define INDEX_HTML "index.html" #endif #ifndef SERVER_SOFTWARE -#define SERVER_SOFTWARE "bozohttpd/20170102" +#define SERVER_SOFTWARE "bozohttpd/20170201" #endif #ifndef DIRECT_ACCESS_FILE #define DIRECT_ACCESS_FILE ".bzdirect"
CVS commit: src/common/lib/libprop
Module Name:src Committed By: pgoyette Date: Sun Feb 5 00:47:33 UTC 2017 Modified Files: src/common/lib/libprop: prop_copyin_ioctl.9 Log Message: Add the *_size() variants to the .Nm list so it will be found by apropos(1). While here, reorder the function lists to improve readability. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/common/lib/libprop/prop_copyin_ioctl.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libprop/prop_copyin_ioctl.9 diff -u src/common/lib/libprop/prop_copyin_ioctl.9:1.13 src/common/lib/libprop/prop_copyin_ioctl.9:1.14 --- src/common/lib/libprop/prop_copyin_ioctl.9:1.13 Sat Feb 4 23:32:43 2017 +++ src/common/lib/libprop/prop_copyin_ioctl.9 Sun Feb 5 00:47:33 2017 @@ -1,4 +1,4 @@ -.\" $NetBSD: prop_copyin_ioctl.9,v 1.13 2017/02/04 23:32:43 wiz Exp $ +.\" $NetBSD: prop_copyin_ioctl.9,v 1.14 2017/02/05 00:47:33 pgoyette Exp $ .\" .\" Copyright (c) 2006, 2009 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -31,41 +31,39 @@ .Dt PROP_COPYIN_IOCTL 9 .Os .Sh NAME -.Nm prop_array_copyin_ioctl , -.Nm prop_array_copyout_ioctl , .Nm prop_array_copyin , +.Nm prop_array_copyin_size , +.Nm prop_array_copyin_ioctl , +.Nm prop_array_copyin_ioctl_size , .Nm prop_array_copyout , -.Nm prop_dictionary_copyin_ioctl , -.Nm prop_dictionary_copyout_ioctl , +.Nm prop_array_copyout_ioctl , .Nm prop_dictionary_copyin , +.Nm prop_dictionary_copyin_size , +.Nm prop_dictionary_copyin_ioctl , +.Nm prop_dictionary_copyin_ioctl_size , .Nm prop_dictionary_copyout +.Nm prop_dictionary_copyout_ioctl , .Nd Copy property lists to and from kernel space .Sh SYNOPSIS .In prop/proplib.h .Ft int -.Fn prop_array_copyin_ioctl "const struct plistref *pref" \ -"const u_long cmd" "prop_array_t *arrayp" -.Ft int -.Fn prop_array_copyin_ioctl_size "const struct plistref *pref" \ -"const u_long cmd" "prop_array_t *arrayp" "size_t lim" -.Ft int .Fn prop_array_copyin "const struct plistref *pref" \ "prop_array_t *arrayp" .Ft int .Fn prop_array_copyin_size "const struct plistref *pref" \ "prop_array_t *arrayp" "size_t lim" .Ft int -.Fn prop_array_copyout_ioctl "struct plistref *pref" \ -"const u_long cmd" "prop_array_t array" +.Fn prop_array_copyin_ioctl "const struct plistref *pref" \ +"const u_long cmd" "prop_array_t *arrayp" +.Ft int +.Fn prop_array_copyin_ioctl_size "const struct plistref *pref" \ +"const u_long cmd" "prop_array_t *arrayp" "size_t lim" .Ft int .Fn prop_array_copyout "struct plistref *pref" \ "prop_array_t array" .Ft int -.Fn prop_dictionary_copyin_ioctl "const struct plistref *pref" \ -"const u_long cmd" "prop_dictionary_t *dictp" -.Ft int -.Fn prop_dictionary_copyin_ioctl_size "const struct plistref *pref" \ -"const u_long cmd" "prop_dictionary_t *dictp" "size_t lim" +.Fn prop_array_copyout_ioctl "struct plistref *pref" \ +"const u_long cmd" "prop_array_t array" .Ft int .Fn prop_dictionary_copyin "const struct plistref *pref" \ "prop_dictionary_t *dictp" @@ -73,14 +71,19 @@ .Fn prop_dictionary_copyin_size "const struct plistref *pref" \ "prop_dictionary_t *dictp" "size_t lim" .Ft int -.Fn prop_dictionary_copyout_ioctl "struct plistref *pref" \ -"const u_long cmd" "prop_dictionary_t dict" +.Fn prop_dictionary_copyin_ioctl "const struct plistref *pref" \ +"const u_long cmd" "prop_dictionary_t *dictp" +.Ft int +.Fn prop_dictionary_copyin_ioctl_size "const struct plistref *pref" \ +"const u_long cmd" "prop_dictionary_t *dictp" "size_t lim" .Ft int .Fn prop_dictionary_copyout "struct plistref *pref" \ "prop_dictionary_t dict" +.Ft int +.Fn prop_dictionary_copyout_ioctl "struct plistref *pref" \ +"const u_long cmd" "prop_dictionary_t dict" .Sh DESCRIPTION The -.Nm prop_array_ioctl , .Nm prop_array_copyin_ioctl , .Nm prop_array_copyin_ioctl_size , .Nm prop_array_copyout_ioctl , @@ -109,19 +112,19 @@ This structure encapsulates the referenc form. .Pp The functions -.Nm prop_array_copyin_ioctl_size , -.Nm prop_dictionary_copyin_ioctl_size , .Nm prop_array_copyin_size , +.Nm prop_array_copyin_ioctl_size , +.Nm prop_dictionary_copyin_size , and -.Nm prop_dictionary_copyin_size +.Nm prop_dictionary_copyin_ioctl_size take an explicit limit argument .Ar lim while -.Nm prop_array_copyin_ioctl , -.Nm prop_dictionary_copyin_ioctl , .Nm prop_array_copyin , +.Nm prop_array_copyin_ioctl , +.Nm prop_dictionary_copyin , and -.Nm prop_dictionary_copyin +.Nm prop_dictionary_copyin_ioctl have an implicit size limit of 128KB. Attempts to transfer objects larger than the limit result in an .Er E2BIG
CVS commit: src/sbin/mount_nfs
Module Name:src Committed By: christos Date: Sun Feb 5 00:24:24 UTC 2017 Modified Files: src/sbin/mount_nfs: getnfsargs.c Log Message: remove debugging printf. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sbin/mount_nfs/getnfsargs.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/mount_nfs/getnfsargs.c diff -u src/sbin/mount_nfs/getnfsargs.c:1.17 src/sbin/mount_nfs/getnfsargs.c:1.18 --- src/sbin/mount_nfs/getnfsargs.c:1.17 Fri Feb 3 16:56:01 2017 +++ src/sbin/mount_nfs/getnfsargs.c Sat Feb 4 19:24:24 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: getnfsargs.c,v 1.17 2017/02/03 21:56:01 christos Exp $ */ +/* $NetBSD: getnfsargs.c,v 1.18 2017/02/05 00:24:24 christos Exp $ */ /* * Copyright (c) 1992, 1993, 1994 @@ -42,7 +42,7 @@ __COPYRIGHT("@(#) Copyright (c) 1992, 19 #if 0 static char sccsid[] = "@(#)mount_nfs.c 8.11 (Berkeley) 5/4/95"; #else -__RCSID("$NetBSD: getnfsargs.c,v 1.17 2017/02/03 21:56:01 christos Exp $"); +__RCSID("$NetBSD: getnfsargs.c,v 1.18 2017/02/05 00:24:24 christos Exp $"); #endif #endif /* not lint */ @@ -201,7 +201,6 @@ tryagain: * XXX relies on clnt_tcp_create to bind to a reserved * socket. */ - printf("netid=%s\n", netid); clp = clnt_tp_create(hostp, RPCPROG_MNT, mntvers, mnttcp_ok ? nconf : getnetconfigent(netid)); if (clp == NULL) {
CVS commit: src/bin/sh
Module Name:src Committed By: wiz Date: Sat Feb 4 23:35:15 UTC 2017 Modified Files: src/bin/sh: sh.1 Log Message: Remove trailing space. To generate a diff of this commit: cvs rdiff -u -r1.124 -r1.125 src/bin/sh/sh.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/bin/sh/sh.1 diff -u src/bin/sh/sh.1:1.124 src/bin/sh/sh.1:1.125 --- src/bin/sh/sh.1:1.124 Thu Feb 2 20:00:40 2017 +++ src/bin/sh/sh.1 Sat Feb 4 23:35:15 2017 @@ -1,4 +1,4 @@ -.\" $NetBSD: sh.1,v 1.124 2017/02/02 20:00:40 christos Exp $ +.\" $NetBSD: sh.1,v 1.125 2017/02/04 23:35:15 wiz Exp $ .\" Copyright (c) 1991, 1993 .\" The Regents of the University of California. All rights reserved. .\" @@ -1688,7 +1688,7 @@ Move the specified job or the current jo .It fdflags Oo Fl v Oc Oo fd ... Oc .It fdflags Oo Fl v Oc Fl s Ar flags fd Oo ... Oc Get or set file descriptor flags. -The +The .Fl v argument enables verbose printing, printing flags that are also off, and the flags of the file descriptor being set after setting.
CVS commit: src/external/bsd/blacklist/lib
Module Name:src Committed By: wiz Date: Sat Feb 4 23:33:56 UTC 2017 Modified Files: src/external/bsd/blacklist/lib: libblacklist.3 Log Message: Quote - to make it a minus. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/external/bsd/blacklist/lib/libblacklist.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/blacklist/lib/libblacklist.3 diff -u src/external/bsd/blacklist/lib/libblacklist.3:1.6 src/external/bsd/blacklist/lib/libblacklist.3:1.7 --- src/external/bsd/blacklist/lib/libblacklist.3:1.6 Tue Jan 31 16:55:04 2017 +++ src/external/bsd/blacklist/lib/libblacklist.3 Sat Feb 4 23:33:56 2017 @@ -1,4 +1,4 @@ -.\" $NetBSD: libblacklist.3,v 1.6 2017/01/31 16:55:04 abhinav Exp $ +.\" $NetBSD: libblacklist.3,v 1.7 2017/02/04 23:33:56 wiz Exp $ .\" .\" Copyright (c) 2015 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -121,7 +121,7 @@ and return .Dv 0 on success and -.Dv -1 +.Dv \-1 on failure setting .Dv errno to an appropriate value.
CVS commit: src/common/lib/libprop
Module Name:src Committed By: wiz Date: Sat Feb 4 23:32:44 UTC 2017 Modified Files: src/common/lib/libprop: prop_copyin_ioctl.9 Log Message: Use just the right amount of commas. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/common/lib/libprop/prop_copyin_ioctl.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libprop/prop_copyin_ioctl.9 diff -u src/common/lib/libprop/prop_copyin_ioctl.9:1.12 src/common/lib/libprop/prop_copyin_ioctl.9:1.13 --- src/common/lib/libprop/prop_copyin_ioctl.9:1.12 Sun Jan 29 01:38:02 2017 +++ src/common/lib/libprop/prop_copyin_ioctl.9 Sat Feb 4 23:32:43 2017 @@ -1,4 +1,4 @@ -.\" $NetBSD: prop_copyin_ioctl.9,v 1.12 2017/01/29 01:38:02 pgoyette Exp $ +.\" $NetBSD: prop_copyin_ioctl.9,v 1.13 2017/02/04 23:32:43 wiz Exp $ .\" .\" Copyright (c) 2006, 2009 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -113,7 +113,7 @@ The functions .Nm prop_dictionary_copyin_ioctl_size , .Nm prop_array_copyin_size , and -.Nm prop_dictionary_copyin_size , +.Nm prop_dictionary_copyin_size take an explicit limit argument .Ar lim while @@ -121,7 +121,7 @@ while .Nm prop_dictionary_copyin_ioctl , .Nm prop_array_copyin , and -.Nm prop_dictionary_copyin , +.Nm prop_dictionary_copyin have an implicit size limit of 128KB. Attempts to transfer objects larger than the limit result in an .Er E2BIG
CVS commit: [bouyer-socketcan] src/tests/net/can
Module Name:src Committed By: bouyer Date: Sat Feb 4 22:26:16 UTC 2017 Modified Files: src/tests/net/can [bouyer-socketcan]: Makefile t_can.c Added Files: src/tests/net/can [bouyer-socketcan]: h_canutils.c h_canutils.h Log Message: Factor out reading from a can socket, and move to a helper file. To generate a diff of this commit: cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/tests/net/can/Makefile cvs rdiff -u -r0 -r1.1.2.1 src/tests/net/can/h_canutils.c \ src/tests/net/can/h_canutils.h cvs rdiff -u -r1.1.2.2 -r1.1.2.3 src/tests/net/can/t_can.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/net/can/Makefile diff -u src/tests/net/can/Makefile:1.1.2.1 src/tests/net/can/Makefile:1.1.2.2 --- src/tests/net/can/Makefile:1.1.2.1 Sun Jan 15 20:29:01 2017 +++ src/tests/net/can/Makefile Sat Feb 4 22:26:16 2017 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1.2.1 2017/01/15 20:29:01 bouyer Exp $ +# $NetBSD: Makefile,v 1.1.2.2 2017/02/04 22:26:16 bouyer Exp $ # .include @@ -6,6 +6,7 @@ TESTSDIR= ${TESTSBASE}/net/can TESTS_C= t_can +SRCS.t_can= t_can.c h_canutils.c # XXX we don't use INET here, but we need rumpnet_netinet anyway: # common code in if.c is compiled with -DINET and will dereference ip_pktq, Index: src/tests/net/can/t_can.c diff -u src/tests/net/can/t_can.c:1.1.2.2 src/tests/net/can/t_can.c:1.1.2.3 --- src/tests/net/can/t_can.c:1.1.2.2 Mon Jan 16 18:04:27 2017 +++ src/tests/net/can/t_can.c Sat Feb 4 22:26:16 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: t_can.c,v 1.1.2.2 2017/01/16 18:04:27 bouyer Exp $ */ +/* $NetBSD: t_can.c,v 1.1.2.3 2017/02/04 22:26:16 bouyer Exp $ */ /*- * Copyright (c) 2017 The NetBSD Foundation, Inc. @@ -32,12 +32,11 @@ #include #ifndef lint -__RCSID("$NetBSD: t_can.c,v 1.1.2.2 2017/01/16 18:04:27 bouyer Exp $"); +__RCSID("$NetBSD: t_can.c,v 1.1.2.3 2017/02/04 22:26:16 bouyer Exp $"); #endif /* not lint */ #include #include -#include #include #include #include @@ -49,7 +48,6 @@ __RCSID("$NetBSD: t_can.c,v 1.1.2.2 2017 #include #include #include -#include #include #include @@ -58,37 +56,7 @@ __RCSID("$NetBSD: t_can.c,v 1.1.2.2 2017 #include #include "h_macros.h" - -static void -cancfg_rump_createif(const char *ifname) -{ - int s, rv; - struct ifreq ifr; - - s = -1; - if ((s = rump_sys_socket(AF_CAN, SOCK_RAW, CAN_RAW)) < 0) { - atf_tc_fail_errno("if config socket"); - } - - memset(, 0, sizeof(ifr)); - strncpy(ifr.ifr_name, ifname, IFNAMSIZ); - - if ((rv = rump_sys_ioctl(s, SIOCIFCREATE, )) < 0) { - atf_tc_fail_errno("if config create"); - } - - memset(, 0, sizeof(ifr)); - strncpy(ifr.ifr_name, ifname, IFNAMSIZ); - - if ((rv = rump_sys_ioctl(s, SIOCGIFFLAGS, )) < 0) { - atf_tc_fail_errno("if config get flags"); - } - - ifr.ifr_flags |= IFF_UP; - if ((rv = rump_sys_ioctl(s, SIOCSIFFLAGS, )) < 0) { - atf_tc_fail_errno("if config set flags"); - } -} +#include "h_canutils.h" ATF_TC(canlocreate); ATF_TC_HEAD(canlocreate, tc) @@ -197,38 +165,12 @@ ATF_TC_BODY(cannoown, tc) } /* now try to read */ - - memset(_receive, 0, sizeof(cf_receive)); - FD_ZERO(); - FD_SET(s, ); - /* we should receive no message; wait for 2 seconds */ - tmout.tv_sec = 2; - tmout.tv_usec = 0; - rv = rump_sys_select(s + 1, , NULL, NULL, ); - switch(rv) { - case -1: - atf_tc_fail_errno("select"); - break; - case 0: - /* timeout: expected case */ - return; - default: break; + if (can_recvfrom(s, _receive, , ) < 0) { + if (errno == EWOULDBLOCK) + return; /* expected timeout */ + atf_tc_fail_errno("can_recvfrom"); } - salen = sizeof(sa); - ATF_CHECK_MSG(FD_ISSET(s, ), "select returns but s not in set"); - if (( rv = rump_sys_recvfrom(s, _receive, sizeof(cf_receive), - 0, (struct sockaddr *), )) < 0) { - atf_tc_fail_errno("recvfrom"); - } - - ATF_CHECK_MSG(rv > 0, "short read on socket"); - ATF_CHECK_MSG(memcmp(_send, _receive, sizeof(cf_send)) == 0, - "recvfrom packet is not what we sent"); - ATF_CHECK_MSG(sa.can_family == AF_CAN, - "recvfrom provided wrong %d family", sa.can_family); - ATF_CHECK_MSG(salen == sizeof(sa), - "recvfrom provided wrong size %d (!= %d)", salen, sizeof(sa)); ATF_CHECK_MSG(sa.can_ifindex == ifr.ifr_ifindex, "recvfrom provided wrong ifindex %d (!= %d)", sa.can_ifindex, ifr.ifr_ifindex); @@ -320,13 +262,10 @@ ATF_TC_BODY(canwritelo, tc) atf_tc_fail_errno("write"); } - memset(_receive, 0, sizeof(cf_receive)); - if (( rv = rump_sys_read(s, _receive, sizeof(cf_receive))) < 0) { - atf_tc_fail_errno("read"); + if (can_read(s, _receive, ) < 0) { + atf_tc_fail_errno("can_read"); } - ATF_CHECK_MSG(rv > 0, "short read on socket"); - memset(_send, 0, sizeof(cf_send)); cf_send.can_id = 1; cf_send.can_dlc = 1; @@ -433,13 +372,10 @@ ATF_TC_BODY(cansendtolo, tc) atf_tc_fail_errno("sendto"); } - memset(_receive, 0, sizeof(cf_receive)); - if (( rv =
CVS commit: src/sys/compat/linux/arch/mips
Module Name:src Committed By: christos Date: Sat Feb 4 18:14:55 UTC 2017 Modified Files: src/sys/compat/linux/arch/mips: linux_syscall.h linux_syscallargs.h linux_syscalls.c linux_sysent.c Log Message: regen To generate a diff of this commit: cvs rdiff -u -r1.73 -r1.74 src/sys/compat/linux/arch/mips/linux_syscall.h cvs rdiff -u -r1.72 -r1.73 src/sys/compat/linux/arch/mips/linux_syscallargs.h \ src/sys/compat/linux/arch/mips/linux_syscalls.c \ src/sys/compat/linux/arch/mips/linux_sysent.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/compat/linux/arch/mips/linux_syscall.h diff -u src/sys/compat/linux/arch/mips/linux_syscall.h:1.73 src/sys/compat/linux/arch/mips/linux_syscall.h:1.74 --- src/sys/compat/linux/arch/mips/linux_syscall.h:1.73 Fri Feb 3 11:49:19 2017 +++ src/sys/compat/linux/arch/mips/linux_syscall.h Sat Feb 4 13:14:55 2017 @@ -1,10 +1,10 @@ -/* $NetBSD: linux_syscall.h,v 1.73 2017/02/03 16:49:19 christos Exp $ */ +/* $NetBSD: linux_syscall.h,v 1.74 2017/02/04 18:14:55 christos Exp $ */ /* * System call numbers. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.63 2017/02/03 16:49:08 christos Exp + * created from NetBSD: syscalls.master,v 1.64 2017/02/04 18:14:44 christos Exp */ #ifndef _LINUX_SYS_SYSCALL_H_ @@ -421,7 +421,7 @@ /* syscall: "bind" ret: "int" args: "int" "const struct osockaddr *" "int" */ #define LINUX_SYS_bind 169 -/* syscall: "connect" ret: "int" args: "int" "const struct sockaddr *" "int" */ +/* syscall: "connect" ret: "int" args: "int" "const struct osockaddr *" "int" */ #define LINUX_SYS_connect 170 /* syscall: "getpeername" ret: "int" args: "int" "void *" "int *" */ Index: src/sys/compat/linux/arch/mips/linux_syscallargs.h diff -u src/sys/compat/linux/arch/mips/linux_syscallargs.h:1.72 src/sys/compat/linux/arch/mips/linux_syscallargs.h:1.73 --- src/sys/compat/linux/arch/mips/linux_syscallargs.h:1.72 Fri Feb 3 11:49:19 2017 +++ src/sys/compat/linux/arch/mips/linux_syscallargs.h Sat Feb 4 13:14:55 2017 @@ -1,10 +1,10 @@ -/* $NetBSD: linux_syscallargs.h,v 1.72 2017/02/03 16:49:19 christos Exp $ */ +/* $NetBSD: linux_syscallargs.h,v 1.73 2017/02/04 18:14:55 christos Exp $ */ /* * System call argument lists. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.63 2017/02/03 16:49:08 christos Exp + * created from NetBSD: syscalls.master,v 1.64 2017/02/04 18:14:44 christos Exp */ #ifndef _LINUX_SYS_SYSCALLARGS_H_ @@ -549,37 +549,125 @@ struct linux_sys_mremap_args { }; check_syscall_args(linux_sys_mremap) -struct linux_sys_accept_args; +struct linux_sys_accept_args { + syscallarg(int) s; + syscallarg(struct osockaddr *) name; + syscallarg(int *) anamelen; +}; +check_syscall_args(linux_sys_accept) -struct linux_sys_bind_args; +struct linux_sys_bind_args { + syscallarg(int) s; + syscallarg(const struct osockaddr *) name; + syscallarg(int) namelen; +}; +check_syscall_args(linux_sys_bind) -struct linux_sys_connect_args; +struct linux_sys_connect_args { + syscallarg(int) s; + syscallarg(const struct osockaddr *) name; + syscallarg(int) namelen; +}; +check_syscall_args(linux_sys_connect) -struct linux_sys_getpeername_args; +struct linux_sys_getpeername_args { + syscallarg(int) fdes; + syscallarg(void *) asa; + syscallarg(int *) alen; +}; +check_syscall_args(linux_sys_getpeername) -struct linux_sys_getsockname_args; +struct linux_sys_getsockname_args { + syscallarg(int) fdes; + syscallarg(void *) asa; + syscallarg(int *) alen; +}; +check_syscall_args(linux_sys_getsockname) -struct linux_sys_getsockopt_args; +struct linux_sys_getsockopt_args { + syscallarg(int) s; + syscallarg(int) level; + syscallarg(int) optname; + syscallarg(void *) optval; + syscallarg(int *) optlen; +}; +check_syscall_args(linux_sys_getsockopt) struct sys_listen_args; -struct linux_sys_recv_args; - -struct linux_sys_recvfrom_args; - -struct linux_sys_recvmsg_args; +struct linux_sys_recv_args { + syscallarg(int) s; + syscallarg(void *) buf; + syscallarg(int) len; + syscallarg(int) flags; +}; +check_syscall_args(linux_sys_recv) -struct linux_sys_send_args; +struct linux_sys_recvfrom_args { + syscallarg(int) s; + syscallarg(void *) buf; + syscallarg(int) len; + syscallarg(int) flags; + syscallarg(struct osockaddr *) from; + syscallarg(int *) fromlenaddr; +}; +check_syscall_args(linux_sys_recvfrom) -struct linux_sys_sendmsg_args; +struct linux_sys_recvmsg_args { + syscallarg(int) s; + syscallarg(struct linux_msghdr *) msg; + syscallarg(u_int) flags; +}; +check_syscall_args(linux_sys_recvmsg) -struct linux_sys_sendto_args; +struct linux_sys_send_args { + syscallarg(int) s; + syscallarg(void *) buf; + syscallarg(int) len; + syscallarg(int) flags; +}; +check_syscall_args(linux_sys_send) -struct
CVS commit: src/sys/compat/linux/arch/mips
Module Name:src Committed By: christos Date: Sat Feb 4 18:14:44 UTC 2017 Modified Files: src/sys/compat/linux/arch/mips: syscalls.master Log Message: fix broken entries that prevented compilation. To generate a diff of this commit: cvs rdiff -u -r1.63 -r1.64 src/sys/compat/linux/arch/mips/syscalls.master 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/linux/arch/mips/syscalls.master diff -u src/sys/compat/linux/arch/mips/syscalls.master:1.63 src/sys/compat/linux/arch/mips/syscalls.master:1.64 --- src/sys/compat/linux/arch/mips/syscalls.master:1.63 Fri Feb 3 11:49:08 2017 +++ src/sys/compat/linux/arch/mips/syscalls.master Sat Feb 4 13:14:44 2017 @@ -1,4 +1,4 @@ - $NetBSD: syscalls.master,v 1.63 2017/02/03 16:49:08 christos Exp $ + $NetBSD: syscalls.master,v 1.64 2017/02/04 18:14:44 christos Exp $ ; @(#)syscalls.master 8.1 (Berkeley) 7/19/93 @@ -283,39 +283,39 @@ struct linux_timespec *rmtp); } 167 STD { void *|linux_sys||mremap(void *old_address, \ size_t old_size, size_t new_size, u_long flags); } -168 NOARGS { int|linux_sys||accept(int s, \ +168 STD { int|linux_sys||accept(int s, \ struct osockaddr *name, int *anamelen); } -169 NOARGS { int|linux_sys||bind(int s, \ +169 STD { int|linux_sys||bind(int s, \ const struct osockaddr *name, int namelen); } -170 NOARGS { int|linux_sys||connect(int s, \ - const struct sockaddr *name, int namelen); } -171 NOARGS { int|linux_sys||getpeername(int fdes, void *asa, \ +170 STD { int|linux_sys||connect(int s, \ + const struct osockaddr *name, int namelen); } +171 STD { int|linux_sys||getpeername(int fdes, void *asa, \ int *alen); } -172 NOARGS { int|linux_sys||getsockname(int fdes, void *asa, \ +172 STD { int|linux_sys||getsockname(int fdes, void *asa, \ int *alen); } -173 NOARGS { int|linux_sys||getsockopt(int s, int level, \ +173 STD { int|linux_sys||getsockopt(int s, int level, \ int optname, void *optval, int *optlen); } 174 NOARGS { int|sys||listen(int s, int backlog); } -175 NOARGS { int|linux_sys||recv(int s, void *buf, int len, \ +175 STD { int|linux_sys||recv(int s, void *buf, int len, \ int flags); } -176 NOARGS { int|linux_sys||recvfrom(int s, void *buf, int len, \ +176 STD { int|linux_sys||recvfrom(int s, void *buf, int len, \ int flags, struct osockaddr *from, \ int *fromlenaddr); } -177 NOARGS { int|linux_sys||recvmsg(int s, \ +177 STD { int|linux_sys||recvmsg(int s, \ struct linux_msghdr *msg, u_int flags); } -178 NOARGS { int|linux_sys||send(int s, void *buf, int len, \ +178 STD { int|linux_sys||send(int s, void *buf, int len, \ int flags); } -179 NOARGS { int|linux_sys||sendmsg(int s, \ +179 STD { int|linux_sys||sendmsg(int s, \ struct linux_msghdr *msg, u_int flags); } -180 NOARGS { int|linux_sys||sendto(int s, void *msg, \ +180 STD { int|linux_sys||sendto(int s, void *msg, \ int len, int flags, struct osockaddr *to, \ int tolen); } -181 NOARGS { int|linux_sys||setsockopt(int s, int level, \ +181 STD { int|linux_sys||setsockopt(int s, int level, \ int optname, void *optval, int optlen); } 182 UNIMPL shutdown -183 NOARGS { int|linux_sys||socket(int domain, int type, \ +183 STD { int|linux_sys||socket(int domain, int type, \ int protocol); } -184 NOARGS { int|linux_sys||socketpair(int domain, int type, \ +184 STD { int|linux_sys||socketpair(int domain, int type, \ int protocol, int *rsv); } 185 STD { int|linux_sys||setresuid(uid_t ruid, uid_t euid, \ uid_t suid); }
CVS commit: src/sys/external/bsd/gnu-efi/dist/lib
Module Name:src Committed By: mlelstv Date: Sat Feb 4 18:08:29 UTC 2017 Modified Files: src/sys/external/bsd/gnu-efi/dist/lib: dpath.c event.c hand.c hw.c Log Message: tag variables as __unused to appease compiler. To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 src/sys/external/bsd/gnu-efi/dist/lib/dpath.c \ src/sys/external/bsd/gnu-efi/dist/lib/event.c \ src/sys/external/bsd/gnu-efi/dist/lib/hw.c cvs rdiff -u -r1.2 -r1.3 src/sys/external/bsd/gnu-efi/dist/lib/hand.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/gnu-efi/dist/lib/dpath.c diff -u src/sys/external/bsd/gnu-efi/dist/lib/dpath.c:1.1.1.1 src/sys/external/bsd/gnu-efi/dist/lib/dpath.c:1.2 --- src/sys/external/bsd/gnu-efi/dist/lib/dpath.c:1.1.1.1 Tue Apr 1 16:16:06 2014 +++ src/sys/external/bsd/gnu-efi/dist/lib/dpath.c Sat Feb 4 18:08:29 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: dpath.c,v 1.1.1.1 2014/04/01 16:16:06 jakllsch Exp $ */ +/* $NetBSD: dpath.c,v 1.2 2017/02/04 18:08:29 mlelstv Exp $ */ /*++ @@ -677,7 +677,7 @@ _DevPathIPv4 ( IN VOID *DevPath ) { -IPv4_DEVICE_PATH *IP; +IPv4_DEVICE_PATH *IP __unused; IP = DevPath; CatPrint(Str, L"IPv4(not-done)"); @@ -689,7 +689,7 @@ _DevPathIPv6 ( IN VOID *DevPath ) { -IPv6_DEVICE_PATH *IP; +IPv6_DEVICE_PATH *IP __unused; IP = DevPath; CatPrint(Str, L"IP-v6(not-done)"); @@ -701,7 +701,7 @@ _DevPathInfiniBand ( IN VOID *DevPath ) { -INFINIBAND_DEVICE_PATH *InfiniBand; +INFINIBAND_DEVICE_PATH *InfiniBand __unused; InfiniBand = DevPath; CatPrint(Str, L"InfiniBand(not-done)"); Index: src/sys/external/bsd/gnu-efi/dist/lib/event.c diff -u src/sys/external/bsd/gnu-efi/dist/lib/event.c:1.1.1.1 src/sys/external/bsd/gnu-efi/dist/lib/event.c:1.2 --- src/sys/external/bsd/gnu-efi/dist/lib/event.c:1.1.1.1 Tue Apr 1 16:16:06 2014 +++ src/sys/external/bsd/gnu-efi/dist/lib/event.c Sat Feb 4 18:08:29 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: event.c,v 1.1.1.1 2014/04/01 16:16:06 jakllsch Exp $ */ +/* $NetBSD: event.c,v 1.2 2017/02/04 18:08:29 mlelstv Exp $ */ /*++ @@ -29,7 +29,11 @@ LibCreateProtocolNotifyEvent ( OUT VOID*Registration ) { +#ifdef EFI_DEBUG EFI_STATUS Status; +#else +EFI_STATUS Status __unused; +#endif EFI_EVENT Event; // Index: src/sys/external/bsd/gnu-efi/dist/lib/hw.c diff -u src/sys/external/bsd/gnu-efi/dist/lib/hw.c:1.1.1.1 src/sys/external/bsd/gnu-efi/dist/lib/hw.c:1.2 --- src/sys/external/bsd/gnu-efi/dist/lib/hw.c:1.1.1.1 Tue Apr 1 16:16:06 2014 +++ src/sys/external/bsd/gnu-efi/dist/lib/hw.c Sat Feb 4 18:08:29 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: hw.c,v 1.1.1.1 2014/04/01 16:16:06 jakllsch Exp $ */ +/* $NetBSD: hw.c,v 1.2 2017/02/04 18:08:29 mlelstv Exp $ */ /*++ @@ -78,7 +78,7 @@ ReadPort ( ) { UINT32 Data; -EFI_STATUS Status; +EFI_STATUS Status __unused; Status = uefi_call_wrapper(GlobalIoFncs->Io.Read, 5, GlobalIoFncs, Width, (UINT64)Port, 1, ); ASSERT(!EFI_ERROR(Status)); @@ -93,7 +93,7 @@ WritePort ( IN UINTN Data ) { -EFI_STATUS Status; +EFI_STATUS Status __unused; Status = uefi_call_wrapper(GlobalIoFncs->Io.Write, 5, GlobalIoFncs, Width, (UINT64)Port, 1, ); ASSERT(!EFI_ERROR(Status)); @@ -108,7 +108,7 @@ ReadPciConfig ( ) { UINT32 Data; -EFI_STATUS Status; +EFI_STATUS Status __unused; Status = uefi_call_wrapper(GlobalIoFncs->Pci.Read, 5, GlobalIoFncs, Width, (UINT64)Address, 1, ); ASSERT(!EFI_ERROR(Status)); @@ -123,7 +123,7 @@ WritePciConfig ( IN UINTN Data ) { -EFI_STATUS Status; +EFI_STATUS Status __unused; Status = uefi_call_wrapper(GlobalIoFncs->Pci.Write, 5, GlobalIoFncs, Width, (UINT64)Address, 1, ); ASSERT(!EFI_ERROR(Status)); Index: src/sys/external/bsd/gnu-efi/dist/lib/hand.c diff -u src/sys/external/bsd/gnu-efi/dist/lib/hand.c:1.2 src/sys/external/bsd/gnu-efi/dist/lib/hand.c:1.3 --- src/sys/external/bsd/gnu-efi/dist/lib/hand.c:1.2 Tue Dec 15 12:36:10 2015 +++ src/sys/external/bsd/gnu-efi/dist/lib/hand.c Sat Feb 4 18:08:29 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: hand.c,v 1.2 2015/12/15 12:36:10 christos Exp $ */ +/* $NetBSD: hand.c,v 1.3 2017/02/04 18:08:29 mlelstv Exp $ */ /*++ @@ -119,7 +119,7 @@ LibLocateHandleByDiskSignature ( EFI_HANDLE*BlockIoBuffer; EFI_DEVICE_PATH *DevicePath; UINTN Index; -EFI_DEVICE_PATH *Start, *Next, *DevPath; +EFI_DEVICE_PATH *Start __unused, *Next, *DevPath; HARDDRIVE_DEVICE_PATH *HardDriveDevicePath; BOOLEAN Match; BOOLEAN
CVS commit: src/sys/arch/i386/stand/efiboot/bootx64
Module Name:src Committed By: christos Date: Sat Feb 4 16:14:28 UTC 2017 Modified Files: src/sys/arch/i386/stand/efiboot/bootx64: startprog64.S Log Message: Fix operand width To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 \ src/sys/arch/i386/stand/efiboot/bootx64/startprog64.S 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/i386/stand/efiboot/bootx64/startprog64.S diff -u src/sys/arch/i386/stand/efiboot/bootx64/startprog64.S:1.1 src/sys/arch/i386/stand/efiboot/bootx64/startprog64.S:1.2 --- src/sys/arch/i386/stand/efiboot/bootx64/startprog64.S:1.1 Tue Jan 24 06:09:14 2017 +++ src/sys/arch/i386/stand/efiboot/bootx64/startprog64.S Sat Feb 4 11:14:27 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: startprog64.S,v 1.1 2017/01/24 11:09:14 nonaka Exp $ */ +/* $NetBSD: startprog64.S,v 1.2 2017/02/04 16:14:27 christos Exp $ */ /* NetBSD: startprog.S,v 1.3 2003/02/01 14:48:18 dsl Exp */ /* starts program in protected mode / flat space @@ -110,11 +110,11 @@ start: .code32 start32a: movl $DATA_SEGMENT, %eax - movw %eax, %ds - movw %eax, %es - movw %eax, %fs - movw %eax, %gs - movw %eax, %ss + movw %ax, %ds + movw %ax, %es + movw %ax, %fs + movw %ax, %gs + movw %ax, %ss movl %edx, %esp
CVS commit: src/sys/arch/i386/stand/efiboot
Module Name:src Committed By: christos Date: Sat Feb 4 16:14:04 UTC 2017 Modified Files: src/sys/arch/i386/stand/efiboot: Makefile.efiboot Log Message: Don't error out for set but unused variables for now. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/i386/stand/efiboot/Makefile.efiboot 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/i386/stand/efiboot/Makefile.efiboot diff -u src/sys/arch/i386/stand/efiboot/Makefile.efiboot:1.3 src/sys/arch/i386/stand/efiboot/Makefile.efiboot:1.4 --- src/sys/arch/i386/stand/efiboot/Makefile.efiboot:1.3 Sat Feb 4 08:36:07 2017 +++ src/sys/arch/i386/stand/efiboot/Makefile.efiboot Sat Feb 4 11:14:04 2017 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.efiboot,v 1.3 2017/02/04 13:36:07 roy Exp $ +# $NetBSD: Makefile.efiboot,v 1.4 2017/02/04 16:14:04 christos Exp $ S= ${.CURDIR}/../../../../.. @@ -48,6 +48,7 @@ CPPFLAGS+= -I${.CURDIR}/../../lib COPTS+= -ffreestanding -fPIC -fshort-wchar -fno-strict-aliasing -fno-builtin COPTS+= -fno-stack-protector +COPTS+= -Wno-error=unused-but-set-variable COPTS+= ${${ACTIVE_CC} == "gcc":? -falign-functions=16 :} CPPFLAGS+= -nostdinc -D_STANDALONE CPPFLAGS+= -DEFIBOOT
CVS commit: src/sys/arch/i386/stand/efiboot
Module Name:src Committed By: roy Date: Sat Feb 4 13:36:07 UTC 2017 Modified Files: src/sys/arch/i386/stand/efiboot: Makefile.efiboot panic.c Log Message: Mark reboot() and _rtt() as __dead. Use __builtin_unreachable() to ensure Panic really is marked dead. Thanks to joerg@ To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/i386/stand/efiboot/Makefile.efiboot cvs rdiff -u -r1.1 -r1.2 src/sys/arch/i386/stand/efiboot/panic.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/i386/stand/efiboot/Makefile.efiboot diff -u src/sys/arch/i386/stand/efiboot/Makefile.efiboot:1.2 src/sys/arch/i386/stand/efiboot/Makefile.efiboot:1.3 --- src/sys/arch/i386/stand/efiboot/Makefile.efiboot:1.2 Fri Feb 3 17:24:43 2017 +++ src/sys/arch/i386/stand/efiboot/Makefile.efiboot Sat Feb 4 13:36:07 2017 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.efiboot,v 1.2 2017/02/03 17:24:43 roy Exp $ +# $NetBSD: Makefile.efiboot,v 1.3 2017/02/04 13:36:07 roy Exp $ S= ${.CURDIR}/../../../../.. @@ -46,7 +46,6 @@ CPPFLAGS+= -I$S -I${.CURDIR} -I${.CURDIR CPPFLAGS+= -I${.OBJDIR} CPPFLAGS+= -I${.CURDIR}/../../lib -CWARNFLAGS.clang+= -Wno-invalid-noreturn #panic.c COPTS+= -ffreestanding -fPIC -fshort-wchar -fno-strict-aliasing -fno-builtin COPTS+= -fno-stack-protector COPTS+= ${${ACTIVE_CC} == "gcc":? -falign-functions=16 :} Index: src/sys/arch/i386/stand/efiboot/panic.c diff -u src/sys/arch/i386/stand/efiboot/panic.c:1.1 src/sys/arch/i386/stand/efiboot/panic.c:1.2 --- src/sys/arch/i386/stand/efiboot/panic.c:1.1 Tue Jan 24 11:09:14 2017 +++ src/sys/arch/i386/stand/efiboot/panic.c Sat Feb 4 13:36:07 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: panic.c,v 1.1 2017/01/24 11:09:14 nonaka Exp $ */ +/* $NetBSD: panic.c,v 1.2 2017/02/04 13:36:07 roy Exp $ */ /*- * Copyright (c) 2016 Kimihiro Nonaka@@ -47,9 +47,10 @@ Panic( va_end(args); reboot(); /*NOTREACHED*/ + __builtin_unreachable(); } -void +__dead void reboot(void) { @@ -61,7 +62,7 @@ reboot(void) continue; } -void +__dead void _rtt(void) {
CVS commit: src
Module Name:src Committed By: spz Date: Sat Feb 4 10:56:10 UTC 2017 Modified Files: src/doc: 3RDPARTY src/external/mit/expat/dist/conftools: config.guess config.sub src/external/mit/expat/dist/lib: xmlparse.c xmltok.c xmltok_impl.c src/external/mit/expat/dist/tests: xmltest.sh src/external/mit/expat/lib/libexpat: expat_config.h Removed Files: src/external/mit/expat/dist/doc: xmlwf.sgml Log Message: merge expat-2.2.0 and document To generate a diff of this commit: cvs rdiff -u -r1.1406 -r1.1407 src/doc/3RDPARTY cvs rdiff -u -r1.2 -r1.3 src/external/mit/expat/dist/conftools/config.guess \ src/external/mit/expat/dist/conftools/config.sub cvs rdiff -u -r1.1.1.3 -r0 src/external/mit/expat/dist/doc/xmlwf.sgml cvs rdiff -u -r1.5 -r1.6 src/external/mit/expat/dist/lib/xmlparse.c cvs rdiff -u -r1.2 -r1.3 src/external/mit/expat/dist/lib/xmltok.c cvs rdiff -u -r1.4 -r1.5 src/external/mit/expat/dist/lib/xmltok_impl.c cvs rdiff -u -r1.1.1.3 -r1.2 src/external/mit/expat/dist/tests/xmltest.sh cvs rdiff -u -r1.3 -r1.4 src/external/mit/expat/lib/libexpat/expat_config.h 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.1406 src/doc/3RDPARTY:1.1407 --- src/doc/3RDPARTY:1.1406 Tue Jan 31 23:56:41 2017 +++ src/doc/3RDPARTY Sat Feb 4 10:56:10 2017 @@ -1,4 +1,4 @@ -# $NetBSD: 3RDPARTY,v 1.1406 2017/01/31 23:56:41 christos Exp $ +# $NetBSD: 3RDPARTY,v 1.1407 2017/02/04 10:56:10 spz Exp $ # # This file contains a list of the software that has been integrated into # NetBSD where we are not the primary maintainer. @@ -413,7 +413,7 @@ Location: external/bsd/ekermit Notes: Package: expat -Version: 2.1.1 +Version: 2.2.0 Current Vers: 2.2.0 Maintainer: Expat Project Archive Site: http://sourceforge.net/projects/expat/files/expat/ Index: src/external/mit/expat/dist/conftools/config.guess diff -u src/external/mit/expat/dist/conftools/config.guess:1.2 src/external/mit/expat/dist/conftools/config.guess:1.3 --- src/external/mit/expat/dist/conftools/config.guess:1.2 Wed Feb 1 09:26:43 2017 +++ src/external/mit/expat/dist/conftools/config.guess Sat Feb 4 10:56:10 2017 @@ -1057,7 +1057,18 @@ EOF echo ${UNAME_MACHINE}-dec-linux-${LIBC} exit ;; x86_64:Linux:*:*) - echo ${UNAME_MACHINE}-pc-linux-${LIBC} + eval $set_cc_for_build + X86_64_ABI= + # If there is a compiler, see if it is configured for 32-bit objects. + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __ILP32__'; echo IS_X32; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_X32 >/dev/null + then + X86_64_ABI=x32 + fi + fi + echo ${UNAME_MACHINE}-pc-linux-${LIBC}${X86_64_ABI} exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} Index: src/external/mit/expat/dist/conftools/config.sub diff -u src/external/mit/expat/dist/conftools/config.sub:1.2 src/external/mit/expat/dist/conftools/config.sub:1.3 --- src/external/mit/expat/dist/conftools/config.sub:1.2 Wed Feb 1 09:26:43 2017 +++ src/external/mit/expat/dist/conftools/config.sub Sat Feb 4 10:56:10 2017 @@ -838,6 +838,24 @@ case $basic_machine in basic_machine=m68k-atari os=-mint ;; + mipsEE* | ee | ps2) + basic_machine=mips64r5900el-scei + case $os in + -linux*) + ;; + *) + os=-elf + ;; + esac + ;; + iop) + basic_machine=mipsel-scei + os=-irx + ;; + dvp) + basic_machine=dvp-scei + os=-elf + ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; @@ -1404,7 +1422,7 @@ case $os in | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* | -irx* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ Index: src/external/mit/expat/dist/lib/xmlparse.c diff -u src/external/mit/expat/dist/lib/xmlparse.c:1.5 src/external/mit/expat/dist/lib/xmlparse.c:1.6 --- src/external/mit/expat/dist/lib/xmlparse.c:1.5 Tue May 17 23:53:02 2016 +++ src/external/mit/expat/dist/lib/xmlparse.c Sat Feb 4 10:56:10 2017 @@ -6,11 +6,18 @@ #include /* memset(), memcpy() */ #include #include /* UINT_MAX */ -#include/* time() */ + +#ifdef WIN32 +#define getpid GetCurrentProcessId +#else +#include/* gettimeofday() */ +#include /* getpid() */ +#include /* getpid() */ +#endif #define XML_BUILDING_EXPAT 1 -#ifdef COMPILED_FROM_DSP +#ifdef WIN32 #include
CVS import: src/external/mit/expat/dist
Module Name:src Committed By: spz Date: Sat Feb 4 10:16:19 UTC 2017 Update of /cvsroot/src/external/mit/expat/dist In directory ivanova.netbsd.org:/tmp/cvs-serv7814 Log Message: from Changes: Release 2.2.0 Tue June 21 2016 Security fixes: #537 CVE-2016-0718 -- Fix crash on malformed input CVE-2016-4472 -- Improve insufficient fix to CVE-2015-1283 / CVE-2015-2716 introduced with Expat 2.1.1 #499 CVE-2016-5300 -- Use more entropy for hash initialization than the original fix to CVE-2012-0876 #519 CVE-2012-6702 -- Resolve troublesome internal call to srand that was introduced with Expat 2.1.0 when addressing CVE-2012-0876 (issue #496) Bug fixes: Fix uninitialized reads of size 1 (e.g. in little2_updatePosition) Fix detection of UTF-8 character boundaries Other changes: #532 Fix compilation for Visual Studio 2010 (keyword "C99") Autotools: Resolve use of "$<" to better support bmake Autotools: Add QA script "qa.sh" (and make target "qa") Autotools: Respect CXXFLAGS if given Autotools: Fix "make run-xmltest" Autotools: Have "make run-xmltest" check for expected output p90 CMake: Fix static build (BUILD_shared=OFF) on Windows #536 CMake: Add soversion, support -DNO_SONAME=yes to bypass #323 CMake: Add suffix "d" to differentiate debug from release CMake: Define WIN32 with CMake on Windows Annotate memory allocators for GCC Address all currently known compile warnings Make sure that API symbols remain visible despite -fvisibility=hidden Remove executable flag from source files Resolve COMPILED_FROM_DSP in favor of WIN32 Status: Vendor Tag: expat Release Tags: expat-2-2-0 U src/external/mit/expat/dist/COPYING U src/external/mit/expat/dist/Makefile.in U src/external/mit/expat/dist/configure.ac U src/external/mit/expat/dist/MANIFEST U src/external/mit/expat/dist/expat_config.h.in U src/external/mit/expat/dist/expat.dsw U src/external/mit/expat/dist/configure U src/external/mit/expat/dist/README U src/external/mit/expat/dist/ConfigureChecks.cmake U src/external/mit/expat/dist/aclocal.m4 U src/external/mit/expat/dist/CMakeLists.txt U src/external/mit/expat/dist/CMake.README U src/external/mit/expat/dist/expat_config.h.cmake U src/external/mit/expat/dist/expat.pc.in U src/external/mit/expat/dist/Changes U src/external/mit/expat/dist/xmlwf/win32filemap.c U src/external/mit/expat/dist/xmlwf/xmltchar.h U src/external/mit/expat/dist/xmlwf/codepage.h U src/external/mit/expat/dist/xmlwf/xmlurl.h U src/external/mit/expat/dist/xmlwf/unixfilemap.c U src/external/mit/expat/dist/xmlwf/xmlwf.dsp U src/external/mit/expat/dist/xmlwf/xmlmime.h U src/external/mit/expat/dist/xmlwf/filemap.h U src/external/mit/expat/dist/xmlwf/ct.c U src/external/mit/expat/dist/xmlwf/codepage.c U src/external/mit/expat/dist/xmlwf/xmlwin32url.cxx U src/external/mit/expat/dist/xmlwf/xmlfile.c U src/external/mit/expat/dist/xmlwf/xmlfile.h U src/external/mit/expat/dist/xmlwf/xmlwf.c U src/external/mit/expat/dist/xmlwf/readfilemap.c U src/external/mit/expat/dist/xmlwf/xmlmime.c U src/external/mit/expat/dist/vms/expat_config.h U src/external/mit/expat/dist/vms/README.vms U src/external/mit/expat/dist/vms/descrip.mms U src/external/mit/expat/dist/m4/lt~obsolete.m4 U src/external/mit/expat/dist/m4/ltsugar.m4 U src/external/mit/expat/dist/m4/ltversion.m4 U src/external/mit/expat/dist/m4/libtool.m4 U src/external/mit/expat/dist/m4/ltoptions.m4 U src/external/mit/expat/dist/examples/outline.dsp U src/external/mit/expat/dist/examples/elements.c U src/external/mit/expat/dist/examples/elements.dsp U src/external/mit/expat/dist/examples/outline.c U src/external/mit/expat/dist/win32/README.txt U src/external/mit/expat/dist/win32/expat.iss U src/external/mit/expat/dist/win32/MANIFEST.txt U src/external/mit/expat/dist/conftools/mkinstalldirs U src/external/mit/expat/dist/conftools/ltmain.sh U src/external/mit/expat/dist/conftools/PrintPath U src/external/mit/expat/dist/conftools/install-sh U src/external/mit/expat/dist/conftools/expat.m4 C src/external/mit/expat/dist/conftools/config.guess U src/external/mit/expat/dist/conftools/ac_c_bigendian_cross.m4 U src/external/mit/expat/dist/conftools/get-version.sh C src/external/mit/expat/dist/conftools/config.sub U src/external/mit/expat/dist/amiga/expat_vectors.c U src/external/mit/expat/dist/amiga/README.txt U src/external/mit/expat/dist/amiga/expat_68k.c U src/external/mit/expat/dist/amiga/expat.xml U
CVS commit: src/sys/dev/usb
Module Name:src Committed By: skrll Date: Sat Feb 4 08:03:40 UTC 2017 Modified Files: src/sys/dev/usb: ohci.c Log Message: More usb_syncmem tweaks. The main one is sync'ing the entire last TD returned from ohci_reset_std_chain in control transfers. To generate a diff of this commit: cvs rdiff -u -r1.272 -r1.273 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.272 src/sys/dev/usb/ohci.c:1.273 --- src/sys/dev/usb/ohci.c:1.272 Tue Jan 31 07:34:02 2017 +++ src/sys/dev/usb/ohci.c Sat Feb 4 08:03:40 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: ohci.c,v 1.272 2017/01/31 07:34:02 skrll Exp $ */ +/* $NetBSD: ohci.c,v 1.273 2017/02/04 08:03:40 skrll Exp $ */ /* * Copyright (c) 1998, 2004, 2005, 2012 The NetBSD Foundation, Inc. @@ -41,7 +41,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.272 2017/01/31 07:34:02 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.273 2017/02/04 08:03:40 skrll Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -2760,9 +2760,7 @@ ohci_device_ctrl_start(struct usbd_xfer end->td.td_nexttd = HTOO32(stat->physaddr); end->nexttd = stat; - usb_syncmem(>dma, - end->offs + offsetof(ohci_td_t, td_nexttd), - sizeof(end->td.td_nexttd), + usb_syncmem(>dma, end->offs, sizeof(end->td), BUS_DMASYNC_PREWRITE | BUS_DMASYNC_PREREAD); usb_syncmem(>ux_dmabuf, 0, len, @@ -3005,7 +3003,7 @@ ohci_device_bulk_start(struct usbd_xfer tail->nexttd = NULL; tail->xfer = NULL; usb_syncmem(>dma, tail->offs, sizeof(tail->td), - BUS_DMASYNC_PREWRITE); + BUS_DMASYNC_PREWRITE | BUS_DMASYNC_PREREAD); xfer->ux_hcpriv = data; DPRINTFN(8, "xfer %p data %p tail %p", xfer, ox->ox_stds[0], tail, 0); @@ -3202,7 +3200,7 @@ ohci_device_intr_start(struct usbd_xfer tail->nexttd = NULL; tail->xfer = NULL; usb_syncmem(>dma, tail->offs, sizeof(tail->td), - BUS_DMASYNC_PREWRITE); + BUS_DMASYNC_PREWRITE | BUS_DMASYNC_PREREAD); xfer->ux_hcpriv = data; DPRINTFN(8, "data %p tail %p", ox->ox_stds[0], tail, 0, 0); @@ -3536,6 +3534,7 @@ ohci_device_isoc_enter(struct usbd_xfer ncur = 0; } sitd->itd.itd_offset[ncur] = HTOO16(OHCI_ITD_MK_OFFS(offs)); + /* XXX Sync */ offs = noffs; } KASSERT(j <= ox->ox_nsitd);