CVS commit: src/sys/netinet6
Module Name:src Committed By: ozaki-r Date: Sun Dec 11 07:38:50 UTC 2016 Modified Files: src/sys/netinet6: in6.c nd6.c nd6.h nd6_nbr.c nd6_rtr.c Log Message: Add nd6_ prefix to exported functions To generate a diff of this commit: cvs rdiff -u -r1.222 -r1.223 src/sys/netinet6/in6.c cvs rdiff -u -r1.212 -r1.213 src/sys/netinet6/nd6.c cvs rdiff -u -r1.75 -r1.76 src/sys/netinet6/nd6.h cvs rdiff -u -r1.130 -r1.131 src/sys/netinet6/nd6_nbr.c cvs rdiff -u -r1.122 -r1.123 src/sys/netinet6/nd6_rtr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/netinet6/in6.c diff -u src/sys/netinet6/in6.c:1.222 src/sys/netinet6/in6.c:1.223 --- src/sys/netinet6/in6.c:1.222 Fri Nov 18 06:50:04 2016 +++ src/sys/netinet6/in6.c Sun Dec 11 07:38:50 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: in6.c,v 1.222 2016/11/18 06:50:04 knakahara Exp $ */ +/* $NetBSD: in6.c,v 1.223 2016/12/11 07:38:50 ozaki-r Exp $ */ /* $KAME: in6.c,v 1.198 2001/07/18 09:12:38 itojun Exp $ */ /* @@ -62,7 +62,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: in6.c,v 1.222 2016/11/18 06:50:04 knakahara Exp $"); +__KERNEL_RCSID(0, "$NetBSD: in6.c,v 1.223 2016/12/11 07:38:50 ozaki-r Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -722,7 +722,7 @@ in6_control1(struct socket *so, u_long c in6_purgeaddr(&ia->ia_ifa); ia = NULL; if (pr && pr->ndpr_refcnt == 0) - prelist_remove(pr); + nd6_prelist_remove(pr); run_hooks = true; break; } @@ -1390,11 +1390,11 @@ in6_unlink_ifa(struct in6_ifaddr *ia, st /* * Also, if the address being removed is autoconf'ed, call - * pfxlist_onlink_check() since the release might affect the status of + * nd6_pfxlist_onlink_check() since the release might affect the status of * other (detached) addresses. */ if ((ia->ia6_flags & IN6_IFF_AUTOCONF) != 0) - pfxlist_onlink_check(); + nd6_pfxlist_onlink_check(); IN6_ADDRLIST_ENTRY_DESTROY(ia); @@ -2149,7 +2149,7 @@ in6_if_link_up(struct ifnet *ifp) curlwp_bindx(bound); /* Restore any detached prefixes */ - pfxlist_onlink_check(); + nd6_pfxlist_onlink_check(); } void @@ -2176,7 +2176,7 @@ in6_if_link_down(struct ifnet *ifp) int s, bound; /* Any prefixes on this interface should be detached as well */ - pfxlist_onlink_check(); + nd6_pfxlist_onlink_check(); bound = curlwp_bind(); s = pserialize_read_enter(); Index: src/sys/netinet6/nd6.c diff -u src/sys/netinet6/nd6.c:1.212 src/sys/netinet6/nd6.c:1.213 --- src/sys/netinet6/nd6.c:1.212 Sun Dec 11 07:37:53 2016 +++ src/sys/netinet6/nd6.c Sun Dec 11 07:38:50 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: nd6.c,v 1.212 2016/12/11 07:37:53 ozaki-r Exp $ */ +/* $NetBSD: nd6.c,v 1.213 2016/12/11 07:38:50 ozaki-r Exp $ */ /* $KAME: nd6.c,v 1.279 2002/06/08 11:16:51 itojun Exp $ */ /* @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nd6.c,v 1.212 2016/12/11 07:37:53 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nd6.c,v 1.213 2016/12/11 07:38:50 ozaki-r Exp $"); #ifdef _KERNEL_OPT #include "opt_net_mpsafe.h" @@ -595,7 +595,7 @@ nd6_timer_work(struct work *wk, void *ar TAILQ_FOREACH_SAFE(dr, &nd_defrouter, dr_entry, next_dr) { if (dr->expire && dr->expire < time_uptime) { - defrtrlist_del(dr, NULL); + nd6_defrtrlist_del(dr, NULL); } } @@ -706,7 +706,7 @@ nd6_timer_work(struct work *wk, void *ar * separate. NEVER perform in6_purgeaddr here. */ - prelist_remove(pr); + nd6_prelist_remove(pr); } } @@ -844,7 +844,7 @@ nd6_purge(struct ifnet *ifp, struct in6_ if (dr->ifp == ifp) { KASSERT(ext != NULL); - defrtrlist_del(dr, ext); + nd6_defrtrlist_del(dr, ext); } } @@ -854,7 +854,7 @@ nd6_purge(struct ifnet *ifp, struct in6_ if (dr->ifp == ifp) { KASSERT(ext != NULL); - defrtrlist_del(dr, ext); + nd6_defrtrlist_del(dr, ext); } } @@ -876,7 +876,7 @@ nd6_purge(struct ifnet *ifp, struct in6_ * by itself. * (jin...@kame.net 20010129) */ - prelist_remove(pr); + nd6_prelist_remove(pr); } } @@ -889,7 +889,7 @@ nd6_purge(struct ifnet *ifp, struct in6_ struct nd_ifinfo *ndi = ND_IFINFO(ifp); if (ndi && nd6_accepts_rtadv(ndi)) { /* refresh default router list */ - defrouter_select(); + nd6_defrouter_select(); } } @@ -1168,7 +1168,7 @@ nd6_free(struct llentry *ln, int gc) if (!ip6_forwarding) { int s; s = splsoftnet(); - dr = defrouter_lookup(in6, ifp); + dr = nd6_defrouter_lookup(in6, ifp); if (dr != NULL && dr->expire && ln->ln_state == ND6_LLINFO_STALE && gc) { @@ -1196,20 +1196,20 @@ nd6_free(struct llentry *ln, int gc) if (ln->ln_router || dr) { /* - * We need to unlock to avoid a LOR with rt6_flush() + * We need to unlock to avoid a LOR with nd6_rt_flush() * with the rnh and for the calls to - * pfxlist_onlink_check() and defrouter_select() in the + * nd6_pfxlist_onlink_check() and nd6_defrout
CVS commit: src/sys/netinet6
Module Name:src Committed By: ozaki-r Date: Sun Dec 11 07:37:53 UTC 2016 Modified Files: src/sys/netinet6: nd6.c nd6.h nd6_rtr.c Log Message: Move default interface things from nd6_rtr.c to nd6.c To generate a diff of this commit: cvs rdiff -u -r1.211 -r1.212 src/sys/netinet6/nd6.c cvs rdiff -u -r1.74 -r1.75 src/sys/netinet6/nd6.h cvs rdiff -u -r1.121 -r1.122 src/sys/netinet6/nd6_rtr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/netinet6/nd6.c diff -u src/sys/netinet6/nd6.c:1.211 src/sys/netinet6/nd6.c:1.212 --- src/sys/netinet6/nd6.c:1.211 Mon Nov 14 02:34:19 2016 +++ src/sys/netinet6/nd6.c Sun Dec 11 07:37:53 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: nd6.c,v 1.211 2016/11/14 02:34:19 ozaki-r Exp $ */ +/* $NetBSD: nd6.c,v 1.212 2016/12/11 07:37:53 ozaki-r Exp $ */ /* $KAME: nd6.c,v 1.279 2002/06/08 11:16:51 itojun Exp $ */ /* @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nd6.c,v 1.211 2016/11/14 02:34:19 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nd6.c,v 1.212 2016/12/11 07:37:53 ozaki-r Exp $"); #ifdef _KERNEL_OPT #include "opt_net_mpsafe.h" @@ -125,6 +125,11 @@ static struct work nd6_timer_wk; static int fill_drlist(void *, size_t *, size_t); static int fill_prlist(void *, size_t *, size_t); +static struct ifnet *nd6_defifp; +static int nd6_defifindex; + +static int nd6_setdefaultiface(int); + MALLOC_DEFINE(M_IP6NDP, "NDP", "IPv6 Neighbour Discovery"); void @@ -2780,3 +2785,32 @@ fill_prlist(void *oldp, size_t *oldlenp, return error; } + +static int +nd6_setdefaultiface(int ifindex) +{ + ifnet_t *ifp; + int error = 0; + int s; + + s = pserialize_read_enter(); + ifp = if_byindex(ifindex); + if (ifp == NULL) { + pserialize_read_exit(s); + return EINVAL; + } + if (nd6_defifindex != ifindex) { + nd6_defifindex = ifindex; + nd6_defifp = nd6_defifindex > 0 ? ifp : NULL; + + /* + * Our current implementation assumes one-to-one maping between + * interfaces and links, so it would be natural to use the + * default interface as the default link. + */ + scope6_setdefault(nd6_defifp); + } + pserialize_read_exit(s); + + return (error); +} Index: src/sys/netinet6/nd6.h diff -u src/sys/netinet6/nd6.h:1.74 src/sys/netinet6/nd6.h:1.75 --- src/sys/netinet6/nd6.h:1.74 Sun Dec 11 07:36:55 2016 +++ src/sys/netinet6/nd6.h Sun Dec 11 07:37:53 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: nd6.h,v 1.74 2016/12/11 07:36:55 ozaki-r Exp $ */ +/* $NetBSD: nd6.h,v 1.75 2016/12/11 07:37:53 ozaki-r Exp $ */ /* $KAME: nd6.h,v 1.95 2002/06/08 11:31:06 itojun Exp $ */ /* @@ -354,7 +354,6 @@ extern int nd6_debug; do { if (nd6_debug) log(level, "%s: " fmt, __func__, ##args);} while (0) /* nd6_rtr.c */ -extern int nd6_defifindex; extern int ip6_desync_factor; /* seconds */ extern u_int32_t ip6_temp_preferred_lifetime; /* seconds */ extern u_int32_t ip6_temp_valid_lifetime; /* seconds */ @@ -441,7 +440,6 @@ void prelist_remove(struct nd_prefix *); void pfxlist_onlink_check(void); struct nd_defrouter *defrouter_lookup(const struct in6_addr *, struct ifnet *); void rt6_flush(struct in6_addr *, struct ifnet *); -int nd6_setdefaultiface(int); int in6_tmpifadd(const struct in6_ifaddr *, int, int); bool nd6_accepts_rtadv(const struct nd_ifinfo *); Index: src/sys/netinet6/nd6_rtr.c diff -u src/sys/netinet6/nd6_rtr.c:1.121 src/sys/netinet6/nd6_rtr.c:1.122 --- src/sys/netinet6/nd6_rtr.c:1.121 Sun Dec 11 07:36:55 2016 +++ src/sys/netinet6/nd6_rtr.c Sun Dec 11 07:37:53 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: nd6_rtr.c,v 1.121 2016/12/11 07:36:55 ozaki-r Exp $ */ +/* $NetBSD: nd6_rtr.c,v 1.122 2016/12/11 07:37:53 ozaki-r Exp $ */ /* $KAME: nd6_rtr.c,v 1.95 2001/02/07 08:09:47 itojun Exp $ */ /* @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nd6_rtr.c,v 1.121 2016/12/11 07:36:55 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nd6_rtr.c,v 1.122 2016/12/11 07:37:53 ozaki-r Exp $"); #include #include @@ -92,9 +92,6 @@ static struct nd_prefix *nd6_prefix_look extern int nd6_recalc_reachtm_interval; -static struct ifnet *nd6_defifp; -int nd6_defifindex; - int ip6_use_tempaddr = 0; int ip6_desync_factor; @@ -2203,32 +2200,3 @@ rt6_deleteroute_matcher(struct rtentry * return 1; } - -int -nd6_setdefaultiface(int ifindex) -{ - ifnet_t *ifp; - int error = 0; - int s; - - s = pserialize_read_enter(); - ifp = if_byindex(ifindex); - if (ifp == NULL) { - pserialize_read_exit(s); - return EINVAL; - } - if (nd6_defifindex != ifindex) { - nd6_defifindex = ifindex; - nd6_defifp = nd6_defifindex > 0 ? ifp : NULL; - - /* - * Our current implementation assumes one-to-one maping between - * interfaces and links, so it would be natural to use the - * default interface as the default link. - */ - scope6_setdefault(nd6_defifp); - } - pserialize_read_exit(s); - - return (error); -}
CVS commit: src/sys/netinet6
Module Name:src Committed By: ozaki-r Date: Sun Dec 11 07:36:55 UTC 2016 Modified Files: src/sys/netinet6: nd6.h nd6_rtr.c Log Message: Make some functions static To generate a diff of this commit: cvs rdiff -u -r1.73 -r1.74 src/sys/netinet6/nd6.h cvs rdiff -u -r1.120 -r1.121 src/sys/netinet6/nd6_rtr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/netinet6/nd6.h diff -u src/sys/netinet6/nd6.h:1.73 src/sys/netinet6/nd6.h:1.74 --- src/sys/netinet6/nd6.h:1.73 Sun Dec 11 07:36:20 2016 +++ src/sys/netinet6/nd6.h Sun Dec 11 07:36:55 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: nd6.h,v 1.73 2016/12/11 07:36:20 ozaki-r Exp $ */ +/* $NetBSD: nd6.h,v 1.74 2016/12/11 07:36:55 ozaki-r Exp $ */ /* $KAME: nd6.h,v 1.95 2002/06/08 11:31:06 itojun Exp $ */ /* @@ -434,18 +434,12 @@ void nd6_dad_duplicated(struct ifaddr *) /* nd6_rtr.c */ void nd6_rs_input(struct mbuf *, int, int); void nd6_ra_input(struct mbuf *, int, int); -void defrouter_addreq(struct nd_defrouter *); void defrouter_reset(void); void defrouter_select(void); void defrtrlist_del(struct nd_defrouter *, struct in6_ifextra *); void prelist_remove(struct nd_prefix *); -int nd6_prelist_add(struct nd_prefixctl *, struct nd_defrouter *, - struct nd_prefix **); -int nd6_prefix_onlink(struct nd_prefix *); -int nd6_prefix_offlink(struct nd_prefix *); void pfxlist_onlink_check(void); struct nd_defrouter *defrouter_lookup(const struct in6_addr *, struct ifnet *); -struct nd_prefix *nd6_prefix_lookup(struct nd_prefixctl *); void rt6_flush(struct in6_addr *, struct ifnet *); int nd6_setdefaultiface(int); int in6_tmpifadd(const struct in6_ifaddr *, int, int); Index: src/sys/netinet6/nd6_rtr.c diff -u src/sys/netinet6/nd6_rtr.c:1.120 src/sys/netinet6/nd6_rtr.c:1.121 --- src/sys/netinet6/nd6_rtr.c:1.120 Tue Nov 15 01:50:06 2016 +++ src/sys/netinet6/nd6_rtr.c Sun Dec 11 07:36:55 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: nd6_rtr.c,v 1.120 2016/11/15 01:50:06 ozaki-r Exp $ */ +/* $NetBSD: nd6_rtr.c,v 1.121 2016/12/11 07:36:55 ozaki-r Exp $ */ /* $KAME: nd6_rtr.c,v 1.95 2001/02/07 08:09:47 itojun Exp $ */ /* @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nd6_rtr.c,v 1.120 2016/11/15 01:50:06 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nd6_rtr.c,v 1.121 2016/12/11 07:36:55 ozaki-r Exp $"); #include #include @@ -73,6 +73,8 @@ static void pfxrtr_add(struct nd_prefix static void pfxrtr_del(struct nd_pfxrouter *); static struct nd_pfxrouter *find_pfxlist_reachable_router (struct nd_prefix *); + +static void defrouter_addreq(struct nd_defrouter *); static void defrouter_delreq(struct nd_defrouter *); static int in6_init_prefix_ltimes(struct nd_prefix *); @@ -82,6 +84,12 @@ static void purge_detached(struct ifnet static int rt6_deleteroute_matcher(struct rtentry *, void *); +static int nd6_prelist_add(struct nd_prefixctl *, struct nd_defrouter *, + struct nd_prefix **); +static int nd6_prefix_onlink(struct nd_prefix *); +static int nd6_prefix_offlink(struct nd_prefix *); +static struct nd_prefix *nd6_prefix_lookup(struct nd_prefixctl *); + extern int nd6_recalc_reachtm_interval; static struct ifnet *nd6_defifp; @@ -444,7 +452,7 @@ nd6_ra_input(struct mbuf *m, int off, in /* * default router list processing sub routines */ -void +static void defrouter_addreq(struct nd_defrouter *newdr) { union { @@ -873,7 +881,7 @@ pfxrtr_del(struct nd_pfxrouter *pfr) free(pfr, M_IP6NDP); } -struct nd_prefix * +static struct nd_prefix * nd6_prefix_lookup(struct nd_prefixctl *key) { struct nd_prefix *search; @@ -934,7 +942,8 @@ purge_detached(struct ifnet *ifp) prelist_remove(pr); } } -int + +static int nd6_prelist_add(struct nd_prefixctl *prc, struct nd_defrouter *dr, struct nd_prefix **newp) { @@ -1649,7 +1658,7 @@ pfxlist_onlink_check(void) } } -int +static int nd6_prefix_onlink(struct nd_prefix *pr) { struct ifaddr *ifa; @@ -1760,7 +1769,7 @@ nd6_prefix_onlink(struct nd_prefix *pr) return (error); } -int +static int nd6_prefix_offlink(struct nd_prefix *pr) { int error = 0;
CVS commit: src/sys/dev
Module Name:src Committed By: nat Date: Sun Dec 11 07:36:30 UTC 2016 Modified Files: src/sys/dev: audio.c Log Message: PR 50613: Onno van der Linden: unpausing audio(4) causes already written data to be dropped. Applied patch prepared by Onno. To generate a diff of this commit: cvs rdiff -u -r1.275 -r1.276 src/sys/dev/audio.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/audio.c diff -u src/sys/dev/audio.c:1.275 src/sys/dev/audio.c:1.276 --- src/sys/dev/audio.c:1.275 Sat Dec 10 22:37:12 2016 +++ src/sys/dev/audio.c Sun Dec 11 07:36:30 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: audio.c,v 1.275 2016/12/10 22:37:12 christos Exp $ */ +/* $NetBSD: audio.c,v 1.276 2016/12/11 07:36:30 nat Exp $ */ /*- * Copyright (c) 2016 Nathanial Sloss @@ -148,7 +148,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.275 2016/12/10 22:37:12 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.276 2016/12/11 07:36:30 nat Exp $"); #include "audio.h" #if NAUDIO > 0 @@ -4506,7 +4506,8 @@ cleanup: int init_error; mutex_enter(sc->sc_intr_lock); - init_error = audio_initbufs(sc, n); + init_error = (pausechange == 1 && reset == 0) ? 0 : + audio_initbufs(sc, n); if (init_error) goto err; if (vc->sc_mpr.blksize != oldpblksize || vc->sc_mrr.blksize != oldrblksize ||
CVS commit: src/sys/netinet6
Module Name:src Committed By: ozaki-r Date: Sun Dec 11 07:36:20 UTC 2016 Modified Files: src/sys/netinet6: nd6.h Log Message: Remove function declarations that have no actual definition To generate a diff of this commit: cvs rdiff -u -r1.72 -r1.73 src/sys/netinet6/nd6.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/netinet6/nd6.h diff -u src/sys/netinet6/nd6.h:1.72 src/sys/netinet6/nd6.h:1.73 --- src/sys/netinet6/nd6.h:1.72 Mon Apr 4 07:37:07 2016 +++ src/sys/netinet6/nd6.h Sun Dec 11 07:36:20 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: nd6.h,v 1.72 2016/04/04 07:37:07 ozaki-r Exp $ */ +/* $NetBSD: nd6.h,v 1.73 2016/12/11 07:36:20 ozaki-r Exp $ */ /* $KAME: nd6.h,v 1.95 2002/06/08 11:31:06 itojun Exp $ */ /* @@ -434,7 +434,6 @@ void nd6_dad_duplicated(struct ifaddr *) /* nd6_rtr.c */ void nd6_rs_input(struct mbuf *, int, int); void nd6_ra_input(struct mbuf *, int, int); -void prelist_del(struct nd_prefix *); void defrouter_addreq(struct nd_defrouter *); void defrouter_reset(void); void defrouter_select(void); @@ -447,7 +446,6 @@ int nd6_prefix_offlink(struct nd_prefix void pfxlist_onlink_check(void); struct nd_defrouter *defrouter_lookup(const struct in6_addr *, struct ifnet *); struct nd_prefix *nd6_prefix_lookup(struct nd_prefixctl *); -int in6_ifdel(struct ifnet *, struct in6_addr *); void rt6_flush(struct in6_addr *, struct ifnet *); int nd6_setdefaultiface(int); int in6_tmpifadd(const struct in6_ifaddr *, int, int);
CVS commit: src/sys/netinet6
Module Name:src Committed By: ozaki-r Date: Sun Dec 11 07:35:42 UTC 2016 Modified Files: src/sys/netinet6: icmp6.c Log Message: Correct sanity checks of icmp6_redirect_output - rt->rt_ifp is always non-NULL - Checking RTF_UP here is just racy and meaningless - The arguments should be non-NULL (at least for now) To generate a diff of this commit: cvs rdiff -u -r1.201 -r1.202 src/sys/netinet6/icmp6.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/netinet6/icmp6.c diff -u src/sys/netinet6/icmp6.c:1.201 src/sys/netinet6/icmp6.c:1.202 --- src/sys/netinet6/icmp6.c:1.201 Tue Nov 15 20:50:28 2016 +++ src/sys/netinet6/icmp6.c Sun Dec 11 07:35:42 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: icmp6.c,v 1.201 2016/11/15 20:50:28 mlelstv Exp $ */ +/* $NetBSD: icmp6.c,v 1.202 2016/12/11 07:35:42 ozaki-r Exp $ */ /* $KAME: icmp6.c,v 1.217 2001/06/20 15:03:29 jinmei Exp $ */ /* @@ -62,7 +62,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: icmp6.c,v 1.201 2016/11/15 20:50:28 mlelstv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: icmp6.c,v 1.202 2016/12/11 07:35:42 ozaki-r Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -2421,8 +2421,10 @@ icmp6_redirect_output(struct mbuf *m0, s goto fail; /* sanity check */ - if (!m0 || !rt || !(rt->rt_flags & RTF_UP) || !(ifp = rt->rt_ifp)) - goto fail; + KASSERT(m0 != NULL); + KASSERT(rt != NULL); + + ifp = rt->rt_ifp; /* * Address check:
CVS commit: src/sys/netinet
Module Name:src Committed By: ozaki-r Date: Sun Dec 11 07:34:14 UTC 2016 Modified Files: src/sys/netinet: icmp6.h Log Message: Remove unnecessary forward struct declarations To generate a diff of this commit: cvs rdiff -u -r1.47 -r1.48 src/sys/netinet/icmp6.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/netinet/icmp6.h diff -u src/sys/netinet/icmp6.h:1.47 src/sys/netinet/icmp6.h:1.48 --- src/sys/netinet/icmp6.h:1.47 Mon Jul 1 12:43:15 2013 +++ src/sys/netinet/icmp6.h Sun Dec 11 07:34:14 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: icmp6.h,v 1.47 2013/07/01 12:43:15 christos Exp $ */ +/* $NetBSD: icmp6.h,v 1.48 2016/12/11 07:34:14 ozaki-r Exp $ */ /* $KAME: icmp6.h,v 1.84 2003/04/23 10:26:51 itojun Exp $ */ @@ -655,8 +655,6 @@ struct icmp6_filter { #ifdef _KERNEL struct rtentry; -struct rttimer; -struct in6_multi; void icmp6_init(void); void icmp6_paramerror(struct mbuf *, int);
CVS commit: src/share/mk
Module Name:src Committed By: christos Date: Sun Dec 11 06:37:49 UTC 2016 Modified Files: src/share/mk: bsd.own.mk Log Message: complete the transition to binutils-2.27 To generate a diff of this commit: cvs rdiff -u -r1.998 -r1.999 src/share/mk/bsd.own.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.own.mk diff -u src/share/mk/bsd.own.mk:1.998 src/share/mk/bsd.own.mk:1.999 --- src/share/mk/bsd.own.mk:1.998 Sat Dec 10 22:40:57 2016 +++ src/share/mk/bsd.own.mk Sun Dec 11 01:37:49 2016 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.own.mk,v 1.998 2016/12/11 03:40:57 mrg Exp $ +# $NetBSD: bsd.own.mk,v 1.999 2016/12/11 06:37:49 christos Exp $ # This needs to be before bsd.init.mk .if defined(BSD_MK_COMPAT_FILE) @@ -144,17 +144,12 @@ EXTERNAL_GDB_SUBDIR= /does/not/exist # # What binutils is used? # -.if \ -${MACHINE_CPU} == "hppa" -HAVE_BINUTILS?= 226 -.else HAVE_BINUTILS?= 227 -.endif -.if ${HAVE_BINUTILS} == 226 -EXTERNAL_BINUTILS_SUBDIR= binutils.old -.elif ${HAVE_BINUTILS} == 227 +.if ${HAVE_BINUTILS} == 227 EXTERNAL_BINUTILS_SUBDIR= binutils +.elif ${HAVE_BINUTILS} == 226 +EXTERNAL_BINUTILS_SUBDIR= binutils.old .else EXTERNAL_BINUTILS_SUBDIR= /does/not/exist .endif
CVS commit: src/sys/dev
Module Name:src Committed By: christos Date: Sun Dec 11 06:30:11 UTC 2016 Modified Files: src/sys/dev: files.audio Log Message: one more vaudiospeaker remove To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/dev/files.audio 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/files.audio diff -u src/sys/dev/files.audio:1.6 src/sys/dev/files.audio:1.7 --- src/sys/dev/files.audio:1.6 Thu Dec 8 23:32:39 2016 +++ src/sys/dev/files.audio Sun Dec 11 01:30:11 2016 @@ -1,4 +1,4 @@ -# $NetBSD: files.audio,v 1.6 2016/12/09 04:32:39 christos Exp $ +# $NetBSD: files.audio,v 1.7 2016/12/11 06:30:11 christos Exp $ define audiobus { } define midibus { } @@ -26,7 +26,7 @@ define audiobell file dev/auconv.c auconv file dev/audio.c audio needs-flag -file dev/audiobell.c audiobell & vaudiospeaker needs-flag +file dev/audiobell.c audiobell needs-flag file dev/aurateconv.c aurateconv needs-flag file dev/auvolconv.c auvolconv file dev/midi.c midi needs-flag
CVS commit: src/sys/dev/raidframe
Module Name:src Committed By: nat Date: Sun Dec 11 05:27:00 UTC 2016 Modified Files: src/sys/dev/raidframe: rf_dagffrd.c rf_engine.c Log Message: Ensure variables are initialized. Fixes error due to -Wmaybe-unitialized. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/sys/dev/raidframe/rf_dagffrd.c cvs rdiff -u -r1.51 -r1.52 src/sys/dev/raidframe/rf_engine.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/raidframe/rf_dagffrd.c diff -u src/sys/dev/raidframe/rf_dagffrd.c:1.19 src/sys/dev/raidframe/rf_dagffrd.c:1.20 --- src/sys/dev/raidframe/rf_dagffrd.c:1.19 Sun Sep 15 12:23:06 2013 +++ src/sys/dev/raidframe/rf_dagffrd.c Sun Dec 11 05:27:00 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: rf_dagffrd.c,v 1.19 2013/09/15 12:23:06 martin Exp $ */ +/* $NetBSD: rf_dagffrd.c,v 1.20 2016/12/11 05:27:00 nat Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rf_dagffrd.c,v 1.19 2013/09/15 12:23:06 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_dagffrd.c,v 1.20 2016/12/11 05:27:00 nat Exp $"); #include @@ -139,6 +139,10 @@ rf_CreateNonredundantDAG(RF_Raid_t *raid n = asmap->numStripeUnitsAccessed; dag_h->creator = "NonredundantDAG"; + doFunc = rf_NullNodeFunc; + undoFunc = rf_NullNodeUndoFunc; + name = NULL; + RF_ASSERT(RF_IO_IS_R_OR_W(type)); switch (type) { case RF_IO_TYPE_READ: Index: src/sys/dev/raidframe/rf_engine.c diff -u src/sys/dev/raidframe/rf_engine.c:1.51 src/sys/dev/raidframe/rf_engine.c:1.52 --- src/sys/dev/raidframe/rf_engine.c:1.51 Sun Jan 3 08:17:24 2016 +++ src/sys/dev/raidframe/rf_engine.c Sun Dec 11 05:27:00 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: rf_engine.c,v 1.51 2016/01/03 08:17:24 mlelstv Exp $ */ +/* $NetBSD: rf_engine.c,v 1.52 2016/12/11 05:27:00 nat Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -55,7 +55,7 @@ / #include -__KERNEL_RCSID(0, "$NetBSD: rf_engine.c,v 1.51 2016/01/03 08:17:24 mlelstv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_engine.c,v 1.52 2016/12/11 05:27:00 nat Exp $"); #include @@ -229,14 +229,14 @@ NodeReady(RF_DagNode_t *node) { int ready; + ready = RF_FALSE; + switch (node->dagHdr->status) { case rf_enable: case rf_rollForward: if ((node->status == rf_wait) && (node->numAntecedents == node->numAntDone)) ready = RF_TRUE; - else - ready = RF_FALSE; break; case rf_rollBackward: RF_ASSERT(node->numSuccDone <= node->numSuccedents); @@ -245,8 +245,6 @@ NodeReady(RF_DagNode_t *node) if ((node->status == rf_good) && (node->numSuccDone == node->numSuccedents)) ready = RF_TRUE; - else - ready = RF_FALSE; break; default: printf("Execution engine found illegal DAG status in NodeReady\n");
CVS commit: src/share/mk
Module Name:src Committed By: mrg Date: Sun Dec 11 03:40:57 UTC 2016 Modified Files: src/share/mk: bsd.own.mk Log Message: aarch64 builds work with binutils 2.27. switch it. hppa builds, just needs a run time test if someone wants. then we're done! To generate a diff of this commit: cvs rdiff -u -r1.997 -r1.998 src/share/mk/bsd.own.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.own.mk diff -u src/share/mk/bsd.own.mk:1.997 src/share/mk/bsd.own.mk:1.998 --- src/share/mk/bsd.own.mk:1.997 Sun Dec 11 02:38:54 2016 +++ src/share/mk/bsd.own.mk Sun Dec 11 03:40:57 2016 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.own.mk,v 1.997 2016/12/11 02:38:54 mrg Exp $ +# $NetBSD: bsd.own.mk,v 1.998 2016/12/11 03:40:57 mrg Exp $ # This needs to be before bsd.init.mk .if defined(BSD_MK_COMPAT_FILE) @@ -145,7 +145,6 @@ EXTERNAL_GDB_SUBDIR= /does/not/exist # What binutils is used? # .if \ -${MACHINE_CPU} == "aarch64" || \ ${MACHINE_CPU} == "hppa" HAVE_BINUTILS?= 226 .else
CVS commit: src/tests/lib/libc/gen/exect
Module Name:src Committed By: kamil Date: Sun Dec 11 03:38:09 UTC 2016 Modified Files: src/tests/lib/libc/gen/exect: t_exect.c Log Message: Skip t_exect test because it makes test machines to hang exect(NULL,NULL,NULL) generates 15859 times SIGTRAP on amd64 Currently exect(3) is misdesigned -- see PR port-amd64/51700 and it needs to be redone from scratch. This test affects amd64 releng machines causing tests to hang or fail. As there is little point to test interface that is still not, designed and implemented and implemented and is breaking tests - skip it unconditionally for all ports. Sponsored by To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/tests/lib/libc/gen/exect/t_exect.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/gen/exect/t_exect.c diff -u src/tests/lib/libc/gen/exect/t_exect.c:1.4 src/tests/lib/libc/gen/exect/t_exect.c:1.5 --- src/tests/lib/libc/gen/exect/t_exect.c:1.4 Fri Dec 9 08:34:37 2016 +++ src/tests/lib/libc/gen/exect/t_exect.c Sun Dec 11 03:38:09 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: t_exect.c,v 1.4 2016/12/09 08:34:37 kamil Exp $ */ +/* $NetBSD: t_exect.c,v 1.5 2016/12/11 03:38:09 kamil Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -57,12 +57,17 @@ ATF_TC_BODY(t_exect_null, tc) { struct sigaction act; -#if defined(__x86_64__) /* - * exect(NULL,NULL,NULL) generates 15859 times SIGTRAP on amd64 + * Currently exect(3) is misdesigned -- see PR port-amd64/51700 and it + * needs to be redone from scratch. + * + * This test affects amd64 releng machines causing tests to hang or + * fail. As there is little point to test interface that is still not, + * designed and implemented and is breaking tests - skip it + * unconditionally for all ports. */ - atf_tc_expect_fail("PR port-amd64/51700"); -#endif + + atf_tc_skip("exect(3) misdesigned and hangs - PR port-amd64/51700"); ATF_REQUIRE(sigemptyset(&act.sa_mask) == 0); act.sa_sigaction = sigtrap_handler;
CVS commit: src/share/mk
Module Name:src Committed By: mrg Date: Sun Dec 11 02:38:54 UTC 2016 Modified Files: src/share/mk: bsd.own.mk Log Message: switch mips (32 bit) and arm to binutils 2.27. hppa and aarch64 left. To generate a diff of this commit: cvs rdiff -u -r1.996 -r1.997 src/share/mk/bsd.own.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.own.mk diff -u src/share/mk/bsd.own.mk:1.996 src/share/mk/bsd.own.mk:1.997 --- src/share/mk/bsd.own.mk:1.996 Sat Dec 10 23:40:03 2016 +++ src/share/mk/bsd.own.mk Sun Dec 11 02:38:54 2016 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.own.mk,v 1.996 2016/12/10 23:40:03 mrg Exp $ +# $NetBSD: bsd.own.mk,v 1.997 2016/12/11 02:38:54 mrg Exp $ # This needs to be before bsd.init.mk .if defined(BSD_MK_COMPAT_FILE) @@ -146,10 +146,7 @@ EXTERNAL_GDB_SUBDIR= /does/not/exist # .if \ ${MACHINE_CPU} == "aarch64" || \ -${MACHINE_CPU} == "arm" || \ -${MACHINE_CPU} == "hppa" || \ -${MACHINE_ARCH} == "mipsel" || \ -${MACHINE_ARCH} == "mipseb" +${MACHINE_CPU} == "hppa" HAVE_BINUTILS?= 226 .else HAVE_BINUTILS?= 227
CVS commit: src/external/gpl3/binutils
Module Name:src Committed By: mrg Date: Sun Dec 11 02:13:35 UTC 2016 Modified Files: src/external/gpl3/binutils/lib/libbfd/arch/hppa: bfd.h bfdver.h config.h src/external/gpl3/binutils/lib/libopcodes/arch/hppa: config.h src/external/gpl3/binutils/usr.bin/common/arch/hppa: config.h defs.mk src/external/gpl3/binutils/usr.bin/gas/arch/hppa: config.h src/external/gpl3/binutils/usr.bin/gprof/arch/hppa: gconfig.h src/external/gpl3/binutils/usr.bin/ld/arch/hppa: config.h Log Message: mknative-binutils 2.27 and hppa. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 \ src/external/gpl3/binutils/lib/libbfd/arch/hppa/bfd.h cvs rdiff -u -r1.9 -r1.10 \ src/external/gpl3/binutils/lib/libbfd/arch/hppa/bfdver.h cvs rdiff -u -r1.5 -r1.6 \ src/external/gpl3/binutils/lib/libbfd/arch/hppa/config.h cvs rdiff -u -r1.5 -r1.6 \ src/external/gpl3/binutils/lib/libopcodes/arch/hppa/config.h cvs rdiff -u -r1.5 -r1.6 \ src/external/gpl3/binutils/usr.bin/common/arch/hppa/config.h cvs rdiff -u -r1.7 -r1.8 \ src/external/gpl3/binutils/usr.bin/common/arch/hppa/defs.mk cvs rdiff -u -r1.5 -r1.6 \ src/external/gpl3/binutils/usr.bin/gas/arch/hppa/config.h cvs rdiff -u -r1.5 -r1.6 \ src/external/gpl3/binutils/usr.bin/gprof/arch/hppa/gconfig.h cvs rdiff -u -r1.5 -r1.6 \ src/external/gpl3/binutils/usr.bin/ld/arch/hppa/config.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/binutils/lib/libbfd/arch/hppa/bfd.h diff -u src/external/gpl3/binutils/lib/libbfd/arch/hppa/bfd.h:1.6 src/external/gpl3/binutils/lib/libbfd/arch/hppa/bfd.h:1.7 --- src/external/gpl3/binutils/lib/libbfd/arch/hppa/bfd.h:1.6 Fri Jan 29 17:30:22 2016 +++ src/external/gpl3/binutils/lib/libbfd/arch/hppa/bfd.h Sun Dec 11 02:13:34 2016 @@ -11,7 +11,7 @@ /* Main header file for the bfd library -- portable access to object files. - Copyright (C) 1990-2015 Free Software Foundation, Inc. + Copyright (C) 1990-2016 Free Software Foundation, Inc. Contributed by Cygnus Support. @@ -522,7 +522,6 @@ extern void warn_deprecated (const char #define bfd_get_file_flags(abfd) ((abfd)->flags) #define bfd_applicable_file_flags(abfd) ((abfd)->xvec->object_flags) #define bfd_applicable_section_flags(abfd) ((abfd)->xvec->section_flags) -#define bfd_my_archive(abfd) ((abfd)->my_archive) #define bfd_has_map(abfd) ((abfd)->has_armap) #define bfd_is_thin_archive(abfd) ((abfd)->is_thin_archive) @@ -914,6 +913,9 @@ extern bfd_boolean bfd_elf32_arm_get_bfd extern bfd_boolean bfd_elf32_arm_add_glue_sections_to_bfd (bfd *, struct bfd_link_info *); +extern void bfd_elf32_arm_keep_private_stub_output_sections + (struct bfd_link_info *); + /* ELF ARM mapping symbol support. */ #define BFD_ARM_SPECIAL_SYM_TYPE_MAP (1 << 0) #define BFD_ARM_SPECIAL_SYM_TYPE_TAG (1 << 1) @@ -945,7 +947,8 @@ extern void elf32_arm_next_input_section (struct bfd_link_info *, struct bfd_section *); extern bfd_boolean elf32_arm_size_stubs (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma, - struct bfd_section * (*) (const char *, struct bfd_section *, unsigned int), + struct bfd_section * (*) (const char *, struct bfd_section *, + struct bfd_section *, unsigned int), void (*) (void)); extern bfd_boolean elf32_arm_build_stubs (struct bfd_link_info *); @@ -958,13 +961,6 @@ extern bfd_boolean elf32_arm_fix_exidx_c extern bfd_boolean elf32_tic6x_fix_exidx_coverage (struct bfd_section **, unsigned int, struct bfd_link_info *, bfd_boolean); -/* PowerPC @tls opcode transform/validate. */ -extern unsigned int _bfd_elf_ppc_at_tls_transform - (unsigned int, unsigned int); -/* PowerPC @tprel opcode transform/validate. */ -extern unsigned int _bfd_elf_ppc_at_tprel_transform - (unsigned int, unsigned int); - extern void bfd_elf64_aarch64_init_maps (bfd *); @@ -972,10 +968,10 @@ extern void bfd_elf32_aarch64_init_maps (bfd *); extern void bfd_elf64_aarch64_set_options - (bfd *, struct bfd_link_info *, int, int, int, int, int); + (bfd *, struct bfd_link_info *, int, int, int, int, int, int); extern void bfd_elf32_aarch64_set_options - (bfd *, struct bfd_link_info *, int, int, int, int, int); + (bfd *, struct bfd_link_info *, int, int, int, int, int, int); /* ELF AArch64 mapping symbol support. */ #define BFD_AARCH64_SPECIAL_SYM_TYPE_MAP (1 << 0) @@ -1436,6 +1432,9 @@ typedef struct bfd_section when memory read flag isn't set. */ #define SEC_COFF_NOREAD 0x4000 + /* Indicate that section has the no read flag set. */ +#define SEC_ELF_NOREAD 0x8000 + /* End of section flags. */ /* Some internal packed boolean fields. */ @@ -1502,7 +1501,7 @@ typedef struct bfd_section information. */ bfd_vma lma; - /* The size of the section in octets, as it will be output. + /* The size of the section in
CVS commit: src/external/gpl3/binutils
Module Name:src Committed By: mrg Date: Sun Dec 11 01:53:44 UTC 2016 Modified Files: src/external/gpl3/binutils/lib/libbfd/arch/aarch64: bfd.h bfdver.h config.h src/external/gpl3/binutils/lib/libbfd/arch/mipseb: bfd.h bfdver.h config.h defs.mk src/external/gpl3/binutils/lib/libbfd/arch/mipsel: bfd.h bfdver.h config.h defs.mk src/external/gpl3/binutils/lib/libopcodes/arch/aarch64: config.h src/external/gpl3/binutils/lib/libopcodes/arch/mipseb: config.h src/external/gpl3/binutils/lib/libopcodes/arch/mipsel: config.h src/external/gpl3/binutils/usr.bin/common/arch/aarch64: config.h defs.mk src/external/gpl3/binutils/usr.bin/common/arch/mipseb: config.h defs.mk src/external/gpl3/binutils/usr.bin/common/arch/mipsel: config.h defs.mk src/external/gpl3/binutils/usr.bin/gas/arch/aarch64: config.h src/external/gpl3/binutils/usr.bin/gas/arch/mipseb: config.h src/external/gpl3/binutils/usr.bin/gas/arch/mipsel: config.h src/external/gpl3/binutils/usr.bin/gprof/arch/aarch64: gconfig.h src/external/gpl3/binutils/usr.bin/gprof/arch/mipseb: gconfig.h src/external/gpl3/binutils/usr.bin/gprof/arch/mipsel: gconfig.h src/external/gpl3/binutils/usr.bin/ld/arch/aarch64: config.h src/external/gpl3/binutils/usr.bin/ld/arch/mipseb: config.h src/external/gpl3/binutils/usr.bin/ld/arch/mipsel: config.h Log Message: regen binutils mknative files for binutils 2.27 on mipsel, mipseb and aarch64. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 \ src/external/gpl3/binutils/lib/libbfd/arch/aarch64/bfd.h cvs rdiff -u -r1.3 -r1.4 \ src/external/gpl3/binutils/lib/libbfd/arch/aarch64/bfdver.h \ src/external/gpl3/binutils/lib/libbfd/arch/aarch64/config.h cvs rdiff -u -r1.8 -r1.9 \ src/external/gpl3/binutils/lib/libbfd/arch/mipseb/bfd.h cvs rdiff -u -r1.11 -r1.12 \ src/external/gpl3/binutils/lib/libbfd/arch/mipseb/bfdver.h cvs rdiff -u -r1.7 -r1.8 \ src/external/gpl3/binutils/lib/libbfd/arch/mipseb/config.h cvs rdiff -u -r1.5 -r1.6 \ src/external/gpl3/binutils/lib/libbfd/arch/mipseb/defs.mk cvs rdiff -u -r1.8 -r1.9 \ src/external/gpl3/binutils/lib/libbfd/arch/mipsel/bfd.h cvs rdiff -u -r1.11 -r1.12 \ src/external/gpl3/binutils/lib/libbfd/arch/mipsel/bfdver.h cvs rdiff -u -r1.7 -r1.8 \ src/external/gpl3/binutils/lib/libbfd/arch/mipsel/config.h cvs rdiff -u -r1.5 -r1.6 \ src/external/gpl3/binutils/lib/libbfd/arch/mipsel/defs.mk cvs rdiff -u -r1.3 -r1.4 \ src/external/gpl3/binutils/lib/libopcodes/arch/aarch64/config.h cvs rdiff -u -r1.7 -r1.8 \ src/external/gpl3/binutils/lib/libopcodes/arch/mipseb/config.h cvs rdiff -u -r1.7 -r1.8 \ src/external/gpl3/binutils/lib/libopcodes/arch/mipsel/config.h cvs rdiff -u -r1.3 -r1.4 \ src/external/gpl3/binutils/usr.bin/common/arch/aarch64/config.h \ src/external/gpl3/binutils/usr.bin/common/arch/aarch64/defs.mk cvs rdiff -u -r1.7 -r1.8 \ src/external/gpl3/binutils/usr.bin/common/arch/mipseb/config.h cvs rdiff -u -r1.9 -r1.10 \ src/external/gpl3/binutils/usr.bin/common/arch/mipseb/defs.mk cvs rdiff -u -r1.7 -r1.8 \ src/external/gpl3/binutils/usr.bin/common/arch/mipsel/config.h cvs rdiff -u -r1.9 -r1.10 \ src/external/gpl3/binutils/usr.bin/common/arch/mipsel/defs.mk cvs rdiff -u -r1.3 -r1.4 \ src/external/gpl3/binutils/usr.bin/gas/arch/aarch64/config.h cvs rdiff -u -r1.7 -r1.8 \ src/external/gpl3/binutils/usr.bin/gas/arch/mipseb/config.h cvs rdiff -u -r1.7 -r1.8 \ src/external/gpl3/binutils/usr.bin/gas/arch/mipsel/config.h cvs rdiff -u -r1.3 -r1.4 \ src/external/gpl3/binutils/usr.bin/gprof/arch/aarch64/gconfig.h cvs rdiff -u -r1.7 -r1.8 \ src/external/gpl3/binutils/usr.bin/gprof/arch/mipseb/gconfig.h cvs rdiff -u -r1.7 -r1.8 \ src/external/gpl3/binutils/usr.bin/gprof/arch/mipsel/gconfig.h cvs rdiff -u -r1.3 -r1.4 \ src/external/gpl3/binutils/usr.bin/ld/arch/aarch64/config.h cvs rdiff -u -r1.7 -r1.8 \ src/external/gpl3/binutils/usr.bin/ld/arch/mipseb/config.h cvs rdiff -u -r1.7 -r1.8 \ src/external/gpl3/binutils/usr.bin/ld/arch/mipsel/config.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/binutils/lib/libbfd/arch/aarch64/bfd.h diff -u src/external/gpl3/binutils/lib/libbfd/arch/aarch64/bfd.h:1.2 src/external/gpl3/binutils/lib/libbfd/arch/aarch64/bfd.h:1.3 --- src/external/gpl3/binutils/lib/libbfd/arch/aarch64/bfd.h:1.2 Tue Apr 5 09:54:26 2016 +++ src/external/gpl3/binutils/lib/libbfd/arch/aarch64/bfd.h Sun Dec 11 01:53:43 2016 @@ -11,7 +11,7 @@ /* Main header file for the bfd library -- portable access to object files. - Copyright (C) 1990-2015 Free Software Foundation, Inc. + Copyright (C) 1990-2016 Free Software Foundation, Inc. Contributed by Cygnus Support.
CVS commit: src/doc
Module Name:src Committed By: mrg Date: Sun Dec 11 01:44:32 UTC 2016 Modified Files: src/doc: CHANGES Log Message: add a bunch of stuff i've done since netbsd-7. fix a few entries. To generate a diff of this commit: cvs rdiff -u -r1.2220 -r1.2221 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES diff -u src/doc/CHANGES:1.2220 src/doc/CHANGES:1.2221 --- src/doc/CHANGES:1.2220 Sun Dec 11 00:25:32 2016 +++ src/doc/CHANGES Sun Dec 11 01:44:32 2016 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2220 $> +# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2221 $> # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -133,6 +133,7 @@ Changes from NetBSD 7.0 to NetBSD 8.0: dhcpcd(8): Import dhcpcd-6.7.1. [roy 20150130] zoneinfo: Import tzdata2015a. [apb 20150131] libc: Import tzcode2015a. [christos 20150131] + tetris(6): Add down key support, as 'n'. [mrg 20150218] bind: patch to version 9.10.1-P2. [spz 20150221] network: introduce RTF_LOCAL for local address routes. [roy 20150226] evbarm: Add support for RPI2. [skrll 20150304] @@ -160,6 +161,11 @@ Changes from NetBSD 7.0 to NetBSD 8.0: netinet: Added IN_IFF_TENTATIVE, IN_IFF_DUPLICATED and IN_IFF_DETACHED. IPV4 addresses now perform DAD using ARP as described in RFC 5227. [roy 20150502] + amd64: Bump CHILD_MAX and OPEN_MAX. [mrg 20150507] + i386: Bump CHILD_MAX and OPEN_MAX. [mrg 20150507] + aarch64: Bump CHILD_MAX and OPEN_MAX. [mrg 20150507] + evbarm: Bump CHILD_MAX and OPEN_MAX. [mrg 20150507] + sparc64: Bump CHILD_MAX and OPEN_MAX. [mrg 20150507] dhcpcd(8): Import dhcpcd-6.9.0. [roy 20150517] FFS: General improvements in the superblock parser. [maxv 20150523] openssl: Import openssl 1.0.1n [christos 20150612] @@ -174,6 +180,7 @@ Changes from NetBSD 7.0 to NetBSD 8.0: iostat(8): Support fnmatch(3) patterns for disknames. [mrg 20150709] openssl: Import openssl 1.0.1p [christos 20150709] ntp: Import ntp 4.2.8p3. [christos 20150710] + X11: Delete XFree86 sources. [mrg 20150723] arm: Add support for NVIDIA Tegra K1 SoC. [jmcneill 20150725] evbarm: Add support for NVIDIA Jetson TK1. [jmcneill 20150725] bind: Import version 9.10.2-P3. [christos 20150728] @@ -203,6 +210,7 @@ Changes from NetBSD 7.0 to NetBSD 8.0: dhcpcd: Import dhcpcd 6.9.3. [roy 20150904] ftp(1): SNI support for https. [wiz 20150912] netstat(1): Now knows how tall the display is. [mrg 20150919] + atactl(8): Add smart codes 210, 246, 247 and 248. [mrg 20150920] libproc, librtld_db: Added from FreeBSD [christos 20150924] dtrace: Updated from FreeBSD [christos 20150924] resolvconf: Import openresolv-3.7.1 [roy 20150929] @@ -213,6 +221,8 @@ Changes from NetBSD 7.0 to NetBSD 8.0: libc: Update to tzcode2015g. [christos 20151009] wm(4): Support RX multiqueue. [knakahara,msaitoh 20151013] ntp: Import ntp 4.2.8p4. [christos 20151023] + scdebug: Add a way to have system call debug logs go to a kernel + history. [mrg 20151028] vioscsi(4): Add driver for virtio SCSI devices [christos 20151030] omapgpio(4): Add support for TI AM335x GPIO. [jmcneill 20151101] libc/ti-rpc: Remove FD_SETSIZE limit; provide MT support for svc_run() @@ -231,8 +241,6 @@ Changes from NetBSD 7.0 to NetBSD 8.0: [ozaki-r 20151125] dhcpcd: Import dhcpcd 6.9.4. [roy 20151130] openssl: Import openssl 1.0.1q [christos 20151206] - network: Packet input processing (except for bpf) never runs in - hardware interrupt. [ozaki-r 20160209] ip6addrctl: Import from FreeBSD [christos 20151212] adm1026hm(4): Add driver for ADM1026 i2c hardware monitor [jdc 20151216] @@ -257,9 +265,12 @@ Changes from NetBSD 7.0 to NetBSD 8.0: gettext: Upgrade to 0.16.1 [christos 20160112] bind: Import version 9.10.3-P3. [christos 20160119] dhcpcd: Import dhcpcd 6.10.1. [roy 20160120] + gcc: Import GCC 5.3.0. [mrg 20160123] lua: Updated to 5.3.2 [lneto 20160128] openssl: Import openssl 1.0.1r [christos 20160130] gdb(1): Updated to 7.10.1. [christos 20160202] + network: Packet input processing (except for bpf) never runs in + hardware interrupt. [ozaki-r 20160209] elftoolchain: Import FreeBSD-2016-02-19. [christos 20160219] openresolv: Import openresolv-3.7.3. [roy 20160222] mv(1): Add SIGINFO support. [mrg 20160228] @@ -272,6 +283,7 @@ Changes from NetBSD 7.0 to NetBSD 8.0: wpa_supplicant(8): Added interface matching rules [roy 20160323] lua: Applied second and third patch from http://lua.org/bugs.html [mbalmer 20160325] + i366: Add a GENERIC_PAE kernel that supports >4GB systems. [mrg 20160326] network: Drop the concept of cloning/cloned routes [ozaki-r 20160404] network: Remove RTF_CLONING, RTF_XRESOLVE, RTF_LLINFO, RTF_CLONED and RTM_RESOLVE [ozaki-r 20160404] @@ -290,7 +302,7 @@ Changes from NetBSD 7.0 to NetBSD 8.0: dhcpcd(8): Import dh
CVS commit: src/usr.sbin/sysinst
Module Name:src Committed By: alnsn Date: Sun Dec 11 00:56:34 UTC 2016 Modified Files: src/usr.sbin/sysinst: menus.mi partman.c Log Message: Add aes-xts to sysinst(8). To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/usr.sbin/sysinst/menus.mi cvs rdiff -u -r1.13 -r1.14 src/usr.sbin/sysinst/partman.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/sysinst/menus.mi diff -u src/usr.sbin/sysinst/menus.mi:1.10 src/usr.sbin/sysinst/menus.mi:1.11 --- src/usr.sbin/sysinst/menus.mi:1.10 Mon May 11 13:07:57 2015 +++ src/usr.sbin/sysinst/menus.mi Sun Dec 11 00:56:34 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: menus.mi,v 1.10 2015/05/11 13:07:57 martin Exp $ */ +/* $NetBSD: menus.mi,v 1.11 2016/12/11 00:56:34 alnsn Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -731,6 +731,7 @@ menu raidlevel; option MSG_raid5, exit, action { *(int *)arg = 5; }; menu cgd_enctype; + option "aes-xts", exit, action { *(const char**)arg = "aes-xts"; }; option "aes-cbc", exit, action { *(const char**)arg = "aes-cbc"; }; option "3des-cbc", exit, action { *(const char**)arg = "3des-cbc"; }; option "blowfish-cbc", exit, action { *(const char**)arg = "blowfish-cbc"; }; Index: src/usr.sbin/sysinst/partman.c diff -u src/usr.sbin/sysinst/partman.c:1.13 src/usr.sbin/sysinst/partman.c:1.14 --- src/usr.sbin/sysinst/partman.c:1.13 Mon May 30 17:03:21 2016 +++ src/usr.sbin/sysinst/partman.c Sun Dec 11 00:56:34 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: partman.c,v 1.13 2016/05/30 17:03:21 dholland Exp $ */ +/* $NetBSD: partman.c,v 1.14 2016/12/11 00:56:34 alnsn Exp $ */ /* * Copyright 2012 Eugene Lozovoy @@ -1023,12 +1023,19 @@ pm_cgd_set_value(menudesc *m, void *arg) case PMC_MENU_ENCTYPE: process_menu(MENU_cgd_enctype, &retstring); dev_ptr->enc_type = retstring; + if (! strcmp(retstring, "aes-xts")) +dev_ptr->key_size = 256; + if (! strcmp(retstring, "aes-cbc")) +dev_ptr->key_size = 192; if (! strcmp(retstring, "blowfish-cbc")) dev_ptr->key_size = 128; if (! strcmp(retstring, "3des-cbc")) dev_ptr->key_size = 192; return 0; case PMC_MENU_KEYSIZE: + if (! strcmp(dev_ptr->enc_type, "aes-xts")) +dev_ptr->key_size += + (dev_ptr->key_size < 512)? 256 : -256; if (! strcmp(dev_ptr->enc_type, "aes-cbc")) dev_ptr->key_size += (dev_ptr->key_size < 256)? 64 : -128; @@ -1071,9 +1078,9 @@ pm_cgd_init(void *arg1, void *arg2) .pm_part = 0, .keygen_type = "pkcs5_pbkdf2/sha1", .verify_type = "disklabel", - .enc_type = "aes-cbc", + .enc_type = "aes-xts", .iv_type = "encblkno1", - .key_size = 192, + .key_size = 256, }; if (disk_entrie != NULL) { pm_getdevstring(disk_entrie->fullname, SSTRSIZE,
CVS commit: src/sbin/cgdconfig
Module Name:src Committed By: alnsn Date: Sun Dec 11 00:34:39 UTC 2016 Modified Files: src/sbin/cgdconfig: params.c Log Message: Add aes-xts to cgdconfig(8). To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/sbin/cgdconfig/params.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/cgdconfig/params.c diff -u src/sbin/cgdconfig/params.c:1.28 src/sbin/cgdconfig/params.c:1.29 --- src/sbin/cgdconfig/params.c:1.28 Tue Nov 24 14:07:18 2015 +++ src/sbin/cgdconfig/params.c Sun Dec 11 00:34:39 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: params.c,v 1.28 2015/11/24 14:07:18 christos Exp $ */ +/* $NetBSD: params.c,v 1.29 2016/12/11 00:34:39 alnsn Exp $ */ /*- * Copyright (c) 2002, 2003 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include #ifndef lint -__RCSID("$NetBSD: params.c,v 1.28 2015/11/24 14:07:18 christos Exp $"); +__RCSID("$NetBSD: params.c,v 1.29 2016/12/11 00:34:39 alnsn Exp $"); #endif #include @@ -70,6 +70,7 @@ static struct crypto_defaults { int keylen; } crypto_defaults[] = { { "aes-cbc", 128 }, + { "aes-xts", 256 }, { "3des-cbc", 192 }, { "blowfish-cbc", 128 } };
CVS commit: src/sys/crypto/rijndael
Module Name:src Committed By: alnsn Date: Sun Dec 11 00:28:45 UTC 2016 Modified Files: src/sys/crypto/rijndael: rijndael-api-fst.c rijndael-api-fst.h Log Message: Add XTS mode. To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/sys/crypto/rijndael/rijndael-api-fst.c cvs rdiff -u -r1.8 -r1.9 src/sys/crypto/rijndael/rijndael-api-fst.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/crypto/rijndael/rijndael-api-fst.c diff -u src/sys/crypto/rijndael/rijndael-api-fst.c:1.24 src/sys/crypto/rijndael/rijndael-api-fst.c:1.25 --- src/sys/crypto/rijndael/rijndael-api-fst.c:1.24 Sat May 14 16:46:55 2011 +++ src/sys/crypto/rijndael/rijndael-api-fst.c Sun Dec 11 00:28:44 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: rijndael-api-fst.c,v 1.24 2011/05/14 16:46:55 jmmv Exp $ */ +/* $NetBSD: rijndael-api-fst.c,v 1.25 2016/12/11 00:28:44 alnsn Exp $ */ /** * rijndael-api-fst.c @@ -38,7 +38,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rijndael-api-fst.c,v 1.24 2011/05/14 16:46:55 jmmv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rijndael-api-fst.c,v 1.25 2016/12/11 00:28:44 alnsn Exp $"); #include #ifdef _KERNEL @@ -52,6 +52,8 @@ __KERNEL_RCSID(0, "$NetBSD: rijndael-api #include #include +#define XTS_ALPHA 0x87 + static void xor16(uint8_t *d, const uint8_t *a, const uint8_t* b) { for (size_t i = 0; i < 4; i++) { @@ -62,6 +64,22 @@ static void xor16(uint8_t *d, const uint } } +static void +xts_exponentiate(uint8_t *iv) +{ + unsigned int carry = 0; + + for (size_t i = 0; i < 16; i++) { + unsigned int msb = iv[i] >> 7; + + iv[i] = (iv[i] << 1) | carry; + carry = msb; + } + + if (carry != 0) + iv[0] ^= XTS_ALPHA; +} + int rijndael_makeKey(keyInstance *key, BYTE direction, int keyLen, const char *keyMaterial) @@ -102,7 +120,8 @@ rijndael_makeKey(keyInstance *key, BYTE int rijndael_cipherInit(cipherInstance *cipher, BYTE mode, const char *IV) { - if ((mode == MODE_ECB) || (mode == MODE_CBC) || (mode == MODE_CFB1)) { + if ((mode == MODE_ECB) || (mode == MODE_CBC) || + (mode == MODE_XTS) || (mode == MODE_CFB1)) { cipher->mode = mode; } else { return BAD_CIPHER_MODE; @@ -153,6 +172,18 @@ rijndael_blockEncrypt(cipherInstance *ci } break; + case MODE_XTS: + iv = (u_int8_t *)cipher->IV; + for (i = numBlocks; i > 0; i--) { + xor16(block, input, iv); + rijndaelEncrypt(key->rk, key->Nr, block, block); + xor16(outBuffer, block, iv); + xts_exponentiate(iv); + input += 16; + outBuffer += 16; + } + break; + case MODE_CFB1: iv = (u_int8_t *)cipher->IV; for (i = numBlocks; i > 0; i--) { @@ -284,7 +315,19 @@ rijndael_blockDecrypt(cipherInstance *ci } break; -case MODE_CFB1: + case MODE_XTS: + iv = (u_int8_t *)cipher->IV; + for (i = numBlocks; i > 0; i--) { + xor16(block, input, iv); + rijndaelDecrypt(key->rk, key->Nr, block, block); + xor16(outBuffer, block, iv); + xts_exponentiate(iv); + input += 16; + outBuffer += 16; + } + break; + + case MODE_CFB1: iv = (u_int8_t *)cipher->IV; for (i = numBlocks; i > 0; i--) { memcpy(outBuffer, input, 16); Index: src/sys/crypto/rijndael/rijndael-api-fst.h diff -u src/sys/crypto/rijndael/rijndael-api-fst.h:1.8 src/sys/crypto/rijndael/rijndael-api-fst.h:1.9 --- src/sys/crypto/rijndael/rijndael-api-fst.h:1.8 Sun Jan 21 23:00:08 2007 +++ src/sys/crypto/rijndael/rijndael-api-fst.h Sun Dec 11 00:28:44 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: rijndael-api-fst.h,v 1.8 2007/01/21 23:00:08 cbiere Exp $ */ +/* $NetBSD: rijndael-api-fst.h,v 1.9 2016/12/11 00:28:44 alnsn Exp $ */ /** * rijndael-api-fst.h @@ -48,6 +48,7 @@ #define MODE_ECB 1 /* Are we ciphering in ECB mode? */ #define MODE_CBC 2 /* Are we ciphering in CBC mode? */ #define MODE_CFB1 3 /* Are we ciphering in 1-bit CFB mode? */ +#define MODE_XTS 4 /* Are we ciphering in XTS mode? */ #define TRUE 1 #define FALSE 0 #define BITSPERBLOCK128 /* Default number of bits in a cipher block */
CVS commit: src/doc
Module Name:src Committed By: alnsn Date: Sun Dec 11 00:25:32 UTC 2016 Modified Files: src/doc: CHANGES Log Message: Added aes-xts to cgd(4). To generate a diff of this commit: cvs rdiff -u -r1.2219 -r1.2220 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES diff -u src/doc/CHANGES:1.2219 src/doc/CHANGES:1.2220 --- src/doc/CHANGES:1.2219 Sat Dec 10 10:43:28 2016 +++ src/doc/CHANGES Sun Dec 11 00:25:32 2016 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2219 $> +# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2220 $> # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -407,3 +407,4 @@ Changes from NetBSD 7.0 to NetBSD 8.0: audio(4): Audio sub-system changes - in kernel mixing [nat 20161208] speaker(4):Synthesized beep for platforms with audio [nat 20161208] crash(8): Add sparc support. [mrg 20161210] + cgd(4): Add aes-xts. [alnsn 20161211]
CVS commit: src/share/man/man4
Module Name:src Committed By: alnsn Date: Sun Dec 11 00:24:48 UTC 2016 Modified Files: src/share/man/man4: cgd.4 Log Message: Document AES-XTS in cgd(4). To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/share/man/man4/cgd.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/cgd.4 diff -u src/share/man/man4/cgd.4:1.19 src/share/man/man4/cgd.4:1.20 --- src/share/man/man4/cgd.4:1.19 Wed Jun 1 01:34:43 2016 +++ src/share/man/man4/cgd.4 Sun Dec 11 00:24:48 2016 @@ -1,4 +1,4 @@ -.\" $NetBSD: cgd.4,v 1.19 2016/06/01 01:34:43 pgoyette Exp $ +.\" $NetBSD: cgd.4,v 1.20 2016/12/11 00:24:48 alnsn Exp $ .\" .\" Copyright (c) 2002, 2003 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 November 30, 2013 +.Dd December 11, 2016 .Dt CGD 4 .Os .Sh NAME @@ -64,6 +64,21 @@ mode. .Tn AES uses a 128 bit blocksize and can accept keys of length 128, 192, or 256. The default key length is 128. +.It Ic aes-xts +.Tn AES +in +.Tn XTS +mode. +.Tn AES-XTS +uses a 128 bit blocksize and can accept keys of length 256 or 512. +Note that +.Tn AES-XTS +key is made of two +.Tn AES +keys of equal size. +The second key is used solely to encrypt the block number of the physical +disk block. +The default key length is 256. .It Ic 3des-cbc Triple .Tn DES @@ -159,11 +174,25 @@ and their associated data structures are .In dev/cgdvar.h header. .Sh WARNINGS +.Pp It goes without saying that if you forget the passphrase that you used to configure a .Nm , then you have irrevocably lost all of the data on the disk. Please ensure that you are using an appropriate backup strategy. +.Pp +A +.Nm +device doesn't authenticate data and thus it can't guarantee integrity +of the encrypted data. +In particular, if the plaintext is known to an adversary, it is +possible to change every second block on a disk encrypted in the +.Tn CBC +mode to plaintext blocks of their choice. +The +.Tn +XTS mode isn't vulnerable to this particular attack but a lack of +integrity should be taken into accout when evaluating security risks. .Sh FILES .Bl -tag -width indentxxx .It /dev/{,r}cgd*
CVS commit: src/tests/dev/cgd
Module Name:src Committed By: alnsn Date: Sun Dec 11 00:23:44 UTC 2016 Modified Files: src/tests/dev/cgd: t_cgd_aes.c Log Message: AES XTS unit tests should now pass. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/tests/dev/cgd/t_cgd_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/tests/dev/cgd/t_cgd_aes.c diff -u src/tests/dev/cgd/t_cgd_aes.c:1.4 src/tests/dev/cgd/t_cgd_aes.c:1.5 --- src/tests/dev/cgd/t_cgd_aes.c:1.4 Thu Nov 24 22:42:16 2016 +++ src/tests/dev/cgd/t_cgd_aes.c Sun Dec 11 00:23:44 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: t_cgd_aes.c,v 1.4 2016/11/24 22:42:16 alnsn Exp $ */ +/* $NetBSD: t_cgd_aes.c,v 1.5 2016/12/11 00:23:44 alnsn Exp $ */ /*- * Copyright (c) 2016 The NetBSD Foundation, Inc. * Copyright (c) 2007 The Institute of Electrical and Electronics Engineers, Inc @@ -3511,8 +3511,6 @@ ATF_TC_BODY(cgd_aes_xts_256, tc) const size_t dksize = 256 * SECSIZE; /* Last blkno is 0xff. */ int dkfd, cgdfd; - atf_tc_expect_fail("aes-xts implementation not committed yet"); - rump_init(); RL(dkfd = open_disk(dkpath, imgpath, dksize)); @@ -3565,8 +3563,6 @@ ATF_TC_BODY(cgd_aes_xts_512, tc) const size_t dksize = 65536 * SECSIZE; /* Last blkno is 0x. */ int dkfd, cgdfd; - atf_tc_expect_fail("aes-xts implementation not committed yet"); - rump_init(); RL(dkfd = open_disk(dkpath, imgpath, dksize));
CVS commit: src/sys/sys
Module Name:src Committed By: alnsn Date: Sun Dec 11 00:23:04 UTC 2016 Modified Files: src/sys/sys: param.h Log Message: Welcome to 7.99.45. cgd(4): struct cryptfuncs gets a new cf_cipher_prep member. To generate a diff of this commit: cvs rdiff -u -r1.511 -r1.512 src/sys/sys/param.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/sys/param.h diff -u src/sys/sys/param.h:1.511 src/sys/sys/param.h:1.512 --- src/sys/sys/param.h:1.511 Thu Dec 8 12:21:54 2016 +++ src/sys/sys/param.h Sun Dec 11 00:23:04 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: param.h,v 1.511 2016/12/08 12:21:54 mlelstv Exp $ */ +/* $NetBSD: param.h,v 1.512 2016/12/11 00:23:04 alnsn Exp $ */ /*- * Copyright (c) 1982, 1986, 1989, 1993 @@ -67,7 +67,7 @@ * 2.99.9 (299000900) */ -#define __NetBSD_Version__ 799004400 /* NetBSD 7.99.44 */ +#define __NetBSD_Version__ 799004500 /* NetBSD 7.99.45 */ #define __NetBSD_Prereq__(M,m,p) (M) * 1) + \ (m) * 100) + (p) * 100) <= __NetBSD_Version__)
CVS commit: src/sys/dev
Module Name:src Committed By: alnsn Date: Sun Dec 11 00:20:49 UTC 2016 Modified Files: src/sys/dev: cgd.c cgd_crypto.c cgd_crypto.h Log Message: Add XTS mode to cgd(4). To generate a diff of this commit: cvs rdiff -u -r1.111 -r1.112 src/sys/dev/cgd.c cvs rdiff -u -r1.13 -r1.14 src/sys/dev/cgd_crypto.c cvs rdiff -u -r1.8 -r1.9 src/sys/dev/cgd_crypto.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/cgd.c diff -u src/sys/dev/cgd.c:1.111 src/sys/dev/cgd.c:1.112 --- src/sys/dev/cgd.c:1.111 Wed Sep 14 23:16:30 2016 +++ src/sys/dev/cgd.c Sun Dec 11 00:20:49 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: cgd.c,v 1.111 2016/09/14 23:16:30 mlelstv Exp $ */ +/* $NetBSD: cgd.c,v 1.112 2016/12/11 00:20:49 alnsn Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cgd.c,v 1.111 2016/09/14 23:16:30 mlelstv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cgd.c,v 1.112 2016/12/11 00:20:49 alnsn Exp $"); #include #include @@ -59,6 +59,18 @@ __KERNEL_RCSID(0, "$NetBSD: cgd.c,v 1.11 #include "ioconf.h" +struct selftest_params { + const char *alg; + int blocksize; /* number of bytes */ + int secsize; + daddr_t blkno; + int keylen; /* number of bits */ + int txtlen; /* number of bytes */ + const uint8_t *key; + const uint8_t *ptxt; + const uint8_t *ctxt; +}; + /* Entry Point Functions */ static dev_type_open(cgdopen); @@ -96,6 +108,101 @@ const struct cdevsw cgd_cdevsw = { .d_flag = D_DISK }; +/* + * Vector 5 from IEEE 1619/D16 truncated to 64 bytes, blkno 1. + */ +static const uint8_t selftest_aes_xts_256_ptxt[64] = { + 0x27, 0xa7, 0x47, 0x9b, 0xef, 0xa1, 0xd4, 0x76, + 0x48, 0x9f, 0x30, 0x8c, 0xd4, 0xcf, 0xa6, 0xe2, + 0xa9, 0x6e, 0x4b, 0xbe, 0x32, 0x08, 0xff, 0x25, + 0x28, 0x7d, 0xd3, 0x81, 0x96, 0x16, 0xe8, 0x9c, + 0xc7, 0x8c, 0xf7, 0xf5, 0xe5, 0x43, 0x44, 0x5f, + 0x83, 0x33, 0xd8, 0xfa, 0x7f, 0x56, 0x00, 0x00, + 0x05, 0x27, 0x9f, 0xa5, 0xd8, 0xb5, 0xe4, 0xad, + 0x40, 0xe7, 0x36, 0xdd, 0xb4, 0xd3, 0x54, 0x12, +}; + +static const uint8_t selftest_aes_xts_256_ctxt[512] = { + 0x26, 0x4d, 0x3c, 0xa8, 0x51, 0x21, 0x94, 0xfe, + 0xc3, 0x12, 0xc8, 0xc9, 0x89, 0x1f, 0x27, 0x9f, + 0xef, 0xdd, 0x60, 0x8d, 0x0c, 0x02, 0x7b, 0x60, + 0x48, 0x3a, 0x3f, 0xa8, 0x11, 0xd6, 0x5e, 0xe5, + 0x9d, 0x52, 0xd9, 0xe4, 0x0e, 0xc5, 0x67, 0x2d, + 0x81, 0x53, 0x2b, 0x38, 0xb6, 0xb0, 0x89, 0xce, + 0x95, 0x1f, 0x0f, 0x9c, 0x35, 0x59, 0x0b, 0x8b, + 0x97, 0x8d, 0x17, 0x52, 0x13, 0xf3, 0x29, 0xbb, +}; + +static const uint8_t selftest_aes_xts_256_key[33] = { + 0x27, 0x18, 0x28, 0x18, 0x28, 0x45, 0x90, 0x45, + 0x23, 0x53, 0x60, 0x28, 0x74, 0x71, 0x35, 0x26, + 0x31, 0x41, 0x59, 0x26, 0x53, 0x58, 0x97, 0x93, + 0x23, 0x84, 0x62, 0x64, 0x33, 0x83, 0x27, 0x95, + 0 +}; + +/* + * Vector 11 from IEEE 1619/D16 truncated to 64 bytes, blkno 0x. + */ +static const uint8_t selftest_aes_xts_512_ptxt[64] = { + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, + 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, + 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, + 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, + 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, + 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, + 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, + 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, +}; + +static const uint8_t selftest_aes_xts_512_ctxt[64] = { + 0x77, 0xa3, 0x12, 0x51, 0x61, 0x8a, 0x15, 0xe6, + 0xb9, 0x2d, 0x1d, 0x66, 0xdf, 0xfe, 0x7b, 0x50, + 0xb5, 0x0b, 0xad, 0x55, 0x23, 0x05, 0xba, 0x02, + 0x17, 0xa6, 0x10, 0x68, 0x8e, 0xff, 0x7e, 0x11, + 0xe1, 0xd0, 0x22, 0x54, 0x38, 0xe0, 0x93, 0x24, + 0x2d, 0x6d, 0xb2, 0x74, 0xfd, 0xe8, 0x01, 0xd4, + 0xca, 0xe0, 0x6f, 0x20, 0x92, 0xc7, 0x28, 0xb2, + 0x47, 0x85, 0x59, 0xdf, 0x58, 0xe8, 0x37, 0xc2, +}; + +static const uint8_t selftest_aes_xts_512_key[65] = { + 0x27, 0x18, 0x28, 0x18, 0x28, 0x45, 0x90, 0x45, + 0x23, 0x53, 0x60, 0x28, 0x74, 0x71, 0x35, 0x26, + 0x62, 0x49, 0x77, 0x57, 0x24, 0x70, 0x93, 0x69, + 0x99, 0x59, 0x57, 0x49, 0x66, 0x96, 0x76, 0x27, + 0x31, 0x41, 0x59, 0x26, 0x53, 0x58, 0x97, 0x93, + 0x23, 0x84, 0x62, 0x64, 0x33, 0x83, 0x27, 0x95, + 0x02, 0x88, 0x41, 0x97, 0x16, 0x93, 0x99, 0x37, + 0x51, 0x05, 0x82, 0x09, 0x74, 0x94, 0x45, 0x92, + 0 +}; + +const struct selftest_params selftests[] = { + { + .alg = "aes-xts", + .blocksize = 16, + .secsize = 512, + .blkno = 1, + .keylen = 256, + .txtlen = sizeof(selftest_aes_xts_256_ptxt), + .key = selftest_aes_xts_256_key, + .ptxt = selftest_aes_xts_256_ptxt, + .ctxt = selftest_aes_xts_256_ctxt + }, + { + .alg = "aes-xts", + .blocksize = 16, + .secsize = 512, + .blkno = 0x, + .keylen = 512, + .txtlen = sizeof(selftest_aes_xts_512_ptxt), + .key = selftest_aes_xts_512_key, + .ptxt = selftest_aes_xts_512_ptxt, + .ctxt = selftest_aes_xts_512_ctxt + } +}; + static int cgd_match(device_t, cfdata_t, void *); static void cgd_attach(device_t, dev
CVS commit: src/share/mk
Module Name:src Committed By: mrg Date: Sat Dec 10 23:40:03 UTC 2016 Modified Files: src/share/mk: bsd.own.mk Log Message: revert binutils check polarity. now we know that only these are not updated to binutils 2.27: aarch64*, *arm*, hppa, mipse[lb] To generate a diff of this commit: cvs rdiff -u -r1.995 -r1.996 src/share/mk/bsd.own.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.own.mk diff -u src/share/mk/bsd.own.mk:1.995 src/share/mk/bsd.own.mk:1.996 --- src/share/mk/bsd.own.mk:1.995 Sat Dec 10 23:19:26 2016 +++ src/share/mk/bsd.own.mk Sat Dec 10 23:40:03 2016 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.own.mk,v 1.995 2016/12/10 23:19:26 mrg Exp $ +# $NetBSD: bsd.own.mk,v 1.996 2016/12/10 23:40:03 mrg Exp $ # This needs to be before bsd.init.mk .if defined(BSD_MK_COMPAT_FILE) @@ -145,20 +145,14 @@ EXTERNAL_GDB_SUBDIR= /does/not/exist # What binutils is used? # .if \ -${MACHINE} == "alpha" || \ -${MACHINE_ARCH} == "i386" || \ -${MACHINE_CPU} == "m68k" || \ -${MACHINE_ARCH} == "mips64el" || \ -${MACHINE_ARCH} == "mips64eb" || \ -${MACHINE_CPU} == "powerpc" || \ -${MACHINE_CPU} == "sh3" || \ -${MACHINE} == "sparc" || \ -${MACHINE} == "sparc64" || \ -${MACHINE_ARCH} == "x86_64" || \ -${MACHINE_ARCH} == "vax" -HAVE_BINUTILS?= 227 -.else +${MACHINE_CPU} == "aarch64" || \ +${MACHINE_CPU} == "arm" || \ +${MACHINE_CPU} == "hppa" || \ +${MACHINE_ARCH} == "mipsel" || \ +${MACHINE_ARCH} == "mipseb" HAVE_BINUTILS?= 226 +.else +HAVE_BINUTILS?= 227 .endif .if ${HAVE_BINUTILS} == 226
CVS commit: src/usr.sbin/crash
Module Name:src Committed By: mrg Date: Sat Dec 10 23:21:02 UTC 2016 Modified Files: src/usr.sbin/crash: crash.8 Log Message: note that crash/sparc is unstable To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/usr.sbin/crash/crash.8 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/crash/crash.8 diff -u src/usr.sbin/crash/crash.8:1.5 src/usr.sbin/crash/crash.8:1.6 --- src/usr.sbin/crash/crash.8:1.5 Sun Oct 5 23:08:01 2014 +++ src/usr.sbin/crash/crash.8 Sat Dec 10 23:21:02 2016 @@ -1,4 +1,4 @@ -.\" $NetBSD: crash.8,v 1.5 2014/10/05 23:08:01 wiz Exp $ +.\" $NetBSD: crash.8,v 1.6 2016/12/10 23:21:02 mrg Exp $ .\" .\" Copyright (c) 2009 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 October 5, 2014 +.Dd December 10, 2016 .Dt CRASH 8 .Os .Sh NAME @@ -93,3 +93,7 @@ The .Nm command appeared in .Nx 6.0 . +.Sh BUGS +The +.Nm +command for the sparc port is unstable.
CVS commit: src/share/mk
Module Name:src Committed By: mrg Date: Sat Dec 10 23:19:26 UTC 2016 Modified Files: src/share/mk: bsd.own.mk Log Message: switch ppc* to binutils 2.27. To generate a diff of this commit: cvs rdiff -u -r1.994 -r1.995 src/share/mk/bsd.own.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.own.mk diff -u src/share/mk/bsd.own.mk:1.994 src/share/mk/bsd.own.mk:1.995 --- src/share/mk/bsd.own.mk:1.994 Thu Dec 8 03:22:36 2016 +++ src/share/mk/bsd.own.mk Sat Dec 10 23:19:26 2016 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.own.mk,v 1.994 2016/12/08 03:22:36 christos Exp $ +# $NetBSD: bsd.own.mk,v 1.995 2016/12/10 23:19:26 mrg Exp $ # This needs to be before bsd.init.mk .if defined(BSD_MK_COMPAT_FILE) @@ -150,6 +150,7 @@ EXTERNAL_GDB_SUBDIR= /does/not/exist ${MACHINE_CPU} == "m68k" || \ ${MACHINE_ARCH} == "mips64el" || \ ${MACHINE_ARCH} == "mips64eb" || \ +${MACHINE_CPU} == "powerpc" || \ ${MACHINE_CPU} == "sh3" || \ ${MACHINE} == "sparc" || \ ${MACHINE} == "sparc64" || \
CVS commit: src
Module Name:src Committed By: christos Date: Sat Dec 10 23:12:40 UTC 2016 Modified Files: src/share/mk: bsd.obj.mk src/usr.bin/make: main.c Log Message: Back in 1993 ${MACHINE} was a unique way to define objdirs for every platform. Thus setting OBJMACHINE, allowed one to keep in-tree objdirs with multiple builds. With the advent of evb*, this has become impossible until now. Introduce OBJMACHINE_ARCH that adds ${MACHINE_ARCH} to the objdir so that we have unique objdirs per build again. Until we restructure things to that this is not necessary, it is the simplest fix. To generate a diff of this commit: cvs rdiff -u -r1.50 -r1.51 src/share/mk/bsd.obj.mk cvs rdiff -u -r1.253 -r1.254 src/usr.bin/make/main.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.obj.mk diff -u src/share/mk/bsd.obj.mk:1.50 src/share/mk/bsd.obj.mk:1.51 --- src/share/mk/bsd.obj.mk:1.50 Wed Dec 7 22:25:35 2016 +++ src/share/mk/bsd.obj.mk Sat Dec 10 18:12:39 2016 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.obj.mk,v 1.50 2016/12/08 03:25:35 christos Exp $ +# $NetBSD: bsd.obj.mk,v 1.51 2016/12/10 23:12:39 christos Exp $ .if !defined(_BSD_OBJ_MK_) _BSD_OBJ_MK_=1 @@ -37,7 +37,7 @@ obj: .else PAWD?= /bin/pwd -__objdirsuffix= ${OBJMACHINE:D.${MACHINE}} +__objdirsuffix= ${OBJMACHINE:D.${MACHINE}${OBJMACHINE_ARCH:D-${MACHINE_ARCH}}} __objdir= obj${__objdirsuffix} __usrobjdir= ${BSDOBJDIR}${USR_OBJMACHINE:D.${MACHINE}} Index: src/usr.bin/make/main.c diff -u src/usr.bin/make/main.c:1.253 src/usr.bin/make/main.c:1.254 --- src/usr.bin/make/main.c:1.253 Wed Dec 7 14:57:09 2016 +++ src/usr.bin/make/main.c Sat Dec 10 18:12:39 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.253 2016/12/07 19:57:09 christos Exp $ */ +/* $NetBSD: main.c,v 1.254 2016/12/10 23:12:39 christos Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,7 +69,7 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: main.c,v 1.253 2016/12/07 19:57:09 christos Exp $"; +static char rcsid[] = "$NetBSD: main.c,v 1.254 2016/12/10 23:12:39 christos Exp $"; #else #include #ifndef lint @@ -81,7 +81,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 19 #if 0 static char sccsid[] = "@(#)main.c 8.3 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: main.c,v 1.253 2016/12/07 19:57:09 christos Exp $"); +__RCSID("$NetBSD: main.c,v 1.254 2016/12/10 23:12:39 christos Exp $"); #endif #endif /* not lint */ #endif @@ -1122,6 +1122,7 @@ main(int argc, char **argv) if (!Main_SetVarObjdir("MAKEOBJDIRPREFIX", curdir) && !Main_SetVarObjdir("MAKEOBJDIR", "") && + !Main_SetObjdir("%s.%s-%s", _PATH_OBJDIR, machine, machine_arch) && !Main_SetObjdir("%s.%s", _PATH_OBJDIR, machine) && !Main_SetObjdir("%s", _PATH_OBJDIR)) (void)Main_SetObjdir("%s%s", _PATH_OBJDIRPREFIX, curdir);
CVS commit: src/sys/arch
Module Name:src Committed By: christos Date: Sat Dec 10 23:03:26 UTC 2016 Modified Files: src/sys/arch/acorn32/conf: EB7500ATX GENERIC INSTALL LOWMEM_WSCONS NC src/sys/arch/alpha/conf: GENERIC src/sys/arch/amd64/conf: ALL GENERIC XEN3_DOM0 src/sys/arch/amiga/conf: AMIGA DRACO GENERIC GENERIC.in MDINSTALL src/sys/arch/amigappc/conf: GENERIC NULL src/sys/arch/atari/conf: GENERIC.in HADES HADES.in MILAN-ISAIDE MILAN-PCIIDE src/sys/arch/bebox/conf: GENERIC src/sys/arch/cats/conf: GENERIC INSTALL src/sys/arch/cobalt/conf: GENERIC INSTALL src/sys/arch/dreamcast/conf: GENERIC src/sys/arch/epoc32/conf: GENERIC src/sys/arch/evbarm/conf: ALLWINNER_A80 ARMADILLO9 BPI CUBIEBOARD GUMSTIX HDL_G HPT5325 HUMMINGBIRD_A31 IMX23_OLINUXINO LUBBOCK MINI2440 MMNET_GENERIC MPCSA_GENERIC MV2120 RPI SHEEVAPLUG SMDK2410 TEGRA TS7200 TWINTAIL src/sys/arch/evbmips/conf: ALCHEMY LOONGSON MALTA src/sys/arch/evbppc/conf: EV64260 OPENBLOCKS266_OPT PMPPC src/sys/arch/hp300/conf: GENERIC src/sys/arch/hpcarm/conf: NETBOOKPRO WZERO3 src/sys/arch/hpcmips/conf: GENERIC TX3922 VR41XX src/sys/arch/hppa/conf: GENERIC src/sys/arch/i386/conf: ALL GENERIC GENERIC_TINY INSTALL_FLOPPY INSTALL_TINY XEN3_DOM0 src/sys/arch/ibmnws/conf: GENERIC src/sys/arch/iyonix/conf: GENERIC src/sys/arch/landisk/conf: GENERIC src/sys/arch/macppc/conf: GENERIC GENERIC_601 src/sys/arch/mmeye/conf: MMEYE_WLF src/sys/arch/netwinder/conf: GENERIC src/sys/arch/ofppc/conf: GENERIC src/sys/arch/playstation2/conf: DEBUG src/sys/arch/pmax/conf: GENERIC GENERIC64 INSTALL INSTALL64 src/sys/arch/prep/conf: GENERIC src/sys/arch/sandpoint/conf: ENCPP1 src/sys/arch/sgimips/conf: GENERIC32_IP2x GENERIC32_IP3x src/sys/arch/shark/conf: GENERIC INSTALL src/sys/arch/sparc/conf: INSTALL KRUPS MRCOFFEE TADPOLE3GX src/sys/arch/sparc64/conf: GENERIC NONPLUS64 src/sys/arch/usermode/conf: GENERIC.common src/sys/arch/vax/conf: GENERIC src/sys/arch/x68k/conf: GENERIC INSTALL src/sys/arch/zaurus/conf: GENERIC Log Message: remove VAUDIOSPEAKER for now, will be done differently. To generate a diff of this commit: cvs rdiff -u -r1.59 -r1.60 src/sys/arch/acorn32/conf/EB7500ATX cvs rdiff -u -r1.118 -r1.119 src/sys/arch/acorn32/conf/GENERIC cvs rdiff -u -r1.74 -r1.75 src/sys/arch/acorn32/conf/INSTALL cvs rdiff -u -r1.68 -r1.69 src/sys/arch/acorn32/conf/LOWMEM_WSCONS cvs rdiff -u -r1.67 -r1.68 src/sys/arch/acorn32/conf/NC cvs rdiff -u -r1.373 -r1.374 src/sys/arch/alpha/conf/GENERIC cvs rdiff -u -r1.42 -r1.43 src/sys/arch/amd64/conf/ALL cvs rdiff -u -r1.445 -r1.446 src/sys/arch/amd64/conf/GENERIC cvs rdiff -u -r1.121 -r1.122 src/sys/arch/amd64/conf/XEN3_DOM0 cvs rdiff -u -r1.109 -r1.110 src/sys/arch/amiga/conf/AMIGA cvs rdiff -u -r1.178 -r1.179 src/sys/arch/amiga/conf/DRACO cvs rdiff -u -r1.312 -r1.313 src/sys/arch/amiga/conf/GENERIC cvs rdiff -u -r1.130 -r1.131 src/sys/arch/amiga/conf/GENERIC.in cvs rdiff -u -r1.33 -r1.34 src/sys/arch/amiga/conf/MDINSTALL cvs rdiff -u -r1.27 -r1.28 src/sys/arch/amigappc/conf/GENERIC cvs rdiff -u -r1.47 -r1.48 src/sys/arch/amigappc/conf/NULL cvs rdiff -u -r1.110 -r1.111 src/sys/arch/atari/conf/GENERIC.in cvs rdiff -u -r1.108 -r1.109 src/sys/arch/atari/conf/HADES cvs rdiff -u -r1.13 -r1.14 src/sys/arch/atari/conf/HADES.in cvs rdiff -u -r1.85 -r1.86 src/sys/arch/atari/conf/MILAN-ISAIDE cvs rdiff -u -r1.89 -r1.90 src/sys/arch/atari/conf/MILAN-PCIIDE cvs rdiff -u -r1.149 -r1.150 src/sys/arch/bebox/conf/GENERIC cvs rdiff -u -r1.159 -r1.160 src/sys/arch/cats/conf/GENERIC cvs rdiff -u -r1.99 -r1.100 src/sys/arch/cats/conf/INSTALL cvs rdiff -u -r1.149 -r1.150 src/sys/arch/cobalt/conf/GENERIC cvs rdiff -u -r1.60 -r1.61 src/sys/arch/cobalt/conf/INSTALL cvs rdiff -u -r1.123 -r1.124 src/sys/arch/dreamcast/conf/GENERIC cvs rdiff -u -r1.9 -r1.10 src/sys/arch/epoc32/conf/GENERIC cvs rdiff -u -r1.17 -r1.18 src/sys/arch/evbarm/conf/ALLWINNER_A80 \ src/sys/arch/evbarm/conf/MINI2440 cvs rdiff -u -r1.50 -r1.51 src/sys/arch/evbarm/conf/ARMADILLO9 \ src/sys/arch/evbarm/conf/SHEEVAPLUG cvs rdiff -u -r1.18 -r1.19 src/sys/arch/evbarm/conf/BPI cvs rdiff -u -r1.47 -r1.48 src/sys/arch/evbarm/conf/CUBIEBOARD cvs rdiff -u -r1.87 -r1.88 src/sys/arch/evbarm/conf/GUMSTIX cvs rdiff -u -r1.46 -r1.47 src/sys/arch/evbarm/conf/HDL_G \ src/sys/arch/evbarm/conf/MPCSA_GENERIC cvs rdiff -u -r1.28 -r1.29 src/sys/arch/evbarm/conf/HPT5325 \ src/sys/arch/evbarm/conf/MV2120 cvs rdiff -u -r1.25 -r1.26 src/sys/arch/evbarm/conf/HUMMINGBIRD_A31 cvs rdiff -u -r1.13 -r1.14 src/sys/arch/evbarm/conf/IMX23_OLINUXINO cvs rdiff -u -r1.55 -r1.56 src/sys/arch/evbarm/conf/LUBBOCK cvs rdiff -u -r1.24 -r1.25 src/sys/arch/evbarm/conf/MMNET_GEN
CVS commit: src/sys/dev/raidframe
Module Name:src Committed By: maya Date: Sat Dec 10 23:03:27 UTC 2016 Modified Files: src/sys/dev/raidframe: rf_driver.c rf_general.h Log Message: raidframe: use existing routines to print an error and panic. fixes the i386 ALL build with clang which complained about the format string not being a string literal, and lets us get rid of rf_panicbuf. note: kern_assert is not KASSERT. it should panic as long as the string is not NULL. No functional change intended. To generate a diff of this commit: cvs rdiff -u -r1.132 -r1.133 src/sys/dev/raidframe/rf_driver.c cvs rdiff -u -r1.21 -r1.22 src/sys/dev/raidframe/rf_general.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/raidframe/rf_driver.c diff -u src/sys/dev/raidframe/rf_driver.c:1.132 src/sys/dev/raidframe/rf_driver.c:1.133 --- src/sys/dev/raidframe/rf_driver.c:1.132 Sat Dec 26 00:58:45 2015 +++ src/sys/dev/raidframe/rf_driver.c Sat Dec 10 23:03:27 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: rf_driver.c,v 1.132 2015/12/26 00:58:45 pgoyette Exp $ */ +/* $NetBSD: rf_driver.c,v 1.133 2016/12/10 23:03:27 maya Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. * All rights reserved. @@ -66,7 +66,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: rf_driver.c,v 1.132 2015/12/26 00:58:45 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_driver.c,v 1.133 2016/12/10 23:03:27 maya Exp $"); #ifdef _KERNEL_OPT #include "opt_raid_diagnostic.h" @@ -121,9 +121,6 @@ __KERNEL_RCSID(0, "$NetBSD: rf_driver.c, #define RF_MAX_FREE_RAD 128 #define RF_MIN_FREE_RAD 32 -/* debug variables */ -charrf_panicbuf[2048]; /* a buffer to hold an error msg when we panic */ - /* main configuration routines */ static int raidframe_booted = 0; @@ -888,17 +885,15 @@ rf_ConfigureDebug(RF_Config_t *cfgPtr) void rf_print_panic_message(int line, const char *file) { - snprintf(rf_panicbuf, sizeof(rf_panicbuf), - "raidframe error at line %d file %s", line, file); + kern_assert("raidframe error at line %d file %s", line, file); } #ifdef RAID_DIAGNOSTIC void rf_print_assert_panic_message(int line, const char *file, const char *condition) { - snprintf(rf_panicbuf, sizeof(rf_panicbuf), - "raidframe error at line %d file %s (failed asserting %s)\n", - line, file, condition); + kern_assert("raidframe error at line %d file %s (failed asserting %s)\n", + line, file, condition); } #endif Index: src/sys/dev/raidframe/rf_general.h diff -u src/sys/dev/raidframe/rf_general.h:1.21 src/sys/dev/raidframe/rf_general.h:1.22 --- src/sys/dev/raidframe/rf_general.h:1.21 Tue Mar 25 16:19:14 2014 +++ src/sys/dev/raidframe/rf_general.h Sat Dec 10 23:03:27 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: rf_general.h,v 1.21 2014/03/25 16:19:14 christos Exp $ */ +/* $NetBSD: rf_general.h,v 1.22 2016/12/10 23:03:27 maya Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -54,14 +54,12 @@ void rf_print_unable_to_init_mutex(const void rf_print_unable_to_add_shutdown(const char *, int, int); -extern char rf_panicbuf[]; -#define RF_PANIC() {rf_print_panic_message(__LINE__,__FILE__); panic("%s", rf_panicbuf);} +#define RF_PANIC() {rf_print_panic_message(__LINE__,__FILE__);} #if defined(RAID_DIAGNOSTIC) || defined(__COVERITY__) #define RF_ASSERT(_x_) { \ if (!(_x_)) { \ rf_print_assert_panic_message(__LINE__, __FILE__, #_x_); \ -panic(rf_panicbuf); \ } \ } #else /* RAID_DIAGNOSTIC */
CVS commit: src/external/gpl3/binutils
Module Name:src Committed By: mrg Date: Sat Dec 10 22:57:41 UTC 2016 Modified Files: src/external/gpl3/binutils/lib/libbfd/arch/powerpc64: bfd.h bfdver.h config.h src/external/gpl3/binutils/lib/libopcodes/arch/powerpc64: config.h src/external/gpl3/binutils/usr.bin/common/arch/powerpc64: config.h defs.mk src/external/gpl3/binutils/usr.bin/gas/arch/powerpc64: config.h src/external/gpl3/binutils/usr.bin/gprof/arch/powerpc64: gconfig.h src/external/gpl3/binutils/usr.bin/ld/arch/powerpc64: config.h Log Message: regen mknative-binutils for ppc64 and binutils 2.27 To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 \ src/external/gpl3/binutils/lib/libbfd/arch/powerpc64/bfd.h cvs rdiff -u -r1.8 -r1.9 \ src/external/gpl3/binutils/lib/libbfd/arch/powerpc64/bfdver.h cvs rdiff -u -r1.6 -r1.7 \ src/external/gpl3/binutils/lib/libbfd/arch/powerpc64/config.h cvs rdiff -u -r1.5 -r1.6 \ src/external/gpl3/binutils/lib/libopcodes/arch/powerpc64/config.h cvs rdiff -u -r1.6 -r1.7 \ src/external/gpl3/binutils/usr.bin/common/arch/powerpc64/config.h \ src/external/gpl3/binutils/usr.bin/common/arch/powerpc64/defs.mk cvs rdiff -u -r1.5 -r1.6 \ src/external/gpl3/binutils/usr.bin/gas/arch/powerpc64/config.h cvs rdiff -u -r1.5 -r1.6 \ src/external/gpl3/binutils/usr.bin/gprof/arch/powerpc64/gconfig.h cvs rdiff -u -r1.5 -r1.6 \ src/external/gpl3/binutils/usr.bin/ld/arch/powerpc64/config.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/binutils/lib/libbfd/arch/powerpc64/bfd.h diff -u src/external/gpl3/binutils/lib/libbfd/arch/powerpc64/bfd.h:1.5 src/external/gpl3/binutils/lib/libbfd/arch/powerpc64/bfd.h:1.6 --- src/external/gpl3/binutils/lib/libbfd/arch/powerpc64/bfd.h:1.5 Fri Jan 29 17:30:23 2016 +++ src/external/gpl3/binutils/lib/libbfd/arch/powerpc64/bfd.h Sat Dec 10 22:57:41 2016 @@ -11,7 +11,7 @@ /* Main header file for the bfd library -- portable access to object files. - Copyright (C) 1990-2015 Free Software Foundation, Inc. + Copyright (C) 1990-2016 Free Software Foundation, Inc. Contributed by Cygnus Support. @@ -522,7 +522,6 @@ extern void warn_deprecated (const char #define bfd_get_file_flags(abfd) ((abfd)->flags) #define bfd_applicable_file_flags(abfd) ((abfd)->xvec->object_flags) #define bfd_applicable_section_flags(abfd) ((abfd)->xvec->section_flags) -#define bfd_my_archive(abfd) ((abfd)->my_archive) #define bfd_has_map(abfd) ((abfd)->has_armap) #define bfd_is_thin_archive(abfd) ((abfd)->is_thin_archive) @@ -914,6 +913,9 @@ extern bfd_boolean bfd_elf32_arm_get_bfd extern bfd_boolean bfd_elf32_arm_add_glue_sections_to_bfd (bfd *, struct bfd_link_info *); +extern void bfd_elf32_arm_keep_private_stub_output_sections + (struct bfd_link_info *); + /* ELF ARM mapping symbol support. */ #define BFD_ARM_SPECIAL_SYM_TYPE_MAP (1 << 0) #define BFD_ARM_SPECIAL_SYM_TYPE_TAG (1 << 1) @@ -945,7 +947,8 @@ extern void elf32_arm_next_input_section (struct bfd_link_info *, struct bfd_section *); extern bfd_boolean elf32_arm_size_stubs (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma, - struct bfd_section * (*) (const char *, struct bfd_section *, unsigned int), + struct bfd_section * (*) (const char *, struct bfd_section *, + struct bfd_section *, unsigned int), void (*) (void)); extern bfd_boolean elf32_arm_build_stubs (struct bfd_link_info *); @@ -958,13 +961,6 @@ extern bfd_boolean elf32_arm_fix_exidx_c extern bfd_boolean elf32_tic6x_fix_exidx_coverage (struct bfd_section **, unsigned int, struct bfd_link_info *, bfd_boolean); -/* PowerPC @tls opcode transform/validate. */ -extern unsigned int _bfd_elf_ppc_at_tls_transform - (unsigned int, unsigned int); -/* PowerPC @tprel opcode transform/validate. */ -extern unsigned int _bfd_elf_ppc_at_tprel_transform - (unsigned int, unsigned int); - extern void bfd_elf64_aarch64_init_maps (bfd *); @@ -972,10 +968,10 @@ extern void bfd_elf32_aarch64_init_maps (bfd *); extern void bfd_elf64_aarch64_set_options - (bfd *, struct bfd_link_info *, int, int, int, int, int); + (bfd *, struct bfd_link_info *, int, int, int, int, int, int); extern void bfd_elf32_aarch64_set_options - (bfd *, struct bfd_link_info *, int, int, int, int, int); + (bfd *, struct bfd_link_info *, int, int, int, int, int, int); /* ELF AArch64 mapping symbol support. */ #define BFD_AARCH64_SPECIAL_SYM_TYPE_MAP (1 << 0) @@ -1436,6 +1432,9 @@ typedef struct bfd_section when memory read flag isn't set. */ #define SEC_COFF_NOREAD 0x4000 + /* Indicate that section has the no read flag set. */ +#define SEC_ELF_NOREAD 0x8000 + /* End of section flags. */ /* Some internal packed boolean fields. */ @@ -1502,7 +1501,7 @@ typedef struct bfd_section information. */ bfd_vm
CVS commit: src/sys/dev
Module Name:src Committed By: christos Date: Sat Dec 10 22:37:12 UTC 2016 Modified Files: src/sys/dev: audio.c Log Message: remove VAUDIOSPEAKER, needs to be done differently. To generate a diff of this commit: cvs rdiff -u -r1.274 -r1.275 src/sys/dev/audio.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/audio.c diff -u src/sys/dev/audio.c:1.274 src/sys/dev/audio.c:1.275 --- src/sys/dev/audio.c:1.274 Sat Dec 10 12:31:33 2016 +++ src/sys/dev/audio.c Sat Dec 10 17:37:12 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: audio.c,v 1.274 2016/12/10 17:31:33 martin Exp $ */ +/* $NetBSD: audio.c,v 1.275 2016/12/10 22:37:12 christos Exp $ */ /*- * Copyright (c) 2016 Nathanial Sloss @@ -148,7 +148,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.274 2016/12/10 17:31:33 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.275 2016/12/10 22:37:12 christos Exp $"); #include "audio.h" #if NAUDIO > 0 @@ -179,9 +179,6 @@ __KERNEL_RCSID(0, "$NetBSD: audio.c,v 1. #include #include #include -#ifdef VAUDIOSPEAKER -#include -#endif #include @@ -840,9 +837,6 @@ bad_rec: audio_rec_thread, sc, &sc->sc_recthread, "audiorec"); kthread_create(PRI_NONE, KTHREAD_MPSAFE | KTHREAD_MUSTJOIN, NULL, audio_play_thread, sc, &sc->sc_playthread, "audiomix"); -#ifdef VAUDIOSPEAKER - speakerattach_mi(self); -#endif } int
CVS commit: src/sys/dev/wscons
Module Name:src Committed By: christos Date: Sat Dec 10 22:36:28 UTC 2016 Modified Files: src/sys/dev/wscons: wskbd.c Log Message: remove VAUDIOSPEAKER, needs to be done differently. To generate a diff of this commit: cvs rdiff -u -r1.137 -r1.138 src/sys/dev/wscons/wskbd.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/wscons/wskbd.c diff -u src/sys/dev/wscons/wskbd.c:1.137 src/sys/dev/wscons/wskbd.c:1.138 --- src/sys/dev/wscons/wskbd.c:1.137 Thu Dec 8 06:31:08 2016 +++ src/sys/dev/wscons/wskbd.c Sat Dec 10 17:36:28 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: wskbd.c,v 1.137 2016/12/08 11:31:08 nat Exp $ */ +/* $NetBSD: wskbd.c,v 1.138 2016/12/10 22:36:28 christos Exp $ */ /* * Copyright (c) 1996, 1997 Christopher G. Demetriou. All rights reserved. @@ -105,7 +105,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: wskbd.c,v 1.137 2016/12/08 11:31:08 nat Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wskbd.c,v 1.138 2016/12/10 22:36:28 christos Exp $"); #ifdef _KERNEL_OPT #include "opt_ddb.h" @@ -156,10 +156,6 @@ int wskbddebug = 0; #include -#ifdef VAUDIOSPEAKER -#include -#endif - struct wskbd_internal { const struct wskbd_mapdata *t_keymap; @@ -190,7 +186,7 @@ struct wskbd_softc { int sc_ledstate; int sc_isconsole; - + struct wskbd_bell_data sc_bell_data; struct wskbd_keyrepeat_data sc_keyrepeat_data; #ifdef WSDISPLAY_SCROLLSUPPORT @@ -1093,27 +1089,16 @@ wskbd_displayioctl(device_t dev, u_long case WSKBDIO_BELL: if ((flag & FWRITE) == 0) return (EACCES); -#ifndef VAUDIOSPEAKER return ((*sc->sc_accessops->ioctl)(sc->sc_accesscookie, WSKBDIO_COMPLEXBELL, (void *)&sc->sc_bell_data, flag, l)); -#else - wskbd_cnbell(0, sc->sc_bell_data.pitch, sc->sc_bell_data.period, - sc->sc_bell_data.volume); - return 0; -#endif case WSKBDIO_COMPLEXBELL: if ((flag & FWRITE) == 0) return (EACCES); ubdp = (struct wskbd_bell_data *)data; SETBELL(ubdp, ubdp, &sc->sc_bell_data); -#ifndef VAUDIOSPEAKER return ((*sc->sc_accessops->ioctl)(sc->sc_accesscookie, WSKBDIO_COMPLEXBELL, (void *)ubdp, flag, l)); -#else - wskbd_cnbell(0, ubdp->pitch, ubdp->period, ubdp->volume); - return 0; -#endif case WSKBDIO_SETBELL: if ((flag & FWRITE) == 0) @@ -1481,14 +1466,10 @@ wskbd_cnbell(dev_t dev, u_int pitch, u_i if (!wskbd_console_initted) return; -#ifndef VAUDIOSPEAKER if (wskbd_console_data.t_consops->bell != NULL) (*wskbd_console_data.t_consops->bell) (wskbd_console_data.t_consaccesscookie, pitch, period, volume); -#else - speaker_play(pitch, period, volume); -#endif } static inline void
CVS commit: src/sys/net/npf
Module Name:src Committed By: christos Date: Sat Dec 10 22:09:50 UTC 2016 Modified Files: src/sys/net/npf: npf_conn.c Log Message: revert dir hack. To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/sys/net/npf/npf_conn.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_conn.c diff -u src/sys/net/npf/npf_conn.c:1.20 src/sys/net/npf/npf_conn.c:1.21 --- src/sys/net/npf/npf_conn.c:1.20 Sat Dec 10 14:05:45 2016 +++ src/sys/net/npf/npf_conn.c Sat Dec 10 17:09:49 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: npf_conn.c,v 1.20 2016/12/10 19:05:45 christos Exp $ */ +/* $NetBSD: npf_conn.c,v 1.21 2016/12/10 22:09:49 christos Exp $ */ /*- * Copyright (c) 2014-2015 Mindaugas Rasiukevicius @@ -99,7 +99,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: npf_conn.c,v 1.20 2016/12/10 19:05:45 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: npf_conn.c,v 1.21 2016/12/10 22:09:49 christos Exp $"); #include #include @@ -1115,7 +1115,6 @@ npf_conn_find(prop_dictionary_t idict, p return ESRCH; } - dir = dir == PFIL_IN ? PFIL_OUT : PFIL_IN; if (!npf_conn_ok(con, dir, true)) { atomic_dec_uint(&con->c_refcnt); return ESRCH;
CVS commit: src/libexec/identd
Module Name:src Committed By: christos Date: Sat Dec 10 22:09:18 UTC 2016 Modified Files: src/libexec/identd: npf.c Log Message: Fix the direction; ipf/pf seem to be wrong... To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/libexec/identd/npf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/libexec/identd/npf.c diff -u src/libexec/identd/npf.c:1.1 src/libexec/identd/npf.c:1.2 --- src/libexec/identd/npf.c:1.1 Sat Dec 10 00:43:11 2016 +++ src/libexec/identd/npf.c Sat Dec 10 17:09:18 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: npf.c,v 1.1 2016/12/10 05:43:11 christos Exp $ */ +/* $NetBSD: npf.c,v 1.2 2016/12/10 22:09:18 christos Exp $ */ /*- * Copyright (c) 2016 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__RCSID("$NetBSD: npf.c,v 1.1 2016/12/10 05:43:11 christos Exp $"); +__RCSID("$NetBSD: npf.c,v 1.2 2016/12/10 22:09:18 christos Exp $"); #include #include @@ -84,7 +84,7 @@ npf_natlookup(const struct sockaddr_stor maybe_syslog(LOG_ERR, "Cannot open /dev/npf: %m"); return 0; } - if (npf_nat_lookup(dev, af, addr, port, IPPROTO_TCP, PFIL_IN) == -1) { + if (npf_nat_lookup(dev, af, addr, port, IPPROTO_TCP, PFIL_OUT) == -1) { maybe_syslog(LOG_ERR, "NAT lookup failure: %m"); (void)close(dev); return 0;
CVS commit: src/libexec/identd
Module Name:src Committed By: christos Date: Sat Dec 10 22:08:13 UTC 2016 Modified Files: src/libexec/identd: identd.c Log Message: Fix varargs. To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36 src/libexec/identd/identd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/libexec/identd/identd.c diff -u src/libexec/identd/identd.c:1.35 src/libexec/identd/identd.c:1.36 --- src/libexec/identd/identd.c:1.35 Sat Dec 10 00:43:11 2016 +++ src/libexec/identd/identd.c Sat Dec 10 17:08:13 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: identd.c,v 1.35 2016/12/10 05:43:11 christos Exp $ */ +/* $NetBSD: identd.c,v 1.36 2016/12/10 22:08:13 christos Exp $ */ /* * identd.c - TCP/IP Ident protocol server. @@ -8,7 +8,7 @@ */ #include -__RCSID("$NetBSD: identd.c,v 1.35 2016/12/10 05:43:11 christos Exp $"); +__RCSID("$NetBSD: identd.c,v 1.36 2016/12/10 22:08:13 christos Exp $"); #include #include @@ -1050,12 +1050,17 @@ die(const char *message, ...) { va_list ap; - va_start(ap, message); - if (bflag) + if (bflag) { + va_start(ap, message); vwarnx(message, ap); - if (lflag) + va_end(ap); + } + + if (lflag) { + va_start(ap, message); vsyslog(LOG_ERR, message, ap); - va_end(ap); + va_end(ap); + } exit(EXIT_FAILURE); }
CVS commit: src/external/gpl3/binutils
Module Name:src Committed By: mrg Date: Sat Dec 10 21:33:53 UTC 2016 Modified Files: src/external/gpl3/binutils/lib/libbfd/arch/powerpc: bfd.h bfdver.h config.h src/external/gpl3/binutils/lib/libopcodes/arch/powerpc: config.h src/external/gpl3/binutils/usr.bin/common/arch/powerpc: config.h defs.mk src/external/gpl3/binutils/usr.bin/gas/arch/powerpc: config.h src/external/gpl3/binutils/usr.bin/gprof/arch/powerpc: gconfig.h src/external/gpl3/binutils/usr.bin/ld/arch/powerpc: config.h Log Message: rebuild mkantive for ppc and binutils 2.27. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 \ src/external/gpl3/binutils/lib/libbfd/arch/powerpc/bfd.h cvs rdiff -u -r1.9 -r1.10 \ src/external/gpl3/binutils/lib/libbfd/arch/powerpc/bfdver.h cvs rdiff -u -r1.5 -r1.6 \ src/external/gpl3/binutils/lib/libbfd/arch/powerpc/config.h cvs rdiff -u -r1.5 -r1.6 \ src/external/gpl3/binutils/lib/libopcodes/arch/powerpc/config.h cvs rdiff -u -r1.5 -r1.6 \ src/external/gpl3/binutils/usr.bin/common/arch/powerpc/config.h cvs rdiff -u -r1.7 -r1.8 \ src/external/gpl3/binutils/usr.bin/common/arch/powerpc/defs.mk cvs rdiff -u -r1.5 -r1.6 \ src/external/gpl3/binutils/usr.bin/gas/arch/powerpc/config.h cvs rdiff -u -r1.5 -r1.6 \ src/external/gpl3/binutils/usr.bin/gprof/arch/powerpc/gconfig.h cvs rdiff -u -r1.5 -r1.6 \ src/external/gpl3/binutils/usr.bin/ld/arch/powerpc/config.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/binutils/lib/libbfd/arch/powerpc/bfd.h diff -u src/external/gpl3/binutils/lib/libbfd/arch/powerpc/bfd.h:1.7 src/external/gpl3/binutils/lib/libbfd/arch/powerpc/bfd.h:1.8 --- src/external/gpl3/binutils/lib/libbfd/arch/powerpc/bfd.h:1.7 Fri Jan 29 17:30:23 2016 +++ src/external/gpl3/binutils/lib/libbfd/arch/powerpc/bfd.h Sat Dec 10 21:33:53 2016 @@ -11,7 +11,7 @@ /* Main header file for the bfd library -- portable access to object files. - Copyright (C) 1990-2015 Free Software Foundation, Inc. + Copyright (C) 1990-2016 Free Software Foundation, Inc. Contributed by Cygnus Support. @@ -522,7 +522,6 @@ extern void warn_deprecated (const char #define bfd_get_file_flags(abfd) ((abfd)->flags) #define bfd_applicable_file_flags(abfd) ((abfd)->xvec->object_flags) #define bfd_applicable_section_flags(abfd) ((abfd)->xvec->section_flags) -#define bfd_my_archive(abfd) ((abfd)->my_archive) #define bfd_has_map(abfd) ((abfd)->has_armap) #define bfd_is_thin_archive(abfd) ((abfd)->is_thin_archive) @@ -914,6 +913,9 @@ extern bfd_boolean bfd_elf32_arm_get_bfd extern bfd_boolean bfd_elf32_arm_add_glue_sections_to_bfd (bfd *, struct bfd_link_info *); +extern void bfd_elf32_arm_keep_private_stub_output_sections + (struct bfd_link_info *); + /* ELF ARM mapping symbol support. */ #define BFD_ARM_SPECIAL_SYM_TYPE_MAP (1 << 0) #define BFD_ARM_SPECIAL_SYM_TYPE_TAG (1 << 1) @@ -945,7 +947,8 @@ extern void elf32_arm_next_input_section (struct bfd_link_info *, struct bfd_section *); extern bfd_boolean elf32_arm_size_stubs (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma, - struct bfd_section * (*) (const char *, struct bfd_section *, unsigned int), + struct bfd_section * (*) (const char *, struct bfd_section *, + struct bfd_section *, unsigned int), void (*) (void)); extern bfd_boolean elf32_arm_build_stubs (struct bfd_link_info *); @@ -958,13 +961,6 @@ extern bfd_boolean elf32_arm_fix_exidx_c extern bfd_boolean elf32_tic6x_fix_exidx_coverage (struct bfd_section **, unsigned int, struct bfd_link_info *, bfd_boolean); -/* PowerPC @tls opcode transform/validate. */ -extern unsigned int _bfd_elf_ppc_at_tls_transform - (unsigned int, unsigned int); -/* PowerPC @tprel opcode transform/validate. */ -extern unsigned int _bfd_elf_ppc_at_tprel_transform - (unsigned int, unsigned int); - extern void bfd_elf64_aarch64_init_maps (bfd *); @@ -972,10 +968,10 @@ extern void bfd_elf32_aarch64_init_maps (bfd *); extern void bfd_elf64_aarch64_set_options - (bfd *, struct bfd_link_info *, int, int, int, int, int); + (bfd *, struct bfd_link_info *, int, int, int, int, int, int); extern void bfd_elf32_aarch64_set_options - (bfd *, struct bfd_link_info *, int, int, int, int, int); + (bfd *, struct bfd_link_info *, int, int, int, int, int, int); /* ELF AArch64 mapping symbol support. */ #define BFD_AARCH64_SPECIAL_SYM_TYPE_MAP (1 << 0) @@ -1436,6 +1432,9 @@ typedef struct bfd_section when memory read flag isn't set. */ #define SEC_COFF_NOREAD 0x4000 + /* Indicate that section has the no read flag set. */ +#define SEC_ELF_NOREAD 0x8000 + /* End of section flags. */ /* Some internal packed boolean fields. */ @@ -1502,7 +1501,7 @@ typedef struct bfd_section information. */ bfd_vma lma; - /* The siz
CVS commit: src/lib/libc/arch/ia64/sys
Module Name:src Committed By: scole Date: Sat Dec 10 21:19:15 UTC 2016 Modified Files: src/lib/libc/arch/ia64/sys: exect.S Log Message: Add exect stub so "build.sh distribution" will compile To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/lib/libc/arch/ia64/sys/exect.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/ia64/sys/exect.S diff -u src/lib/libc/arch/ia64/sys/exect.S:1.1 src/lib/libc/arch/ia64/sys/exect.S:1.2 --- src/lib/libc/arch/ia64/sys/exect.S:1.1 Sun Sep 10 21:22:34 2006 +++ src/lib/libc/arch/ia64/sys/exect.S Sat Dec 10 21:19:15 2016 @@ -1,3 +1,12 @@ -/* $NetBSD: exect.S,v 1.1 2006/09/10 21:22:34 cherry Exp $ */ +/* $NetBSD: exect.S,v 1.2 2016/12/10 21:19:15 scole Exp $ */ -/* XXX: Stub */ \ No newline at end of file +/* XXX: Stub */ + +#include + +#include "SYS.h" + +ENTRY(exect, 3) + // XXX break into debugger in ski + break.i 1 +END(exect)
CVS commit: src/sys/dev/scsipi
Module Name:src Committed By: mlelstv Date: Sat Dec 10 21:17:12 UTC 2016 Modified Files: src/sys/dev/scsipi: cd.c Log Message: appease gcc. To generate a diff of this commit: cvs rdiff -u -r1.334 -r1.335 src/sys/dev/scsipi/cd.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/scsipi/cd.c diff -u src/sys/dev/scsipi/cd.c:1.334 src/sys/dev/scsipi/cd.c:1.335 --- src/sys/dev/scsipi/cd.c:1.334 Sat Dec 10 10:26:38 2016 +++ src/sys/dev/scsipi/cd.c Sat Dec 10 21:17:12 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: cd.c,v 1.334 2016/12/10 10:26:38 mlelstv Exp $ */ +/* $NetBSD: cd.c,v 1.335 2016/12/10 21:17:12 mlelstv Exp $ */ /*- * Copyright (c) 1998, 2001, 2003, 2004, 2005, 2008 The NetBSD Foundation, @@ -50,7 +50,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cd.c,v 1.334 2016/12/10 10:26:38 mlelstv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cd.c,v 1.335 2016/12/10 21:17:12 mlelstv Exp $"); #include #include @@ -722,7 +722,7 @@ cdstrategy(struct buf *bp) * If label and device don't agree in sector size use a bounce buffer */ if (dksc->sc_dkdev.dk_label->d_secsize != dksc->sc_dkdev.dk_geom.dg_secsize) { - struct cdbounce *bounce; + struct cdbounce *bounce = NULL; error = cd_make_bounce(cd, bp, &bounce); if (error)
CVS commit: src/lib/libnpf
Module Name:src Committed By: christos Date: Sat Dec 10 21:04:12 UTC 2016 Modified Files: src/lib/libnpf: npf.c npf.h Log Message: use array notation To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.39 src/lib/libnpf/npf.c cvs rdiff -u -r1.29 -r1.30 src/lib/libnpf/npf.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libnpf/npf.c diff -u src/lib/libnpf/npf.c:1.38 src/lib/libnpf/npf.c:1.39 --- src/lib/libnpf/npf.c:1.38 Sat Dec 10 14:07:22 2016 +++ src/lib/libnpf/npf.c Sat Dec 10 16:04:12 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: npf.c,v 1.38 2016/12/10 19:07:22 christos Exp $ */ +/* $NetBSD: npf.c,v 1.39 2016/12/10 21:04:12 christos Exp $ */ /*- * Copyright (c) 2010-2015 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: npf.c,v 1.38 2016/12/10 19:07:22 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: npf.c,v 1.39 2016/12/10 21:04:12 christos Exp $"); #include #include @@ -1249,9 +1249,8 @@ _npf_debug_addif(nl_config_t *ncf, const prop_object_release(ifdict); } - int -npf_nat_lookup(int fd, int af, npf_addr_t **addr, in_port_t *port, +npf_nat_lookup(int fd, int af, npf_addr_t *addr[2], in_port_t port[2], int proto, int dir) { prop_dictionary_t conn_dict, conn_res = NULL; Index: src/lib/libnpf/npf.h diff -u src/lib/libnpf/npf.h:1.29 src/lib/libnpf/npf.h:1.30 --- src/lib/libnpf/npf.h:1.29 Sat Dec 10 00:37:55 2016 +++ src/lib/libnpf/npf.h Sat Dec 10 16:04:12 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: npf.h,v 1.29 2016/12/10 05:37:55 christos Exp $ */ +/* $NetBSD: npf.h,v 1.30 2016/12/10 21:04:12 christos Exp $ */ /*- * Copyright (c) 2011-2014 The NetBSD Foundation, Inc. @@ -111,7 +111,7 @@ int npf_rproc_insert(nl_config_t *, nl_ nl_nat_t * npf_nat_create(int, u_int, const char *, int, npf_addr_t *, npf_netmask_t, in_port_t); int npf_nat_insert(nl_config_t *, nl_nat_t *, pri_t); -int npf_nat_lookup(int, int, npf_addr_t **, in_port_t *, int, int); +int npf_nat_lookup(int, int, npf_addr_t *[2], in_port_t [2], int, int); nl_table_t * npf_table_create(const char *, u_int, int); int npf_table_add_entry(nl_table_t *, int,
CVS commit: src/lib/libc/sys
Module Name:src Committed By: kamil Date: Sat Dec 10 20:02:07 UTC 2016 Modified Files: src/lib/libc/sys: ptrace.2 Log Message: Remove outdated note in the PT_DUMPCORE call of the ptrace(2) man-page Currently the PT_DUMPCORE call requires process to be stopped, therefore it no longer need to warn about stoped tracee to generate consistent data. Sponsored by To generate a diff of this commit: cvs rdiff -u -r1.40 -r1.41 src/lib/libc/sys/ptrace.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/sys/ptrace.2 diff -u src/lib/libc/sys/ptrace.2:1.40 src/lib/libc/sys/ptrace.2:1.41 --- src/lib/libc/sys/ptrace.2:1.40 Thu Nov 24 00:12:52 2016 +++ src/lib/libc/sys/ptrace.2 Sat Dec 10 20:02:07 2016 @@ -1,4 +1,4 @@ -.\" $NetBSD: ptrace.2,v 1.40 2016/11/24 00:12:52 kamil Exp $ +.\" $NetBSD: ptrace.2,v 1.41 2016/12/10 20:02:07 kamil Exp $ .\" .\" This file is in the public domain. .Dd November 1, 2016 @@ -257,10 +257,6 @@ argument should contain the name of the and the .Fa data argument should contain the length of the core filename. -This -.Nm -call currently does not stop the child process so it can generate -inconsistent data. .It Dv PT_LWPINFO Returns information about a thread from the list of threads for the process specified in the
CVS commit: src/distrib/sets/lists/xdebug
Module Name:src Committed By: martin Date: Sat Dec 10 19:28:19 UTC 2016 Modified Files: src/distrib/sets/lists/xdebug: md.sparc Log Message: glint_drv.so.1.debug is not obsolete with XOrg server 1.18 any more To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/distrib/sets/lists/xdebug/md.sparc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/xdebug/md.sparc diff -u src/distrib/sets/lists/xdebug/md.sparc:1.9 src/distrib/sets/lists/xdebug/md.sparc:1.10 --- src/distrib/sets/lists/xdebug/md.sparc:1.9 Thu Sep 29 18:58:27 2016 +++ src/distrib/sets/lists/xdebug/md.sparc Sat Dec 10 19:28:19 2016 @@ -1,4 +1,4 @@ -# $NetBSD: md.sparc,v 1.9 2016/09/29 18:58:27 christos Exp $ +# $NetBSD: md.sparc,v 1.10 2016/12/10 19:28:19 martin Exp $ ./usr/X11R7/lib/modules/extensions/libcfb32_g.a -unknown- obsolete ./usr/X11R7/lib/modules/extensions/libcfb_g.a -unknown- obsolete ./usr/X11R7/lib/modules/extensions/libdbe_g.a -unknown- debuglib,xorg,obsolete @@ -50,8 +50,7 @@ ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/ag10e_drv.so.0.debug -unknown- xorg,debug,xorg_server_ver=110 ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/ag10e_drv.so.0.debug -unknown- xorg,debug,xorg_server_ver=118,obsolete ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/ati_drv.so.6.debug -unknown- xorg,debug -./usr/libdata/debug/usr/X11R7/lib/modules/drivers/glint_drv.so.1.debug -unknown- xorg,debug,xorg_server_ver=110 -./usr/libdata/debug/usr/X11R7/lib/modules/drivers/glint_drv.so.1.debug -unknown- xorg,debug,xorg_server_ver=118,obsolete +./usr/libdata/debug/usr/X11R7/lib/modules/drivers/glint_drv.so.1.debug -unknown- xorg,debug ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/kbd_drv.so.1.debug -unknown- xorg,debug ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/libag10e_drv.so.0.debug obsolete xorg,obsolete ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/libati_drv.so.6.debug obsolete xorg,obsolete
CVS commit: src/lib/libnpf
Module Name:src Committed By: christos Date: Sat Dec 10 19:07:22 UTC 2016 Modified Files: src/lib/libnpf: npf.c Log Message: update for v18 conn list; more error checks To generate a diff of this commit: cvs rdiff -u -r1.37 -r1.38 src/lib/libnpf/npf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libnpf/npf.c diff -u src/lib/libnpf/npf.c:1.37 src/lib/libnpf/npf.c:1.38 --- src/lib/libnpf/npf.c:1.37 Sat Dec 10 03:48:11 2016 +++ src/lib/libnpf/npf.c Sat Dec 10 14:07:22 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: npf.c,v 1.37 2016/12/10 08:48:11 kre Exp $ */ +/* $NetBSD: npf.c,v 1.38 2016/12/10 19:07:22 christos Exp $ */ /*- * Copyright (c) 2010-2015 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: npf.c,v 1.37 2016/12/10 08:48:11 kre Exp $"); +__KERNEL_RCSID(0, "$NetBSD: npf.c,v 1.38 2016/12/10 19:07:22 christos Exp $"); #include #include @@ -1254,45 +1254,56 @@ int npf_nat_lookup(int fd, int af, npf_addr_t **addr, in_port_t *port, int proto, int dir) { - prop_dictionary_t conn_dict, conn_res; + prop_dictionary_t conn_dict, conn_res = NULL; int error = EINVAL; conn_dict = prop_dictionary_create(); - if (conn_dict == NULL) { + if (conn_dict == NULL) return ENOMEM; - } - if (!_npf_add_addr(conn_dict, "saddr", af, addr[0])) + + if (!prop_dictionary_set_uint16(conn_dict, "direction", dir)) goto out; - if (!_npf_add_addr(conn_dict, "daddr", af, addr[1])) + conn_res = prop_dictionary_create(); + if (conn_res == NULL) goto out; - prop_dictionary_set_uint16(conn_dict, "sport", port[0]); - prop_dictionary_set_uint16(conn_dict, "dport", port[1]); - prop_dictionary_set_uint16(conn_dict, "proto", proto); - prop_dictionary_set_uint16(conn_dict, "direction", dir); + if (!_npf_add_addr(conn_res, "saddr", af, addr[0])) + goto out; + if (!_npf_add_addr(conn_res, "daddr", af, addr[1])) + goto out; + if (!prop_dictionary_set_uint16(conn_res, "sport", port[0])) + goto out; + if (!prop_dictionary_set_uint16(conn_res, "dport", port[1])) + goto out; + if (!prop_dictionary_set_uint16(conn_res, "proto", proto)) + goto out; + if (!prop_dictionary_set(conn_dict, "key", conn_res)) + goto out; + + prop_object_release(conn_res); - prop_dictionary_externalize_to_file(conn_dict, "/tmp/in"); error = prop_dictionary_sendrecv_ioctl(conn_dict, fd, IOC_NPF_CONN_LOOKUP, &conn_res); if (error != 0) goto out; - prop_dictionary_externalize_to_file(conn_res, "/tmp/out"); prop_dictionary_t nat = prop_dictionary_get(conn_res, "nat"); if (nat == NULL) { errno = ENOENT; goto out; } + if (!_npf_get_addr(nat, "oaddr", addr[0])) { - prop_object_release(nat); error = EINVAL; goto out; } + prop_dictionary_get_uint16(nat, "oport", &port[0]); prop_dictionary_get_uint16(nat, "tport", &port[1]); - prop_object_release(conn_res); out: + if (conn_res) + prop_object_release(conn_res); prop_object_release(conn_dict); return error; }
CVS commit: src/sys/net/npf
Module Name:src Committed By: christos Date: Sat Dec 10 19:05:46 UTC 2016 Modified Files: src/sys/net/npf: npf.h npf_conn.c npf_conn.h Log Message: Welcome to version 18: - Connection state keys are not stored and loaded using the logical key contents. - connection finder key is stored in a map that contains the key and the direction. To generate a diff of this commit: cvs rdiff -u -r1.50 -r1.51 src/sys/net/npf/npf.h cvs rdiff -u -r1.19 -r1.20 src/sys/net/npf/npf_conn.c cvs rdiff -u -r1.9 -r1.10 src/sys/net/npf/npf_conn.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/net/npf/npf.h diff -u src/sys/net/npf/npf.h:1.50 src/sys/net/npf/npf.h:1.51 --- src/sys/net/npf/npf.h:1.50 Sat Dec 10 00:41:10 2016 +++ src/sys/net/npf/npf.h Sat Dec 10 14:05:45 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: npf.h,v 1.50 2016/12/10 05:41:10 christos Exp $ */ +/* $NetBSD: npf.h,v 1.51 2016/12/10 19:05:45 christos Exp $ */ /*- * Copyright (c) 2009-2014 The NetBSD Foundation, Inc. @@ -45,7 +45,7 @@ #include #include -#define NPF_VERSION 17 +#define NPF_VERSION 18 /* * Public declarations and definitions. Index: src/sys/net/npf/npf_conn.c diff -u src/sys/net/npf/npf_conn.c:1.19 src/sys/net/npf/npf_conn.c:1.20 --- src/sys/net/npf/npf_conn.c:1.19 Sat Dec 10 04:26:16 2016 +++ src/sys/net/npf/npf_conn.c Sat Dec 10 14:05:45 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: npf_conn.c,v 1.19 2016/12/10 09:26:16 kre Exp $ */ +/* $NetBSD: npf_conn.c,v 1.20 2016/12/10 19:05:45 christos Exp $ */ /*- * Copyright (c) 2014-2015 Mindaugas Rasiukevicius @@ -99,7 +99,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: npf_conn.c,v 1.19 2016/12/10 09:26:16 kre Exp $"); +__KERNEL_RCSID(0, "$NetBSD: npf_conn.c,v 1.20 2016/12/10 19:05:45 christos Exp $"); #include #include @@ -241,10 +241,10 @@ npf_conn_trackable_p(const npf_cache_t * } static uint32_t -connkey_setkey(npf_connkey_t *key, uint32_t proto, const void *ipv, -uint16_t *id, size_t alen, bool forw) +connkey_setkey(npf_connkey_t *key, uint16_t proto, const void *ipv, +const uint16_t *id, uint16_t alen, bool forw) { - uint32_t isrc, idst; + uint32_t isrc, idst, *k = key->ck_key; const npf_addr_t * const *ips = ipv; if (__predict_true(forw)) { isrc = NPF_SRC, idst = NPF_DST; @@ -264,21 +264,43 @@ connkey_setkey(npf_connkey_t *key, uint3 * on the 'alen' field; it is a length in bytes, either 4 or 16. */ - key->ck_key[0] = ((uint32_t)proto << 16) | (alen & 0x); - key->ck_key[1] = ((uint32_t)id[isrc] << 16) | id[idst]; + k[0] = ((uint32_t)proto << 16) | (alen & 0x); + k[1] = ((uint32_t)id[isrc] << 16) | id[idst]; if (__predict_true(alen == sizeof(in_addr_t))) { - key->ck_key[2] = ips[isrc]->s6_addr32[0]; - key->ck_key[3] = ips[idst]->s6_addr32[0]; + k[2] = ips[isrc]->s6_addr32[0]; + k[3] = ips[idst]->s6_addr32[0]; return 4 * sizeof(uint32_t); } else { const u_int nwords = alen >> 2; - memcpy(&key->ck_key[2], ips[isrc], alen); - memcpy(&key->ck_key[2 + nwords], ips[idst], alen); + memcpy(&k[2], ips[isrc], alen); + memcpy(&k[2 + nwords], ips[idst], alen); return (2 + (nwords * 2)) * sizeof(uint32_t); } } +static void +connkey_getkey(const npf_connkey_t *key, uint16_t *proto, npf_addr_t *ips, +uint16_t *id, uint16_t *alen) +{ + const uint32_t *k = key->ck_key; + + *proto = k[0] >> 16; + *alen = k[0] & 0x; + id[NPF_SRC] = k[1] >> 16; + id[NPF_DST] = k[1] & 0x; + + switch (*alen) { + case sizeof(struct in6_addr): + case sizeof(struct in_addr): + memcpy(&ips[NPF_SRC], &k[2], *alen); + memcpy(&ips[NPF_DST], &k[2 + ((unsigned)*alen >> 2)], *alen); + return; + default: + KASSERT(0); + } +} + /* * npf_conn_conkey: construct a key for the connection lookup. * @@ -287,7 +309,7 @@ connkey_setkey(npf_connkey_t *key, uint3 unsigned npf_conn_conkey(const npf_cache_t *npc, npf_connkey_t *key, const bool forw) { - const u_int alen = npc->npc_alen; + const uint16_t alen = npc->npc_alen; const struct tcphdr *th; const struct udphdr *uh; uint16_t id[2]; @@ -902,13 +924,37 @@ npf_conndb_export(prop_array_t conlist) return 0; } +static prop_dictionary_t +npf_connkey_export(const npf_connkey_t *key) +{ + uint16_t id[2], alen, proto; + npf_addr_t ips[2]; + prop_data_t d; + prop_dictionary_t kdict = prop_dictionary_create(); + + connkey_getkey(key, &proto, ips, id, &alen); + + prop_dictionary_set_uint16(kdict, "proto", proto); + + prop_dictionary_set_uint16(kdict, "sport", id[NPF_SRC]); + prop_dictionary_set_uint16(kdict, "dport", id[NPF_DST]); + + d = prop_data_create_data(&ips[NPF_SRC], alen); + prop_dictionary_set_and_rel(kdict, "saddr", d); + + d = prop_data_create_data(&ips[NPF_DST], alen); + prop_dictionary_set_and_rel(kdict, "daddr", d); + + return kdict; +} + /* * npf_conn_export: serialise a single connection. */ prop_dictionary_t npf_conn_export(const npf_conn_t *con) { - prop
CVS commit: src/sys/net/npf
Module Name:src Committed By: christos Date: Sat Dec 10 19:02:18 UTC 2016 Modified Files: src/sys/net/npf: npf_rproc.c Log Message: Add missing extcalls array. This is currently a no-op, but this is what userland does too. Allows npfctl save; npfctl load to work again. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/net/npf/npf_rproc.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_rproc.c diff -u src/sys/net/npf/npf_rproc.c:1.12 src/sys/net/npf/npf_rproc.c:1.13 --- src/sys/net/npf/npf_rproc.c:1.12 Sun Aug 10 21:54:12 2014 +++ src/sys/net/npf/npf_rproc.c Sat Dec 10 14:02:18 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: npf_rproc.c,v 1.12 2014/08/11 01:54:12 rmind Exp $ */ +/* $NetBSD: npf_rproc.c,v 1.13 2016/12/10 19:02:18 christos Exp $ */ /*- * Copyright (c) 2009-2013 The NetBSD Foundation, Inc. @@ -269,6 +269,8 @@ npf_rprocset_export(const npf_rprocset_t LIST_FOREACH(rp, &rpset->rps_list, rp_entry) { rpdict = prop_dictionary_create(); + prop_array_t extcalls = prop_array_create(); + prop_dictionary_set_and_rel(rpdict, "extcalls", extcalls); prop_dictionary_set_cstring(rpdict, "name", rp->rp_name); prop_dictionary_set_uint32(rpdict, "flags", rp->rp_flags); prop_array_add(rprocs, rpdict);
CVS commit: src/sys/dev/isa
Module Name:src Committed By: maya Date: Sat Dec 10 17:41:44 UTC 2016 Modified Files: src/sys/dev/isa: cms.c Log Message: Be explicit about precedence of operators Appeases clang when building an ALL kernel To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/sys/dev/isa/cms.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/isa/cms.c diff -u src/sys/dev/isa/cms.c:1.21 src/sys/dev/isa/cms.c:1.22 --- src/sys/dev/isa/cms.c:1.21 Mon Apr 9 10:18:16 2012 +++ src/sys/dev/isa/cms.c Sat Dec 10 17:41:44 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: cms.c,v 1.21 2012/04/09 10:18:16 plunky Exp $ */ +/* $NetBSD: cms.c,v 1.22 2016/12/10 17:41:44 maya Exp $ */ /* * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cms.c,v 1.21 2012/04/09 10:18:16 plunky Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cms.c,v 1.22 2016/12/10 17:41:44 maya Exp $"); #include #include @@ -261,7 +261,7 @@ cms_on(midisyn *ms, uint_fast16_t vidx, /* set the volume */ /* this may be the wrong curve but will do something. no docs! */ - vol = 15 + (level_cB > -75) ? level_cB/5 : -15; + vol = 15 + ((level_cB > -75) ? level_cB/5 : -15); CMS_WRITE(sc, chip, CMS_IREG_VOL0 + voice, ((vol<<4)|vol)); /* enable the voice */
CVS commit: src/sys/dev
Module Name:src Committed By: martin Date: Sat Dec 10 17:31:33 UTC 2016 Modified Files: src/sys/dev: audio.c Log Message: Avoid crashes in calcwater when audioattach did not fully complete To generate a diff of this commit: cvs rdiff -u -r1.273 -r1.274 src/sys/dev/audio.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/audio.c diff -u src/sys/dev/audio.c:1.273 src/sys/dev/audio.c:1.274 --- src/sys/dev/audio.c:1.273 Sat Dec 10 17:01:08 2016 +++ src/sys/dev/audio.c Sat Dec 10 17:31:33 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: audio.c,v 1.273 2016/12/10 17:01:08 maya Exp $ */ +/* $NetBSD: audio.c,v 1.274 2016/12/10 17:31:33 martin Exp $ */ /*- * Copyright (c) 2016 Nathanial Sloss @@ -148,7 +148,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.273 2016/12/10 17:01:08 maya Exp $"); +__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.274 2016/12/10 17:31:33 martin Exp $"); #include "audio.h" #if NAUDIO > 0 @@ -1809,7 +1809,7 @@ audio_calcwater(struct audio_softc *sc, struct virtual_channel *vc = sc->sc_vchan[n]; /* set high at 100% */ - if (audio_can_playback(sc)) { + if (audio_can_playback(sc) && vc && vc->sc_pustream) { vc->sc_mpr.usedhigh = vc->sc_pustream->end - vc->sc_pustream->start; /* set low at 75% of usedhigh */ @@ -1818,7 +1818,7 @@ audio_calcwater(struct audio_softc *sc, vc->sc_mpr.usedlow -= vc->sc_mpr.blksize; } - if (audio_can_capture(sc)) { + if (audio_can_capture(sc) && vc && vc->sc_rustream) { vc->sc_mrr.usedhigh = vc->sc_rustream->end - vc->sc_rustream->start - vc->sc_mrr.blksize;
CVS commit: src/sys/dev
Module Name:src Committed By: maya Date: Sat Dec 10 17:01:09 UTC 2016 Modified Files: src/sys/dev: audio.c Log Message: fix AUDIO_DEBUG build (it builds, it boots, it plays music) typos (vhan to vchan), sc->sc_mode[n] to vc->sc_mode, etc. To generate a diff of this commit: cvs rdiff -u -r1.272 -r1.273 src/sys/dev/audio.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/audio.c diff -u src/sys/dev/audio.c:1.272 src/sys/dev/audio.c:1.273 --- src/sys/dev/audio.c:1.272 Sat Dec 10 16:08:04 2016 +++ src/sys/dev/audio.c Sat Dec 10 17:01:08 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: audio.c,v 1.272 2016/12/10 16:08:04 maya Exp $ */ +/* $NetBSD: audio.c,v 1.273 2016/12/10 17:01:08 maya Exp $ */ /*- * Copyright (c) 2016 Nathanial Sloss @@ -148,7 +148,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.272 2016/12/10 16:08:04 maya Exp $"); +__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.273 2016/12/10 17:01:08 maya Exp $"); #include "audio.h" #if NAUDIO > 0 @@ -1075,9 +1075,9 @@ audio_printsc(struct audio_softc *sc) printf("rchan 0x%x wchan 0x%x ", cv_has_waiters(&sc->sc_rchan), cv_has_waiters(&sc->sc_wchan)); printf("rring used 0x%x pring used=%d\n", - audio_stream_get_used(&sc->sc_vchan[n].sc_mrr.s), - audio_stream_get_used(&sc->sc_vhan[n].sc_mpr.s)); - printf("rbus 0x%x pbus 0x%x ", sc->sc_rbus, sc->sc_vchan[n]->sc_pbus); + audio_stream_get_used(&sc->sc_vchan[n]->sc_mrr.s), + audio_stream_get_used(&sc->sc_vchan[n]->sc_mpr.s)); + printf("rbus 0x%x pbus 0x%x ", sc->sc_vchan[n]->sc_rbus, sc->sc_vchan[n]->sc_pbus); printf("blksize %d", sc->sc_vchan[n]->sc_mpr.blksize); printf("hiwat %d lowat %d\n", sc->sc_vchan[n]->sc_mpr.usedhigh, sc->sc_vchan[n]->sc_mpr.usedlow); @@ -1299,7 +1299,7 @@ audio_setup_rfilters(struct audio_softc for (i = 0; i < rfilters->req_size; i++) { char num[100]; snprintf(num, 100, "[%d]", i); - audio_print_params(num, &sc->sc_rstreams[i].param); + audio_print_params(num, &vc->sc_rstreams[i].param); } #endif /* AUDIO_DEBUG */ @@ -1782,10 +1782,10 @@ audio_initbufs(struct audio_softc *sc, i sc->sc_pblktime = (u_long)( (double)sc->sc_vchan[n]->sc_mpr.blksize * 10 / (double)(sc->sc_vchan[n]->sc_pparams.precision / NBBY * - sc->sc_vhan[n].sc_pparams.channels * - sc->sc_vhan[n].sc_pparams.sample_rate)) * 10; + sc->sc_vchan[n].sc_pparams.channels * + sc->sc_vchan[n].sc_pparams.sample_rate)) * 10; DPRINTF(("audio: play blktime = %lu for %d\n", - sc->sc_pblktime, sc->sc_vhan[n].sc_mpr.blksize)); + sc->sc_pblktime, sc->sc_vchan[n].sc_mpr.blksize)); } if (audio_can_capture(sc)) { sc->sc_rnintr = 0; @@ -1978,7 +1978,7 @@ audio_open(dev_t dev, struct audio_softc /* audio_close() decreases sc_mpr[n].usedlow, recalculate here */ audio_calcwater(sc, n); - DPRINTF(("audio_open: done sc_mode = 0x%x\n", sc->sc_mode[n])); + DPRINTF(("audio_open: done sc_mode = 0x%x\n", vc->sc_mode)); mutex_enter(sc->sc_intr_lock); sc->sc_nmixer_states += 2; @@ -2064,7 +2064,7 @@ audio_drain(struct audio_softc *sc, int KASSERT(mutex_owned(sc->sc_lock)); KASSERT(mutex_owned(sc->sc_intr_lock)); - DPRINTF(("audio_drain: enter busy=%d\n", sc->sc_pbus[n])); + DPRINTF(("audio_drain: enter busy=%d\n", sc->sc_vchan[n]->sc_pbus)); cb = &sc->sc_vchan[n]->sc_mpr; if (cb->mmapped) return 0; @@ -3495,7 +3495,7 @@ audio_mix(void *v) mix_func(sc, cb, n); DPRINTFN(2, ("audio_pint: mode=%d pause=%d used=%d lowat=%d\n", - sc->sc_mode[n], cb->pause, + vc->sc_mode, cb->pause, audio_stream_get_used(vc->sc_pustream), cb->usedlow)); @@ -4371,7 +4371,7 @@ audiosetinfo(struct audio_softc *sc, str #ifdef AUDIO_DEBUG if (audiodebug > 1 && nr > 0) { audio_print_params("audiosetinfo() After setting record params:", - &sc->sc_rparams); + &vc->sc_rparams); } if (audiodebug > 1 && np > 0) { audio_print_params("audiosetinfo() After setting play params:",
CVS commit: src/sys/dev
Module Name:src Committed By: maya Date: Sat Dec 10 16:08:04 UTC 2016 Modified Files: src/sys/dev: audio.c Log Message: remove redundant null check allocating with KM_SLEEP can't fail To generate a diff of this commit: cvs rdiff -u -r1.271 -r1.272 src/sys/dev/audio.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/audio.c diff -u src/sys/dev/audio.c:1.271 src/sys/dev/audio.c:1.272 --- src/sys/dev/audio.c:1.271 Fri Dec 9 13:06:02 2016 +++ src/sys/dev/audio.c Sat Dec 10 16:08:04 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: audio.c,v 1.271 2016/12/09 13:06:02 martin Exp $ */ +/* $NetBSD: audio.c,v 1.272 2016/12/10 16:08:04 maya Exp $ */ /*- * Copyright (c) 2016 Nathanial Sloss @@ -148,7 +148,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.271 2016/12/09 13:06:02 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.272 2016/12/10 16:08:04 maya Exp $"); #include "audio.h" #if NAUDIO > 0 @@ -1331,8 +1331,6 @@ audio_stream_ctor(audio_stream_t *stream size = min(size, AU_RING_SIZE); stream->bufsize = size; stream->start = kmem_zalloc(size, KM_SLEEP); - if (stream->start == NULL) - return ENOMEM; frame_size = (param->precision + 7) / 8 * param->channels; size = (size / frame_size) * frame_size; stream->end = stream->start + size; @@ -1864,8 +1862,6 @@ audio_open(dev_t dev, struct audio_softc return ENXIO; sc->sc_vchan[n] = kmem_zalloc(sizeof(struct virtual_channel), KM_SLEEP); - if (sc->sc_vchan[n] == NULL) - return ENOMEM; vc = sc->sc_vchan[n]; vc->sc_open = 0;
CVS commit: src/lib/libc/gen
Module Name:src Committed By: rin Date: Sat Dec 10 14:13:29 UTC 2016 Modified Files: src/lib/libc/gen: exec.3 Log Message: Fix typo; ".Lx" should be ".Nx" To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/lib/libc/gen/exec.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/gen/exec.3 diff -u src/lib/libc/gen/exec.3:1.26 src/lib/libc/gen/exec.3:1.27 --- src/lib/libc/gen/exec.3:1.26 Sat Sep 27 16:42:07 2014 +++ src/lib/libc/gen/exec.3 Sat Dec 10 14:13:29 2016 @@ -1,4 +1,4 @@ -.\" $NetBSD: exec.3,v 1.26 2014/09/27 16:42:07 wiz Exp $ +.\" $NetBSD: exec.3,v 1.27 2016/12/10 14:13:29 rin Exp $ .\" .\" Copyright (c) 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -284,5 +284,5 @@ The function appeared first in QNX and the .Fn execvpe function exists on both -.Lx +.Nx and QNX.
CVS commit: src/sys/arch/x68k/stand/loadbsd
Module Name:src Committed By: rin Date: Sat Dec 10 14:06:44 UTC 2016 Modified Files: src/sys/arch/x68k/stand/loadbsd: Makefile Log Message: Fix comment. We do not use the a.out format anymore... To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sys/arch/x68k/stand/loadbsd/Makefile 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/x68k/stand/loadbsd/Makefile diff -u src/sys/arch/x68k/stand/loadbsd/Makefile:1.17 src/sys/arch/x68k/stand/loadbsd/Makefile:1.18 --- src/sys/arch/x68k/stand/loadbsd/Makefile:1.17 Sat Dec 10 14:03:34 2016 +++ src/sys/arch/x68k/stand/loadbsd/Makefile Sat Dec 10 14:06:44 2016 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.17 2016/12/10 14:03:34 rin Exp $ +# $NetBSD: Makefile,v 1.18 2016/12/10 14:06:44 rin Exp $ S= ${.CURDIR}/../../../.. @@ -15,7 +15,7 @@ BINDIR= /usr/mdec .include .include -STRIPFLAG= # not an a.out +STRIPFLAG= # not an elf AOUT2HUXDIR!= cd ${.CURDIR}/../aout2hux && ${PRINTOBJDIR} AOUT2HUX= ${AOUT2HUXDIR}/aout2hux
CVS commit: src/sys/arch/x68k/stand/loadbsd
Module Name:src Committed By: rin Date: Sat Dec 10 14:03:34 UTC 2016 Modified Files: src/sys/arch/x68k/stand/loadbsd: Makefile Log Message: Clear STRIPFLAG after include bsd.own.mk; it can be modified by mk.conf via bsd.own.mk. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/arch/x68k/stand/loadbsd/Makefile 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/x68k/stand/loadbsd/Makefile diff -u src/sys/arch/x68k/stand/loadbsd/Makefile:1.16 src/sys/arch/x68k/stand/loadbsd/Makefile:1.17 --- src/sys/arch/x68k/stand/loadbsd/Makefile:1.16 Wed Aug 21 08:17:34 2013 +++ src/sys/arch/x68k/stand/loadbsd/Makefile Sat Dec 10 14:03:34 2016 @@ -1,10 +1,9 @@ -# $NetBSD: Makefile,v 1.16 2013/08/21 08:17:34 matt Exp $ +# $NetBSD: Makefile,v 1.17 2016/12/10 14:03:34 rin Exp $ S= ${.CURDIR}/../../../.. BASE= loadbsd PROG= ${BASE}.x # Human68k ".x" executable -STRIPFLAG= # not an a.out BINMODE=444 # not to be run on NetBSD SRCS= start.S loadbsd.c xprintf.c trampoline.S @@ -16,6 +15,8 @@ BINDIR= /usr/mdec .include .include +STRIPFLAG= # not an a.out + AOUT2HUXDIR!= cd ${.CURDIR}/../aout2hux && ${PRINTOBJDIR} AOUT2HUX= ${AOUT2HUXDIR}/aout2hux LIBDOS!= cd ${.CURDIR}/../libdos && ${PRINTOBJDIR}
CVS commit: src/usr.sbin/mlxctl
Module Name:src Committed By: rin Date: Sat Dec 10 13:55:56 UTC 2016 Modified Files: src/usr.sbin/mlxctl: Makefile Log Message: s/LIButil/LIBUTIL/ in DPADD To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/mlxctl/Makefile 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/mlxctl/Makefile diff -u src/usr.sbin/mlxctl/Makefile:1.4 src/usr.sbin/mlxctl/Makefile:1.5 --- src/usr.sbin/mlxctl/Makefile:1.4 Wed Jun 11 14:51:49 2014 +++ src/usr.sbin/mlxctl/Makefile Sat Dec 10 13:55:55 2016 @@ -1,10 +1,10 @@ -# $NetBSD: Makefile,v 1.4 2014/06/11 14:51:49 joerg Exp $ +# $NetBSD: Makefile,v 1.5 2016/12/10 13:55:55 rin Exp $ PROG= mlxctl SRCS= cmds.c config.c dklist.c main.c util.c MAN= mlxctl.8 LDADD= -lutil -DPADD= ${LIButil} +DPADD= ${LIBUTIL} .include
CVS commit: src/external/bsd/less/bin
Module Name:src Committed By: rin Date: Sat Dec 10 13:44:51 UTC 2016 Modified Files: src/external/bsd/less/bin/less: Makefile src/external/bsd/less/bin/lesskey: Makefile Log Message: PR bin/50123 (myself): less and lesskey do not depend on libcurses and libterminfo, respectively. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/bsd/less/bin/less/Makefile cvs rdiff -u -r1.1 -r1.2 src/external/bsd/less/bin/lesskey/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/less/bin/less/Makefile diff -u src/external/bsd/less/bin/less/Makefile:1.2 src/external/bsd/less/bin/less/Makefile:1.3 --- src/external/bsd/less/bin/less/Makefile:1.2 Sun Jul 3 18:15:18 2011 +++ src/external/bsd/less/bin/less/Makefile Sat Dec 10 13:44:51 2016 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.2 2011/07/03 18:15:18 tron Exp $ +# $NetBSD: Makefile,v 1.3 2016/12/10 13:44:51 rin Exp $ .include @@ -11,8 +11,8 @@ SRCS= main.c screen.c brac.c ch.c charse output.c pattern.c position.c prompt.c search.c signal.c \ tags.c ttyin.c version.c -LDADD+= -lcurses -ltermcap -DPADD+= ${LIBCURSES} +LDADD+= -lterminfo +DPADD+= ${LIBTERMINFO} MLINKS= less.1 more.1 less.1 page.1 LINKS= ${BINDIR}/less ${BINDIR}/more ${BINDIR}/less ${BINDIR}/page Index: src/external/bsd/less/bin/lesskey/Makefile diff -u src/external/bsd/less/bin/lesskey/Makefile:1.1 src/external/bsd/less/bin/lesskey/Makefile:1.2 --- src/external/bsd/less/bin/lesskey/Makefile:1.1 Sun Jul 3 18:02:01 2011 +++ src/external/bsd/less/bin/lesskey/Makefile Sat Dec 10 13:44:51 2016 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 2011/07/03 18:02:01 tron Exp $ +# $NetBSD: Makefile,v 1.2 2016/12/10 13:44:51 rin Exp $ .include @@ -6,7 +6,4 @@ PROG= lesskey SRCS= lesskey version.c -LDADD+= -ltermcap -DPADD+= ${LIBTERM} - .include "bsd.prog.mk"
CVS commit: src/doc
Module Name:src Committed By: mrg Date: Sat Dec 10 10:43:28 UTC 2016 Modified Files: src/doc: CHANGES Log Message: note crash for sparc To generate a diff of this commit: cvs rdiff -u -r1.2218 -r1.2219 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES diff -u src/doc/CHANGES:1.2218 src/doc/CHANGES:1.2219 --- src/doc/CHANGES:1.2218 Thu Dec 8 11:34:40 2016 +++ src/doc/CHANGES Sat Dec 10 10:43:28 2016 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2218 $> +# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2219 $> # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -406,3 +406,4 @@ Changes from NetBSD 7.0 to NetBSD 8.0: ixg(4): Add X55x support [msaitoh 20161205] audio(4): Audio sub-system changes - in kernel mixing [nat 20161208] speaker(4):Synthesized beep for platforms with audio [nat 20161208] + crash(8): Add sparc support. [mrg 20161210]
CVS commit: src/usr.sbin/crash
Module Name:src Committed By: mrg Date: Sat Dec 10 10:42:43 UTC 2016 Modified Files: src/usr.sbin/crash: Makefile Log Message: enable sparc crash(8) builds. it's not very stable yet but it's not 100% useless. To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 src/usr.sbin/crash/Makefile 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/crash/Makefile diff -u src/usr.sbin/crash/Makefile:1.31 src/usr.sbin/crash/Makefile:1.32 --- src/usr.sbin/crash/Makefile:1.31 Tue Jun 16 23:48:20 2015 +++ src/usr.sbin/crash/Makefile Sat Dec 10 10:42:43 2016 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.31 2015/06/16 23:48:20 christos Exp $ +# $NetBSD: Makefile,v 1.32 2016/12/10 10:42:43 mrg Exp $ PROG= crash MAN= crash.8 @@ -16,11 +16,14 @@ DPADD+= ${LIBUTIL} ${LIBKVM} ${LIBEDIT} .if${MACHINE} == "amd64" \ || ${MACHINE} == "hppa" \ || ${MACHINE} == "i386" \ +|| ${MACHINE} == "sparc" \ || ${MACHINE} == "sparc64" \ || (${MACHINE_CPU} == "arm" && ${MACHINE} != "acorn26") \ || ${MACHINE_ARCH} == "m68k" SRCS+= db_trace.c -.if ${MACHINE_ARCH} != "m68k" +.if ${MACHINE_ARCH} == "sparc" +SRCS+= db_interface.c +.elif ${MACHINE_ARCH} != "m68k" SRCS+= db_machdep.c .endif REALCRASH=yes @@ -56,8 +59,7 @@ CPPFLAGS+= -I${S}/arch . if${MACHINE} == "amd64" \ || ${MACHINE} == "i386" MACHINE_FAMILY = x86 -. elif${MACHINE} == "sparc64" \ - || ${MACHINE} == "sparc64" +. elif ${MACHINE} == "sparc64" MACHINE_FAMILY = sparc . else MACHINE_FAMILY = ${MACHINE_CPU}
CVS commit: src/sys/arch/sparc
Module Name:src Committed By: mrg Date: Sat Dec 10 10:41:07 UTC 2016 Modified Files: src/sys/arch/sparc/include: cpu.h db_machdep.h src/sys/arch/sparc/sparc: cpuvar.h db_interface.c db_trace.c machdep.c Log Message: rearrange slightly to enable crash(8) to build. To generate a diff of this commit: cvs rdiff -u -r1.96 -r1.97 src/sys/arch/sparc/include/cpu.h cvs rdiff -u -r1.26 -r1.27 src/sys/arch/sparc/include/db_machdep.h cvs rdiff -u -r1.93 -r1.94 src/sys/arch/sparc/sparc/cpuvar.h cvs rdiff -u -r1.91 -r1.92 src/sys/arch/sparc/sparc/db_interface.c cvs rdiff -u -r1.34 -r1.35 src/sys/arch/sparc/sparc/db_trace.c cvs rdiff -u -r1.327 -r1.328 src/sys/arch/sparc/sparc/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sparc/include/cpu.h diff -u src/sys/arch/sparc/include/cpu.h:1.96 src/sys/arch/sparc/include/cpu.h:1.97 --- src/sys/arch/sparc/include/cpu.h:1.96 Sat Dec 10 09:51:43 2016 +++ src/sys/arch/sparc/include/cpu.h Sat Dec 10 10:41:07 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.96 2016/12/10 09:51:43 mrg Exp $ */ +/* $NetBSD: cpu.h,v 1.97 2016/12/10 10:41:07 mrg Exp $ */ /* * Copyright (c) 1992, 1993 @@ -52,11 +52,13 @@ #define CPU_ARCH 4 /* integer: cpu architecture version */ #define CPU_MAXID 5 /* number of valid machdep ids */ -#ifdef _KERNEL /* * Exported definitions unique to SPARC cpu support. */ +/* Things needed by crash or the kernel */ +#if defined(_KERNEL) || defined(_KMEMUSER) + #if defined(_KERNEL_OPT) #include "opt_multiprocessor.h" #include "opt_lockdebug.h" @@ -77,6 +79,8 @@ #include #endif +struct trapframe; + /* * Message structure for Inter Processor Communication in MP systems */ @@ -337,11 +341,17 @@ struct cpu_info { * definitions of cpu-dependent requirements * referenced in generic code */ +#define cpuinfo (*(struct cpu_info *)CPUINFO_VA) #define curcpu() (cpuinfo.ci_self) #define curlwp (cpuinfo.ci_curlwp) #define CPU_IS_PRIMARY(ci) ((ci)->master) #define cpu_number() (cpuinfo.ci_cpuid) + +#endif /* _KERNEL || _KMEMUSER */ + +/* Kernel only things. */ +#if defined(_KERNEL) void cpu_proc_fork(struct proc *, struct proc *); #if defined(MULTIPROCESSOR) Index: src/sys/arch/sparc/include/db_machdep.h diff -u src/sys/arch/sparc/include/db_machdep.h:1.26 src/sys/arch/sparc/include/db_machdep.h:1.27 --- src/sys/arch/sparc/include/db_machdep.h:1.26 Thu May 26 15:34:13 2011 +++ src/sys/arch/sparc/include/db_machdep.h Sat Dec 10 10:41:07 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: db_machdep.h,v 1.26 2011/05/26 15:34:13 joerg Exp $ */ +/* $NetBSD: db_machdep.h,v 1.27 2016/12/10 10:41:07 mrg Exp $ */ /* * Mach Operating System @@ -32,7 +32,10 @@ /* * Machine-dependent defines for new kernel debugger. */ +#include + #include + #include #include #include Index: src/sys/arch/sparc/sparc/cpuvar.h diff -u src/sys/arch/sparc/sparc/cpuvar.h:1.93 src/sys/arch/sparc/sparc/cpuvar.h:1.94 --- src/sys/arch/sparc/sparc/cpuvar.h:1.93 Sat Dec 10 09:51:43 2016 +++ src/sys/arch/sparc/sparc/cpuvar.h Sat Dec 10 10:41:07 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: cpuvar.h,v 1.93 2016/12/10 09:51:43 mrg Exp $ */ +/* $NetBSD: cpuvar.h,v 1.94 2016/12/10 10:41:07 mrg Exp $ */ /* * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -233,8 +233,6 @@ extern struct cpu_info *cpus[]; extern u_int cpu_ready_mask; /* the set of CPUs marked as READY */ #endif -#define cpuinfo (*(struct cpu_info *)CPUINFO_VA) - #if defined(DDB) || defined(MULTIPROCESSOR) /* * These are called by ddb mach functions. Index: src/sys/arch/sparc/sparc/db_interface.c diff -u src/sys/arch/sparc/sparc/db_interface.c:1.91 src/sys/arch/sparc/sparc/db_interface.c:1.92 --- src/sys/arch/sparc/sparc/db_interface.c:1.91 Sun Oct 4 08:17:03 2015 +++ src/sys/arch/sparc/sparc/db_interface.c Sat Dec 10 10:41:07 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: db_interface.c,v 1.91 2015/10/04 08:17:03 joerg Exp $ */ +/* $NetBSD: db_interface.c,v 1.92 2016/12/10 10:41:07 mrg Exp $ */ /* * Mach Operating System @@ -33,16 +33,20 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.91 2015/10/04 08:17:03 joerg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.92 2016/12/10 10:41:07 mrg Exp $"); +#ifdef _KERNEL_OPT #include "opt_ddb.h" #include "opt_kgdb.h" #include "opt_multiprocessor.h" +#endif #include #include +#include #include #include +#include #include @@ -53,7 +57,8 @@ __KERNEL_RCSID(0, "$NetBSD: db_interface #include #include -#if defined(DDB) +#if defined(DDB) || defined(_KMEMUSER) +#include #include #include #include @@ -63,9 +68,13 @@ __KERNEL_RCSID(0, "$NetBSD: db_interface #endif #include +#if defined(_KERNEL) #include +#endif #include #include + +#if defined(_KERNEL) #include #include "fb.h" @@ -102,6 +111,7 @@ db_write_bytes(vaddr_t addr, size_t size } } +#endif db_r
CVS commit: src/sys/dev
Module Name:src Committed By: mlelstv Date: Sat Dec 10 10:26:38 UTC 2016 Modified Files: src/sys/dev: files.dev src/sys/dev/scsipi: cd.c cdvar.h sd.c sdvar.h Log Message: Refactored sd and cd to use common disk subroutines. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/dev/files.dev cvs rdiff -u -r1.333 -r1.334 src/sys/dev/scsipi/cd.c cvs rdiff -u -r1.32 -r1.33 src/sys/dev/scsipi/cdvar.h cvs rdiff -u -r1.319 -r1.320 src/sys/dev/scsipi/sd.c cvs rdiff -u -r1.37 -r1.38 src/sys/dev/scsipi/sdvar.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/files.dev diff -u src/sys/dev/files.dev:1.1 src/sys/dev/files.dev:1.2 --- src/sys/dev/files.dev:1.1 Fri Aug 21 02:18:18 2015 +++ src/sys/dev/files.dev Sat Dec 10 10:26:38 2016 @@ -1,4 +1,4 @@ -# $NetBSD: files.dev,v 1.1 2015/08/21 02:18:18 uebayasi Exp $ +# $NetBSD: files.dev,v 1.2 2016/12/10 10:26:38 mlelstv Exp $ file dev/bio.c bio needs-flag file dev/ccd.c ccd @@ -6,7 +6,7 @@ file dev/cgd.c cgd file dev/cgd_crypto.c cgd file dev/clock_subr.c kern # XXX file dev/clockctl.c clockctl -file dev/dksubr.c cgd | xbd | ccd | raid | dm | ld +file dev/dksubr.c cgd | xbd | ccd | raid | dm | ld | sd | cd file dev/dkwedge/dk.c kern # XXX file dev/dkwedge/dkwedge_apple.c dkwedge_method_apple file dev/dkwedge/dkwedge_bsdlabel.c dkwedge_method_bsdlabel Index: src/sys/dev/scsipi/cd.c diff -u src/sys/dev/scsipi/cd.c:1.333 src/sys/dev/scsipi/cd.c:1.334 --- src/sys/dev/scsipi/cd.c:1.333 Sun Nov 20 15:37:19 2016 +++ src/sys/dev/scsipi/cd.c Sat Dec 10 10:26:38 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: cd.c,v 1.333 2016/11/20 15:37:19 mlelstv Exp $ */ +/* $NetBSD: cd.c,v 1.334 2016/12/10 10:26:38 mlelstv Exp $ */ /*- * Copyright (c) 1998, 2001, 2003, 2004, 2005, 2008 The NetBSD Foundation, @@ -50,7 +50,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cd.c,v 1.333 2016/11/20 15:37:19 mlelstv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cd.c,v 1.334 2016/12/10 10:26:38 mlelstv Exp $"); #include #include @@ -114,22 +114,26 @@ struct cd_formatted_toc { }; struct cdbounce { - struct buf *obp; /* original buf */ - int doff; /* byte offset in orig. buf */ - int soff; /* byte offset in bounce buf */ - int resid; /* residual i/o in orig. buf */ - int bcount; /* actual obp bytes in bounce */ + struct buf *obp; /* original buf */ + struct buf *lbp; /* first buffer */ + struct buf *rbp; /* second buffer */ + int lerr; /* error returned for first buffer */ + int rerr; /* error returned for second buffer */ + int head; /* bytes skipped at the start */ + int lcount; /* bytes copied to first buffer */ + int rcount; /* bytes copied to second buffer */ }; static void cdstart(struct scsipi_periph *); static void cdrestart(void *); static void cdminphys(struct buf *); -static void cdgetdefaultlabel(struct cd_softc *, struct cd_formatted_toc *, - struct disklabel *); -static void cdgetdisklabel(struct cd_softc *); static void cddone(struct scsipi_xfer *, int); -static void cdbounce(struct buf *); static int cd_interpret_sense(struct scsipi_xfer *); +static int cd_diskstart(device_t, struct buf *); +static void cd_iosize(device_t, int *); +static int cd_lastclose(device_t); +static int cd_firstopen(device_t, dev_t, int, int); +static void cd_label(device_t, struct disklabel *); static u_long cd_size(struct cd_softc *, int); static int cd_play(struct cd_softc *, int, int); static int cd_play_tracks(struct cd_softc *, struct cd_formatted_toc *, @@ -230,8 +234,14 @@ const struct cdevsw cd_cdevsw = { }; static struct dkdriver cddkdriver = { + .d_open = cdopen, + .d_close = cdclose, .d_strategy = cdstrategy, - .d_minphys = cdminphys + .d_minphys = cdminphys, + .d_diskstart = cd_diskstart, + .d_firstopen = cd_firstopen, + .d_lastclose = cd_lastclose, + .d_label = cd_label, }; static const struct scsipi_periphsw cd_switch = { @@ -262,20 +272,37 @@ static void cdattach(device_t parent, device_t self, void *aux) { struct cd_softc *cd = device_private(self); + struct dk_softc *dksc = &cd->sc_dksc; struct scsipibus_attach_args *sa = aux; struct scsipi_periph *periph = sa->sa_periph; + int dtype; SC_DEBUG(periph, SCSIPI_DB2, ("cdattach: ")); - cd->sc_dev = self; + switch (SCSIPI_BUSTYPE_TYPE(scsipi_periph_bustype(sa->sa_periph))) { + case SCSIPI_BUSTYPE_SCSI: + dtype = DKTYPE_SCSI; + if (periph->periph_version == 0) + cd->flags |= CDF_ANCIENT; + break; + case SCSIPI_BUSTYPE_ATAPI: + dtype = DKTYPE_ATAPI; + break; + default: + dtype = DKTYPE_UNKNOWN; + break; + } - mutex_init(&cd->sc_lock, MUTEX_DEFAULT, IPL_NONE); + /* + * Initialize and attach the disk structure. + */ + dk_init(dksc, self, dtype); + disk_init(&dksc->sc_dkdev, dksc->sc_xname, &cddkdriver); - if (SCSIPI_BUSTYPE_TYPE(scsipi_periph_bustype(sa->sa_periph)) == - SCSIPI_BUSTYPE_SCSI && per
CVS commit: src/sys/arch/sparc
Module Name:src Committed By: mrg Date: Sat Dec 10 09:51:44 UTC 2016 Modified Files: src/sys/arch/sparc/include: cpu.h src/sys/arch/sparc/sparc: cpuvar.h Log Message: move struct cpu_info and xpmsg into from . this enables them for crash(8) and this seems more natural to me anyway. To generate a diff of this commit: cvs rdiff -u -r1.95 -r1.96 src/sys/arch/sparc/include/cpu.h cvs rdiff -u -r1.92 -r1.93 src/sys/arch/sparc/sparc/cpuvar.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/sparc/include/cpu.h diff -u src/sys/arch/sparc/include/cpu.h:1.95 src/sys/arch/sparc/include/cpu.h:1.96 --- src/sys/arch/sparc/include/cpu.h:1.95 Sat Oct 19 19:20:59 2013 +++ src/sys/arch/sparc/include/cpu.h Sat Dec 10 09:51:43 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.95 2013/10/19 19:20:59 christos Exp $ */ +/* $NetBSD: cpu.h,v 1.96 2016/12/10 09:51:43 mrg Exp $ */ /* * Copyright (c) 1992, 1993 @@ -63,10 +63,275 @@ #include "opt_sparc_arch.h" #endif +#include +#include + #include #include + +#if defined(_KERNEL) #include #include +#else +#include +#include +#endif + +/* + * Message structure for Inter Processor Communication in MP systems + */ +struct xpmsg { + volatile int tag; +#define XPMSG15_PAUSECPU 1 +#define XPMSG_FUNC 4 +#define XPMSG_FTRP 5 + + volatile union { + /* + * Cross call: ask to run (*func)(arg0,arg1,arg2) + * or (*trap)(arg0,arg1,arg2). `trap' should be the + * address of a `fast trap' handler that executes in + * the trap window (see locore.s). + */ + struct xpmsg_func { + void (*func)(int, int, int); + void (*trap)(int, int, int); + int arg0; + int arg1; + int arg2; + } xpmsg_func; + } u; + volatile int received; + volatile int complete; +}; + +/* + * The cpuinfo structure. This structure maintains information about one + * currently installed CPU (there may be several of these if the machine + * supports multiple CPUs, as on some Sun4m architectures). The information + * in this structure supersedes the old "cpumod", "mmumod", and similar + * fields. + */ + +struct cpu_info { + struct cpu_data ci_data; /* MI per-cpu data */ + + /* + * Primary Inter-processor message area. Keep this aligned + * to a cache line boundary if possible, as the structure + * itself is one (normal 32 byte) cache-line. + */ + struct xpmsg msg __aligned(32); + + /* Scheduler flags */ + int ci_want_ast; + int ci_want_resched; + + /* + * SPARC cpu_info structures live at two VAs: one global + * VA (so each CPU can access any other CPU's cpu_info) + * and an alias VA CPUINFO_VA which is the same on each + * CPU and maps to that CPU's cpu_info. Since the alias + * CPUINFO_VA is how we locate our cpu_info, we have to + * self-reference the global VA so that we can return it + * in the curcpu() macro. + */ + struct cpu_info * volatile ci_self; + + int ci_cpuid; /* CPU index (see cpus[] array) */ + + /* Context administration */ + int *ctx_tbl; /* [4m] SRMMU-edible context table */ + paddr_t ctx_tbl_pa; /* [4m] ctx table physical address */ + + /* Cache information */ + struct cacheinfo cacheinfo; /* see cache.h */ + + /* various flags to workaround anomalies in chips */ + volatile int flags; /* see CPUFLG_xxx, below */ + + /* Per processor counter register (sun4m only) */ + volatile struct counter_4m *counterreg_4m; + + /* Per processor interrupt mask register (sun4m only) */ + volatile struct icr_pi *intreg_4m; + /* + * Send a IPI to (cpi). For Ross cpus we need to read + * the pending register to avoid a hardware bug. + */ +#define raise_ipi(cpi,lvl) do { \ + int x; \ + (cpi)->intreg_4m->pi_set = PINTR_SINTRLEV(lvl); \ + x = (cpi)->intreg_4m->pi_pend; __USE(x); \ +} while (0) + + int sun4_mmu3l; /* [4]: 3-level MMU present */ +#if defined(SUN4_MMU3L) +#define HASSUN4_MMU3L (cpuinfo.sun4_mmu3l) +#else +#define HASSUN4_MMU3L (0) +#endif + int ci_idepth; /* Interrupt depth */ + + /* + * The following pointers point to processes that are somehow + * associated with this CPU--running on it, using its FPU, + * etc. + */ + struct lwp *ci_curlwp; /* CPU owner */ + struct lwp *fplwp; /* FPU owner */ + + int ci_mtx_count; + int ci_mtx_oldspl; + + /* + * Idle PCB and Interrupt stack; + */ + void *eintstack; /* End of interrupt stack */ +#define INT_STACK_SIZE (128 * 128) /* 128 128-byte stack frames */ + void *redzone; /* DEBUG: stack red zone */ +#define REDSIZE (8*96) /* some room for bouncing */ + + struct pcb *curpcb; /* CPU's PCB & kernel stack */ + + /* locore defined: */ + void (*get_syncflt)(void); /* Not C-callable */ + int (*get_asyncflt)(u_int *, u_int *); + + /* Synchronous Fault Status; temporary storage */ + struct { + int sfsr; + int sfva; + } syncfltdump; + + /* + * Cache handling functions. + * Most cache flush function come in two flavours: one that + * acts only on the CPU it executes
CVS commit: src/share/man/man9
Module Name:src Committed By: mlelstv Date: Sat Dec 10 09:49:00 UTC 2016 Modified Files: src/share/man/man9: disk.9 dksubr.9 Log Message: Add d_label and add a few words to minphys and strategy. Update disk man page for other users of the disk driver switch and add reference to dksubr(9). To generate a diff of this commit: cvs rdiff -u -r1.40 -r1.41 src/share/man/man9/disk.9 cvs rdiff -u -r1.2 -r1.3 src/share/man/man9/dksubr.9 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/man9/disk.9 diff -u src/share/man/man9/disk.9:1.40 src/share/man/man9/disk.9:1.41 --- src/share/man/man9/disk.9:1.40 Wed Dec 31 20:13:41 2014 +++ src/share/man/man9/disk.9 Sat Dec 10 09:49:00 2016 @@ -1,4 +1,4 @@ -.\" $NetBSD: disk.9,v 1.40 2014/12/31 20:13:41 mlelstv Exp $ +.\" $NetBSD: disk.9,v 1.41 2016/12/10 09:49:00 mlelstv Exp $ .\" .\" Copyright (c) 1995, 1996 Jason R. Thorpe. .\" All rights reserved. @@ -368,15 +368,36 @@ The above is the disk's .Dq driver switch. -This switch currently includes a pointer to the disk's -.Dq strategy -routine. +This switch currently includes pointers to several driver entry points, +where only the +.Nm d_strategy +entry point is used by the disk framework. This switch needs to have global scope and should be initialized as follows: .Bd -literal -void foostrategy(struct buf *); +void(foostrategy)(struct buf *); +void(foominphys)(struct buf *); +int (fooopen)(dev_t, int, int, struct lwp *); +int (fooclose)(dev_t, int, int, struct lwp *); +int (foo_discard)(device_t, off_t, off_t); +int (foo_diskstart)(device_t, struct buf *); +void(foo_iosize)(device_t, int *); +int (foo_dumpblocks)(device_t, void *, daddr_t, int); +int (foo_lastclose)(device_t); +int (foo_firstopen)(device_t, dev_t, int, int); +int (foo_label)(device_t, struct disklabel *); const struct dkdriver foodkdriver = { + .d_open = fooopen, + .d_close = fooclose, .d_strategy = foostrategy, + .d_minphys = foominphys, + .d_discard = foo_discard, + .d_diskstart = foo_diskstart, /* optional */ + .d_dumpblocks = foo_dumpblocks, /* optional */ + .d_iosize = foo_iosize, /* optional */ + .d_firstopen = foo_firstopen, /* optional */ + .d_lastclose = foo_lastclose, /* optional */ + .d_label = foo_label, /* optional */ }; .Ed .Pp @@ -519,7 +540,8 @@ and .Sh SEE ALSO .Xr ccd 4 , .Xr dm 4 , -.Xr vnd 4 +.Xr vnd 4 , +.Xr dksubr 4 .Sh HISTORY The .Nx Index: src/share/man/man9/dksubr.9 diff -u src/share/man/man9/dksubr.9:1.2 src/share/man/man9/dksubr.9:1.3 --- src/share/man/man9/dksubr.9:1.2 Mon Nov 28 11:54:18 2016 +++ src/share/man/man9/dksubr.9 Sat Dec 10 09:49:00 2016 @@ -1,4 +1,4 @@ -.\" $NetBSD: dksubr.9,v 1.2 2016/11/28 11:54:18 wiz Exp $ +.\" $NetBSD: dksubr.9,v 1.3 2016/12/10 09:49:00 mlelstv Exp $ .\" .\" Copyright (c) 2016 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -218,6 +218,12 @@ to cooperate with .Nm dk_start . .It Fn dk_getdefaultlabel Compute a common default disklabel for all disk drivers. +Some drivers provide device specific information or assign specific +disk formats to partitions. Such drivers may implement the +.Nm d_label +callback that is called by +.Nm dk_getdefaultlabel +after initializing the label with common values. .It Fn dk_getdisklabel Read disklabel with machine dependent low-level function .Nm readdisklabel @@ -240,13 +246,20 @@ struct dkdriver { int (*d_lastclose)(device_t); int (*d_discard)(device_t, off_t, off_t); int (*d_firstopen)(device_t, dev_t, int, int); +void(*d_label)(device_t, struct disklabel *); }; .Ed .Bl -tag -width ".Fn dk_firstopen" .It Fn d_strategy -The driver strategy routine. +The driver strategy routine queues a single buffer for I/O +and starts queue processing as appropriate. .It Fn d_minphys -The driver minphys routine. +The driver minphys routine limits the buffer +.Nm b_bcount +to the maximum size for an I/O transfer supported by the driver +and hardware. It also calls +.Nm minphys +to apply the platform limit. .It Fn d_open The driver open routine. .It Fn d_close @@ -255,7 +268,9 @@ The driver close routine. Issues a single I/O request, called by .Nm dk_start . .It Fn d_iosize -Truncate I/O size to the driver limit. +Truncate I/O size to the driver limit. This is similar to +.Nm minphys +but operates on an integer value instead of a buffer. .It Fn d_dumpblocks Issue a single I/O requests, called by .Nm dk_dump . @@ -267,6 +282,7 @@ Issue a single I/O request to invalidate .It Fn d_firstopen Private initialization when first user opens the driver. .Sh SEE ALSO +.Xr driver 9 , .Xr disk 9 , .Xr cprng 9 , .Xr ld 4 ,
CVS commit: src/sys/arch/sparc/conf
Module Name:src Committed By: mrg Date: Sat Dec 10 09:44:06 UTC 2016 Modified Files: src/sys/arch/sparc/conf: GENERIC Log Message: revert the previous. sparc has no spkr. To generate a diff of this commit: cvs rdiff -u -r1.252 -r1.253 src/sys/arch/sparc/conf/GENERIC 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/sparc/conf/GENERIC diff -u src/sys/arch/sparc/conf/GENERIC:1.252 src/sys/arch/sparc/conf/GENERIC:1.253 --- src/sys/arch/sparc/conf/GENERIC:1.252 Thu Dec 8 11:31:12 2016 +++ src/sys/arch/sparc/conf/GENERIC Sat Dec 10 09:44:06 2016 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.252 2016/12/08 11:31:12 nat Exp $ +# $NetBSD: GENERIC,v 1.253 2016/12/10 09:44:06 mrg Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ include "arch/sparc/conf/std.sparc" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.252 $" +#ident "GENERIC-$Revision: 1.253 $" maxusers 32 @@ -639,9 +639,6 @@ dbri* at sbus? slot ? offset ? # SUNW, audio* at audiobus? -options VAUDIOSPEAKER -spkr0 at audio0 # PC speaker (synthesized) - ## Sun "bwtwo" black and white framebuffer, found on sun4, sun4c, and sun4m ## systems. If your sun4 system has a cgfour installed in the P4 slot, ## the P4 entries for "bwtwo" will attach to the overlay plane of the
CVS commit: src/sys/net/npf
Module Name:src Committed By: kre Date: Sat Dec 10 09:26:16 UTC 2016 Modified Files: src/sys/net/npf: npf_conn.c Log Message: Remove what looks like remnant (partly removed already) debug code, which could not possibly compile as it was. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/sys/net/npf/npf_conn.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_conn.c diff -u src/sys/net/npf/npf_conn.c:1.18 src/sys/net/npf/npf_conn.c:1.19 --- src/sys/net/npf/npf_conn.c:1.18 Sat Dec 10 05:41:10 2016 +++ src/sys/net/npf/npf_conn.c Sat Dec 10 09:26:16 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: npf_conn.c,v 1.18 2016/12/10 05:41:10 christos Exp $ */ +/* $NetBSD: npf_conn.c,v 1.19 2016/12/10 09:26:16 kre Exp $ */ /*- * Copyright (c) 2014-2015 Mindaugas Rasiukevicius @@ -99,7 +99,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: npf_conn.c,v 1.18 2016/12/10 05:41:10 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: npf_conn.c,v 1.19 2016/12/10 09:26:16 kre Exp $"); #include #include @@ -964,9 +964,7 @@ npf_connkey_import(prop_dictionary_t idi size_t alen = prop_data_size(sobj); if (alen != prop_data_size(dobj)) return 0; - *(const int *)ips[NPF_SRC], id[NPF_SRC], - *(const int *)ips[NPF_DST], id[NPF_DST], alen, proto, *dir); - + return connkey_setkey(key, proto, ips, id, alen, true); }
CVS commit: src/lib/libnpf
Module Name:src Committed By: kre Date: Sat Dec 10 08:48:11 UTC 2016 Modified Files: src/lib/libnpf: npf.c Log Message: Remove what was probably a left over remnant of a debugging printf which was incompletely deleted. Hopefully fix the build. To generate a diff of this commit: cvs rdiff -u -r1.36 -r1.37 src/lib/libnpf/npf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libnpf/npf.c diff -u src/lib/libnpf/npf.c:1.36 src/lib/libnpf/npf.c:1.37 --- src/lib/libnpf/npf.c:1.36 Sat Dec 10 05:37:55 2016 +++ src/lib/libnpf/npf.c Sat Dec 10 08:48:11 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: npf.c,v 1.36 2016/12/10 05:37:55 christos Exp $ */ +/* $NetBSD: npf.c,v 1.37 2016/12/10 08:48:11 kre Exp $ */ /*- * Copyright (c) 2010-2015 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: npf.c,v 1.36 2016/12/10 05:37:55 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: npf.c,v 1.37 2016/12/10 08:48:11 kre Exp $"); #include #include @@ -1291,7 +1291,6 @@ npf_nat_lookup(int fd, int af, npf_addr_ } prop_dictionary_get_uint16(nat, "oport", &port[0]); prop_dictionary_get_uint16(nat, "tport", &port[1]); - ntohs(port[1])); prop_object_release(conn_res); out: prop_object_release(conn_dict);