CVS commit: src/sys/net/npf
Module Name:src Committed By: maxv Date: Thu Mar 8 07:54:14 UTC 2018 Modified Files: src/sys/net/npf: npf_inet.c Log Message: Switch nptr to uint8_t, and use nbuf_ensure_contig. Makes us use fewer magic values. To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.39 src/sys/net/npf/npf_inet.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/npf/npf_inet.c diff -u src/sys/net/npf/npf_inet.c:1.38 src/sys/net/npf/npf_inet.c:1.39 --- src/sys/net/npf/npf_inet.c:1.38 Thu Mar 8 07:06:13 2018 +++ src/sys/net/npf/npf_inet.c Thu Mar 8 07:54:14 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: npf_inet.c,v 1.38 2018/03/08 07:06:13 maxv Exp $ */ +/* $NetBSD: npf_inet.c,v 1.39 2018/03/08 07:54:14 maxv Exp $ */ /*- * Copyright (c) 2009-2014 The NetBSD Foundation, Inc. @@ -40,7 +40,7 @@ #ifdef _KERNEL #include -__KERNEL_RCSID(0, "$NetBSD: npf_inet.c,v 1.38 2018/03/08 07:06:13 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: npf_inet.c,v 1.39 2018/03/08 07:54:14 maxv Exp $"); #include #include @@ -229,7 +229,7 @@ npf_fetch_tcpopts(npf_cache_t *npc, uint nbuf_t *nbuf = npc->npc_nbuf; const struct tcphdr *th = npc->npc_l4.tcp; int topts_len, step; - void *nptr; + uint8_t *nptr; uint8_t val; bool ok; @@ -252,7 +252,7 @@ next: ok = false; goto done; } - val = *(uint8_t *)nptr; + val = *nptr; switch (val) { case TCPOPT_EOL: @@ -264,43 +264,43 @@ next: step = 1; break; case TCPOPT_MAXSEG: - if ((nptr = nbuf_advance(nbuf, 2, 2)) == NULL) { + if ((nptr = nbuf_ensure_contig(nbuf, TCPOLEN_MAXSEG)) == NULL) { ok = false; goto done; } if (mss) { if (*mss) { -memcpy(nptr, mss, sizeof(uint16_t)); +memcpy(nptr + 2, mss, sizeof(uint16_t)); } else { -memcpy(mss, nptr, sizeof(uint16_t)); +memcpy(mss, nptr + 2, sizeof(uint16_t)); } } topts_len -= TCPOLEN_MAXSEG; - step = 2; + step = TCPOLEN_MAXSEG; break; case TCPOPT_WINDOW: /* TCP Window Scaling (RFC 1323). */ - if ((nptr = nbuf_advance(nbuf, 2, 1)) == NULL) { + if ((nptr = nbuf_ensure_contig(nbuf, TCPOLEN_WINDOW)) == NULL) { ok = false; goto done; } - val = *(uint8_t *)nptr; + val = *(nptr + 2); *wscale = (val > TCP_MAX_WINSHIFT) ? TCP_MAX_WINSHIFT : val; topts_len -= TCPOLEN_WINDOW; - step = 1; + step = TCPOLEN_WINDOW; break; default: - if ((nptr = nbuf_advance(nbuf, 1, 1)) == NULL) { + if ((nptr = nbuf_ensure_contig(nbuf, 2)) == NULL) { ok = false; goto done; } - val = *(uint8_t *)nptr; + val = *(nptr + 1); if (val < 2 || val > topts_len) { ok = false; goto done; } topts_len -= val; - step = val - 1; + step = val; } /* Any options left? */
CVS commit: src/share/man/man4
Module Name:src Committed By: wiz Date: Thu Mar 8 07:39:28 UTC 2018 Modified Files: src/share/man/man4: lm.4 Log Message: Remove Tn. Add serial comma. To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36 src/share/man/man4/lm.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/lm.4 diff -u src/share/man/man4/lm.4:1.35 src/share/man/man4/lm.4:1.36 --- src/share/man/man4/lm.4:1.35 Thu Mar 8 07:35:21 2018 +++ src/share/man/man4/lm.4 Thu Mar 8 07:39:28 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: lm.4,v 1.35 2018/03/08 07:35:21 msaitoh Exp $ +.\" $NetBSD: lm.4,v 1.36 2018/03/08 07:39:28 wiz Exp $ .\" .\" Copyright (c) 2000 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -44,8 +44,7 @@ .Sh DESCRIPTION The .Nm -driver provides support for the -.Tn National Semiconductor +driver provides support for the National Semiconductor LM series hardware monitors and register compatible chips to be used with the .Xr envsys 4 @@ -76,14 +75,14 @@ Chips supported by the driver include: .Bl -item -offset indent .It -.Tn National Semiconductor +National Semiconductor .Em LM78 , .Em LM78-J , -.Em LM79 +.Em LM79 , and .Em LM81 . .It -.Tn Nuvoton +Nuvoton .Em NCT5104D , .Em NCT6775F , .Em NCT6776F , @@ -94,11 +93,11 @@ and .Em NCT6791D , .Em NCT6792D , .Em NCT6793D , -.Em NCT6795D +.Em NCT6795D , and .Em NCT6796D . .It -.Tn Winbond +Winbond .Em W83627HF* , .Em W83627THF* , .Em W83627EHF* , @@ -109,11 +108,11 @@ and .Em W83782D* , .Em W83783S* , .Em W83791D* , -.Em W83791SD +.Em W83791SD , and .Em W83792D . .It -.Tn ASUS +ASUS .Em AS99127F . .El .Pp
CVS commit: src/share/man/man4
Module Name:src Committed By: msaitoh Date: Thu Mar 8 07:35:21 UTC 2018 Modified Files: src/share/man/man4: lm.4 Log Message: Add NCT6796D. To generate a diff of this commit: cvs rdiff -u -r1.34 -r1.35 src/share/man/man4/lm.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/lm.4 diff -u src/share/man/man4/lm.4:1.34 src/share/man/man4/lm.4:1.35 --- src/share/man/man4/lm.4:1.34 Wed Jul 12 11:23:52 2017 +++ src/share/man/man4/lm.4 Thu Mar 8 07:35:21 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: lm.4,v 1.34 2017/07/12 11:23:52 wiz Exp $ +.\" $NetBSD: lm.4,v 1.35 2018/03/08 07:35:21 msaitoh Exp $ .\" .\" Copyright (c) 2000 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd July 12, 2017 +.Dd March 8, 2018 .Dt LM 4 .Os .Sh NAME @@ -94,7 +94,9 @@ and .Em NCT6791D , .Em NCT6792D , .Em NCT6793D , -.Em NCT6795D . +.Em NCT6795D +and +.Em NCT6796D . .It .Tn Winbond .Em W83627HF* ,
CVS commit: src/sys/net/npf
Module Name:src Committed By: maxv Date: Thu Mar 8 07:06:13 UTC 2018 Modified Files: src/sys/net/npf: npf.h npf_handler.c npf_inet.c Log Message: Declare NPC_FMTERR, and use it to kick malformed packets. Several sanity checks are added in IPv6; after we see the first IPPROTO_FRAGMENT header, we are allowed to fail to advance, otherwise we kick the packet. Sent on tech-net@ a few days ago, no response, but I'm committing it now anyway. To generate a diff of this commit: cvs rdiff -u -r1.55 -r1.56 src/sys/net/npf/npf.h cvs rdiff -u -r1.37 -r1.38 src/sys/net/npf/npf_handler.c \ src/sys/net/npf/npf_inet.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/npf/npf.h diff -u src/sys/net/npf/npf.h:1.55 src/sys/net/npf/npf.h:1.56 --- src/sys/net/npf/npf.h:1.55 Fri Dec 15 21:00:26 2017 +++ src/sys/net/npf/npf.h Thu Mar 8 07:06:13 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: npf.h,v 1.55 2017/12/15 21:00:26 maxv Exp $ */ +/* $NetBSD: npf.h,v 1.56 2018/03/08 07:06:13 maxv Exp $ */ /*- * Copyright (c) 2009-2014 The NetBSD Foundation, Inc. @@ -143,6 +143,8 @@ int nbuf_find_tag(nbuf_t *, uint32_t *) #define NPC_ALG_EXEC 0x100 /* ALG execution. */ +#define NPC_FMTERR 0x200 /* Format error. */ + #define NPC_IP46 (NPC_IP4|NPC_IP6) typedef struct { Index: src/sys/net/npf/npf_handler.c diff -u src/sys/net/npf/npf_handler.c:1.37 src/sys/net/npf/npf_handler.c:1.38 --- src/sys/net/npf/npf_handler.c:1.37 Sun Feb 19 20:27:22 2017 +++ src/sys/net/npf/npf_handler.c Thu Mar 8 07:06:13 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: npf_handler.c,v 1.37 2017/02/19 20:27:22 christos Exp $ */ +/* $NetBSD: npf_handler.c,v 1.38 2018/03/08 07:06:13 maxv Exp $ */ /*- * Copyright (c) 2009-2013 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ #ifdef _KERNEL #include -__KERNEL_RCSID(0, "$NetBSD: npf_handler.c,v 1.37 2017/02/19 20:27:22 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: npf_handler.c,v 1.38 2018/03/08 07:06:13 maxv Exp $"); #include #include @@ -109,7 +109,7 @@ npf_reassembly(npf_t *npf, npf_cache_t * nbuf_init(npf, nbuf, *mp, nbuf->nb_ifp); npc->npc_info = 0; - if (npf_cache_all(npc) & NPC_IPFRAG) { + if (npf_cache_all(npc) & (NPC_IPFRAG|NPC_FMTERR)) { return EINVAL; } npf_stats_inc(npf, NPF_STAT_REASSEMBLY); @@ -154,8 +154,16 @@ npf_packet_handler(npf_t *npf, struct mb error = 0; rp = NULL; - /* Cache everything. Determine whether it is an IP fragment. */ + /* Cache everything. */ flags = npf_cache_all(&npc); + + /* If error on the format, leave quickly. */ + if (flags & NPC_FMTERR) { + error = EINVAL; + goto fastout; + } + + /* Determine whether it is an IP fragment. */ if (__predict_false(flags & NPC_IPFRAG)) { /* * We pass IPv6 fragments unconditionally @@ -308,6 +316,7 @@ out: error = ENETUNREACH; } +fastout: if (*mp) { /* Free the mbuf chain. */ m_freem(*mp); Index: src/sys/net/npf/npf_inet.c diff -u src/sys/net/npf/npf_inet.c:1.37 src/sys/net/npf/npf_inet.c:1.38 --- src/sys/net/npf/npf_inet.c:1.37 Sun Feb 19 20:27:22 2017 +++ src/sys/net/npf/npf_inet.c Thu Mar 8 07:06:13 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: npf_inet.c,v 1.37 2017/02/19 20:27:22 christos Exp $ */ +/* $NetBSD: npf_inet.c,v 1.38 2018/03/08 07:06:13 maxv Exp $ */ /*- * Copyright (c) 2009-2014 The NetBSD Foundation, Inc. @@ -40,7 +40,7 @@ #ifdef _KERNEL #include -__KERNEL_RCSID(0, "$NetBSD: npf_inet.c,v 1.37 2017/02/19 20:27:22 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: npf_inet.c,v 1.38 2018/03/08 07:06:13 maxv Exp $"); #include #include @@ -328,12 +328,12 @@ npf_cache_ip(npf_cache_t *npc, nbuf_t *n ip = nbuf_ensure_contig(nbuf, sizeof(struct ip)); if (ip == NULL) { - return 0; + return NPC_FMTERR; } /* Check header length and fragment offset. */ if ((u_int)(ip->ip_hl << 2) < sizeof(struct ip)) { - return 0; + return NPC_FMTERR; } if (ip->ip_off & ~htons(IP_DF | IP_RF)) { /* Note fragmentation. */ @@ -357,10 +357,14 @@ npf_cache_ip(npf_cache_t *npc, nbuf_t *n struct ip6_ext *ip6e; struct ip6_frag *ip6f; size_t off, hlen; + int frag_present; + bool is_frag; + uint8_t onxt; + int fragoff; ip6 = nbuf_ensure_contig(nbuf, sizeof(struct ip6_hdr)); if (ip6 == NULL) { - return 0; + return NPC_FMTERR; } /* Set initial next-protocol value. */ @@ -368,16 +372,14 @@ npf_cache_ip(npf_cache_t *npc, nbuf_t *n npc->npc_proto = ip6->ip6_nxt; npc->npc_hlen = hlen; + frag_present = 0; + is_frag = false; + /* * Advance by the length of the current header. */ off = nbuf_offset(nbuf); - while (nbuf_advance(nbuf, hlen, 0) != NULL) { - ip6e = nbuf_ensure_contig(nbuf, sizeof(*ip6e)); - if (ip6e == NULL) { -return 0; - } - + while ((ip6e = nbuf_advance(nbuf, hlen, sizeof(*ip6e))) != NULL) { /* * Determine whether we are going to continue. */ @@ -388,9 +390,23 @@ npf_c
CVS commit: [pgoyette-compat] src/sys/compat/common
Module Name:src Committed By: pgoyette Date: Thu Mar 8 07:04:01 UTC 2018 Modified Files: src/sys/compat/common [pgoyette-compat]: uipc_syscalls_50.c Log Message: Clean up compat routine vectors To generate a diff of this commit: cvs rdiff -u -r1.3.56.1 -r1.3.56.2 src/sys/compat/common/uipc_syscalls_50.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/common/uipc_syscalls_50.c diff -u src/sys/compat/common/uipc_syscalls_50.c:1.3.56.1 src/sys/compat/common/uipc_syscalls_50.c:1.3.56.2 --- src/sys/compat/common/uipc_syscalls_50.c:1.3.56.1 Thu Mar 8 00:23:47 2018 +++ src/sys/compat/common/uipc_syscalls_50.c Thu Mar 8 07:04:01 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: uipc_syscalls_50.c,v 1.3.56.1 2018/03/08 00:23:47 pgoyette Exp $ */ +/* $NetBSD: uipc_syscalls_50.c,v 1.3.56.2 2018/03/08 07:04:01 pgoyette Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls_50.c,v 1.3.56.1 2018/03/08 00:23:47 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls_50.c,v 1.3.56.2 2018/03/08 07:04:01 pgoyette Exp $"); #include #include @@ -54,6 +54,7 @@ __KERNEL_RCSID(0, "$NetBSD: uipc_syscall #include #include #include +#include #ifdef COMPAT_OIFDATA /*ARGSUSED*/ @@ -98,16 +99,13 @@ compat_ifdatareq(struct lwp *l, u_long c /* Save and restore compat vector as needed */ -int (*orig_compat_ifconf)(u_long, void *); int (*orig_compat_ifdatareq)(struct lwp *, u_long, void *); void if_50_init(void) { - orig_compat_ifreqo2n = vec_compat_ifreqo2n; orig_compat_ifdatareq = vec_compat_ifdatareq; - vec_compat_ifreqo2n = compat_ifreqo2n; vec_compat_ifdatareq = compat_ifdatareq; } @@ -115,7 +113,6 @@ void if_50_fini(void) { - vec_compat_ifreqo2n = orig_compat_ifreqo2n; vec_compat_ifdatareq = orig_compat_ifdatareq; } #endif
CVS commit: src/sys
Module Name:src Committed By: ozaki-r Date: Thu Mar 8 06:48:23 UTC 2018 Modified Files: src/sys/netinet: if_arp.c src/sys/netinet6: nd6_nbr.c Log Message: Fix a race condition on DAD destructions (again) The previous fix to DAD timers was wrong; it avoided a use-after-free but instead introduced a memory leak. The destruction method had delegated a destruction of a DAD timer to the timer itself and told that by setting NULL to dp->dad_ifa. However, the previous fix made DAD timers do nothing on the sign. Fixing the issue with using callout_stop isn't easy. One approach is to have a refcount on dp but it introduces extra complexity that we want to avoid. The new fix falls back to using callout_halt, which was abandoned because of softnet_lock. Fortunately now the network stack is protected by KERNEL_LOCK so we can remove softnet_lock from DAD timers (callout) and use callout_halt safely. To generate a diff of this commit: cvs rdiff -u -r1.270 -r1.271 src/sys/netinet/if_arp.c cvs rdiff -u -r1.151 -r1.152 src/sys/netinet6/nd6_nbr.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.270 src/sys/netinet/if_arp.c:1.271 --- src/sys/netinet/if_arp.c:1.270 Tue Mar 6 07:24:01 2018 +++ src/sys/netinet/if_arp.c Thu Mar 8 06:48:23 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: if_arp.c,v 1.270 2018/03/06 07:24:01 ozaki-r Exp $ */ +/* $NetBSD: if_arp.c,v 1.271 2018/03/08 06:48:23 ozaki-r Exp $ */ /* * Copyright (c) 1998, 2000, 2008 The NetBSD Foundation, Inc. @@ -68,7 +68,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_arp.c,v 1.270 2018/03/06 07:24:01 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_arp.c,v 1.271 2018/03/08 06:48:23 ozaki-r Exp $"); #ifdef _KERNEL_OPT #include "opt_ddb.h" @@ -1526,14 +1526,24 @@ arp_dad_starttimer(struct dadq *dp, int } static void -arp_dad_destroytimer(struct dadq *dp) +arp_dad_stoptimer(struct dadq *dp) { + KASSERT(mutex_owned(&arp_dad_lock)); + TAILQ_REMOVE(&dadq, dp, dad_list); - /* Request the timer to destroy dp. */ + /* Tell the timer that dp is being destroyed. */ dp->dad_ifa = NULL; - callout_reset(&dp->dad_timer_ch, 0, - (void (*)(void *))arp_dad_timer, dp); + callout_halt(&dp->dad_timer_ch, &arp_dad_lock); +} + +static void +arp_dad_destroytimer(struct dadq *dp) +{ + + callout_destroy(&dp->dad_timer_ch); + KASSERT(dp->dad_ifa == NULL); + kmem_intr_free(dp, sizeof(*dp)); } static void @@ -1652,11 +1662,11 @@ arp_dad_stop(struct ifaddr *ifa) return; } - /* Prevent the timer from running anymore. */ - arp_dad_destroytimer(dp); + arp_dad_stoptimer(dp); mutex_exit(&arp_dad_lock); + arp_dad_destroytimer(dp); ifafree(ifa); } @@ -1668,15 +1678,12 @@ arp_dad_timer(struct dadq *dp) char ipbuf[INET_ADDRSTRLEN]; bool need_free = false; - SOFTNET_KERNEL_LOCK_UNLESS_NET_MPSAFE(); + KERNEL_LOCK_UNLESS_NET_MPSAFE(); mutex_enter(&arp_dad_lock); ifa = dp->dad_ifa; if (ifa == NULL) { - /* - * ifa is being deleted and the callout is already scheduled - * again, so we cannot destroy dp in this run. - */ + /* dp is being destroyed by someone. Do nothing. */ goto done; } @@ -1700,7 +1707,7 @@ arp_dad_timer(struct dadq *dp) ARPLOG(LOG_INFO, "%s: could not run DAD, driver problem?\n", if_name(ifa->ifa_ifp)); - TAILQ_REMOVE(&dadq, dp, dad_list); + arp_dad_stoptimer(dp); need_free = true; goto done; } @@ -1749,19 +1756,18 @@ announce: if_name(ifa->ifa_ifp), ARPLOGADDR(&ia->ia_addr.sin_addr)); } - TAILQ_REMOVE(&dadq, dp, dad_list); + arp_dad_stoptimer(dp); need_free = true; done: mutex_exit(&arp_dad_lock); if (need_free) { - callout_destroy(&dp->dad_timer_ch); - kmem_intr_free(dp, sizeof(*dp)); - if (ifa != NULL) - ifafree(ifa); + arp_dad_destroytimer(dp); + KASSERT(ifa != NULL); + ifafree(ifa); } - SOFTNET_KERNEL_UNLOCK_UNLESS_NET_MPSAFE(); + KERNEL_UNLOCK_UNLESS_NET_MPSAFE(); } static void Index: src/sys/netinet6/nd6_nbr.c diff -u src/sys/netinet6/nd6_nbr.c:1.151 src/sys/netinet6/nd6_nbr.c:1.152 --- src/sys/netinet6/nd6_nbr.c:1.151 Wed Mar 7 01:37:24 2018 +++ src/sys/netinet6/nd6_nbr.c Thu Mar 8 06:48:23 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: nd6_nbr.c,v 1.151 2018/03/07 01:37:24 ozaki-r Exp $ */ +/* $NetBSD: nd6_nbr.c,v 1.152 2018/03/08 06:48:23 ozaki-r Exp $ */ /* $KAME: nd6_nbr.c,v 1.61 2001/02/10 16:06:14 jinmei Exp $ */ /* @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nd6_nbr.c,v 1.151 2018/03/07 01:37:24 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nd6_nbr.c,v 1.152 2018/03/08 06:48:23 ozaki-r Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -1145,17 +1145,24 @@ nd6_dad_starttimer(struct dadq *dp, int } static void -nd6_dad_destroytimer(struct dadq *dp) +nd6_dad_stoptimer(struct dadq *dp) { - struct ifaddr *ifa; + + KASSERT(mutex_owned(&nd6_dad
CVS commit: src/share/man/man3
Module Name:src Committed By: wiz Date: Thu Mar 8 06:47:30 UTC 2018 Modified Files: src/share/man/man3: bitmap.3 Log Message: Bump date for previous. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/share/man/man3/bitmap.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man3/bitmap.3 diff -u src/share/man/man3/bitmap.3:1.11 src/share/man/man3/bitmap.3:1.12 --- src/share/man/man3/bitmap.3:1.11 Thu Mar 8 05:50:13 2018 +++ src/share/man/man3/bitmap.3 Thu Mar 8 06:47:30 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: bitmap.3,v 1.11 2018/03/08 05:50:13 martin Exp $ +.\" $NetBSD: bitmap.3,v 1.12 2018/03/08 06:47:30 wiz Exp $ .\" .\" Copyright (c) 2012 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd December 6, 2012 +.Dd March 8, 2018 .Dt BITMAP 3 .Os .Sh NAME
CVS commit: src/share/man/man3
Module Name:src Committed By: martin Date: Thu Mar 8 05:50:14 UTC 2018 Modified Files: src/share/man/man3: bitmap.3 Log Message: __BITMAP_ZERO() only takes the pointer to the bitmap as an argument To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/share/man/man3/bitmap.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man3/bitmap.3 diff -u src/share/man/man3/bitmap.3:1.10 src/share/man/man3/bitmap.3:1.11 --- src/share/man/man3/bitmap.3:1.10 Mon Jul 3 21:30:58 2017 +++ src/share/man/man3/bitmap.3 Thu Mar 8 05:50:13 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: bitmap.3,v 1.10 2017/07/03 21:30:58 wiz Exp $ +.\" $NetBSD: bitmap.3,v 1.11 2018/03/08 05:50:13 martin Exp $ .\" .\" Copyright (c) 2012 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -106,7 +106,7 @@ that holds and is named .Fa name . .Pp -.Fn __BITMAP_ZERO bit bitmap +.Fn __BITMAP_ZERO bitmap initializes a descriptor set pointed to by .Fa bitmap to the null set.
CVS commit: src/sys/arch/x86/include
Module Name:src Committed By: msaitoh Date: Thu Mar 8 04:15:11 UTC 2018 Modified Files: src/sys/arch/x86/include: specialreg.h Log Message: Sort entries. No functional change. To generate a diff of this commit: cvs rdiff -u -r1.112 -r1.113 src/sys/arch/x86/include/specialreg.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/x86/include/specialreg.h diff -u src/sys/arch/x86/include/specialreg.h:1.112 src/sys/arch/x86/include/specialreg.h:1.113 --- src/sys/arch/x86/include/specialreg.h:1.112 Mon Mar 5 05:44:07 2018 +++ src/sys/arch/x86/include/specialreg.h Thu Mar 8 04:15:11 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: specialreg.h,v 1.112 2018/03/05 05:44:07 msaitoh Exp $ */ +/* $NetBSD: specialreg.h,v 1.113 2018/03/08 04:15:11 msaitoh Exp $ */ /*- * Copyright (c) 1991 The Regents of the University of California. @@ -435,28 +435,6 @@ #define CPUID_PES1_FLAGS "\20" \ "\1" "XSAVEOPT" "\2" "XSAVEC" "\3" "XGETBV" "\4" "XSAVES" -/* Intel Fn8001 extended features - %edx */ -#define CPUID_SYSCALL 0x0800 /* SYSCALL/SYSRET */ -#define CPUID_XD 0x0010 /* Execute Disable (like CPUID_NOX) */ -#define CPUID_P1GB 0x0400 /* 1GB Large Page Support */ -#define CPUID_RDTSCP 0x0800 /* Read TSC Pair Instruction */ -#define CPUID_EM64T 0x2000 /* Intel EM64T */ - -#define CPUID_INTEL_EXT_FLAGS "\20" \ - "\14" "SYSCALL/SYSRET" "\25" "XD" "\33" "P1GB" \ - "\34" "RDTSCP" "\36" "EM64T" - -/* Intel Fn8001 extended features - %ecx */ -#define CPUID_LAHF 0x0001 /* LAHF/SAHF in IA-32e mode, 64bit sub*/ - /* 0x0020 */ /* LZCNT. Same as AMD's CPUID_LZCNT */ -#define CPUID_PREFETCHW 0x0100 /* PREFETCHW */ - -#define CPUID_INTEL_FLAGS4 "\20"\ - "\1" "LAHF" "\02" "B01" "\03" "B02" \ - "\06" "LZCNT"\ - "\11" "PREFETCHW" - - /* * Intel Deterministic Address Translation Parameter Leaf * Fn_0018 @@ -486,6 +464,28 @@ #define CPUID_DATP_SHAREING __BITS(25, 14) /* shareing */ +/* Intel Fn8001 extended features - %edx */ +#define CPUID_SYSCALL 0x0800 /* SYSCALL/SYSRET */ +#define CPUID_XD 0x0010 /* Execute Disable (like CPUID_NOX) */ +#define CPUID_P1GB 0x0400 /* 1GB Large Page Support */ +#define CPUID_RDTSCP 0x0800 /* Read TSC Pair Instruction */ +#define CPUID_EM64T 0x2000 /* Intel EM64T */ + +#define CPUID_INTEL_EXT_FLAGS "\20" \ + "\14" "SYSCALL/SYSRET" "\25" "XD" "\33" "P1GB" \ + "\34" "RDTSCP" "\36" "EM64T" + +/* Intel Fn8001 extended features - %ecx */ +#define CPUID_LAHF 0x0001 /* LAHF/SAHF in IA-32e mode, 64bit sub*/ + /* 0x0020 */ /* LZCNT. Same as AMD's CPUID_LZCNT */ +#define CPUID_PREFETCHW 0x0100 /* PREFETCHW */ + +#define CPUID_INTEL_FLAGS4 "\20"\ + "\1" "LAHF" "\02" "B01" "\03" "B02" \ + "\06" "LZCNT"\ + "\11" "PREFETCHW" + + /* AMD/VIA Fn8001 extended features - %edx */ /* CPUID_SYSCALL SYSCALL/SYSRET */ #define CPUID_MPC 0x0008 /* Multiprocessing Capable */
CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto/arch/vax
Module Name:src Committed By: christos Date: Thu Mar 8 03:15:08 UTC 2018 Added Files: src/crypto/external/bsd/openssl/lib/libcrypto/arch/vax: crypto.inc Log Message: need CRYPTO_memcmp() To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/vax/crypto.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/vax/crypto.inc diff -u /dev/null src/crypto/external/bsd/openssl/lib/libcrypto/arch/vax/crypto.inc:1.1 --- /dev/null Wed Mar 7 22:15:08 2018 +++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/vax/crypto.inc Wed Mar 7 22:15:08 2018 @@ -0,0 +1,5 @@ +.PATH.S: ${.PARSEDIR} + +CRYPTO_SRCS += libc-memequal.c + +.include "../../crypto.inc"
CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto/arch/vax
Module Name:src Committed By: christos Date: Thu Mar 8 03:14:31 UTC 2018 Modified Files: src/crypto/external/bsd/openssl/lib/libcrypto/arch/vax: bn_asm_vax.S Log Message: add size directives. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/vax/bn_asm_vax.S 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/lib/libcrypto/arch/vax/bn_asm_vax.S diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/vax/bn_asm_vax.S:1.1 src/crypto/external/bsd/openssl/lib/libcrypto/arch/vax/bn_asm_vax.S:1.2 --- src/crypto/external/bsd/openssl/lib/libcrypto/arch/vax/bn_asm_vax.S:1.1 Sun Jul 19 19:30:47 2009 +++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/vax/bn_asm_vax.S Wed Mar 7 22:14:31 2018 @@ -1,4 +1,4 @@ -# $NetBSD: bn_asm_vax.S,v 1.1 2009/07/19 23:30:47 christos Exp $ +# $NetBSD: bn_asm_vax.S,v 1.2 2018/03/08 03:14:31 christos Exp $ # # w.j.m. 15-jan-1999 # @@ -50,6 +50,7 @@ bn_mul_add_words: movl %r6,%r0 ret + .size bn_mul_add_words, .-bn_mul_add_words # .title vax_bn_mul_words unsigned multiply & add, 32*32+32=>64 #; @@ -98,6 +99,7 @@ bn_mul_words: movl %r6,%r0 ret + .size bn_mul_words, .-bn_mul_words @@ -136,6 +138,7 @@ bn_sqr_words: sobgtr %r4,0b # loop ret + .size bn_sqr_words, .-bn_sqr_words # .title vax_bn_div_words unsigned divide @@ -315,6 +318,7 @@ bn_div_words: incl %r2 # [q',q] = [q',q] + 1 adwc $0,%r8 brb 5b + .size bn_div_words, .-bn_div_words @@ -351,6 +355,7 @@ bn_add_words: adwc $0,%r0 1: ret + .size bn_add_words, .-bn_add_words #; #; Richard Levitte 20-Nov-2000 @@ -383,6 +388,7 @@ bn_sub_words: 1: adwc $0,%r0 ret + .size bn_sub_words, .-bn_sub_words # # Ragge 20-Sep-2003 @@ -463,3 +469,4 @@ bn_sqr_comba8: sobgtr %r8,2b ret + .size bn_mul_comba4, .-bn_mul_comba4
CVS commit: src/sys/arch
Module Name:src Committed By: mrg Date: Thu Mar 8 03:12:02 UTC 2018 Modified Files: src/sys/arch/hp300/stand/common: devopen.c src/sys/arch/luna68k/dev: lcd.c src/sys/arch/mvme68k/conf: Makefile.mvme68k src/sys/arch/mvme68k/dev: sbic.c src/sys/arch/mvme68k/stand/sboot: le_poll.c src/sys/arch/next68k/next68k: nextrom.c src/sys/arch/next68k/stand/boot: en.c Log Message: fix various gcc6 m68k issues: - bad indentation. next68k en.c and mvme68k le_poll.c fixes real issues in error handling, the rest are NFCI. - pass 68030 flags as appropriate for mvme68k. - next68k nextrom.c has -Warray-bounds ignored for an odd expression that appears to run before relocation, and needs manual offsets added which trips bounds array checking. with this all m68k ports build with GCC 6. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/arch/hp300/stand/common/devopen.c cvs rdiff -u -r1.8 -r1.9 src/sys/arch/luna68k/dev/lcd.c cvs rdiff -u -r1.66 -r1.67 src/sys/arch/mvme68k/conf/Makefile.mvme68k cvs rdiff -u -r1.34 -r1.35 src/sys/arch/mvme68k/dev/sbic.c cvs rdiff -u -r1.5 -r1.6 src/sys/arch/mvme68k/stand/sboot/le_poll.c cvs rdiff -u -r1.25 -r1.26 src/sys/arch/next68k/next68k/nextrom.c cvs rdiff -u -r1.18 -r1.19 src/sys/arch/next68k/stand/boot/en.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/hp300/stand/common/devopen.c diff -u src/sys/arch/hp300/stand/common/devopen.c:1.11 src/sys/arch/hp300/stand/common/devopen.c:1.12 --- src/sys/arch/hp300/stand/common/devopen.c:1.11 Sun Aug 10 07:40:49 2014 +++ src/sys/arch/hp300/stand/common/devopen.c Thu Mar 8 03:12:01 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: devopen.c,v 1.11 2014/08/10 07:40:49 isaki Exp $ */ +/* $NetBSD: devopen.c,v 1.12 2018/03/08 03:12:01 mrg Exp $ */ /*- * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc. @@ -144,7 +144,7 @@ devparse(const char *fname, int *dev, in /* get device name */ for (s = (char *)fname; *s && *s != '/' && *s != ':' && *s != '('; s++) - ; + continue; /* first form */ if (*s == '(') { @@ -188,11 +188,12 @@ devparse(const char *fname, int *dev, in int temp; /* isolate device */ - for (s = (char *)fname; *s != ':' && !isdigit(*s); s++); + for (s = (char *)fname; *s != ':' && !isdigit(*s); s++) + continue; - /* lookup device and get index */ - if ((*dev = devlookup(fname, s - fname)) < 0) -goto baddev; + /* lookup device and get index */ + if ((*dev = devlookup(fname, s - fname)) < 0) + goto baddev; /* isolate unit */ if ((temp = atoi(s)) > 255) @@ -200,7 +201,7 @@ devparse(const char *fname, int *dev, in *adapt = temp / 8; *ctlr = temp % 8; for (; isdigit(*s); s++) - ; + continue; /* translate partition */ if (!ispart(*s)) Index: src/sys/arch/luna68k/dev/lcd.c diff -u src/sys/arch/luna68k/dev/lcd.c:1.8 src/sys/arch/luna68k/dev/lcd.c:1.9 --- src/sys/arch/luna68k/dev/lcd.c:1.8 Thu Mar 9 14:05:58 2017 +++ src/sys/arch/luna68k/dev/lcd.c Thu Mar 8 03:12:02 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: lcd.c,v 1.8 2017/03/09 14:05:58 tsutsui Exp $ */ +/* $NetBSD: lcd.c,v 1.9 2018/03/08 03:12:02 mrg Exp $ */ /* $OpenBSD: lcd.c,v 1.7 2015/02/10 22:42:35 miod Exp $ */ /*- @@ -32,7 +32,7 @@ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: lcd.c,v 1.8 2017/03/09 14:05:58 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: lcd.c,v 1.9 2018/03/08 03:12:02 mrg Exp $"); #include #include @@ -214,9 +214,8 @@ lcdioctl(dev_t dev, u_long cmd, void *ad case LCDMOVE: case LCDSEEK: case LCDRESTORE: - if ((flag & FWRITE) == 0) - return EACCES; - break; + if ((flag & FWRITE) == 0) + return EACCES; } switch (cmd) { Index: src/sys/arch/mvme68k/conf/Makefile.mvme68k diff -u src/sys/arch/mvme68k/conf/Makefile.mvme68k:1.66 src/sys/arch/mvme68k/conf/Makefile.mvme68k:1.67 --- src/sys/arch/mvme68k/conf/Makefile.mvme68k:1.66 Sun Sep 6 02:17:31 2015 +++ src/sys/arch/mvme68k/conf/Makefile.mvme68k Thu Mar 8 03:12:02 2018 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.mvme68k,v 1.66 2015/09/06 02:17:31 uebayasi Exp $ +# $NetBSD: Makefile.mvme68k,v 1.67 2018/03/08 03:12:02 mrg Exp $ # Makefile for NetBSD # @@ -40,9 +40,9 @@ CMACHFLAGS= -m68030 .endif .else .if empty(IDENT:M-DMVME147) && empty(IDENT:M-DMVME162) && empty(IDENT:M-DMVME167) -CMACHFLAGS= -m68060 -Wa,-march=68030 -Wa,-mcpu=68030 -Wa,-m68851 +CMACHFLAGS= -m68060 -Wa,-march=68030 -Wa,-m68030 -Wa,-mcpu=68030 -Wa,-m68851 .else -CMACHFLAGS= -m68020-60 -Wa,-mcpu=68030 -Wa,-m68851 +CMACHFLAGS= -m68020-60 -Wa,-m68030 -Wa,-mcpu=68030 -Wa,-m68851 .endif .endif CFLAGS+= ${CMACHFLAGS} -msoft-float Index: src/sys/arch/mvme68k/dev/sbic.c diff -u src/sys/arch/mvme68k/dev/sbic.c:1.34 src/sys/arch/mvme68k/dev/sbic.c:1.35 --- src/sys/arch/mvme68k/dev/sbic.c:1.34 Mon Mar 24 19:52:27 2014 +++ src/sys/arch/mvme68k/dev/sbi
CVS commit: src/sys/dev/pci/ixgbe
Module Name:src Committed By: knakahara Date: Thu Mar 8 02:41:27 UTC 2018 Modified Files: src/sys/dev/pci/ixgbe: ixgbe.c Log Message: Reduce duplicated code which schedule deferred packet processing. No functional change. To generate a diff of this commit: cvs rdiff -u -r1.132 -r1.133 src/sys/dev/pci/ixgbe/ixgbe.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/ixgbe/ixgbe.c diff -u src/sys/dev/pci/ixgbe/ixgbe.c:1.132 src/sys/dev/pci/ixgbe/ixgbe.c:1.133 --- src/sys/dev/pci/ixgbe/ixgbe.c:1.132 Thu Mar 8 02:39:42 2018 +++ src/sys/dev/pci/ixgbe/ixgbe.c Thu Mar 8 02:41:27 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: ixgbe.c,v 1.132 2018/03/08 02:39:42 knakahara Exp $ */ +/* $NetBSD: ixgbe.c,v 1.133 2018/03/08 02:41:27 knakahara Exp $ */ /** @@ -2439,6 +2439,36 @@ out: } /* ixgbe_disable_queue */ / + * ixgbe_sched_handle_que - schedule deferred packet processing + / +static inline void +ixgbe_sched_handle_que(struct adapter *adapter, struct ix_queue *que) +{ + + if (adapter->txrx_use_workqueue) { + /* + * adapter->que_wq is bound to each CPU instead of + * each NIC queue to reduce workqueue kthread. As we + * should consider about interrupt affinity in this + * function, the workqueue kthread must be WQ_PERCPU. + * If create WQ_PERCPU workqueue kthread for each NIC + * queue, that number of created workqueue kthread is + * (number of used NIC queue) * (number of CPUs) = + * (number of CPUs) ^ 2 most often. + * + * The same NIC queue's interrupts are avoided by + * masking the queue's interrupt. And different + * NIC queue's interrupts use different struct work + * (que->wq_cookie). So, "enqueued flag" to avoid + * twice workqueue_enqueue() is not required . + */ + workqueue_enqueue(adapter->que_wq, &que->wq_cookie, curcpu()); + } else { + softint_schedule(que->que_si); + } +} + +/ * ixgbe_msix_que - MSI-X Queue Interrupt Service routine / static int @@ -2526,30 +2556,9 @@ ixgbe_msix_que(void *arg) rxr->packets = 0; no_calc: - if (more) { - if (adapter->txrx_use_workqueue) { - /* - * adapter->que_wq is bound to each CPU instead of - * each NIC queue to reduce workqueue kthread. As we - * should consider about interrupt affinity in this - * function, the workqueue kthread must be WQ_PERCPU. - * If create WQ_PERCPU workqueue kthread for each NIC - * queue, that number of created workqueue kthread is - * (number of used NIC queue) * (number of CPUs) = - * (number of CPUs) ^ 2 most often. - * - * The same NIC queue's interrupts are avoided by - * masking the queue's interrupt. And different - * NIC queue's interrupts use different struct work - * (que->wq_cookie). So, "enqueued flag" to avoid - * twice workqueue_enqueue() is not required . - */ - workqueue_enqueue(adapter->que_wq, &que->wq_cookie, - curcpu()); - } else { - softint_schedule(que->que_si); - } - } else + if (more) + ixgbe_sched_handle_que(adapter, que); + else ixgbe_enable_queue(adapter, que->msix); return 1; @@ -4725,16 +4734,7 @@ ixgbe_legacy_irq(void *arg) if (more) { que->req.ev_count++; - if (adapter->txrx_use_workqueue) { - /* - * "enqueued flag" is not required here. - * See ixgbe_msix_que(). - */ - workqueue_enqueue(adapter->que_wq, &que->wq_cookie, - curcpu()); - } else { - softint_schedule(que->que_si); - } + ixgbe_sched_handle_que(adapter, que); } else ixgbe_enable_intr(adapter); @@ -5853,16 +5853,7 @@ ixgbe_handle_que(void *context) if (more) { que->req.ev_count++; - if (adapter->txrx_use_workqueue) { - /* - * "enqueued flag" is not required here. - * See ixgbe_msix_que(). - */ - workqueue_enqueue(adapter->que_wq, &que->wq_cookie, - curcpu()); - } else { - softint_schedule(que->que_si); - } + ixgbe_sched_handle_que(adapter, que); } else if (que->res != NULL) { /* Re-enable this interrupt */ ixgbe_enable_queue(adapter, que->msix);
CVS commit: src/sys/dev/pci/ixgbe
Module Name:src Committed By: knakahara Date: Thu Mar 8 02:39:42 UTC 2018 Modified Files: src/sys/dev/pci/ixgbe: ixgbe.c Log Message: Fix INTx/MSI handler did not schedule workqueue. Pointed out by msaitoh@n.o. To generate a diff of this commit: cvs rdiff -u -r1.131 -r1.132 src/sys/dev/pci/ixgbe/ixgbe.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/ixgbe/ixgbe.c diff -u src/sys/dev/pci/ixgbe/ixgbe.c:1.131 src/sys/dev/pci/ixgbe/ixgbe.c:1.132 --- src/sys/dev/pci/ixgbe/ixgbe.c:1.131 Wed Mar 7 11:18:29 2018 +++ src/sys/dev/pci/ixgbe/ixgbe.c Thu Mar 8 02:39:42 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: ixgbe.c,v 1.131 2018/03/07 11:18:29 knakahara Exp $ */ +/* $NetBSD: ixgbe.c,v 1.132 2018/03/08 02:39:42 knakahara Exp $ */ /** @@ -4725,7 +4725,16 @@ ixgbe_legacy_irq(void *arg) if (more) { que->req.ev_count++; - softint_schedule(que->que_si); + if (adapter->txrx_use_workqueue) { + /* + * "enqueued flag" is not required here. + * See ixgbe_msix_que(). + */ + workqueue_enqueue(adapter->que_wq, &que->wq_cookie, + curcpu()); + } else { + softint_schedule(que->que_si); + } } else ixgbe_enable_intr(adapter);
CVS commit: [pgoyette-compat] src/sys/compat/sys
Module Name:src Committed By: pgoyette Date: Thu Mar 8 01:37:47 UTC 2018 Modified Files: src/sys/compat/sys [pgoyette-compat]: sockio.h Log Message: Declare the if_50_{init,fini} entry points To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.10.58.1 src/sys/compat/sys/sockio.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/sys/sockio.h diff -u src/sys/compat/sys/sockio.h:1.10 src/sys/compat/sys/sockio.h:1.10.58.1 --- src/sys/compat/sys/sockio.h:1.10 Sun Nov 14 15:36:47 2010 +++ src/sys/compat/sys/sockio.h Thu Mar 8 01:37:46 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: sockio.h,v 1.10 2010/11/14 15:36:47 uebayasi Exp $ */ +/* $NetBSD: sockio.h,v 1.10.58.1 2018/03/08 01:37:46 pgoyette Exp $ */ /*- * Copyright (c) 1982, 1986, 1990, 1993, 1994 @@ -179,6 +179,9 @@ struct oifdatareq { (oi)->ifi_lastchange.tv_usec * 1000; \ } while (/*CONSTCOND*/0) #ifdef _KERNEL +void if_50_init(void); +void if_50_fini(void); + __BEGIN_DECLS int compat_ifconf(u_long, void *); int compat_ifdatareq(struct lwp *, u_long, void *);
CVS commit: [pgoyette-compat] src/sys/compat/common
Module Name:src Committed By: pgoyette Date: Thu Mar 8 01:07:13 UTC 2018 Modified Files: src/sys/compat/common [pgoyette-compat]: compat_mod.c Log Message: Include if.h to get IFNAMSIZE To generate a diff of this commit: cvs rdiff -u -r1.24.14.3 -r1.24.14.4 src/sys/compat/common/compat_mod.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/common/compat_mod.c diff -u src/sys/compat/common/compat_mod.c:1.24.14.3 src/sys/compat/common/compat_mod.c:1.24.14.4 --- src/sys/compat/common/compat_mod.c:1.24.14.3 Thu Mar 8 00:23:47 2018 +++ src/sys/compat/common/compat_mod.c Thu Mar 8 01:07:13 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: compat_mod.c,v 1.24.14.3 2018/03/08 00:23:47 pgoyette Exp $ */ +/* $NetBSD: compat_mod.c,v 1.24.14.4 2018/03/08 01:07:13 pgoyette Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: compat_mod.c,v 1.24.14.3 2018/03/08 00:23:47 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: compat_mod.c,v 1.24.14.4 2018/03/08 01:07:13 pgoyette Exp $"); #ifdef _KERNEL_OPT #include "opt_compat_netbsd.h" @@ -54,6 +54,8 @@ __KERNEL_RCSID(0, "$NetBSD: compat_mod.c #include #include +#include + #include #include
CVS commit: [pgoyette-compat] src/sys
Module Name:src Committed By: pgoyette Date: Thu Mar 8 00:25:30 UTC 2018 Modified Files: src/sys/compat/common [pgoyette-compat]: uipc_syscalls_40.c src/sys/net [pgoyette-compat]: if.c if.h Added Files: src/sys/compat/sys [pgoyette-compat]: if.h Log Message: Handle ifconf() compat vectors To generate a diff of this commit: cvs rdiff -u -r1.15.2.3 -r1.15.2.4 src/sys/compat/common/uipc_syscalls_40.c cvs rdiff -u -r0 -r1.1.2.1 src/sys/compat/sys/if.h cvs rdiff -u -r1.419.2.3 -r1.419.2.4 src/sys/net/if.c cvs rdiff -u -r1.258.2.7 -r1.258.2.8 src/sys/net/if.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/common/uipc_syscalls_40.c diff -u src/sys/compat/common/uipc_syscalls_40.c:1.15.2.3 src/sys/compat/common/uipc_syscalls_40.c:1.15.2.4 --- src/sys/compat/common/uipc_syscalls_40.c:1.15.2.3 Tue Mar 6 23:17:42 2018 +++ src/sys/compat/common/uipc_syscalls_40.c Thu Mar 8 00:25:30 2018 @@ -1,9 +1,9 @@ -/* $NetBSD: uipc_syscalls_40.c,v 1.15.2.3 2018/03/06 23:17:42 pgoyette Exp $ */ +/* $NetBSD: uipc_syscalls_40.c,v 1.15.2.4 2018/03/08 00:25:30 pgoyette Exp $ */ /* written by Pavel Cahyna, 2006. Public domain. */ #include -__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls_40.c,v 1.15.2.3 2018/03/06 23:17:42 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls_40.c,v 1.15.2.4 2018/03/08 00:25:30 pgoyette Exp $"); /* * System call interface to the socket abstraction. @@ -18,6 +18,7 @@ __KERNEL_RCSID(0, "$NetBSD: uipc_syscall #include +#include #include #include Index: src/sys/net/if.c diff -u src/sys/net/if.c:1.419.2.3 src/sys/net/if.c:1.419.2.4 --- src/sys/net/if.c:1.419.2.3 Wed Mar 7 08:56:44 2018 +++ src/sys/net/if.c Thu Mar 8 00:25:30 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: if.c,v 1.419.2.3 2018/03/07 08:56:44 pgoyette Exp $ */ +/* $NetBSD: if.c,v 1.419.2.4 2018/03/08 00:25:30 pgoyette Exp $ */ /*- * Copyright (c) 1999, 2000, 2001, 2008 The NetBSD Foundation, Inc. @@ -90,7 +90,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.419.2.3 2018/03/07 08:56:44 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.419.2.4 2018/03/08 00:25:30 pgoyette Exp $"); #if defined(_KERNEL_OPT) #include "opt_inet.h" @@ -157,6 +157,7 @@ __KERNEL_RCSID(0, "$NetBSD: if.c,v 1.419 #include #include +#include MALLOC_DEFINE(M_IFADDR, "ifaddr", "interface address"); MALLOC_DEFINE(M_IFMADDR, "ether_multi", "link-level multicast address"); Index: src/sys/net/if.h diff -u src/sys/net/if.h:1.258.2.7 src/sys/net/if.h:1.258.2.8 --- src/sys/net/if.h:1.258.2.7 Tue Mar 6 23:49:45 2018 +++ src/sys/net/if.h Thu Mar 8 00:25:30 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: if.h,v 1.258.2.7 2018/03/06 23:49:45 pgoyette Exp $ */ +/* $NetBSD: if.h,v 1.258.2.8 2018/03/08 00:25:30 pgoyette Exp $ */ /*- * Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc. @@ -1333,13 +1333,5 @@ int sysctl_ifq(int *name, u_int namelen, { "drops", CTLTYPE_INT }, \ } -/* compat function vectors */ - -#include - -extern int (*vec_compat_ifdatareq)(struct lwp *, u_long, void *); -extern void (*vec_compat_ifreqo2n)(struct oifreq *, struct ifreq *); -extern int (*vec_compat_ifconf)(u_long, void *); - #endif /* _NETBSD_SOURCE */ #endif /* !_NET_IF_H_ */ Added files: Index: src/sys/compat/sys/if.h diff -u /dev/null src/sys/compat/sys/if.h:1.1.2.1 --- /dev/null Thu Mar 8 00:25:30 2018 +++ src/sys/compat/sys/if.h Thu Mar 8 00:25:30 2018 @@ -0,0 +1,46 @@ +/* $NetBSD: if.h,v 1.1.2.1 2018/03/08 00:25:30 pgoyette Exp $ */ + +/*- + * Copyright (c) 2018 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by pgoyette + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGE
CVS commit: [pgoyette-compat] src/sys/compat/common
Module Name:src Committed By: pgoyette Date: Thu Mar 8 00:23:47 UTC 2018 Modified Files: src/sys/compat/common [pgoyette-compat]: compat_mod.c uipc_syscalls_50.c Log Message: Implement vector initialization for ifreqo2n and ifdatareq To generate a diff of this commit: cvs rdiff -u -r1.24.14.2 -r1.24.14.3 src/sys/compat/common/compat_mod.c cvs rdiff -u -r1.3 -r1.3.56.1 src/sys/compat/common/uipc_syscalls_50.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/common/compat_mod.c diff -u src/sys/compat/common/compat_mod.c:1.24.14.2 src/sys/compat/common/compat_mod.c:1.24.14.3 --- src/sys/compat/common/compat_mod.c:1.24.14.2 Tue Mar 6 23:17:42 2018 +++ src/sys/compat/common/compat_mod.c Thu Mar 8 00:23:47 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: compat_mod.c,v 1.24.14.2 2018/03/06 23:17:42 pgoyette Exp $ */ +/* $NetBSD: compat_mod.c,v 1.24.14.3 2018/03/08 00:23:47 pgoyette Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: compat_mod.c,v 1.24.14.2 2018/03/06 23:17:42 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: compat_mod.c,v 1.24.14.3 2018/03/08 00:23:47 pgoyette Exp $"); #ifdef _KERNEL_OPT #include "opt_compat_netbsd.h" @@ -60,6 +60,8 @@ __KERNEL_RCSID(0, "$NetBSD: compat_mod.c #include #include #include +#include + #if defined(COMPAT_09) || defined(COMPAT_43) || defined(COMPAT_50) static struct sysctllog *compat_clog = NULL; Index: src/sys/compat/common/uipc_syscalls_50.c diff -u src/sys/compat/common/uipc_syscalls_50.c:1.3 src/sys/compat/common/uipc_syscalls_50.c:1.3.56.1 --- src/sys/compat/common/uipc_syscalls_50.c:1.3 Wed Jan 19 10:21:16 2011 +++ src/sys/compat/common/uipc_syscalls_50.c Thu Mar 8 00:23:47 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: uipc_syscalls_50.c,v 1.3 2011/01/19 10:21:16 tsutsui Exp $ */ +/* $NetBSD: uipc_syscalls_50.c,v 1.3.56.1 2018/03/08 00:23:47 pgoyette Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls_50.c,v 1.3 2011/01/19 10:21:16 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls_50.c,v 1.3.56.1 2018/03/08 00:23:47 pgoyette Exp $"); #include #include @@ -95,4 +95,27 @@ compat_ifdatareq(struct lwp *l, u_long c return EINVAL; } } + +/* Save and restore compat vector as needed */ + +int (*orig_compat_ifconf)(u_long, void *); +int (*orig_compat_ifdatareq)(struct lwp *, u_long, void *); + +void +if_50_init(void) +{ + + orig_compat_ifreqo2n = vec_compat_ifreqo2n; + orig_compat_ifdatareq = vec_compat_ifdatareq; + vec_compat_ifreqo2n = compat_ifreqo2n; + vec_compat_ifdatareq = compat_ifdatareq; +} + +void +if_50_fini(void) +{ + + vec_compat_ifreqo2n = orig_compat_ifreqo2n; + vec_compat_ifdatareq = orig_compat_ifdatareq; +} #endif
CVS commit: src/sys/arch/mips/include
Module Name:src Committed By: maya Date: Wed Mar 7 23:08:29 UTC 2018 Modified Files: src/sys/arch/mips/include: cpu.h Log Message: Adjust ci on the second iteration. Now a MULTIPROCESSOR+LOCKDEBUG ERLITE reaches userland again To generate a diff of this commit: cvs rdiff -u -r1.123 -r1.124 src/sys/arch/mips/include/cpu.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/mips/include/cpu.h diff -u src/sys/arch/mips/include/cpu.h:1.123 src/sys/arch/mips/include/cpu.h:1.124 --- src/sys/arch/mips/include/cpu.h:1.123 Mon Jan 22 23:20:26 2018 +++ src/sys/arch/mips/include/cpu.h Wed Mar 7 23:08:29 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.123 2018/01/22 23:20:26 maya Exp $ */ +/* $NetBSD: cpu.h,v 1.124 2018/03/07 23:08:29 maya Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -160,9 +160,11 @@ struct cpu_info { #ifdef MULTIPROCESSOR #define CPU_INFO_ITERATOR int #define CPU_INFO_FOREACH(cii, ci) \ -cii = 0, ci = (ncpu ? cpu_infos[0] : &cpu_info_store); \ -cii < (ncpu ? ncpu : 1); \ -++cii +cii = 0, ci = &cpu_info_store; \ +ci != NULL; \ +cii++, \ +ncpu ? (ci = cpu_infos[cii]) \ + : (ci = NULL) #else #define CPU_INFO_ITERATOR int __unused #define CPU_INFO_FOREACH(cii, ci) \
CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto
Module Name:src Committed By: christos Date: Wed Mar 7 22:40:26 UTC 2018 Modified Files: src/crypto/external/bsd/openssl/lib/libcrypto: man.inc Log Message: remove the SHA256_Init man page; we are using ours from libc. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 \ src/crypto/external/bsd/openssl/lib/libcrypto/man.inc 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/lib/libcrypto/man.inc diff -u src/crypto/external/bsd/openssl/lib/libcrypto/man.inc:1.7 src/crypto/external/bsd/openssl/lib/libcrypto/man.inc:1.8 --- src/crypto/external/bsd/openssl/lib/libcrypto/man.inc:1.7 Thu Feb 8 17:48:55 2018 +++ src/crypto/external/bsd/openssl/lib/libcrypto/man.inc Wed Mar 7 17:40:26 2018 @@ -1,4 +1,4 @@ -# $NetBSD: man.inc,v 1.7 2018/02/08 22:48:55 christos Exp $ +# $NetBSD: man.inc,v 1.8 2018/03/07 22:40:26 christos Exp $ .PATH: ${.CURDIR}/man @@ -222,7 +222,6 @@ RSA_size.3 \ SCT_new.3 \ SCT_print.3 \ SCT_validate.3 \ -SHA256_Init.3 \ SMIME_read_CMS.3 \ SMIME_read_PKCS7.3 \ SMIME_write_CMS.3 \
CVS commit: src/sys/kern
Module Name:src Committed By: kre Date: Wed Mar 7 21:13:24 UTC 2018 Modified Files: src/sys/kern: subr_disk.c Log Message: Fix typo in comment (s/is/if/) - NFC. To generate a diff of this commit: cvs rdiff -u -r1.121 -r1.122 src/sys/kern/subr_disk.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/subr_disk.c diff -u src/sys/kern/subr_disk.c:1.121 src/sys/kern/subr_disk.c:1.122 --- src/sys/kern/subr_disk.c:1.121 Fri Oct 27 12:25:15 2017 +++ src/sys/kern/subr_disk.c Wed Mar 7 21:13:24 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_disk.c,v 1.121 2017/10/27 12:25:15 joerg Exp $ */ +/* $NetBSD: subr_disk.c,v 1.122 2018/03/07 21:13:24 kre Exp $ */ /*- * Copyright (c) 1996, 1997, 1999, 2000, 2009 The NetBSD Foundation, Inc. @@ -67,7 +67,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: subr_disk.c,v 1.121 2017/10/27 12:25:15 joerg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: subr_disk.c,v 1.122 2018/03/07 21:13:24 kre Exp $"); #include #include @@ -130,7 +130,7 @@ diskerr(const struct buf *bp, const char daddr_t sn; if (/*CONSTCOND*/0) - /* Compiler will error this is the format is wrong... */ + /* Compiler will error this if the format is wrong... */ printf("%" PRIdaddr, bp->b_blkno); if (pri != LOG_PRINTF) {
CVS commit: src/sys/arch
Module Name:src Committed By: bouyer Date: Wed Mar 7 20:55:31 UTC 2018 Modified Files: src/sys/arch/arm/sunxi: files.sunxi src/sys/arch/evbarm/conf: SUNXI Added Files: src/sys/arch/arm/sunxi: sunxi_can.c sunxi_can.h sunxi_lradc.c sunxi_lradc.h Log Message: fdt-ise the allwinner can and lradc drivers. To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.43 src/sys/arch/arm/sunxi/files.sunxi cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/sunxi/sunxi_can.c \ src/sys/arch/arm/sunxi/sunxi_can.h src/sys/arch/arm/sunxi/sunxi_lradc.c \ src/sys/arch/arm/sunxi/sunxi_lradc.h cvs rdiff -u -r1.59 -r1.60 src/sys/arch/evbarm/conf/SUNXI Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/sunxi/files.sunxi diff -u src/sys/arch/arm/sunxi/files.sunxi:1.42 src/sys/arch/arm/sunxi/files.sunxi:1.43 --- src/sys/arch/arm/sunxi/files.sunxi:1.42 Sun Feb 18 10:28:37 2018 +++ src/sys/arch/arm/sunxi/files.sunxi Wed Mar 7 20:55:31 2018 @@ -1,4 +1,4 @@ -# $NetBSD: files.sunxi,v 1.42 2018/02/18 10:28:37 jmcneill Exp $ +# $NetBSD: files.sunxi,v 1.43 2018/03/07 20:55:31 bouyer Exp $ # # Configuration info for Allwinner sunxi family SoCs # @@ -236,6 +236,15 @@ device sun6ispi: spibus attach sun6ispi at fdt with sun6i_spi file arch/arm/sunxi/sun6i_spi.c sun6i_spi +# A10/A20 CAN +device sunxican { } : ifnet +attach sunxican at fdt with sunxi_can +file arch/arm/sunxi/sunxi_can.c sunxi_can + +# LRADC +device sunxilradc +attach sunxilradc at fdt with sunxi_lradc +file arch/arm/sunxi/sunxi_lradc.c sunxi_lradc # SOC parameters defflag opt_soc.h SOC_SUNXI defflag opt_soc.h SOC_SUN4I: SOC_SUNXI Index: src/sys/arch/evbarm/conf/SUNXI diff -u src/sys/arch/evbarm/conf/SUNXI:1.59 src/sys/arch/evbarm/conf/SUNXI:1.60 --- src/sys/arch/evbarm/conf/SUNXI:1.59 Wed Feb 14 20:10:17 2018 +++ src/sys/arch/evbarm/conf/SUNXI Wed Mar 7 20:55:31 2018 @@ -1,5 +1,5 @@ # -# $NetBSD: SUNXI,v 1.59 2018/02/14 20:10:17 jakllsch Exp $ +# $NetBSD: SUNXI,v 1.60 2018/03/07 20:55:31 bouyer Exp $ # # Allwinner sunxi family # @@ -240,6 +240,11 @@ seeprom* at iic? # AT24Cxx Serial EEPR sun6ispi* at fdt? spi* at spibus? +# CAN bus +options CAN # Controller Area Network protocol +pseudo-device canloop # CAN loopback interface +sunxican* at fdt? # A10/A20 CAN controller + # RTC sunxirtc* at fdt? # RTC @@ -295,6 +300,9 @@ options WSDISPLAY_MULTICONS sunxits* at fdt? # Touch Screen controller wsmouse* at sunxits? mux 0 +# Low res ADC +sunxilradc* at fdt? + # wscons pseudo-devices pseudo-device wsfont pseudo-device wsmux Added files: Index: src/sys/arch/arm/sunxi/sunxi_can.c diff -u /dev/null src/sys/arch/arm/sunxi/sunxi_can.c:1.1 --- /dev/null Wed Mar 7 20:55:31 2018 +++ src/sys/arch/arm/sunxi/sunxi_can.c Wed Mar 7 20:55:31 2018 @@ -0,0 +1,644 @@ +/* $NetBSD: sunxi_can.c,v 1.1 2018/03/07 20:55:31 bouyer Exp $ */ + +/*- + * Copyright (c) 2017,2018 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Manuel Bouyer. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + + +#include "locators.h" +#include "opt_can.h" + + +#include + +__KERNEL_RCSID(1, "$NetBSD: sunxi_can.c,v 1.1 2018/03/07 20:55:31 bouyer Exp $"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#ifdef CAN +#include +#include +#endif + +#include + +#include + +/* shortcut for all error interrupts */ +#define SUNXI_CAN_INT_ALLERRS (\ + SUNXI_CAN_INT
CVS commit: src/sys/arch/mips/mips
Module Name:src Committed By: maya Date: Wed Mar 7 20:48:00 UTC 2018 Modified Files: src/sys/arch/mips/mips: locore.S Log Message: Remove now duplicate code for enabling FPU before reading FPU_ID To generate a diff of this commit: cvs rdiff -u -r1.216 -r1.217 src/sys/arch/mips/mips/locore.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/mips/mips/locore.S diff -u src/sys/arch/mips/mips/locore.S:1.216 src/sys/arch/mips/mips/locore.S:1.217 --- src/sys/arch/mips/mips/locore.S:1.216 Wed Mar 7 20:46:05 2018 +++ src/sys/arch/mips/mips/locore.S Wed Mar 7 20:48:00 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.S,v 1.216 2018/03/07 20:46:05 maya Exp $ */ +/* $NetBSD: locore.S,v 1.217 2018/03/07 20:48:00 maya Exp $ */ /* * Copyright (c) 1992, 1993 @@ -63,7 +63,7 @@ #include #include -RCSID("$NetBSD: locore.S,v 1.216 2018/03/07 20:46:05 maya Exp $") +RCSID("$NetBSD: locore.S,v 1.217 2018/03/07 20:48:00 maya Exp $") #include "assym.h" @@ -142,14 +142,6 @@ _C_LABEL(kernel_text): PTR_LA gp, _C_LABEL(_gp) #endif -#ifdef NOFPU /* No FPU; avoid touching FPU registers */ -#else /* NOFPU */ - mfc0 t0, MIPS_COP_0_STATUS - MFC0_HAZARD - or t0, MIPS_SR_COP_1_BIT # Disable interrupts, and - mtc0 t0, MIPS_COP_0_STATUS # enable the fp coprocessor - COP0_HAZARD_FPUENABLE -#endif mfc0 t0, MIPS_COP_0_PRID # read product revision ID COP0_SYNC nop
CVS commit: src/sys/arch/mips/mips
Module Name:src Committed By: maya Date: Wed Mar 7 20:46:06 UTC 2018 Modified Files: src/sys/arch/mips/mips: locore.S Log Message: Remove now duplicate code to read FPU_ID into t1 To generate a diff of this commit: cvs rdiff -u -r1.215 -r1.216 src/sys/arch/mips/mips/locore.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/mips/mips/locore.S diff -u src/sys/arch/mips/mips/locore.S:1.215 src/sys/arch/mips/mips/locore.S:1.216 --- src/sys/arch/mips/mips/locore.S:1.215 Wed Mar 7 20:43:53 2018 +++ src/sys/arch/mips/mips/locore.S Wed Mar 7 20:46:05 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.S,v 1.215 2018/03/07 20:43:53 maya Exp $ */ +/* $NetBSD: locore.S,v 1.216 2018/03/07 20:46:05 maya Exp $ */ /* * Copyright (c) 1992, 1993 @@ -63,7 +63,7 @@ #include #include -RCSID("$NetBSD: locore.S,v 1.215 2018/03/07 20:43:53 maya Exp $") +RCSID("$NetBSD: locore.S,v 1.216 2018/03/07 20:46:05 maya Exp $") #include "assym.h" @@ -171,11 +171,6 @@ _C_LABEL(kernel_text): mtc0 k0, MIPS_COP_0_STATUS #endif -#ifdef NOFPU /* No FPU; avoid touching FPU registers */ - add t1, zero, zero -#else - cfc1 t1, MIPS_FPU_ID # read FPU ID register -#endif INT_S t0, _C_LABEL(mips_options)+MO_CPU_ID # save PRID register INT_S t1, _C_LABEL(mips_options)+MO_FPU_ID # save FPU ID register PTR_LA MIPS_CURLWP, _C_LABEL(lwp0) # set curlwp
CVS commit: src/sys/arch/mips/mips
Module Name:src Committed By: maya Date: Wed Mar 7 20:43:54 UTC 2018 Modified Files: src/sys/arch/mips/mips: locore.S Log Message: Remove duplicate confused code for enabling 64bit addressing To generate a diff of this commit: cvs rdiff -u -r1.214 -r1.215 src/sys/arch/mips/mips/locore.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/mips/mips/locore.S diff -u src/sys/arch/mips/mips/locore.S:1.214 src/sys/arch/mips/mips/locore.S:1.215 --- src/sys/arch/mips/mips/locore.S:1.214 Wed Mar 7 15:56:33 2018 +++ src/sys/arch/mips/mips/locore.S Wed Mar 7 20:43:53 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.S,v 1.214 2018/03/07 15:56:33 maya Exp $ */ +/* $NetBSD: locore.S,v 1.215 2018/03/07 20:43:53 maya Exp $ */ /* * Copyright (c) 1992, 1993 @@ -63,7 +63,7 @@ #include #include -RCSID("$NetBSD: locore.S,v 1.214 2018/03/07 15:56:33 maya Exp $") +RCSID("$NetBSD: locore.S,v 1.215 2018/03/07 20:43:53 maya Exp $") #include "assym.h" @@ -143,23 +143,9 @@ _C_LABEL(kernel_text): #endif #ifdef NOFPU /* No FPU; avoid touching FPU registers */ -#if !defined(emips) /* XXX??? we have already disabled interrupts! */ -#ifdef __mips_n32 - li t0, MIPS_SR_KX # turn on XKSEG and XKPHYS -#elif defined(_LP64) - li t0, MIPS_SR_KX | MIPS_SR_UX # turn on XKSEG and XKPHYS -#else - li t0, 0# Disable interrupts and -#endif /* n32 */ - mtc0 t0, MIPS_COP_0_STATUS # the fp coprocessor - COP0_SYNC -#endif /* !emips */ #else /* NOFPU */ mfc0 t0, MIPS_COP_0_STATUS MFC0_HAZARD -#if defined(_LP64) || defined(__mips_n32) - or t0, MIPS_SR_KX # turn on XKSEG and XKPHYS -#endif or t0, MIPS_SR_COP_1_BIT # Disable interrupts, and mtc0 t0, MIPS_COP_0_STATUS # enable the fp coprocessor COP0_HAZARD_FPUENABLE
CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm
Module Name:src Committed By: christos Date: Wed Mar 7 20:38:39 UTC 2018 Modified Files: src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm: aes.inc crypto.inc modes.inc Log Message: fix build on non-earm To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/aes.inc cvs rdiff -u -r1.8 -r1.9 \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/crypto.inc cvs rdiff -u -r1.3 -r1.4 \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/modes.inc 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/lib/libcrypto/arch/arm/aes.inc diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/aes.inc:1.4 src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/aes.inc:1.5 --- src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/aes.inc:1.4 Sun Mar 29 19:35:08 2015 +++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/aes.inc Wed Mar 7 15:38:39 2018 @@ -1,4 +1,13 @@ +.include "arm.inc" + .PATH.S: ${.PARSEDIR} -AES_SRCS = aes-armv4.S aesv8-armx.S bsaes-armv7.S aes_cbc.c +AES_SRCS += aes-armv4.S aes_cbc.c + +.if ${ARM_MAX_ARCH} >= 7 +AES_SRCS+=bsaes-armv7.S +.elif ${ARM_MAX_ARCH} >= 8 +AES_SRCS+=aesv8-armx.S +.endif + AESCPPFLAGS = -DAES_ASM -DBSAES_ASM .include "../../aes.inc" Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/crypto.inc diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/crypto.inc:1.8 src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/crypto.inc:1.9 --- src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/crypto.inc:1.8 Tue Mar 6 08:37:43 2018 +++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/crypto.inc Wed Mar 7 15:38:39 2018 @@ -1,18 +1,8 @@ .PATH.S: ${.PARSEDIR} + CPUID_SRCS += armv4cpuid.S armcap.c armv4-mont.S armv4-gf2m.S CPUID = yes CPPFLAGS += -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m -.if !empty(MACHINE_ARCH:Mearmv4*) || ${MACHINE_ARCH} == "armeb" -ARM_MAX_ARCH=4 -.elif ${MACHINE_ARCH} == "earmeb" || ${MACHINE_ARCH} == "earmhfeb" -ARM_MAX_ARCH=5 -.elif !empty(MACHINE_ARCH:Mearmv6*) -ARM_MAX_ARCH=6 -.elif !empty(MACHINE_ARCH:Mearmv7*) -ARM_MAX_ARCH=7 -.else -ARM_MAX_ARCH=8 -.endif -CPPFLAGS += -D__ARM_MAX_ARCH__=${ARM_MAX_ARCH} + .include "../../crypto.inc" Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/modes.inc diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/modes.inc:1.3 src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/modes.inc:1.4 --- src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/modes.inc:1.3 Fri Mar 2 19:20:57 2018 +++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/modes.inc Wed Mar 7 15:38:39 2018 @@ -1,7 +1,11 @@ +.include "arm.inc" + .PATH.S: ${.PARSEDIR} MODES_SRCS += ghash-armv4.S + .if ${ARM_MAX_ARCH} >= 8 MODES_SRCS += ghashv8-armx.S .endif + MODESCPPFLAGS = -DGHASH_ASM .include "../../modes.inc"
CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips
Module Name:src Committed By: christos Date: Wed Mar 7 19:44:31 UTC 2018 Modified Files: src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips: aes.inc bn.inc crypto.inc sha.inc Log Message: only use the 64 bit abi if specified on the command line. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/aes.inc cvs rdiff -u -r1.2 -r1.3 \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/bn.inc \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/crypto.inc \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/sha.inc 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/lib/libcrypto/arch/mips/aes.inc diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/aes.inc:1.1 src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/aes.inc:1.2 --- src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/aes.inc:1.1 Sat Mar 3 19:59:44 2018 +++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/aes.inc Wed Mar 7 14:44:31 2018 @@ -1,6 +1,6 @@ .PATH.S: ${.PARSEDIR} -#AES_SRCS = aes-mips.S +#AES_SRCS = aes-mips${"${COPTS:M*-mabi=64*}" == "":?:64}.S #AESCPPFLAGS = -DAES_ASM .include "../../aes.inc" Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/bn.inc diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/bn.inc:1.2 src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/bn.inc:1.3 --- src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/bn.inc:1.2 Mon Mar 5 11:43:50 2018 +++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/bn.inc Wed Mar 7 14:44:31 2018 @@ -1,5 +1,5 @@ .PATH.S: ${.PARSEDIR} -BN_SRCS = mips${${MACHINE_ARCH:Mmips64*} == "":?:64}.S +BN_SRCS = mips${"${COPTS:M*-mabi=64*}" == "":?:64}.S .include "../../bn.inc" Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/crypto.inc diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/crypto.inc:1.2 src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/crypto.inc:1.3 --- src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/crypto.inc:1.2 Mon Mar 5 11:43:50 2018 +++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/crypto.inc Wed Mar 7 14:44:31 2018 @@ -1,6 +1,6 @@ .PATH.S: ${.PARSEDIR} -CRYPTO_SRCS += mips-mont${${MACHINE_ARCH:Mmips64*} == "":?:64}.S +CRYPTO_SRCS += mips-mont${"${COPTS:M*-mabi=64*}" == "":?:64}.S CRYPTO_SRCS += libc-memequal.c .include "../../crypto.inc" Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/sha.inc diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/sha.inc:1.2 src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/sha.inc:1.3 --- src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/sha.inc:1.2 Mon Mar 5 11:43:50 2018 +++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/sha.inc Wed Mar 7 14:44:31 2018 @@ -1,7 +1,7 @@ .PATH.S: ${.PARSEDIR} -SHA_SRCS += sha1-mips${${MACHINE_ARCH:Mmips64*} == "":?:64}.S -SHA_SRCS += sha512-mips${${MACHINE_ARCH:Mmips64*} == "":?:64}.S +SHA_SRCS += sha1-mips${"${COPTS:M*-mabi=64*}" == "":?:64}.S +SHA_SRCS += sha512-mips${"${COPTS:M*-mabi=64*}" == "":?:64}.S SHACPPFLAGS = -DSHA1_ASM .include "../../sha.inc"
CVS commit: src/tests/lib/libc/sys
Module Name:src Committed By: kamil Date: Wed Mar 7 16:40:06 UTC 2018 Modified Files: src/tests/lib/libc/sys: t_ptrace_wait.c Log Message: ATF: Reenable attach2 in t_ptrace_wait* The primary race specific to this test has been fixed in previous commit (wrong WNOHANG). This test is still racy and breaks like once every 30,000 execution. This is down like from once from every 100th execution in the past. The remaning race is not specific to attach2 and I can reproduce it with at least attach1. It still looks like being specific to NetBSD and it's not reproducible on Linux and FreeBSD. Perhaps a bug with pipe(2)/write(2)/ read(2) or close to these features. Sponsored by To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/tests/lib/libc/sys/t_ptrace_wait.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/lib/libc/sys/t_ptrace_wait.c diff -u src/tests/lib/libc/sys/t_ptrace_wait.c:1.24 src/tests/lib/libc/sys/t_ptrace_wait.c:1.25 --- src/tests/lib/libc/sys/t_ptrace_wait.c:1.24 Wed Mar 7 10:53:55 2018 +++ src/tests/lib/libc/sys/t_ptrace_wait.c Wed Mar 7 16:40:06 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: t_ptrace_wait.c,v 1.24 2018/03/07 10:53:55 kamil Exp $ */ +/* $NetBSD: t_ptrace_wait.c,v 1.25 2018/03/07 16:40:06 kamil Exp $ */ /*- * Copyright (c) 2016 The NetBSD Foundation, Inc. @@ -27,7 +27,7 @@ */ #include -__RCSID("$NetBSD: t_ptrace_wait.c,v 1.24 2018/03/07 10:53:55 kamil Exp $"); +__RCSID("$NetBSD: t_ptrace_wait.c,v 1.25 2018/03/07 16:40:06 kamil Exp $"); #include #include @@ -424,9 +424,6 @@ ATF_TC_BODY(attach2, tc) int status; #endif - // Feature pending for refactoring - atf_tc_expect_fail("test is racy"); - DPRINTF("Spawn tracee\n"); SYSCALL_REQUIRE(msg_open(&parent_tracee) == 0); tracee = atf_utils_fork(); @@ -507,9 +504,6 @@ ATF_TC_BODY(attach2, tc) msg_close(&parent_tracer); msg_close(&parent_tracee); - - // Test is racy - ATF_REQUIRE(0 && "In order to get reliable failure, abort"); } #endif
CVS commit: src/crypto/external/bsd/openssl/dist
Module Name:src Committed By: christos Date: Wed Mar 7 16:06:57 UTC 2018 Modified Files: src/crypto/external/bsd/openssl/dist: e_os.h Log Message: HACK around aarch64 having "long long" "__int64_t" To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/crypto/external/bsd/openssl/dist/e_os.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/e_os.h diff -u src/crypto/external/bsd/openssl/dist/e_os.h:1.7 src/crypto/external/bsd/openssl/dist/e_os.h:1.8 --- src/crypto/external/bsd/openssl/dist/e_os.h:1.7 Thu Feb 8 16:51:22 2018 +++ src/crypto/external/bsd/openssl/dist/e_os.h Wed Mar 7 11:06:57 2018 @@ -32,7 +32,8 @@ extern "C" { /* * BIO_printf format modifier for [u]int64_t. */ -# if defined(__LP64__) || (defined(__SIZEOF_LONG__) && __SIZEOF_LONG__==8) +# if !defined(__aarch64__) && (defined(__LP64__) || \ + (defined(__SIZEOF_LONG__) && __SIZEOF_LONG__ == 8)) # define BIO_PRI64 "l" /* 'll' does work "universally", but 'l' is * here to shut -Wformat warnings in LP64... */ # else
CVS commit: src/crypto/external/bsd/openssl/dist/crypto/evp
Module Name:src Committed By: christos Date: Wed Mar 7 16:06:29 UTC 2018 Modified Files: src/crypto/external/bsd/openssl/dist/crypto/evp: e_aes.c Log Message: Enable AES_ASM explicitly not by just looking at the processor, like we do for other archs! To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 \ src/crypto/external/bsd/openssl/dist/crypto/evp/e_aes.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_aes.c diff -u src/crypto/external/bsd/openssl/dist/crypto/evp/e_aes.c:1.12 src/crypto/external/bsd/openssl/dist/crypto/evp/e_aes.c:1.13 --- src/crypto/external/bsd/openssl/dist/crypto/evp/e_aes.c:1.12 Thu Feb 8 16:51:28 2018 +++ src/crypto/external/bsd/openssl/dist/crypto/evp/e_aes.c Wed Mar 7 11:06:29 2018 @@ -979,7 +979,7 @@ const EVP_CIPHER *EVP_aes_##keylen##_##m #endif -#if defined(OPENSSL_CPUID_OBJ) && (defined(__arm__) || defined(__arm) || defined(__aarch64__)) +#if defined(OPENSSL_CPUID_OBJ) && defined(AES_ASM) && (defined(__arm__) || defined(__arm) || defined(__aarch64__)) # include "arm_arch.h" # if __ARM_MAX_ARCH__>=7 # if defined(BSAES_ASM)
CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto/arch/aarch64
Module Name:src Committed By: christos Date: Wed Mar 7 16:05:44 UTC 2018 Modified Files: src/crypto/external/bsd/openssl/lib/libcrypto/arch/aarch64: Makefile aes.inc aesv8-armx.S bf.inc bn.inc crypto.inc des.inc ghashv8-armx.S modes.inc rc4.inc sha.inc sha1-armv8.S Added Files: src/crypto/external/bsd/openssl/lib/libcrypto/arch/aarch64: arm64cpuid.S armv8-mont.S chacha-armv8.S chacha.inc ec.inc ecp_nistz256-armv8.S poly1305-armv8.S poly1305.inc sha512-armv8.S vpaes-armv8.S Log Message: regen; some assembly files don't work so disable for now. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/aarch64/Makefile \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/aarch64/aes.inc \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/aarch64/aesv8-armx.S \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/aarch64/bf.inc \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/aarch64/bn.inc \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/aarch64/crypto.inc \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/aarch64/des.inc \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/aarch64/ghashv8-armx.S \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/aarch64/modes.inc \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/aarch64/rc4.inc \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/aarch64/sha.inc \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/aarch64/sha1-armv8.S cvs rdiff -u -r0 -r1.1 \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/aarch64/arm64cpuid.S \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/aarch64/armv8-mont.S \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/aarch64/chacha-armv8.S \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/aarch64/chacha.inc \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/aarch64/ec.inc \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/aarch64/ecp_nistz256-armv8.S \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/aarch64/poly1305-armv8.S \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/aarch64/poly1305.inc \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/aarch64/sha512-armv8.S \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/aarch64/vpaes-armv8.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. diffs are larger than 1MB and have been omitted
CVS commit: src/sys/arch/mips/mips
Module Name:src Committed By: maya Date: Wed Mar 7 15:56:34 UTC 2018 Modified Files: src/sys/arch/mips/mips: locore.S Log Message: Add duplicate code to read the FPU ID. enable & disable the FPU around it. To generate a diff of this commit: cvs rdiff -u -r1.213 -r1.214 src/sys/arch/mips/mips/locore.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/mips/mips/locore.S diff -u src/sys/arch/mips/mips/locore.S:1.213 src/sys/arch/mips/mips/locore.S:1.214 --- src/sys/arch/mips/mips/locore.S:1.213 Wed Mar 7 15:52:43 2018 +++ src/sys/arch/mips/mips/locore.S Wed Mar 7 15:56:33 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.S,v 1.213 2018/03/07 15:52:43 maya Exp $ */ +/* $NetBSD: locore.S,v 1.214 2018/03/07 15:56:33 maya Exp $ */ /* * Copyright (c) 1992, 1993 @@ -63,7 +63,7 @@ #include #include -RCSID("$NetBSD: locore.S,v 1.213 2018/03/07 15:52:43 maya Exp $") +RCSID("$NetBSD: locore.S,v 1.214 2018/03/07 15:56:33 maya Exp $") #include "assym.h" @@ -167,6 +167,24 @@ _C_LABEL(kernel_text): mfc0 t0, MIPS_COP_0_PRID # read product revision ID COP0_SYNC nop + +#ifdef NOFPU + li t1, 0# Dummy FPU_ID +#else + /* Enable the FPU to read FPUID */ + mfc0 k0, MIPS_COP_0_STATUS + MFC0_HAZARD + or k0, MIPS_SR_COP_1_BIT + mtc0 k0, MIPS_COP_0_STATUS + COP0_HAZARD_FPUENABLE + + cfc1 t1, MIPS_FPU_ID + + /* Disable again, we don't want it on in the kernel */ + and k0, ~MIPS_SR_COP_1_BIT + mtc0 k0, MIPS_COP_0_STATUS +#endif + #ifdef NOFPU /* No FPU; avoid touching FPU registers */ add t1, zero, zero #else
CVS commit: src/sys/arch/mips/mips
Module Name:src Committed By: maya Date: Wed Mar 7 15:52:43 UTC 2018 Modified Files: src/sys/arch/mips/mips: locore.S Log Message: Move the hpcmips L1 cache disable hack up where another machine-specific hacks exists. Note that no existing kernel seems to enable this option. To generate a diff of this commit: cvs rdiff -u -r1.212 -r1.213 src/sys/arch/mips/mips/locore.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/mips/mips/locore.S diff -u src/sys/arch/mips/mips/locore.S:1.212 src/sys/arch/mips/mips/locore.S:1.213 --- src/sys/arch/mips/mips/locore.S:1.212 Wed Mar 7 15:49:45 2018 +++ src/sys/arch/mips/mips/locore.S Wed Mar 7 15:52:43 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.S,v 1.212 2018/03/07 15:49:45 maya Exp $ */ +/* $NetBSD: locore.S,v 1.213 2018/03/07 15:52:43 maya Exp $ */ /* * Copyright (c) 1992, 1993 @@ -63,7 +63,7 @@ #include #include -RCSID("$NetBSD: locore.S,v 1.212 2018/03/07 15:49:45 maya Exp $") +RCSID("$NetBSD: locore.S,v 1.213 2018/03/07 15:52:43 maya Exp $") #include "assym.h" @@ -93,6 +93,15 @@ _C_LABEL(kernel_text): mtc0 k0, MIPS_COP_0_STATUS #endif +#ifdef HPCMIPS_L1CACHE_DISABLE + mfc0 t0, MIPS_COP_0_CONFIG + li t1, 0xfff8 + and t0, t0, t1 + or t0, 0x0002 # XXX, KSEG0 is uncached + mtc0 t0, MIPS_COP_0_CONFIG + COP0_SYNC +#endif /* HPCMIPS_L1CACHE_DISABLE */ + #ifdef MIPS64_OCTEON // // U-boot on the erlite starts all cpus at the kernel entry point. @@ -145,14 +154,6 @@ _C_LABEL(kernel_text): mtc0 t0, MIPS_COP_0_STATUS # the fp coprocessor COP0_SYNC #endif /* !emips */ -#ifdef HPCMIPS_L1CACHE_DISABLE - mfc0 t0, MIPS_COP_0_CONFIG - li t1, 0xfff8 - and t0, t0, t1 - or t0, 0x0002 # XXX, KSEG0 is uncached - mtc0 t0, MIPS_COP_0_CONFIG - COP0_SYNC -#endif /* HPCMIPS_L1CACHE_DISABLE */ #else /* NOFPU */ mfc0 t0, MIPS_COP_0_STATUS MFC0_HAZARD
CVS commit: src/sys/arch/mips/mips
Module Name:src Committed By: maya Date: Wed Mar 7 15:49:45 UTC 2018 Modified Files: src/sys/arch/mips/mips: locore.S Log Message: Add duplicate code that enables 64bit addressing under the right macro conditions that is, _LP64. The existing, previous code uses NOFPU as a condition for it. This adds duplicated code (and later removes) for easy bisecting. To generate a diff of this commit: cvs rdiff -u -r1.211 -r1.212 src/sys/arch/mips/mips/locore.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/mips/mips/locore.S diff -u src/sys/arch/mips/mips/locore.S:1.211 src/sys/arch/mips/mips/locore.S:1.212 --- src/sys/arch/mips/mips/locore.S:1.211 Wed Mar 7 15:44:15 2018 +++ src/sys/arch/mips/mips/locore.S Wed Mar 7 15:49:45 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.S,v 1.211 2018/03/07 15:44:15 maya Exp $ */ +/* $NetBSD: locore.S,v 1.212 2018/03/07 15:49:45 maya Exp $ */ /* * Copyright (c) 1992, 1993 @@ -63,7 +63,7 @@ #include #include -RCSID("$NetBSD: locore.S,v 1.211 2018/03/07 15:44:15 maya Exp $") +RCSID("$NetBSD: locore.S,v 1.212 2018/03/07 15:49:45 maya Exp $") #include "assym.h" @@ -85,6 +85,14 @@ _C_LABEL(kernel_text): mtc0 zero, MIPS_COP_0_CAUSE COP0_SYNC +#ifdef _LP64 + /* Enable 64-bit addressing */ + mfc0 k0, MIPS_COP_0_STATUS + MFC0_HAZARD + or k0, MIPS_SR_KX | MIPS_SR_UX + mtc0 k0, MIPS_COP_0_STATUS +#endif + #ifdef MIPS64_OCTEON // // U-boot on the erlite starts all cpus at the kernel entry point.
CVS commit: src/sys/arch/mips/mips
Module Name:src Committed By: maya Date: Wed Mar 7 15:44:15 UTC 2018 Modified Files: src/sys/arch/mips/mips: locore.S Log Message: Replace early interrupt disable code. As suggested by dh, carefully disable interrupts before frobbing interrupt mask, which might trigger more interrupts. Don't bother with keeping BEV and such. Note that we are zeroing out STATUS later on in the (NOFPU || emips) case right now. This change is risky for emips which wasn't tested and didn't reach userland before. To generate a diff of this commit: cvs rdiff -u -r1.210 -r1.211 src/sys/arch/mips/mips/locore.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/mips/mips/locore.S diff -u src/sys/arch/mips/mips/locore.S:1.210 src/sys/arch/mips/mips/locore.S:1.211 --- src/sys/arch/mips/mips/locore.S:1.210 Wed Jan 24 03:13:36 2018 +++ src/sys/arch/mips/mips/locore.S Wed Mar 7 15:44:15 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.S,v 1.210 2018/01/24 03:13:36 maya Exp $ */ +/* $NetBSD: locore.S,v 1.211 2018/03/07 15:44:15 maya Exp $ */ /* * Copyright (c) 1992, 1993 @@ -63,7 +63,7 @@ #include #include -RCSID("$NetBSD: locore.S,v 1.210 2018/01/24 03:13:36 maya Exp $") +RCSID("$NetBSD: locore.S,v 1.211 2018/03/07 15:44:15 maya Exp $") #include "assym.h" @@ -73,23 +73,18 @@ RCSID("$NetBSD: locore.S,v 1.210 2018/01 .globl _C_LABEL(kernel_text) # libkvm refers this start: _C_LABEL(kernel_text): -#if (defined(MIPS3_PLUS) && !defined(MIPS1)) || defined(emips) - /* keep firmware exception handler until we hook. */ - mfc0 v0, MIPS_COP_0_STATUS + /* First disable the interrupts only, for safety */ + mfc0 k0, MIPS_COP_0_STATUS MFC0_HAZARD -#if defined(emips) - and v0, MIPS_SR_TS | MIPS3_SR_RE -#else - and v0, MIPS_SR_BEV -#endif - mtc0 v0, MIPS_COP_0_STATUS # Disable interrupts - COP0_SYNC -#else - mtc0 zero, MIPS_COP_0_STATUS # Disable interrupts + and k0, ~MIPS_SR_INT_IE + mtc0 k0, MIPS_COP_0_STATUS COP0_SYNC -#endif + + /* Known state: BEV, coprocessors disabled */ + mtc0 zero, MIPS_COP_0_STATUS mtc0 zero, MIPS_COP_0_CAUSE COP0_SYNC + #ifdef MIPS64_OCTEON // // U-boot on the erlite starts all cpus at the kernel entry point.
CVS commit: src/sys/arch/sun2/conf
Module Name:src Committed By: maya Date: Wed Mar 7 15:20:50 UTC 2018 Modified Files: src/sys/arch/sun2/conf: Makefile.sun2 Log Message: Remove more unused functions with COMPAT_AS=library To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/sys/arch/sun2/conf/Makefile.sun2 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/sun2/conf/Makefile.sun2 diff -u src/sys/arch/sun2/conf/Makefile.sun2:1.21 src/sys/arch/sun2/conf/Makefile.sun2:1.22 --- src/sys/arch/sun2/conf/Makefile.sun2:1.21 Sat Mar 3 03:19:18 2018 +++ src/sys/arch/sun2/conf/Makefile.sun2 Wed Mar 7 15:20:50 2018 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.sun2,v 1.21 2018/03/03 03:19:18 mrg Exp $ +# $NetBSD: Makefile.sun2,v 1.22 2018/03/07 15:20:50 maya Exp $ # Makefile for NetBSD # @@ -38,11 +38,13 @@ AFLAGS+= -x assembler-with-cpp ## ## (3) libkern and compat ## -OPT_MODULAR= %MODULAR% +OPT_MODULAR= %MODULAR% .if !empty(OPT_MODULAR) -KERN_AS= obj +KERN_AS= obj +COMPAT_AS= obj .else -KERN_AS= library +KERN_AS= library +COMPAT_AS= library .endif # XXX lib/libkern/arch/m68k/Makefile.inc needs to know that # XXX our MACHINE_ARCH is m68000, and not m68k. --fredette
CVS commit: src/sys/arch/sun3/conf
Module Name:src Committed By: maya Date: Wed Mar 7 15:02:36 UTC 2018 Modified Files: src/sys/arch/sun3/conf: Makefile.sun3 Log Message: Build compat code as .a if not MODULAR. Removes some more unused functions. To generate a diff of this commit: cvs rdiff -u -r1.106 -r1.107 src/sys/arch/sun3/conf/Makefile.sun3 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/sun3/conf/Makefile.sun3 diff -u src/sys/arch/sun3/conf/Makefile.sun3:1.106 src/sys/arch/sun3/conf/Makefile.sun3:1.107 --- src/sys/arch/sun3/conf/Makefile.sun3:1.106 Sat Mar 3 03:19:36 2018 +++ src/sys/arch/sun3/conf/Makefile.sun3 Wed Mar 7 15:02:36 2018 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.sun3,v 1.106 2018/03/03 03:19:36 mrg Exp $ +# $NetBSD: Makefile.sun3,v 1.107 2018/03/07 15:02:36 maya Exp $ # Makefile for NetBSD # @@ -41,9 +41,11 @@ AFLAGS+= -x assembler-with-cpp ## OPT_MODULAR= %MODULAR% .if !empty(OPT_MODULAR) -KERN_AS= obj +KERN_AS= obj +COMPAT_AS= obj .else -KERN_AS= library +KERN_AS= library +COMPAT_AS= library .endif ##
CVS commit: src/sys/arch/emips/stand/common
Module Name:src Committed By: christos Date: Wed Mar 7 14:59:14 UTC 2018 Modified Files: src/sys/arch/emips/stand/common: ace.c Log Message: cleanup debugging code so that it compiles again. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/emips/stand/common/ace.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/emips/stand/common/ace.c diff -u src/sys/arch/emips/stand/common/ace.c:1.3 src/sys/arch/emips/stand/common/ace.c:1.4 --- src/sys/arch/emips/stand/common/ace.c:1.3 Wed Feb 5 14:07:16 2014 +++ src/sys/arch/emips/stand/common/ace.c Wed Mar 7 09:59:14 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: ace.c,v 1.3 2014/02/05 19:07:16 christos Exp $ */ +/* $NetBSD: ace.c,v 1.4 2018/03/07 14:59:14 christos Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -88,7 +88,12 @@ */ #if defined(DEBUG) int acedebug = 2; -#define DBGME(lev,x) if (lev >= acedebug) x +#define DBGME(lev,x) \ + do \ + if (lev >= acedebug) { \ + x; \ + } \ + while (/*CONSTCOND*/0) #else #define DBGME(lev,x) #endif @@ -537,9 +542,9 @@ static int SysAce_read(struct _Sac * Int Data32 = Interface->DATABUFREG[0]; Data32 = le32toh(Data32); -DBGME(0,printf(" %x", Data32)); -if (0 == (0xf & (i+4) )) DBGME(0,printf("\n")); -memcpy(Buffer+i,&Data32,4); + DBGME(0,printf(" %x", Data32)); + if (0 == (0xf & (i+4))) DBGME(0,printf("\n")); +memcpy(Buffer+i, &Data32, 4); } else {
CVS commit: [netbsd-8] src/doc
Module Name:src Committed By: martin Date: Wed Mar 7 14:55:49 UTC 2018 Modified Files: src/doc [netbsd-8]: CHANGES-8.0 Log Message: Ticket #609 and #610 To generate a diff of this commit: cvs rdiff -u -r1.1.2.138 -r1.1.2.139 src/doc/CHANGES-8.0 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-8.0 diff -u src/doc/CHANGES-8.0:1.1.2.138 src/doc/CHANGES-8.0:1.1.2.139 --- src/doc/CHANGES-8.0:1.1.2.138 Tue Mar 6 11:19:17 2018 +++ src/doc/CHANGES-8.0 Wed Mar 7 14:55:49 2018 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-8.0,v 1.1.2.138 2018/03/06 11:19:17 martin Exp $ +# $NetBSD: CHANGES-8.0,v 1.1.2.139 2018/03/07 14:55:49 martin Exp $ A complete list of changes from the initial NetBSD 8.0 branch on 2017-06-04 until the 8.0 release: @@ -10087,3 +10087,24 @@ sys/netipsec/ipsecif.c1.3 Fix fragment processing in ipsec4_fragout(). [knakahara, ticket #607] +sys/netipsec/key.c1.249 +sys/netipsec/keydb.h1.21 + + Avoid data races on lifetime counters by using percpu(9). + [ozaki-r, ticket #609] + +sys/arch/amd64/amd64/amd64_trap.S 1.8,1.10,1.12 (partial),1.13-1.15, + 1.19 (partial),1.20,1.21,1.22,1.24 + (via patch) +sys/arch/amd64/amd64/locore.S 1.129 (partial),1.132 (via patch) +sys/arch/amd64/amd64/trap.c 1.97 (partial),1.111 (via patch) +sys/arch/amd64/amd64/vector.S 1.54,1.55 (via patch) +sys/arch/amd64/include/frameasm.h 1.21,1.23 (via patch) +sys/arch/x86/x86/cpu.c 1.138 (via patch) +sys/arch/xen/conf/Makefile.xen 1.45 (via patch) + + Rename and reorder several things in amd64_trap.S. + Compile amd64_trap.S as a file. + Introduce nmitrap and doubletrap. + Have the CPU clear PSL_D automatically in the syscall entry point. + [maxv, ticket #610]
CVS commit: [netbsd-8] src/sys/arch
Module Name:src Committed By: martin Date: Wed Mar 7 14:50:57 UTC 2018 Modified Files: src/sys/arch/amd64/amd64 [netbsd-8]: amd64_trap.S locore.S trap.c vector.S src/sys/arch/amd64/conf [netbsd-8]: files.amd64 src/sys/arch/amd64/include [netbsd-8]: frameasm.h src/sys/arch/x86/x86 [netbsd-8]: cpu.c src/sys/arch/xen/conf [netbsd-8]: Makefile.xen Log Message: Pull up the following revisions (via patch), requested by maxv in ticket #610: sys/arch/amd64/amd64/amd64_trap.S 1.8,1.10,1.12 (partial),1.13-1.15, 1.19 (partial),1.20,1.21,1.22,1.24 (via patch) sys/arch/amd64/amd64/locore.S 1.129 (partial),1.132 (via patch) sys/arch/amd64/amd64/trap.c 1.97 (partial),1.111 (via patch) sys/arch/amd64/amd64/vector.S 1.54,1.55 (via patch) sys/arch/amd64/include/frameasm.h 1.21,1.23 (via patch) sys/arch/x86/x86/cpu.c 1.138 (via patch) sys/arch/xen/conf/Makefile.xen 1.45 (via patch) Rename and reorder several things in amd64_trap.S. Compile amd64_trap.S as a file. Introduce nmitrap and doubletrap. Have the CPU clear PSL_D automatically in the syscall entry point. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.5.6.1 src/sys/arch/amd64/amd64/amd64_trap.S cvs rdiff -u -r1.123.6.2 -r1.123.6.3 src/sys/arch/amd64/amd64/locore.S cvs rdiff -u -r1.96 -r1.96.4.1 src/sys/arch/amd64/amd64/trap.c cvs rdiff -u -r1.49 -r1.49.2.1 src/sys/arch/amd64/amd64/vector.S cvs rdiff -u -r1.88.8.1 -r1.88.8.2 src/sys/arch/amd64/conf/files.amd64 cvs rdiff -u -r1.20 -r1.20.32.1 src/sys/arch/amd64/include/frameasm.h cvs rdiff -u -r1.130.2.1 -r1.130.2.2 src/sys/arch/x86/x86/cpu.c cvs rdiff -u -r1.41 -r1.41.6.1 src/sys/arch/xen/conf/Makefile.xen 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/amd64_trap.S diff -u src/sys/arch/amd64/amd64/amd64_trap.S:1.5 src/sys/arch/amd64/amd64/amd64_trap.S:1.5.6.1 --- src/sys/arch/amd64/amd64/amd64_trap.S:1.5 Fri Mar 24 18:03:32 2017 +++ src/sys/arch/amd64/amd64/amd64_trap.S Wed Mar 7 14:50:56 2018 @@ -1,11 +1,11 @@ -/* $NetBSD: amd64_trap.S,v 1.5 2017/03/24 18:03:32 maxv Exp $ */ +/* $NetBSD: amd64_trap.S,v 1.5.6.1 2018/03/07 14:50:56 martin Exp $ */ -/*- - * Copyright (c) 1998, 2007, 2008 The NetBSD Foundation, Inc. +/* + * Copyright (c) 1998, 2007, 2008, 2017 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation - * by Charles M. Hannum and by Andrew Doran. + * by Charles M. Hannum, by Andrew Doran and by Maxime Villard. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -64,10 +64,19 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#if 0 #include -__KERNEL_RCSID(0, "$NetBSD: amd64_trap.S,v 1.5 2017/03/24 18:03:32 maxv Exp $"); -#endif + +#include "opt_xen.h" +#include "opt_dtrace.h" + +#define ALIGN_TEXT .align 16,0x90 + +#include +#include +#include +#include + +#include "assym.h" /* * Trap and fault vector routines @@ -78,12 +87,10 @@ __KERNEL_RCSID(0, "$NetBSD: amd64_trap.S * (possibly the next clock tick). Thus, we disable interrupt before checking, * and only enable them again on the final `iret' or before calling the AST * handler. - */ - -/*/ + */ #ifdef XEN -#define PRE_TRAP movq (%rsp),%rcx ; movq 8(%rsp),%r11 ; addq $0x10,%rsp +#define PRE_TRAP movq (%rsp),%rcx ; movq 8(%rsp),%r11 ; addq $0x10,%rsp #else #define PRE_TRAP #endif @@ -118,10 +125,10 @@ IDTVEC(trap02) #if defined(XEN) ZTRAP(T_NMI) #else - pushq $0 - pushq $T_NMI + ZTRAP_NJ(T_NMI) subq $TF_REGSIZE,%rsp INTR_SAVE_GPRS + cld movw %gs,TF_GS(%rsp) movw %fs,TF_FS(%rsp) movw %es,TF_ES(%rsp) @@ -130,23 +137,21 @@ IDTVEC(trap02) movl $MSR_GSBASE,%ecx rdmsr cmpl $VM_MIN_KERNEL_ADDRESS_HIGH32,%edx - jae noswapgs + jae .Lnoswapgs swapgs movq %rsp,%rdi incq CPUVAR(NTRAP) - call _C_LABEL(trap) + call _C_LABEL(nmitrap) swapgs - jmp nmileave + jmp .Lnmileave -noswapgs: +.Lnoswapgs: movq %rsp,%rdi incq CPUVAR(NTRAP) - call _C_LABEL(trap) + call _C_LABEL(nmitrap) -nmileave: - movw TF_ES(%rsp),%es - movw TF_DS(%rsp),%ds +.Lnmileave: INTR_RESTORE_GPRS addq $TF_REGSIZE+16,%rsp iretq @@ -179,21 +184,6 @@ IDTVEC(trap03) /* Jump to the code hooked in by DTrace. */ movq dtrace_invop_jump_addr, %rax jmpq *dtrace_invop_jump_addr - - .bss - .globl dtrace_invop_jump_addr - .align 8 - .type dtrace_invop_jump_addr, @object - .size dtrace_invop_jump_addr, 8 -dtrace_invop_jump_addr: - .zero 8 - .globl dtrace_invop_calltrap_addr - .align 8 - .type dtrace_invop_calltrap_addr, @object - .size dtrace_invop_calltrap_addr
CVS commit: [netbsd-8] src/sys/netipsec
Module Name:src Committed By: martin Date: Wed Mar 7 13:46:42 UTC 2018 Modified Files: src/sys/netipsec [netbsd-8]: key.c keydb.h Log Message: Pull up following revision(s) (requested by ozaki-r in ticket #609): sys/netipsec/key.c: revision 1.249 sys/netipsec/keydb.h: revision 1.21 Avoid data races on lifetime counters by using percpu(9) We don't make them percpu(9) directly because the structure is exposed to userland and we don't want to break ABI. So we add another member variable for percpu(9) and use it internally. When we export them to userland, they are converted to the original format. To generate a diff of this commit: cvs rdiff -u -r1.163.2.6 -r1.163.2.7 src/sys/netipsec/key.c cvs rdiff -u -r1.15.2.1 -r1.15.2.2 src/sys/netipsec/keydb.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/netipsec/key.c diff -u src/sys/netipsec/key.c:1.163.2.6 src/sys/netipsec/key.c:1.163.2.7 --- src/sys/netipsec/key.c:1.163.2.6 Sun Feb 11 21:17:34 2018 +++ src/sys/netipsec/key.c Wed Mar 7 13:46:41 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: key.c,v 1.163.2.6 2018/02/11 21:17:34 snj Exp $ */ +/* $NetBSD: key.c,v 1.163.2.7 2018/03/07 13:46:41 martin Exp $ */ /* $FreeBSD: src/sys/netipsec/key.c,v 1.3.2.3 2004/02/14 22:23:23 bms Exp $ */ /* $KAME: key.c,v 1.191 2001/06/27 10:46:49 sakane Exp $ */ @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: key.c,v 1.163.2.6 2018/02/11 21:17:34 snj Exp $"); +__KERNEL_RCSID(0, "$NetBSD: key.c,v 1.163.2.7 2018/03/07 13:46:41 martin Exp $"); /* * This code is referred to RFC 2367 @@ -788,6 +788,26 @@ static struct callout key_timehandler_ch static struct workqueue *key_timehandler_wq; static struct work key_timehandler_wk; +/* + * Utilities for percpu counters for sadb_lifetime_allocations and + * sadb_lifetime_bytes. + */ +#define LIFETIME_COUNTER_ALLOCATIONS 0 +#define LIFETIME_COUNTER_BYTES 1 +#define LIFETIME_COUNTER_SIZE 2 + +typedef uint64_t lifetime_counters_t[LIFETIME_COUNTER_SIZE]; + +static void +key_sum_lifetime_counters(void *p, void *arg, struct cpu_info *ci __unused) +{ + lifetime_counters_t *one = p; + lifetime_counters_t *sum = arg; + + (*sum)[LIFETIME_COUNTER_ALLOCATIONS] += (*one)[LIFETIME_COUNTER_ALLOCATIONS]; + (*sum)[LIFETIME_COUNTER_BYTES] += (*one)[LIFETIME_COUNTER_BYTES]; +} + u_int key_sp_refcnt(const struct secpolicy *sp) { @@ -3260,6 +3280,8 @@ key_newsav(struct mbuf *m, const struct /* We don't allow lft_c to be NULL */ newsav->lft_c = kmem_zalloc(sizeof(struct sadb_lifetime), KM_SLEEP); + newsav->lft_c_counters_percpu = + percpu_alloc(sizeof(lifetime_counters_t)); } /* reset created */ @@ -3470,6 +3492,10 @@ key_freesaval(struct secasvar *sav) kmem_intr_free(sav->key_auth, sav->key_auth_len); if (sav->key_enc != NULL) kmem_intr_free(sav->key_enc, sav->key_enc_len); + if (sav->lft_c_counters_percpu != NULL) { + percpu_free(sav->lft_c_counters_percpu, + sizeof(lifetime_counters_t)); + } if (sav->lft_c != NULL) kmem_intr_free(sav->lft_c, sizeof(*(sav->lft_c))); if (sav->lft_h != NULL) @@ -3638,6 +3664,8 @@ key_setsaval(struct secasvar *sav, struc sav->lft_c->sadb_lifetime_addtime = time_uptime; sav->lft_c->sadb_lifetime_usetime = 0; + sav->lft_c_counters_percpu = percpu_alloc(sizeof(lifetime_counters_t)); + /* lifetimes for HARD and SOFT */ { const struct sadb_lifetime *lft0; @@ -3821,7 +3849,9 @@ key_setdumpsa(struct secasvar *sav, u_in p = sav->key_enc; break; - case SADB_EXT_LIFETIME_CURRENT: + case SADB_EXT_LIFETIME_CURRENT: { + lifetime_counters_t sum = {0}; + KASSERT(sav->lft_c != NULL); l = PFKEY_UNUNIT64(((struct sadb_ext *)sav->lft_c)->sadb_ext_len); memcpy(<, sav->lft_c, sizeof(struct sadb_lifetime)); @@ -3829,8 +3859,15 @@ key_setdumpsa(struct secasvar *sav, u_in time_mono_to_wall(lt.sadb_lifetime_addtime); lt.sadb_lifetime_usetime = time_mono_to_wall(lt.sadb_lifetime_usetime); + percpu_foreach(sav->lft_c_counters_percpu, + key_sum_lifetime_counters, sum); + lt.sadb_lifetime_allocations = + sum[LIFETIME_COUNTER_ALLOCATIONS]; + lt.sadb_lifetime_bytes = + sum[LIFETIME_COUNTER_BYTES]; p = < break; + } case SADB_EXT_LIFETIME_HARD: if (!sav->lft_h) @@ -4860,9 +4897,17 @@ restart: * when new SA is installed. Caution when it's * installed too big lifetime by time. */ - else if (sav->lft_s->sadb_lifetime_bytes != 0 && - sav->lft_s->sadb_lifetime_bytes < - sav->lft_c->sadb_lifetime_bytes) { + else { +uint64_t lft_c_bytes = 0; +lifetime_counters_t sum = {0}; + +percpu_foreach(sav->lft_c_counters_percpu, +key_sum_lifetime_counters, sum); +lft_c_bytes = sum[LIFETIME_COUNTER_BYTES]; + +if (sav->lft_s->sadb_lifetime_bytes == 0 || +sav->lft_s->sadb_lifetime_bytes >= lft_c
CVS commit: src/sys/dev/pci/ixgbe
Module Name:src Committed By: knakahara Date: Wed Mar 7 11:18:29 UTC 2018 Modified Files: src/sys/dev/pci/ixgbe: ixgbe.c Log Message: Fix another poll mode assumption breaking. Implemented by msaitoh@n.o, I just commit by proxy. ixgbe_rearm_queues() writes EICS register(s). 82599, X540 and X550 specifications say "Following a write of 1b to any bit in the EICS register (interrupt cause set), its corresponding bit in the EIMS register is auto set as well enabling its interrupt." in "Extended Interrupt Auto Mask Enable (EIAM) Register" section. That is, ixgbe_rearm_queues() causes interrupts regardless of the status managed by ixgbe_enable_queue()/ixgbe_disable_queue(). That can break poll mode assumption. In fact, the problem occurs in the following situation - CPU#A has high load traffic, in contrast, CPU#B has not so high load traffic - CPU#A is occurred interrupt by its NIC queue - CPU#A calls ixgbe_disable_queue() in interrupt handler(ixgbe_msix_que()) - CPU#A kick softint handler(ixgbe_handle_que()) - CPU#A begins softint - CPU#A's NIC queue is set que->txr->busy flag - With some reason, CPU#A can do ixg interrupt handler E.g. when one of CPU#A's softnet handlers sleeps, ipl is lowered - CPU#B starts callout - CPU#B calls ixgbe_local_timer1() - CPU#B writes EICS bit corresponding CPU#A's NIC queue bit - CPU#A's NIC queue causes interrupt whie CPU#A is running in poll mode - CPU#A calls ixgbe_disable_queue() in interrupt handler *again* - CPU#A has done polling, and then CPU#A calls ixgbe_enable_queue() *once* - CPU#A's NIC queue interrupt is disabled until ixg is detached as ixgbe_disable_queue() is called twice though ixgbe_disable_queue() is called once only NOTE: 82598 does not say so, but it is treated in the same way because of no harm. By the way, we will refactor ixgbe_local_timer(watchdog processing) later. XXX pullup-8 To generate a diff of this commit: cvs rdiff -u -r1.130 -r1.131 src/sys/dev/pci/ixgbe/ixgbe.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/ixgbe/ixgbe.c diff -u src/sys/dev/pci/ixgbe/ixgbe.c:1.130 src/sys/dev/pci/ixgbe/ixgbe.c:1.131 --- src/sys/dev/pci/ixgbe/ixgbe.c:1.130 Wed Mar 7 08:01:32 2018 +++ src/sys/dev/pci/ixgbe/ixgbe.c Wed Mar 7 11:18:29 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: ixgbe.c,v 1.130 2018/03/07 08:01:32 msaitoh Exp $ */ +/* $NetBSD: ixgbe.c,v 1.131 2018/03/07 11:18:29 knakahara Exp $ */ /** @@ -4229,7 +4229,14 @@ ixgbe_local_timer1(void *arg) if (hung == adapter->num_queues) goto watchdog; else if (queues != 0) { /* Force an IRQ on queues with work */ - ixgbe_rearm_queues(adapter, queues); + que = adapter->queues; + for (int i = 0; i < adapter->num_queues; i++, que++) { + mutex_enter(&que->im_mtx); + if (que->im_nest == 0) +ixgbe_rearm_queues(adapter, +queues & ((u64)1 << i)); + mutex_exit(&que->im_mtx); + } } out:
CVS commit: src/tests/lib/libc/sys
Module Name:src Committed By: kamil Date: Wed Mar 7 10:53:55 UTC 2018 Modified Files: src/tests/lib/libc/sys: t_ptrace_wait.c Log Message: ATF: Correct a race bug in attach2 (t_ptrace_wait*) At the end of the test we resume a tracer and expect to observe it to collect the debuggee. We cannot from a parent point of view wait for collecting it with WNOHANG without a race. Remove the WNOHANG option from wait*(2) call. This corrects one type of race. This test is still racy for some other and unknown reason and this is being investigated. Sponsored by To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/tests/lib/libc/sys/t_ptrace_wait.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/lib/libc/sys/t_ptrace_wait.c diff -u src/tests/lib/libc/sys/t_ptrace_wait.c:1.23 src/tests/lib/libc/sys/t_ptrace_wait.c:1.24 --- src/tests/lib/libc/sys/t_ptrace_wait.c:1.23 Mon Mar 5 11:24:34 2018 +++ src/tests/lib/libc/sys/t_ptrace_wait.c Wed Mar 7 10:53:55 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: t_ptrace_wait.c,v 1.23 2018/03/05 11:24:34 kamil Exp $ */ +/* $NetBSD: t_ptrace_wait.c,v 1.24 2018/03/07 10:53:55 kamil Exp $ */ /*- * Copyright (c) 2016 The NetBSD Foundation, Inc. @@ -27,7 +27,7 @@ */ #include -__RCSID("$NetBSD: t_ptrace_wait.c,v 1.23 2018/03/05 11:24:34 kamil Exp $"); +__RCSID("$NetBSD: t_ptrace_wait.c,v 1.24 2018/03/07 10:53:55 kamil Exp $"); #include #include @@ -500,7 +500,7 @@ ATF_TC_BODY(attach2, tc) DPRINTF("Wait for tracee to finish its job and exit - calling %s()\n", TWAIT_FNAME); - TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(tracee, &status, WNOHANG), + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(tracee, &status, 0), tracee); validate_status_exited(status, exitval_tracee);
CVS commit: src/usr.sbin/ifwatchd
Module Name:src Committed By: roy Date: Wed Mar 7 10:06:41 UTC 2018 Modified Files: src/usr.sbin/ifwatchd: ifwatchd.c Log Message: Remove case labels we will never trigger due to filtering. To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.43 src/usr.sbin/ifwatchd/ifwatchd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/ifwatchd/ifwatchd.c diff -u src/usr.sbin/ifwatchd/ifwatchd.c:1.42 src/usr.sbin/ifwatchd/ifwatchd.c:1.43 --- src/usr.sbin/ifwatchd/ifwatchd.c:1.42 Tue Apr 11 14:21:35 2017 +++ src/usr.sbin/ifwatchd/ifwatchd.c Wed Mar 7 10:06:41 2018 @@ -1,6 +1,6 @@ -/* $NetBSD: ifwatchd.c,v 1.42 2017/04/11 14:21:35 roy Exp $ */ +/* $NetBSD: ifwatchd.c,v 1.43 2018/03/07 10:06:41 roy Exp $ */ #include -__RCSID("$NetBSD: ifwatchd.c,v 1.42 2017/04/11 14:21:35 roy Exp $"); +__RCSID("$NetBSD: ifwatchd.c,v 1.43 2018/03/07 10:06:41 roy Exp $"); /*- * Copyright (c) 2002, 2003 The NetBSD Foundation, Inc. @@ -267,18 +267,8 @@ dispatch(const void *msg, size_t len) case RTM_IFINFO: check_carrier(msg); break; - case RTM_ADD: - case RTM_DELETE: - case RTM_CHANGE: - case RTM_LOSING: - case RTM_REDIRECT: - case RTM_MISS: - case RTM_IEEE80211: - case RTM_ONEWADDR: - case RTM_ODELADDR: - case RTM_OCHGADDR: - break; default: + /* Should be impossible as we filter messages. */ if (verbose) printf("unknown message ignored (%d)\n", hd->rtm_type); break;
CVS commit: src/sys/arch/sun3/conf
Module Name:src Committed By: mrg Date: Wed Mar 7 09:44:22 UTC 2018 Modified Files: src/sys/arch/sun3/conf: GENERIC GENERIC3X Log Message: also disable SYSCTL_INCLUDE_DESCR. copy sun3 disables to sun3x mostly. it has the same ufsboot 2MB limit. To generate a diff of this commit: cvs rdiff -u -r1.177 -r1.178 src/sys/arch/sun3/conf/GENERIC cvs rdiff -u -r1.130 -r1.131 src/sys/arch/sun3/conf/GENERIC3X 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/sun3/conf/GENERIC diff -u src/sys/arch/sun3/conf/GENERIC:1.177 src/sys/arch/sun3/conf/GENERIC:1.178 --- src/sys/arch/sun3/conf/GENERIC:1.177 Sat Mar 3 03:19:36 2018 +++ src/sys/arch/sun3/conf/GENERIC Wed Mar 7 09:44:22 2018 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.177 2018/03/03 03:19:36 mrg Exp $ +# $NetBSD: GENERIC,v 1.178 2018/03/07 09:44:22 mrg Exp $ # # GENERIC machine description file # @@ -25,7 +25,7 @@ include "arch/sun3/conf/std.sun3" #options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.177 $" +#ident "GENERIC-$Revision: 1.178 $" makeoptions COPTS="-Os" # bootloader has size limit (~2MB) @@ -48,7 +48,7 @@ options SYSVSHM # System V shared memo #options INSECURE # disable kernel security level #options USERCONF # userconf(4) support options PIPE_SOCKETPAIR # smaller, but slower pipe(2) -options SYSCTL_INCLUDE_DESCR # Include sysctl descriptions in kernel +#options SYSCTL_INCLUDE_DESCR # Include sysctl descriptions in kernel # Alternate buffer queue strategies for better responsiveness under high # disk I/O load. Index: src/sys/arch/sun3/conf/GENERIC3X diff -u src/sys/arch/sun3/conf/GENERIC3X:1.130 src/sys/arch/sun3/conf/GENERIC3X:1.131 --- src/sys/arch/sun3/conf/GENERIC3X:1.130 Tue Jan 23 14:47:56 2018 +++ src/sys/arch/sun3/conf/GENERIC3X Wed Mar 7 09:44:22 2018 @@ -1,13 +1,13 @@ -# $NetBSD: GENERIC3X,v 1.130 2018/01/23 14:47:56 sevan Exp $ +# $NetBSD: GENERIC3X,v 1.131 2018/03/07 09:44:22 mrg Exp $ # GENERIC Sun3X (3/80, 3/470) # Supports root on: ie0, le0, sd*, ... include "arch/sun3/conf/std.sun3x" -options INCLUDE_CONFIG_FILE # embed config file in kernel binary +#options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC3X-$Revision: 1.130 $" +#ident "GENERIC3X-$Revision: 1.131 $" makeoptions COPTS="-Os" # bootloader has size limit (~2MB) @@ -29,8 +29,8 @@ options SYSVSHM # System V shared memo #options INSECURE # disable kernel security level #options USERCONF # userconf(4) support -#options PIPE_SOCKETPAIR # smaller, but slower pipe(2) -options SYSCTL_INCLUDE_DESCR # Include sysctl descriptions in kernel +options PIPE_SOCKETPAIR # smaller, but slower pipe(2) +#options SYSCTL_INCLUDE_DESCR # Include sysctl descriptions in kernel # Alternate buffer queue strategies for better responsiveness under high # disk I/O load. @@ -53,11 +53,13 @@ options DDB #options SCSIVERBOSE # Verbose SCSI errors # Compatibility options -include "conf/compat_netbsd10.config" -options COMPAT_AOUT_M68K # support for NetBSD a.out executables +# Originally in NetBSD 1.0, but limited to 6.0 for size. +#include "conf/compat_netbsd10.config" +include "conf/compat_netbsd60.config" +#options COMPAT_AOUT_M68K # support for NetBSD a.out executables #options COMPAT_LINUX # can run Linux/m68k executables -options EXEC_AOUT # support for a.out executables -options COMPAT_SUNOS # can run SunOS 4.1.1 executables +#options EXEC_AOUT # support for a.out executables +#options COMPAT_SUNOS # can run SunOS 4.1.1 executables #options COMPAT_SVR4 # can run SVR4 executables # Filesystem options @@ -65,28 +67,29 @@ file-system FFS # Berkeley Fast Filesys file-system NFS # Sun NFS client support file-system CD9660 # ISO 9660 + Rock Ridge file system file-system MSDOSFS # MS-DOS FAT file system -file-system FDESC # /dev/fd/* -file-system KERNFS # /kern +#file-system FDESC # /dev/fd/* +#file-system KERNFS # /kern file-system NULLFS # loopback file system #file-system OVERLAY # overlay file system file-system PROCFS # /proc #file-system UNION # union file system file-system MFS # memory-based filesystem file-system PTYFS # /dev/pts/N support -file-system TMPFS # Efficient memory file-system +# Disabled as 20KB larger than MFS. +#file-system TMPFS # Efficient memory file-system #file-system UDF # experimental - OSTA UDF CD/DVD file-system -options NFSSERVER # nfs server support +#options NFSSERVER # nfs server support #options QUOTA # legacy UFS quotas #options QUOTA2 # new, in-filesystem UFS quotas #options FFS_EI # FFS Endian Independent support -options WAPBL # File system journaling support +#options WAPBL # File system journaling support #options UFS_DIRHASH # UFS Large Directory Hashing - Experimental options FFS_NO_SNAPSHOT # No FFS snapshot support # Networ
CVS commit: [pgoyette-compat] src/sys
Module Name:src Committed By: pgoyette Date: Wed Mar 7 09:33:26 UTC 2018 Modified Files: src/sys/compat/common [pgoyette-compat]: compat_util.h src/sys/kern [pgoyette-compat]: exec_elf.c files.kern src/sys/sys [pgoyette-compat]: exec.h Added Files: src/sys/kern [pgoyette-compat]: subr_emul.c Log Message: Move the emul_find_root() and emul_find_interp() to a new file subr_emul.c The previous location was in exec_elf.c but that can get built multiple times for a single kernel, so we could end up with duplicate symbols. Thanks to ,rg@ for the heads-up. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.23.36.1 src/sys/compat/common/compat_util.h cvs rdiff -u -r1.93.2.1 -r1.93.2.2 src/sys/kern/exec_elf.c cvs rdiff -u -r1.16.2.3 -r1.16.2.4 src/sys/kern/files.kern cvs rdiff -u -r0 -r1.1.2.1 src/sys/kern/subr_emul.c cvs rdiff -u -r1.152 -r1.152.2.1 src/sys/sys/exec.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/common/compat_util.h diff -u src/sys/compat/common/compat_util.h:1.23 src/sys/compat/common/compat_util.h:1.23.36.1 --- src/sys/compat/common/compat_util.h:1.23 Thu Feb 21 01:39:54 2013 +++ src/sys/compat/common/compat_util.h Wed Mar 7 09:33:26 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: compat_util.h,v 1.23 2013/02/21 01:39:54 pgoyette Exp $ */ +/* $NetBSD: compat_util.h,v 1.23.36.1 2018/03/07 09:33:26 pgoyette Exp $ */ /*- * Copyright (c) 1994 The NetBSD Foundation, Inc. @@ -71,10 +71,6 @@ struct emul_flags_xtab { unsigned long nval; }; -void emul_find_root(struct lwp *, struct exec_package *); - -int emul_find_interp(struct lwp *, struct exec_package *, const char *); - unsigned long emul_flags_translate(const struct emul_flags_xtab *tab, unsigned long in, unsigned long *leftover); Index: src/sys/kern/exec_elf.c diff -u src/sys/kern/exec_elf.c:1.93.2.1 src/sys/kern/exec_elf.c:1.93.2.2 --- src/sys/kern/exec_elf.c:1.93.2.1 Tue Mar 6 10:37:41 2018 +++ src/sys/kern/exec_elf.c Wed Mar 7 09:33:26 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: exec_elf.c,v 1.93.2.1 2018/03/06 10:37:41 pgoyette Exp $ */ +/* $NetBSD: exec_elf.c,v 1.93.2.2 2018/03/07 09:33:26 pgoyette Exp $ */ /*- * Copyright (c) 1994, 2000, 2005, 2015 The NetBSD Foundation, Inc. @@ -57,7 +57,7 @@ */ #include -__KERNEL_RCSID(1, "$NetBSD: exec_elf.c,v 1.93.2.1 2018/03/06 10:37:41 pgoyette Exp $"); +__KERNEL_RCSID(1, "$NetBSD: exec_elf.c,v 1.93.2.2 2018/03/07 09:33:26 pgoyette Exp $"); #ifdef _KERNEL_OPT #include "opt_pax.h" @@ -1084,77 +1084,3 @@ elf_free_emul_arg(void *arg) KASSERT(ap != NULL); kmem_free(ap, sizeof(*ap)); } - -void -emul_find_root(struct lwp *l, struct exec_package *epp) -{ - struct vnode *vp; - const char *emul_path; - - if (epp->ep_emul_root != NULL) - /* We've already found it */ - return; - - emul_path = epp->ep_esch->es_emul->e_path; - if (emul_path == NULL) - /* Emulation doesn't have a root */ - return; - - if (namei_simple_kernel(emul_path, NSM_FOLLOW_NOEMULROOT, &vp) != 0) - /* emulation root doesn't exist */ - return; - - epp->ep_emul_root = vp; -} - -/* - * Search the alternate path for dynamic binary interpreter. If not found - * there, check if the interpreter exists in within 'proper' tree. - */ -int -emul_find_interp(struct lwp *l, struct exec_package *epp, const char *itp) -{ - int error; - struct pathbuf *pb; - struct nameidata nd; - unsigned int flags; - - pb = pathbuf_create(itp); - if (pb == NULL) { - return ENOMEM; - } - - /* If we haven't found the emulation root already, do so now */ - /* Maybe we should remember failures somehow ? */ - if (epp->ep_esch->es_emul->e_path != 0 && epp->ep_emul_root == NULL) - emul_find_root(l, epp); - - if (epp->ep_interp != NULL) - vrele(epp->ep_interp); - - /* We need to use the emulation root for the new program, - * not the one for the current process. */ - if (epp->ep_emul_root == NULL) - flags = FOLLOW; - else { - nd.ni_erootdir = epp->ep_emul_root; - /* hack: Pass in the emulation path for ktrace calls */ - nd.ni_next = epp->ep_esch->es_emul->e_path; - flags = FOLLOW | TRYEMULROOT | EMULROOTSET; - } - - NDINIT(&nd, LOOKUP, flags, pb); - error = namei(&nd); - if (error != 0) { - epp->ep_interp = NULL; - pathbuf_destroy(pb); - return error; - } - - /* Save interpreter in case we actually need to load it */ - epp->ep_interp = nd.ni_vp; - - pathbuf_destroy(pb); - - return 0; -} Index: src/sys/kern/files.kern diff -u src/sys/kern/files.kern:1.16.2.3 src/sys/kern/files.kern:1.16.2.4 --- src/sys/kern/files.kern:1.16.2.3 Tue Mar 6 10:37:41 2018 +++ src/sys/kern/files.kern Wed Mar 7 09:33:26 2018 @@ -1,4 +1,4 @@ -# $NetBSD: files.kern,v 1.16.2.3 2018/03/06 10:37:41 pgoyette Exp $ +# $NetBSD: files.kern,v 1.16.2.4 2018/03/07 09:33:26 pgoyette Exp $ # # kernel sources @@ -103,6 +103,7 @@ file kern/subr_device.c kern file kern/subr_devsw.c kern file kern/subr_disk.
CVS commit: src/sys/dev
Module Name:src Committed By: msaitoh Date: Wed Mar 7 09:25:56 UTC 2018 Modified Files: src/sys/dev/ic: nslm7x.c src/sys/dev/isa: wbsio.c wbsioreg.h Log Message: Add NCT6796D. Some functions of NCT6796D is extended from NCT6795D, but this commit doesn't support them yet. To generate a diff of this commit: cvs rdiff -u -r1.70 -r1.71 src/sys/dev/ic/nslm7x.c cvs rdiff -u -r1.22 -r1.23 src/sys/dev/isa/wbsio.c cvs rdiff -u -r1.7 -r1.8 src/sys/dev/isa/wbsioreg.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/dev/ic/nslm7x.c diff -u src/sys/dev/ic/nslm7x.c:1.70 src/sys/dev/ic/nslm7x.c:1.71 --- src/sys/dev/ic/nslm7x.c:1.70 Fri Aug 18 04:07:51 2017 +++ src/sys/dev/ic/nslm7x.c Wed Mar 7 09:25:56 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: nslm7x.c,v 1.70 2017/08/18 04:07:51 msaitoh Exp $ */ +/* $NetBSD: nslm7x.c,v 1.71 2018/03/07 09:25:56 msaitoh Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nslm7x.c,v 1.70 2017/08/18 04:07:51 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nslm7x.c,v 1.71 2018/03/07 09:25:56 msaitoh Exp $"); #include #include @@ -2155,6 +2155,7 @@ static const struct wb_product wbsio_pro { WBSIO_ID_NCT6792D,"NCT6792D", nct6779d_sensors, NULL }, { WBSIO_ID_NCT6793D,"NCT6793D", nct6779d_sensors, NULL }, { WBSIO_ID_NCT6795D,"NCT6795D", nct6779d_sensors, NULL }, +{ WBSIO_ID_NCT6796D,"NCT6796D", nct6779d_sensors, NULL }, { 0, NULL, NULL, NULL } }; Index: src/sys/dev/isa/wbsio.c diff -u src/sys/dev/isa/wbsio.c:1.22 src/sys/dev/isa/wbsio.c:1.23 --- src/sys/dev/isa/wbsio.c:1.22 Tue Feb 20 01:53:39 2018 +++ src/sys/dev/isa/wbsio.c Wed Mar 7 09:25:56 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: wbsio.c,v 1.22 2018/02/20 01:53:39 pgoyette Exp $ */ +/* $NetBSD: wbsio.c,v 1.23 2018/03/07 09:25:56 msaitoh Exp $ */ /* $OpenBSD: wbsio.c,v 1.10 2015/03/14 03:38:47 jsg Exp $ */ /* * Copyright (c) 2008 Mark Kettenis @@ -97,6 +97,7 @@ static const struct wbsio_product { { WBSIO_ID_NCT6792D, true, "NCT6792D" }, { WBSIO_ID_NCT6793D, true, "NCT6793D" }, { WBSIO_ID_NCT6795D, true, "NCT6795D" }, + { WBSIO_ID_NCT6796D, true, "NCT6796D" }, }; static const struct wbsio_product *wbsio_lookup(uint8_t id, uint8_t rev); Index: src/sys/dev/isa/wbsioreg.h diff -u src/sys/dev/isa/wbsioreg.h:1.7 src/sys/dev/isa/wbsioreg.h:1.8 --- src/sys/dev/isa/wbsioreg.h:1.7 Wed Dec 13 00:27:53 2017 +++ src/sys/dev/isa/wbsioreg.h Wed Mar 7 09:25:56 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: wbsioreg.h,v 1.7 2017/12/13 00:27:53 knakahara Exp $ */ +/* $NetBSD: wbsioreg.h,v 1.8 2018/03/07 09:25:56 msaitoh Exp $ */ /* $OpenBSD: wbsioreg.h,v 1.4 2015/01/02 23:02:54 chris Exp $ */ /* @@ -70,6 +70,7 @@ #define WBSIO_ID_NCT6792D 0xc91 #define WBSIO_ID_NCT6793D 0xd12 #define WBSIO_ID_NCT6795D 0xd35 +#define WBSIO_ID_NCT6796D 0xd42 /* Strapping Function Result */ #define WBSIO_SFR_24M48M 0x01
CVS commit: [pgoyette-compat] src/sys/net
Module Name:src Committed By: pgoyette Date: Wed Mar 7 08:56:44 UTC 2018 Modified Files: src/sys/net [pgoyette-compat]: if.c Log Message: Remove redundant assignment To generate a diff of this commit: cvs rdiff -u -r1.419.2.2 -r1.419.2.3 src/sys/net/if.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.c diff -u src/sys/net/if.c:1.419.2.2 src/sys/net/if.c:1.419.2.3 --- src/sys/net/if.c:1.419.2.2 Tue Mar 6 23:46:14 2018 +++ src/sys/net/if.c Wed Mar 7 08:56:44 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: if.c,v 1.419.2.2 2018/03/06 23:46:14 pgoyette Exp $ */ +/* $NetBSD: if.c,v 1.419.2.3 2018/03/07 08:56:44 pgoyette Exp $ */ /*- * Copyright (c) 1999, 2000, 2001, 2008 The NetBSD Foundation, Inc. @@ -90,7 +90,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.419.2.2 2018/03/06 23:46:14 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.419.2.3 2018/03/07 08:56:44 pgoyette Exp $"); #if defined(_KERNEL_OPT) #include "opt_inet.h" @@ -265,8 +265,6 @@ void stub_compat_ifreqo2n(struct oifreq void (*vec_compat_ifreqo2n)(struct oifreq *, struct ifreq *) = stub_compat_ifreqo2n; -int (*vec_compat_ifconf)(u_long, void *) = stub_compat_ifconf; - int stub_compat_ifconf(u_long, void *); int (*vec_compat_ifconf)(u_long, void *) = stub_compat_ifconf;
CVS commit: src/games/wtf
Module Name:src Committed By: eadler Date: Wed Mar 7 08:25:43 UTC 2018 Modified Files: src/games/wtf: wtf Log Message: wtf(6): use character classes ok pgoyette@ silence dholland@ To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/games/wtf/wtf Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/games/wtf/wtf diff -u src/games/wtf/wtf:1.23 src/games/wtf/wtf:1.24 --- src/games/wtf/wtf:1.23 Wed Mar 7 08:24:16 2018 +++ src/games/wtf/wtf Wed Mar 7 08:25:43 2018 @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: wtf,v 1.23 2018/03/07 08:24:16 eadler Exp $ +# $NetBSD: wtf,v 1.24 2018/03/07 08:25:43 eadler Exp $ # # Public domain # @@ -74,7 +74,7 @@ done rv=0 for i; do # Search acronym list first - target="$(echo "$i" | tr '[a-z]' '[A-Z]')" + target="$(echo "$i" | tr '[:lower:]' '[:upper:]')" ans="$(fgrep -h "$target" $acronyms 2>/dev/null \ | sed -ne "\|^$target[[:space:]]|s|^$target[[:space:]]*||p")" if [ -n "$ans" ] ; then
CVS commit: src/games/wtf
Module Name:src Committed By: eadler Date: Wed Mar 7 08:24:16 UTC 2018 Modified Files: src/games/wtf: wtf Log Message: wtf(6): quote "$f" ok pgoyette@ silence dholland@ To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/games/wtf/wtf Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/games/wtf/wtf diff -u src/games/wtf/wtf:1.22 src/games/wtf/wtf:1.23 --- src/games/wtf/wtf:1.22 Wed Jan 17 03:03:59 2018 +++ src/games/wtf/wtf Wed Mar 7 08:24:16 2018 @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: wtf,v 1.22 2018/01/17 03:03:59 pgoyette Exp $ +# $NetBSD: wtf,v 1.23 2018/03/07 08:24:16 eadler Exp $ # # Public domain # @@ -65,7 +65,7 @@ fi for f in $acronyms; do - if [ ! -f $f ]; then + if [ ! -f "$f" ]; then echo "$PROGNAME: cannot open acronym database file \`$f'" >&2 exit 1 fi
CVS commit: src/sys/dev/pci/ixgbe
Module Name:src Committed By: msaitoh Date: Wed Mar 7 08:01:32 UTC 2018 Modified Files: src/sys/dev/pci/ixgbe: ixgbe.c ixv.c Log Message: Don't increment que->req.ev_count in MSI-X interrupt because it's not reschedule. To generate a diff of this commit: cvs rdiff -u -r1.129 -r1.130 src/sys/dev/pci/ixgbe/ixgbe.c cvs rdiff -u -r1.85 -r1.86 src/sys/dev/pci/ixgbe/ixv.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/ixgbe/ixgbe.c diff -u src/sys/dev/pci/ixgbe/ixgbe.c:1.129 src/sys/dev/pci/ixgbe/ixgbe.c:1.130 --- src/sys/dev/pci/ixgbe/ixgbe.c:1.129 Wed Mar 7 03:29:10 2018 +++ src/sys/dev/pci/ixgbe/ixgbe.c Wed Mar 7 08:01:32 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: ixgbe.c,v 1.129 2018/03/07 03:29:10 msaitoh Exp $ */ +/* $NetBSD: ixgbe.c,v 1.130 2018/03/07 08:01:32 msaitoh Exp $ */ /** @@ -2527,7 +2527,6 @@ ixgbe_msix_que(void *arg) no_calc: if (more) { - que->req.ev_count++; if (adapter->txrx_use_workqueue) { /* * adapter->que_wq is bound to each CPU instead of Index: src/sys/dev/pci/ixgbe/ixv.c diff -u src/sys/dev/pci/ixgbe/ixv.c:1.85 src/sys/dev/pci/ixgbe/ixv.c:1.86 --- src/sys/dev/pci/ixgbe/ixv.c:1.85 Wed Mar 7 03:29:10 2018 +++ src/sys/dev/pci/ixgbe/ixv.c Wed Mar 7 08:01:32 2018 @@ -1,4 +1,4 @@ -/*$NetBSD: ixv.c,v 1.85 2018/03/07 03:29:10 msaitoh Exp $*/ +/*$NetBSD: ixv.c,v 1.86 2018/03/07 08:01:32 msaitoh Exp $*/ /** @@ -959,10 +959,9 @@ ixv_msix_que(void *arg) rxr->packets = 0; no_calc: - if (more) { - que->req.ev_count++; + if (more) softint_schedule(que->que_si); - } else /* Re-enable this interrupt */ + else /* Re-enable this interrupt */ ixv_enable_queue(adapter, que->msix); return 1;