svn commit: r311381 - head/contrib/bsnmp/snmpd
Author: ngie Date: Thu Jan 5 08:14:20 2017 New Revision: 311381 URL: https://svnweb.freebsd.org/changeset/base/311381 Log: lsock_init_port: address issues with initializing sockaddr_un object - Use strlcpy to ensure p->name doesn't overflow sa.sun_path [*]. - Use SUN_LEN(..) instead of spelling out calculation longhand (inspired by comment by jmallett). Tested with: dgram and stream support with both bsnmpwalk and snmpwalk MFC after:1 week Reported by: Coverity CID: 1006825 Modified: head/contrib/bsnmp/snmpd/trans_lsock.c Modified: head/contrib/bsnmp/snmpd/trans_lsock.c == --- head/contrib/bsnmp/snmpd/trans_lsock.c Thu Jan 5 08:04:04 2017 (r311380) +++ head/contrib/bsnmp/snmpd/trans_lsock.c Thu Jan 5 08:14:20 2017 (r311381) @@ -308,10 +308,9 @@ lsock_init_port(struct tport *tp) return (SNMP_ERR_RES_UNAVAIL); } - strcpy(sa.sun_path, p->name); + strlcpy(sa.sun_path, p->name, sizeof(sa.sun_path)); sa.sun_family = AF_LOCAL; - sa.sun_len = strlen(p->name) + - offsetof(struct sockaddr_un, sun_path); + sa.sun_len = SUN_LEN(&sa); (void)remove(p->name); @@ -363,10 +362,9 @@ lsock_init_port(struct tport *tp) return (SNMP_ERR_GENERR); } - strcpy(sa.sun_path, p->name); + strlcpy(sa.sun_path, p->name, sizeof(sa.sun_path)); sa.sun_family = AF_LOCAL; - sa.sun_len = strlen(p->name) + - offsetof(struct sockaddr_un, sun_path); + sa.sun_len = SUN_LEN(&sa); (void)remove(p->name); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r311382 - head/contrib/bsnmp/snmpd
Author: ngie Date: Thu Jan 5 08:17:17 2017 New Revision: 311382 URL: https://svnweb.freebsd.org/changeset/base/311382 Log: Use calloc instead of malloc + memset(.., 0, ..) MFC after:3 days Modified: head/contrib/bsnmp/snmpd/trans_lsock.c Modified: head/contrib/bsnmp/snmpd/trans_lsock.c == --- head/contrib/bsnmp/snmpd/trans_lsock.c Thu Jan 5 08:14:20 2017 (r311381) +++ head/contrib/bsnmp/snmpd/trans_lsock.c Thu Jan 5 08:17:17 2017 (r311382) @@ -146,16 +146,14 @@ lsock_open_port(u_char *name, size_t nam return (SNMP_ERR_BADVALUE); } - if ((port = malloc(sizeof(*port))) == NULL) + if ((port = calloc(1, sizeof(*port))) == NULL) return (SNMP_ERR_GENERR); - memset(port, 0, sizeof(*port)); if (!is_stream) { - if ((peer = malloc(sizeof(*peer))) == NULL) { + if ((peer = calloc(1, sizeof(*peer))) == NULL) { free(port); return (SNMP_ERR_GENERR); } - memset(peer, 0, sizeof(*peer)); } if ((port->name = malloc(namelen + 1)) == NULL) { free(port); @@ -261,12 +259,11 @@ lsock_listen_input(int fd, void *udata) struct lsock_port *p = udata; struct lsock_peer *peer; - if ((peer = malloc(sizeof(*peer))) == NULL) { + if ((peer = calloc(1, sizeof(*peer))) == NULL) { syslog(LOG_WARNING, "%s: peer malloc failed", p->name); (void)close(accept(fd, NULL, NULL)); return; } - memset(peer, 0, sizeof(*peer)); peer->port = p; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r311384 - head/contrib/bsnmp/snmp_usm
Author: ngie Date: Thu Jan 5 08:27:23 2017 New Revision: 311384 URL: https://svnweb.freebsd.org/changeset/base/311384 Log: op_usm_users: fix indentation in SNMP_OP_SET block MFC after:3 days Modified: head/contrib/bsnmp/snmp_usm/usm_snmp.c Modified: head/contrib/bsnmp/snmp_usm/usm_snmp.c == --- head/contrib/bsnmp/snmp_usm/usm_snmp.c Thu Jan 5 08:21:46 2017 (r311383) +++ head/contrib/bsnmp/snmp_usm/usm_snmp.c Thu Jan 5 08:27:23 2017 (r311384) @@ -167,7 +167,7 @@ op_usm_users(struct snmp_context *ctx, s if ((uuser = usm_get_user(&val->var, sub)) == NULL && val->var.subs[sub - 1] != LEAF_usmUserStatus && val->var.subs[sub - 1] != LEAF_usmUserCloneFrom) - return (SNMP_ERR_NOSUCHNAME); + return (SNMP_ERR_NOSUCHNAME); if (community != COMM_INITIALIZE && uuser->type == StorageType_readOnly) ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r311283 - head/sys/cam/ctl
Dnia 04.01.2017 o godz. 16:38 Ryan Stone napisał(a): >> On Wed, Jan 4, 2017 at 7:50 AM, Edward Tomasz Napierala >> wrote: >> + refcount_release(&cs->cs_outstanding_ctl_pdus); > > Shouldn't the return value of refcount_release() be checked? Not in this case. The destruction of cfumass sessions is always done in one specific place; everywhere else we don't care whether the reference was the last one or not. ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r311390 - head/contrib/bsnmp/lib
Author: ngie Date: Thu Jan 5 08:49:06 2017 New Revision: 311390 URL: https://svnweb.freebsd.org/changeset/base/311390 Log: snmp_table_fetch_async: don't leak `work` if snmp_pdu_send(..) fails MFC after:1 week Reported by: Coverity CID: 1017276 Modified: head/contrib/bsnmp/lib/snmpclient.c Modified: head/contrib/bsnmp/lib/snmpclient.c == --- head/contrib/bsnmp/lib/snmpclient.c Thu Jan 5 08:42:58 2017 (r311389) +++ head/contrib/bsnmp/lib/snmpclient.c Thu Jan 5 08:49:06 2017 (r311390) @@ -728,8 +728,11 @@ snmp_table_fetch_async(const struct snmp work->last_change = 0; table_init_pdu(descr, &work->pdu); - if (snmp_pdu_send(&work->pdu, table_cb, work) == -1) + if (snmp_pdu_send(&work->pdu, table_cb, work) == -1) { + free(work); + work = NULL; return (-1); + } return (0); } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r311346 - in head/sys: kern sys vm
Given the use of the number of CPU's for sizing would this play nice with hot plug CPU's? Regards Steve On 05/01/2017 01:44, Mark Johnston wrote: Author: markj Date: Thu Jan 5 01:44:12 2017 New Revision: 311346 URL: https://svnweb.freebsd.org/changeset/base/311346 Log: Add a small allocator for exec_map entries. Upon each execve, we allocate a KVA range for use in copying data to the new image. Pages must be faulted into the range, and when the range is freed, the backing pages are freed and their mappings are destroyed. This is a lot of needless overhead, and the exec_map management becomes a bottleneck when many CPUs are executing execve concurrently. Moreover, the number of available ranges is fixed at 16, which is insufficient on large systems and potentially excessive on 32-bit systems. The new allocator reduces overhead by making exec_map allocations persistent. When a range is freed, pages backing the range are marked clean and made easy to reclaim. With this change, the exec_map is sized based on the number of CPUs. Reviewed by: kib MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D8921 Modified: head/sys/kern/kern_exec.c head/sys/sys/imgact.h head/sys/vm/vm_init.c head/sys/vm/vm_kern.c head/sys/vm/vm_kern.h Modified: head/sys/kern/kern_exec.c == --- head/sys/kern/kern_exec.c Thu Jan 5 01:28:08 2017(r311345) +++ head/sys/kern/kern_exec.c Thu Jan 5 01:44:12 2017(r311346) @@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -59,6 +60,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -1315,17 +1317,80 @@ err_exit: return (error); } +struct exec_args_kva { + vm_offset_t addr; + SLIST_ENTRY(exec_args_kva) next; +}; + +static DPCPU_DEFINE(struct exec_args_kva *, exec_args_kva); + +static SLIST_HEAD(, exec_args_kva) exec_args_kva_freelist; +static struct mtx exec_args_kva_mtx; + +static void +exec_prealloc_args_kva(void *arg __unused) +{ + struct exec_args_kva *argkva; + u_int i; + + SLIST_INIT(&exec_args_kva_freelist); + mtx_init(&exec_args_kva_mtx, "exec args kva", NULL, MTX_DEF); + for (i = 0; i < exec_map_entries; i++) { + argkva = malloc(sizeof(*argkva), M_PARGS, M_WAITOK); + argkva->addr = kmap_alloc_wait(exec_map, exec_map_entry_size); + SLIST_INSERT_HEAD(&exec_args_kva_freelist, argkva, next); + } +} +SYSINIT(exec_args_kva, SI_SUB_EXEC, SI_ORDER_ANY, exec_prealloc_args_kva, NULL); + +static vm_offset_t +exec_alloc_args_kva(void **cookie) +{ + struct exec_args_kva *argkva; + + argkva = (void *)atomic_readandclear_ptr( + (uintptr_t *)DPCPU_PTR(exec_args_kva)); + if (argkva == NULL) { + mtx_lock(&exec_args_kva_mtx); + while ((argkva = SLIST_FIRST(&exec_args_kva_freelist)) == NULL) + (void)mtx_sleep(&exec_args_kva_freelist, + &exec_args_kva_mtx, 0, "execkva", 0); + SLIST_REMOVE_HEAD(&exec_args_kva_freelist, next); + mtx_unlock(&exec_args_kva_mtx); + } + *(struct exec_args_kva **)cookie = argkva; + return (argkva->addr); +} + +static void +exec_free_args_kva(void *cookie) +{ + struct exec_args_kva *argkva; + vm_offset_t base; + + argkva = cookie; + base = argkva->addr; + + vm_map_madvise(exec_map, base, base + exec_map_entry_size, MADV_FREE); + if (!atomic_cmpset_ptr((uintptr_t *)DPCPU_PTR(exec_args_kva), + (uintptr_t)NULL, (uintptr_t)argkva)) { + mtx_lock(&exec_args_kva_mtx); + SLIST_INSERT_HEAD(&exec_args_kva_freelist, argkva, next); + wakeup_one(&exec_args_kva_freelist); + mtx_unlock(&exec_args_kva_mtx); + } +} + /* * Allocate temporary demand-paged, zero-filled memory for the file name, - * argument, and environment strings. Returns zero if the allocation succeeds - * and ENOMEM otherwise. + * argument, and environment strings. */ int exec_alloc_args(struct image_args *args) { - args->buf = (char *)kmap_alloc_wait(exec_map, PATH_MAX + ARG_MAX); - return (args->buf != NULL ? 0 : ENOMEM); + args->buf = (char *)exec_alloc_args_kva(&args->bufkva); + return (0); } void @@ -1333,8 +1398,7 @@ exec_free_args(struct image_args *args) { if (args->buf != NULL) { - kmap_free_wakeup(exec_map, (vm_offset_t)args->buf, - PATH_MAX + ARG_MAX); + exec_free_args_kva(args->bufkva); args->buf = NULL; } if (args->fname_buf != NULL) { Modified: head/sys/sys/imgact.h ===
svn commit: r311392 - head/usr.bin/netstat
Author: delphij Date: Thu Jan 5 09:23:54 2017 New Revision: 311392 URL: https://svnweb.freebsd.org/changeset/base/311392 Log: Use strlcpy and snprintf in netstat(1). Expand inet6name() line buffer to NI_MAXHOST and use strlcpy/snprintf in various places. Reported by: Anton Yuzhaninov MFC after:3 days Differential Revision:https://reviews.freebsd.org/D8916 Modified: head/usr.bin/netstat/if.c head/usr.bin/netstat/inet.c head/usr.bin/netstat/inet6.c head/usr.bin/netstat/mroute.c head/usr.bin/netstat/netstat.h head/usr.bin/netstat/route.c head/usr.bin/netstat/sctp.c head/usr.bin/netstat/unix.c Modified: head/usr.bin/netstat/if.c == --- head/usr.bin/netstat/if.c Thu Jan 5 08:57:49 2017(r311391) +++ head/usr.bin/netstat/if.c Thu Jan 5 09:23:54 2017(r311392) @@ -393,10 +393,10 @@ intpr(void (*pfunc)(char *), int af) case AF_LINK: { struct sockaddr_dl *sdl; - char linknum[10]; + char linknum[sizeof("")]; sdl = (struct sockaddr_dl *)ifa->ifa_addr; - sprintf(linknum, "", sdl->sdl_index); + snprintf(linknum, sizeof(linknum), "", sdl->sdl_index); xo_emit("{t:network/%-*.*s} ", net_len, net_len, linknum); if (sdl->sdl_nlen == 0 && Modified: head/usr.bin/netstat/inet.c == --- head/usr.bin/netstat/inet.c Thu Jan 5 08:57:49 2017(r311391) +++ head/usr.bin/netstat/inet.c Thu Jan 5 09:23:54 2017(r311392) @@ -84,7 +84,6 @@ __FBSDID("$FreeBSD$"); #include "netstat.h" #include "nl_defs.h" -char *inetname(struct in_addr *); void inetprint(const char *, struct in_addr *, int, const char *, int, const int); #ifdef INET6 @@ -1413,21 +1412,26 @@ inetprint(const char *container, struct struct servent *sp = 0; char line[80], *cp; int width; + size_t alen, plen; if (container) xo_open_container(container); if (Wflag) - sprintf(line, "%s.", inetname(in)); + snprintf(line, sizeof(line), "%s.", inetname(in)); else - sprintf(line, "%.*s.", (Aflag && !num_port) ? 12 : 16, inetname(in)); - cp = strchr(line, '\0'); + snprintf(line, sizeof(line), "%.*s.", + (Aflag && !num_port) ? 12 : 16, inetname(in)); + alen = strlen(line); + cp = line + alen; if (!num_port && port) sp = getservbyport((int)port, proto); if (sp || port == 0) - sprintf(cp, "%.15s ", sp ? sp->s_name : "*"); + snprintf(cp, sizeof(line) - alen, + "%.15s ", sp ? sp->s_name : "*"); else - sprintf(cp, "%d ", ntohs((u_short)port)); + snprintf(cp, sizeof(line) - alen, + "%d ", ntohs((u_short)port)); width = (Aflag && !Wflag) ? 18 : ((!Wflag || af1 == AF_INET) ? 22 : 45); if (Wflag) @@ -1435,7 +1439,8 @@ inetprint(const char *container, struct else xo_emit("{d:target/%-*.*s} ", width, width, line); - int alen = cp - line - 1, plen = strlen(cp) - 1; + plen = strlen(cp) - 1; + alen--; xo_emit("{e:address/%*.*s}{e:port/%*.*s}", alen, alen, line, plen, plen, cp); @@ -1481,8 +1486,9 @@ inetname(struct in_addr *inp) } else { inp->s_addr = ntohl(inp->s_addr); #defineC(x)((u_int)((x) & 0xff)) - sprintf(line, "%u.%u.%u.%u", C(inp->s_addr >> 24), - C(inp->s_addr >> 16), C(inp->s_addr >> 8), C(inp->s_addr)); + snprintf(line, sizeof(line), "%u.%u.%u.%u", + C(inp->s_addr >> 24), C(inp->s_addr >> 16), + C(inp->s_addr >> 8), C(inp->s_addr)); } return (line); } Modified: head/usr.bin/netstat/inet6.c == --- head/usr.bin/netstat/inet6.cThu Jan 5 08:57:49 2017 (r311391) +++ head/usr.bin/netstat/inet6.cThu Jan 5 09:23:54 2017 (r311392) @@ -70,8 +70,6 @@ __FBSDID("$FreeBSD$"); #include #include "netstat.h" -char *inet6name(struct in6_addr *); - static char ntop_buf[INET6_ADDRSTRLEN]; static const char *ip6nh[] = { @@ -1270,24 +1268,30 @@ inet6print(const char *container, struct struct servent *sp = 0; char line[80], *cp; int width; + size_t alen, plen; if (container) xo_open_container(container); - sprintf(line, "%.*s.", Wflag ? 39 : (Aflag && !numeric) ? 12 : 16, + snprintf(line, sizeof(line), "%.*s.", +
svn commit: r311393 - head/usr.sbin/bsnmpd/modules/snmp_hostres
Author: ngie Date: Thu Jan 5 09:28:38 2017 New Revision: 311393 URL: https://svnweb.freebsd.org/changeset/base/311393 Log: OS_getSystemUptime: use nitems for calculating the number of elements in a sysctl mib instead of hardcoding the number 2 MFC after:3 days Modified: head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_scalars.c Modified: head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_scalars.c == --- head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_scalars.c Thu Jan 5 09:23:54 2017(r311392) +++ head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_scalars.c Thu Jan 5 09:28:38 2017(r311393) @@ -33,7 +33,7 @@ * Host Resources MIB scalars implementation for SNMPd. */ -#include +#include #include #include @@ -85,7 +85,7 @@ OS_getSystemUptime(uint32_t *ut) int mib[2] = { CTL_KERN, KERN_BOOTTIME }; size_t len = sizeof(kernel_boot_timestamp); - if (sysctl(mib, 2, &kernel_boot_timestamp, + if (sysctl(mib, nitems(mib), &kernel_boot_timestamp, &len, NULL, 0) == -1) { syslog(LOG_ERR, "sysctl KERN_BOOTTIME failed: %m"); return (SNMP_ERR_GENERR); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r311394 - head/contrib/bsnmp/snmp_usm
Author: ngie Date: Thu Jan 5 09:46:36 2017 New Revision: 311394 URL: https://svnweb.freebsd.org/changeset/base/311394 Log: op_usm_users: don't deref uusers if it's NULL when SETting the value Add an XXX comment to note that the conditional seems suspect given how it's handled elsewhere in the SNMP_OP_SET case. MFC after:2 weeks Reported by: Coverity CID: 1008573 Modified: head/contrib/bsnmp/snmp_usm/usm_snmp.c Modified: head/contrib/bsnmp/snmp_usm/usm_snmp.c == --- head/contrib/bsnmp/snmp_usm/usm_snmp.c Thu Jan 5 09:28:38 2017 (r311393) +++ head/contrib/bsnmp/snmp_usm/usm_snmp.c Thu Jan 5 09:46:36 2017 (r311394) @@ -169,8 +169,12 @@ op_usm_users(struct snmp_context *ctx, s val->var.subs[sub - 1] != LEAF_usmUserCloneFrom) return (SNMP_ERR_NOSUCHNAME); + /* +* XXX (ngie): need to investigate the MIB to determine how +* this is possible given some of the transitions below. +*/ if (community != COMM_INITIALIZE && - uuser->type == StorageType_readOnly) + uuser != NULL && uuser->type == StorageType_readOnly) return (SNMP_ERR_NOT_WRITEABLE); switch (val->var.subs[sub - 1]) { ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r311287 - head/lib/libc/x86/sys
> On Jan 4, 2017, at 08:10, Konstantin Belousov wrote: > > Author: kib > Date: Wed Jan 4 16:10:52 2017 > New Revision: 311287 > URL: https://svnweb.freebsd.org/changeset/base/311287 > > Log: > __vdso_gettc(): be extra careful with /dev/hpet mappings, never unmap > the mapping which might be accessed by other threads. > > If a pointer to the /dev/hpet register page mapping was stored into > the hpet_dev_map, other threads might access the page at any time. > Never unmap it, instead, keep track of mappings for all hpet units in > smal array. Store pointer to the newly mapped registers page using > CAS, to detect parallel mappings. > > It appeared relatively easy to demonstrate the problem by arranging > two threads which perform gettimeofday(2) concurently, first time in > the process address space, when HPET is used for timecounter. > > PR: 215715 > Sponsored by:The FreeBSD Foundation > MFC after: 1 week Thank you very much for the work! I’ll try to reproduce the bug again with the ATF test. -Ngie signature.asc Description: Message signed with OpenPGP using GPGMail
svn commit: r311426 - head/usr.bin/netstat
Author: ume Date: Thu Jan 5 11:44:27 2017 New Revision: 311426 URL: https://svnweb.freebsd.org/changeset/base/311426 Log: When displaying netstat details with libxo in JSON or XML modes, the value conversion for tcp6 and udp6 port numbers drops last digit. PR: 215682 MFC after:3 days Modified: head/usr.bin/netstat/inet6.c Modified: head/usr.bin/netstat/inet6.c == --- head/usr.bin/netstat/inet6.cThu Jan 5 11:43:47 2017 (r311425) +++ head/usr.bin/netstat/inet6.cThu Jan 5 11:44:27 2017 (r311426) @@ -1290,7 +1290,7 @@ inet6print(const char *container, struct xo_emit("{d:target/%-*.*s} ", width, width, line); - plen = strlen(cp) - 1; + plen = strlen(cp); alen--; xo_emit("{e:address/%*.*s}{e:port/%*.*s}", alen, alen, line, plen, plen, cp); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r311445 - head/etc/mtree
Author: asomers Date: Thu Jan 5 15:07:04 2017 New Revision: 311445 URL: https://svnweb.freebsd.org/changeset/base/311445 Log: Fix typo from r311349 Reported by: lwhsu Pointy-hat-to:asomers MFC after:4 weeks X-MFC-with: 311349 Modified: head/etc/mtree/BSD.tests.dist Modified: head/etc/mtree/BSD.tests.dist == --- head/etc/mtree/BSD.tests.dist Thu Jan 5 13:29:57 2017 (r311444) +++ head/etc/mtree/BSD.tests.dist Thu Jan 5 15:07:04 2017 (r311445) @@ -593,6 +593,7 @@ t0 .. .. +.. bsdcat .. calendar ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r311446 - head/sys/cam/ctl
Author: mav Date: Thu Jan 5 16:30:13 2017 New Revision: 311446 URL: https://svnweb.freebsd.org/changeset/base/311446 Log: Fix bootverbose affecting code logic in r294558. Reported by: Jilles Tjoelker Modified: head/sys/cam/ctl/ctl_ha.c Modified: head/sys/cam/ctl/ctl_ha.c == --- head/sys/cam/ctl/ctl_ha.c Thu Jan 5 15:07:04 2017(r311445) +++ head/sys/cam/ctl/ctl_ha.c Thu Jan 5 16:30:13 2017(r311446) @@ -443,8 +443,9 @@ ctl_ha_connect(struct ha_softc *softc) memcpy(&sa, &softc->ha_peer_in, sizeof(sa)); error = soconnect(so, (struct sockaddr *)&sa, td); - if (error != 0 && bootverbose) { - printf("%s: soconnect() error %d\n", __func__, error); + if (error != 0) { + if (bootverbose) + printf("%s: soconnect() error %d\n", __func__, error); goto out; } return (0); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r311343 - head/sys/mips/mips
On Thursday, January 05, 2017 12:59:53 AM John Baldwin wrote: > Author: jhb > Date: Thu Jan 5 00:59:53 2017 > New Revision: 311343 > URL: https://svnweb.freebsd.org/changeset/base/311343 > > Log: > Use db_printsym() to display function names in stack traces. > > Previously, the stack unwinder tried to locate the start of the function > in each frame by walking backwards until it found an instruction that > modified the stack pointer and then assumed that was the first instruction > in a function. The unwinder would only print a function name if the > starting instruction's address was an exact match for a symbol name. > However, not all functions generated by modern compilers start off functions > with that instruction. For those functions, the unwinder would fail to > find a matching function name. As a result, most frames in a stack > trace would be printed as raw hex PC's instead of a function name. > > Stop depending on this incorrect assumption and just use db_printsym() > like other platforms to display the function name and offset for each > frame. This generates a far more useful stack trace. > > While here, don't print out curproc's pid at the end of the trace. The > pid was always from curproc even if tracing some other process. > > In addition, remove some rotted comments about hardcoded constants that > are no longer hardcoded. > > Sponsored by: DARPA / AFRL After these (and previous fixes), the original kernel stack overflow I saw earlier now results in a much more usable stack trace from DDB. Note that some of the function names are false positives due to no symbols for static functions, but many more frames were false negatives previously. panic: kernel stack overflow - trapframe at 0x806d9eb0 KDB: enter: panic [ thread pid 624 tid 100043 ] Stopped at 0x4: db> tr Tracing pid 624 tid 100043 td 0x9800016baa20 kdb_enter+0x88 (?,?,?,?) ra 8031cbc8 sp 806d9e00 sz 16 vpanic+0x1b0 (?,?,?,?) ra 8031cc30 sp 806d9e10 sz 32 kassert_panic (?,806d9eb0,ffec,802fce94) ra 80569fec sp 806d9e30 sz 96 MipsKStackOverflow (?,?,?,?) ra 0 sp 806d9e90 sz 0 --- exception, cause 7 badvaddr 1 --- thread_lock_flags_+0xc (?,?,?,?) ra 802acf4c sp c0002a5a9fb0 sz 96 statclock_cnt+0x1ec (?,?,?,?) ra 80581388 sp c0002a5aa010 sz 32 cpu_set_upcall+0x668 (?,?,?,?) ra 805816f8 sp c0002a5aa030 sz 64 cpu_set_upcall+0x9d8 (?,?,?,?) ra 8058ae94 sp c0002a5aa070 sz 48 DELAY+0x4e4 (?,?,?,?) ra 802db900 sp c0002a5aa0a0 sz 64 intr_event_handle+0xb0 (?,?,?,?) ra 8058a250 sp c0002a5aa0e0 sz 64 cpu_intr+0x230 (?,?,?,?) ra 80569840 sp c0002a5aa120 sz 80 MipsKernIntr+0x188 (?,?,?,?) ra 0 sp c0002a5aa170 sz 0 --- exception, cause 0 badvaddr 8043d700 --- bpf_mtap+0x88 (?,?,?,?) ra 80190028 sp c0002a5aa2e0 sz 96 am7990_config+0x680 (?,?,?,?) ra 801925fc sp c0002a5aa340 sz 96 lance_init_locked+0x564 (?,?,?,?) ra 8042fbdc sp c0002a5aa3a0 sz 32 if_start+0x14 (?,?,?,?) ra 804317f8 sp c0002a5aa3c0 sz 16 if_handoff+0x340 (?,?,?,?) ra 8043cfe0 sp c0002a5aa3d0 sz 48 ether_output_frame+0x80 (?,980001629e00,?,?) ra 8043d700 sp c0002a5aa400 sz 32 ether_output+0x710 (?,980001629e00,?,?) ra 80484618 sp c0002a5aa420 sz 112 ip_output+0x1af8 (980001629e00,?,?,0) ra 804986bc sp c0002a5aa490 sz 304 tcp_output+0x209c (?,?,?,?) ra 804aa8e8 sp c0002a5aa5c0 sz 368 tcp_twstart+0x2c70 (?,?,?,?) ra 803c7220 sp c0002a5aa730 sz 96 sosend_generic+0x618 (?,0,?,?) ra 803c3cb4 sp c0002a5aa790 sz 160 sosend+0x1c (?,?,?,?) ra 804bb2f0 sp c0002a5aa830 sz 16 clnt_vc_create+0x1208 (?,?,15,98000162d900) ra 804b993c sp c0002a5aa840 sz 320 clnt_reconnect_create+0xec4 (980001630400,?,15,98000162d900) ra 801e225c sp c0002a5aa980 sz 176 newnfs_request+0x9f4 (?,?,?,?) ra 8023466c sp c0002a5aaa30 sz 336 nfscl_request+0x7c (?,?,?,?) ra 8020e2d0 sp c0002a5aab80 sz 64 nfsrpc_commit+0x470 (?,?,?,?) ra 802276f8 sp c0002a5aabc0 sz 368 ncl_commit+0xf8 (980004440760,?,?,?) ra 80227bfc sp c0002a5aad30 sz 288 ncl_flush+0x474 (980004440760,?,?,9800016baa20) ra 802285d0 sp c0002a5aae50 sz 384 ncl_flush+0xe48 (?,?,?,?) ra 80591390 sp c0002a5aafd0 sz 16 VOP_FSYNC_APV+0x118 (?,?,?,?) ra 803df524 sp c0002a5aafe0 sz 32 bufsync+0x5c (980004440760,1,?,?) ra 8040e030 sp c0002a5ab000 sz 48 bufobj_invalbuf+0xf8 (?,?,?,?) ra 8040e3e0 sp c0002a5ab030 sz 96 vinvalbuf+0x28 (?,?,?,?) ra 80239780 sp c0002a5ab090 sz 16 ncl_vinvalbuf+0x170 (?,?,?,?) ra 80226b58 sp c0002a5ab0a0 sz 96 ncl_removeit+0x298 (?,?,?,?) ra f
svn commit: r311447 - in head/sys: compat/freebsd32 kern
Author: kib Date: Thu Jan 5 17:03:35 2017 New Revision: 311447 URL: https://svnweb.freebsd.org/changeset/base/311447 Log: Some style fixes for getfstat(2)-related code. Sponsored by: The FreeBSD Foundation MFC after:1 week Modified: head/sys/compat/freebsd32/freebsd32_misc.c head/sys/kern/vfs_syscalls.c Modified: head/sys/compat/freebsd32/freebsd32_misc.c == --- head/sys/compat/freebsd32/freebsd32_misc.c Thu Jan 5 16:30:13 2017 (r311446) +++ head/sys/compat/freebsd32/freebsd32_misc.c Thu Jan 5 17:03:35 2017 (r311447) @@ -244,7 +244,8 @@ copy_statfs(struct statfs *in, struct st #ifdef COMPAT_FREEBSD4 int -freebsd4_freebsd32_getfsstat(struct thread *td, struct freebsd4_freebsd32_getfsstat_args *uap) +freebsd4_freebsd32_getfsstat(struct thread *td, +struct freebsd4_freebsd32_getfsstat_args *uap) { struct statfs *buf, *sp; struct statfs32 stat32; Modified: head/sys/kern/vfs_syscalls.c == --- head/sys/kern/vfs_syscalls.cThu Jan 5 16:30:13 2017 (r311446) +++ head/sys/kern/vfs_syscalls.cThu Jan 5 17:03:35 2017 (r311447) @@ -485,7 +485,7 @@ restart: continue; } } - if (sfsp && count < maxcount) { + if (sfsp != NULL && count < maxcount) { sp = &mp->mnt_stat; /* * Set these in case the underlying filesystem @@ -530,7 +530,7 @@ restart: vfs_unbusy(mp); } mtx_unlock(&mountlist_mtx); - if (sfsp && count > maxcount) + if (sfsp != NULL && count > maxcount) *countp = maxcount; else *countp = count; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r311448 - head/sys/dev/etherswitch/e6000sw
Author: zbb Date: Thu Jan 5 17:08:10 2017 New Revision: 311448 URL: https://svnweb.freebsd.org/changeset/base/311448 Log: Improve ports handling in e6000sw driver - recognize ports and vlangroups based on DTS file - support multi-chip addresing mode (required in upcoming Armada-388-Clearfog support) - refactor attachment function Each port in 'dsa' node should have 'vlangroup' property. Otherwise, e6000sw will fail to attach. Submitted by: Bartosz Szczepanek Konrad Adamczyk Obtained from:Semihalf Sponsored by: Stormshield Differential revision: https://reviews.freebsd.org/D7328 Modified: head/sys/dev/etherswitch/e6000sw/e6000sw.c head/sys/dev/etherswitch/e6000sw/e6000swreg.h Modified: head/sys/dev/etherswitch/e6000sw/e6000sw.c == --- head/sys/dev/etherswitch/e6000sw/e6000sw.c Thu Jan 5 17:03:35 2017 (r311447) +++ head/sys/dev/etherswitch/e6000sw/e6000sw.c Thu Jan 5 17:08:10 2017 (r311448) @@ -59,6 +59,10 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include +#include + #include "e6000swreg.h" #include "etherswitch_if.h" #include "miibus_if.h" @@ -78,23 +82,28 @@ MALLOC_DEFINE(M_E6000SW, "e6000sw", "e60 typedef struct e6000sw_softc { device_tdev; + phandle_t node; struct sx sx; - struct ifnet*ifp[E6000SW_NUM_PHYS]; - char*ifname[E6000SW_NUM_PHYS]; - device_tmiibus[E6000SW_NUM_PHYS]; - struct mii_data *mii[E6000SW_NUM_PHYS]; + struct ifnet*ifp[E6000SW_MAX_PORTS]; + char*ifname[E6000SW_MAX_PORTS]; + device_tmiibus[E6000SW_MAX_PORTS]; + struct mii_data *mii[E6000SW_MAX_PORTS]; struct callout tick_callout; uint32_tcpuports_mask; + uint32_tfixed_mask; + int sw_addr; + int num_ports; + boolean_t multi_chip; int vid[E6000SW_NUM_VGROUPS]; int members[E6000SW_NUM_VGROUPS]; - int vgroup[E6000SW_NUM_PORTS]; + int vgroup[E6000SW_MAX_PORTS]; } e6000sw_softc_t; static etherswitch_info_t etherswitch_info = { - .es_nports =E6000SW_NUM_PORTS, + .es_nports =0, .es_nvlangroups = E6000SW_NUM_VGROUPS, .es_name = "Marvell 6000 series switch" }; @@ -134,7 +143,9 @@ static int e6000sw_atu_mac_table(device_ atu_opt *atu, int flag); static int e6000sw_get_pvid(e6000sw_softc_t *sc, int port, int *pvid); static int e6000sw_set_pvid(e6000sw_softc_t *sc, int port, int pvid); -static __inline int e6000sw_cpuport(e6000sw_softc_t *sc, int port); +static __inline int e6000sw_is_cpuport(e6000sw_softc_t *sc, int port); +static __inline int e6000sw_is_fixedport(e6000sw_softc_t *sc, int port); +static __inline int e6000sw_is_phyport(e6000sw_softc_t *sc, int port); static __inline struct mii_data *e6000sw_miiforphy(e6000sw_softc_t *sc, unsigned int phy); @@ -181,6 +192,14 @@ DRIVER_MODULE(etherswitch, e6000sw, ethe DRIVER_MODULE(miibus, e6000sw, miibus_driver, miibus_devclass, 0, 0); MODULE_DEPEND(e6000sw, mdio, 1, 1, 1); +#define SMI_CMD 0 +#define SMI_CMD_BUSY (1<<15) +#define SMI_CMD_OP_READ((2<<10)|SMI_CMD_BUSY|(1<<12)) +#define SMI_CMD_OP_WRITE ((1<<10)|SMI_CMD_BUSY|(1<<12)) +#define SMI_DATA 1 + +#define MDIO_READ(dev, addr, reg) MDIO_READREG(device_get_parent(dev), (addr), (reg)) +#define MDIO_WRITE(dev, addr, reg, val) MDIO_WRITEREG(device_get_parent(dev), (addr), (reg), (val)) static void e6000sw_identify(driver_t *driver, device_t parent) { @@ -195,10 +214,37 @@ e6000sw_probe(device_t dev) e6000sw_softc_t *sc; const char *description; unsigned int id; + uint16_t dev_addr; + phandle_t dsa_node, switch_node; + + dsa_node = fdt_find_compatible(OF_finddevice("/"), + "marvell,dsa", 0); + switch_node = OF_child(dsa_node); + + if (switch_node == 0) + return (ENXIO); sc = device_get_softc(dev); bzero(sc, sizeof(e6000sw_softc_t)); sc->dev = dev; + sc->node = switch_node; + + /* Read ADDR[4:1]n using indirect access */ + MDIO_WRITE(dev, REG_GLOBAL2, SCR_AND_MISC_REG, + SCR_AND_MISC_PTR_CFG); + dev_addr = MDIO_READ(dev, REG_GLOBAL2, SCR_AND_MISC_REG) & + SCR_AND_MISC_DATA_CFG_MASK; + if (dev_addr != 0) { + sc->multi_chip = true; + device_printf(dev, "multi-chip addresing mode\n"); + } else { + device_printf(dev, "single-chip addressing mode\n"); + } + + if (OF_getenc
svn commit: r311449 - in head/sys: arm/conf conf
Author: zbb Date: Thu Jan 5 17:10:52 2017 New Revision: 311449 URL: https://svnweb.freebsd.org/changeset/base/311449 Log: Include e6000sw driver in ARMADA38X configuration e6000sw Marvell switch driver was added to files and Armada38x kernel configuration file. Submitted by: Bartosz Szczepanek Obtained from:Semihalf Sponsored by: Stormshield Differential revision: https://reviews.freebsd.org/D8178 Modified: head/sys/arm/conf/ARMADA38X head/sys/conf/files Modified: head/sys/arm/conf/ARMADA38X == --- head/sys/arm/conf/ARMADA38X Thu Jan 5 17:08:10 2017(r311448) +++ head/sys/arm/conf/ARMADA38X Thu Jan 5 17:10:52 2017(r311449) @@ -37,6 +37,9 @@ devicevlan device mii device bpf device re +device mdio +device etherswitch +device e6000sw # PCI device pci Modified: head/sys/conf/files == --- head/sys/conf/files Thu Jan 5 17:08:10 2017(r311448) +++ head/sys/conf/files Thu Jan 5 17:10:52 2017(r311449) @@ -1639,6 +1639,7 @@ dev/etherswitch/ip17x/ip17x_phy.c option dev/etherswitch/ip17x/ip17x_vlans.coptional ip17x dev/etherswitch/miiproxy.c optional miiproxy dev/etherswitch/rtl8366/rtl8366rb.coptional rtl8366rb +dev/etherswitch/e6000sw/e6000sw.c optional e6000sw dev/etherswitch/ukswitch/ukswitch.coptional ukswitch dev/evdev/cdev.c optional evdev dev/evdev/evdev.c optional evdev ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r311450 - head/sys/boot/fdt/dts/arm
Author: zbb Date: Thu Jan 5 17:12:53 2017 New Revision: 311450 URL: https://svnweb.freebsd.org/changeset/base/311450 Log: Add buffer management entries to armada-38x.dtsi Hardware buffer management entries are not used yet by FreeBSD. They were added for compliance with Linux Armada 38x device tree representation and will be used in future network support. Submitted by: Bartosz Szczepanek Obtained from: Semihalf Sponsored by: Stormshield Differential revision: https://reviews.freebsd.org/D8179 Modified: head/sys/boot/fdt/dts/arm/armada-38x.dtsi Modified: head/sys/boot/fdt/dts/arm/armada-38x.dtsi == --- head/sys/boot/fdt/dts/arm/armada-38x.dtsi Thu Jan 5 17:10:52 2017 (r311449) +++ head/sys/boot/fdt/dts/arm/armada-38x.dtsi Thu Jan 5 17:12:53 2017 (r311450) @@ -562,6 +562,14 @@ status = "disabled"; }; + bm: bm@c8000 { + compatible = "marvell,armada-380-neta-bm"; + reg = <0xc8000 0xac>; + clocks = <&gateclk 13>; + internal-mem = <&bm_bppi>; + status = "disabled"; + }; + sata@e { compatible = "marvell,armada-380-ahci"; reg = <0xe 0x2000>; @@ -622,6 +630,17 @@ status = "disabled"; }; }; + + bm_bppi: bm-bppi { + compatible = "mmio-sram"; + reg = ; + ranges = <0 MBUS_ID(0x0c, 0x04) 0 0x10>; + #address-cells = <1>; + #size-cells = <1>; + clocks = <&gateclk 13>; + no-memory-wc; + status = "disabled"; + }; }; pci0: pcie@f108 { ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r311346 - in head/sys: kern sys vm
On Thu, Jan 05, 2017 at 09:16:02AM +, Steven Hartland wrote: > Given the use of the number of CPU's for sizing would this play nice > with hot plug CPU's? > > Regards > Steve Not without some work. I don't think it would be a major obstacle to adding hot-plug CPU support on at least 64-bit systems though. > > On 05/01/2017 01:44, Mark Johnston wrote: > > Author: markj > > Date: Thu Jan 5 01:44:12 2017 > > New Revision: 311346 > > URL: https://svnweb.freebsd.org/changeset/base/311346 > > > > Log: > >Add a small allocator for exec_map entries. > > > >Upon each execve, we allocate a KVA range for use in copying data to the > >new image. Pages must be faulted into the range, and when the range is > >freed, the backing pages are freed and their mappings are destroyed. This > >is a lot of needless overhead, and the exec_map management becomes a > >bottleneck when many CPUs are executing execve concurrently. Moreover, > > the > >number of available ranges is fixed at 16, which is insufficient on large > >systems and potentially excessive on 32-bit systems. > > > >The new allocator reduces overhead by making exec_map allocations > >persistent. When a range is freed, pages backing the range are marked > > clean > >and made easy to reclaim. With this change, the exec_map is sized based > > on > >the number of CPUs. ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r311451 - head/sys/boot/fdt/dts/arm
Author: zbb Date: Thu Jan 5 17:14:56 2017 New Revision: 311451 URL: https://svnweb.freebsd.org/changeset/base/311451 Log: Correct CESA node in armada-38x.dtsi CESA resources were invalid, what caused driver to fail during attach call. Submitted by: Bartosz Szczepanek Obtained from:Semihalf Sponsored by: Stormshield Differential revision: https://reviews.freebsd.org/D8180 Modified: head/sys/boot/fdt/dts/arm/armada-38x.dtsi Modified: head/sys/boot/fdt/dts/arm/armada-38x.dtsi == --- head/sys/boot/fdt/dts/arm/armada-38x.dtsi Thu Jan 5 17:12:53 2017 (r311450) +++ head/sys/boot/fdt/dts/arm/armada-38x.dtsi Thu Jan 5 17:14:56 2017 (r311451) @@ -154,7 +154,8 @@ crypto@9 { compatible = "mrvl,cesa"; - reg = <0x9 0x1>; + reg = <0x9 0x1000 /* tdma base reg chan 0 */ + 0x9D000 0x1000>; /* cesa base reg chan 0 */ interrupts = ; interrupt-parent = <&gic>; sram-handle = <&SRAM0>; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r311452 - in head/sys: compat/freebsd32 compat/linux compat/svr4 fs/nfs fs/nfsserver fs/nullfs fs/unionfs i386/ibcs2 kern sys
Author: kib Date: Thu Jan 5 17:19:26 2017 New Revision: 311452 URL: https://svnweb.freebsd.org/changeset/base/311452 Log: Do not allocate struct statfs on kernel stack. Right now size of the structure is 472 bytes on amd64, which is already large and stack allocations are indesirable. With the ino64 work, MNAMELEN is increased to 1024, which will make it impossible to have struct statfs on the stack. Extracted from: ino64 work by gleb Discussed with: mckusick Tested by:pho Sponsored by: The FreeBSD Foundation MFC after:1 week Modified: head/sys/compat/freebsd32/freebsd32_misc.c head/sys/compat/linux/linux_stats.c head/sys/compat/svr4/svr4_misc.c head/sys/fs/nfs/nfs_commonsubs.c head/sys/fs/nfsserver/nfs_nfsdserv.c head/sys/fs/nullfs/null_vfsops.c head/sys/fs/unionfs/union_vfsops.c head/sys/i386/ibcs2/ibcs2_stat.c head/sys/kern/kern_acct.c head/sys/kern/vfs_default.c head/sys/kern/vfs_mount.c head/sys/kern/vfs_syscalls.c head/sys/sys/mount.h Modified: head/sys/compat/freebsd32/freebsd32_misc.c == --- head/sys/compat/freebsd32/freebsd32_misc.c Thu Jan 5 17:14:56 2017 (r311451) +++ head/sys/compat/freebsd32/freebsd32_misc.c Thu Jan 5 17:19:26 2017 (r311452) @@ -265,7 +265,7 @@ freebsd4_freebsd32_getfsstat(struct thre uap->buf++; copycount--; } - free(buf, M_TEMP); + free(buf, M_STATFS); } if (error == 0) td->td_retval[0] = count; @@ -1394,14 +1394,17 @@ int freebsd4_freebsd32_statfs(struct thread *td, struct freebsd4_freebsd32_statfs_args *uap) { struct statfs32 s32; - struct statfs s; + struct statfs *sp; int error; - error = kern_statfs(td, uap->path, UIO_USERSPACE, &s); - if (error) - return (error); - copy_statfs(&s, &s32); - return (copyout(&s32, uap->buf, sizeof(s32))); + sp = malloc(sizeof(struct statfs), M_STATFS, M_WAITOK); + error = kern_statfs(td, uap->path, UIO_USERSPACE, sp); + if (error == 0) { + copy_statfs(sp, &s32); + error = copyout(&s32, uap->buf, sizeof(s32)); + } + free(sp, M_STATFS); + return (error); } #endif @@ -1410,14 +1413,17 @@ int freebsd4_freebsd32_fstatfs(struct thread *td, struct freebsd4_freebsd32_fstatfs_args *uap) { struct statfs32 s32; - struct statfs s; + struct statfs *sp; int error; - error = kern_fstatfs(td, uap->fd, &s); - if (error) - return (error); - copy_statfs(&s, &s32); - return (copyout(&s32, uap->buf, sizeof(s32))); + sp = malloc(sizeof(struct statfs), M_STATFS, M_WAITOK); + error = kern_fstatfs(td, uap->fd, sp); + if (error == 0) { + copy_statfs(sp, &s32); + error = copyout(&s32, uap->buf, sizeof(s32)); + } + free(sp, M_STATFS); + return (error); } #endif @@ -1426,17 +1432,20 @@ int freebsd4_freebsd32_fhstatfs(struct thread *td, struct freebsd4_freebsd32_fhstatfs_args *uap) { struct statfs32 s32; - struct statfs s; + struct statfs *sp; fhandle_t fh; int error; if ((error = copyin(uap->u_fhp, &fh, sizeof(fhandle_t))) != 0) return (error); - error = kern_fhstatfs(td, fh, &s); - if (error) - return (error); - copy_statfs(&s, &s32); - return (copyout(&s32, uap->buf, sizeof(s32))); + sp = malloc(sizeof(struct statfs), M_STATFS, M_WAITOK); + error = kern_fhstatfs(td, fh, sp); + if (error == 0) { + copy_statfs(sp, &s32); + error = copyout(&s32, uap->buf, sizeof(s32)); + } + free(sp, M_STATFS); + return (error); } #endif Modified: head/sys/compat/linux/linux_stats.c == --- head/sys/compat/linux/linux_stats.c Thu Jan 5 17:14:56 2017 (r311451) +++ head/sys/compat/linux/linux_stats.c Thu Jan 5 17:19:26 2017 (r311452) @@ -415,7 +415,7 @@ int linux_statfs(struct thread *td, struct linux_statfs_args *args) { struct l_statfs linux_statfs; - struct statfs bsd_statfs; + struct statfs *bsd_statfs; char *path; int error; @@ -425,12 +425,13 @@ linux_statfs(struct thread *td, struct l if (ldebug(statfs)) printf(ARGS(statfs, "%s, *"), path); #endif - error = kern_statfs(td, path, UIO_SYSSPACE, &bsd_statfs); + bsd_statfs = malloc(sizeof(struct statfs), M_STATFS, M_WAITOK); + error = kern_statfs(td, path, UIO_SYSSPACE, bsd_statfs); LFREEPATH(path); - if (error) - return (error); - error = bsd_to_linux_statfs(&bsd_statfs, &linux_statfs); -
svn commit: r311453 - head/sys/netinet
Author: hiren Date: Thu Jan 5 17:22:09 2017 New Revision: 311453 URL: https://svnweb.freebsd.org/changeset/base/311453 Log: sysctl net.inet.tcp.hostcache.list in a jail can see connections from other jails and the host. This commit fixes it. PR: 200361 Submitted by: bz (original version), hiren (minor corrections) Reported by: Marcus Reid Reviewed by: bz, gnn Tested by:Lohith Bellad MFC after:1 week Sponsored by: Limelight Networks (minor corrections) Modified: head/sys/netinet/tcp_hostcache.c Modified: head/sys/netinet/tcp_hostcache.c == --- head/sys/netinet/tcp_hostcache.cThu Jan 5 17:19:26 2017 (r311452) +++ head/sys/netinet/tcp_hostcache.cThu Jan 5 17:22:09 2017 (r311453) @@ -69,10 +69,12 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include #include +#include #include #include #include @@ -625,6 +627,9 @@ sysctl_tcp_hc_list(SYSCTL_HANDLER_ARGS) char ip6buf[INET6_ADDRSTRLEN]; #endif + if (jailed_without_vnet(curthread->td_ucred) != 0) + return (EPERM); + sbuf_new(&sb, NULL, linesize * (V_tcp_hostcache.cache_count + 1), SBUF_INCLUDENUL); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r311454 - head/sys/boot/fdt/dts/arm
Author: zbb Date: Thu Jan 5 17:25:16 2017 New Revision: 311454 URL: https://svnweb.freebsd.org/changeset/base/311454 Log: Add DTS file for Solidrun ClearFog board ClearFog is equipped with Marvell Armada 388 SoC, which is already supported in FreeBSD. Submitted by: Bartosz Szczepanek Obtained from:Semihalf Sponsored by: Stormshield Differential revision: https://reviews.freebsd.org/D7326 Added: head/sys/boot/fdt/dts/arm/armada-388-clearfog.dts (contents, props changed) head/sys/boot/fdt/dts/arm/armada-38x-solidrun-microsom.dtsi (contents, props changed) Added: head/sys/boot/fdt/dts/arm/armada-388-clearfog.dts == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/fdt/dts/arm/armada-388-clearfog.dts Thu Jan 5 17:25:16 2017(r311454) @@ -0,0 +1,463 @@ +/* + * Device Tree file for SolidRun Clearfog revision A1 rev 2.0 (88F6828) + * + * Copyright (C) 2015 Russell King + * + * This board is in development; the contents of this file work with + * the A1 rev 2.0 of the board, which does not represent final + * production board. Things will change, don't expect this file to + * remain compatible info the future. + * + * This file is dual-licensed: you can use it either under the terms + * of the GPL or the X11 license, at your option. Note that this dual + * licensing only applies to this file, and not this project as a + * whole. + * + * a) This file is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + * + * This file is distributed in the hope that it will be useful + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * Or, alternatively + * + * b) Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use + * copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * + * $FreeBSD$ + */ + +/dts-v1/; +#include "armada-388.dtsi" +#include "armada-38x-solidrun-microsom.dtsi" + +/ { + model = "SolidRun Clearfog A1"; + compatible = "solidrun,clearfog-a1", "marvell,armada388", + "marvell,armada385", "marvell,armada380"; + + aliases { + /* So that mvebu u-boot can update the MAC addresses */ + ethernet1 = ð0; + ethernet2 = ð1; + ethernet3 = ð2; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; + + reg_3p3v: regulator-3p3v { + compatible = "regulator-fixed"; + regulator-name = "3P3V"; + regulator-min-microvolt = <330>; + regulator-max-microvolt = <330>; + regulator-always-on; + }; + + soc { + internal-regs { + ethernet@3 { + phy-mode = "sgmii"; + buffer-manager = <&bm>; + bm,pool-long = <2>; + bm,pool-short = <1>; + status = "okay"; + + fixed-link { + speed = <1000>; + full-duplex; + }; + }; + + ethernet@34000 { + phy-mode = "sgmii"; + buffer-manager = <&bm>; + bm,pool-long = <3>; + bm,pool-short = <1>; + status = "okay"; + + fixed-link { + speed = <1000>; +
svn commit: r311455 - head/sys/boot/fdt/dts/arm
Author: zbb Date: Thu Jan 5 17:27:50 2017 New Revision: 311455 URL: https://svnweb.freebsd.org/changeset/base/311455 Log: Add DTS file for Armada 385 DB-AP board Armada38x is already supported in the tree. This commit adds support for DB-AP board. File was taken from Linux v4.8 and accustomed to FreeBSD in minimal possible way. Submitted by: Bartosz Szczepanek Obtained from:Semihalf Sponsored by: Stormshield Differential revision: https://reviews.freebsd.org/D7327 Added: head/sys/boot/fdt/dts/arm/armada-385-db-ap.dts (contents, props changed) Added: head/sys/boot/fdt/dts/arm/armada-385-db-ap.dts == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/fdt/dts/arm/armada-385-db-ap.dts Thu Jan 5 17:27:50 2017(r311455) @@ -0,0 +1,271 @@ +/* + * Device Tree file for Marvell Armada 385 Access Point Development board + * (DB-88F6820-AP) + * + * Copyright (C) 2014 Marvell + * + * Nadav Haklai + * + * This file is dual-licensed: you can use it either under the terms + * of the GPL or the X11 license, at your option. Note that this dual + * licensing only applies to this file, and not this project as a + * whole. + * + * a) This file is licensed under the terms of the GNU General Public + * License version 2. This program is licensed "as is" without + * any warranty of any kind, whether express or implied. + * + * Or, alternatively, + * + * b) Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * + * $FreeBSD$ + */ + +/dts-v1/; +#include "armada-385.dtsi" + +#include + +/ { + model = "Marvell Armada 385 Access Point Development Board"; + compatible = "marvell,a385-db-ap", "marvell,armada385", "marvell,armada380"; + + chosen { + stdout-path = "serial1"; + }; + + memory { + device_type = "memory"; + reg = <0x 0x8000>; /* 2GB */ + }; + + soc { + ranges = ; + + internal-regs { + i2c0: i2c@11000 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c0_pins>; + status = "okay"; + + /* +* This bus is wired to two EEPROM +* sockets, one of which holding the +* board ID used by the bootloader. +* Erasing this EEPROM's content will +* brick the board. +* Use this bus with caution. +*/ + }; + + mdio@72004 { + pinctrl-names = "default"; + pinctrl-0 = <&mdio_pins>; + + phy0: ethernet-phy@1 { + reg = <1>; + }; + + phy1: ethernet-phy@4 { + reg = <4>; + }; + + phy2: ethernet-phy@6 { + reg = <6>; + }; + }; + + /* UART0 is exposed through the JP8 connector */ + uart0: serial@12000 { + pinctrl-names = "default"; + pinctrl-0 = <&uart0_pins>; + status = "okay"; + }; + + /* +* UART1 is exposed through a FTDI chip +* wired to the mini-USB connector +
svn commit: r311458 - in head/sys/boot/mips/beri: boot2 common loader
Author: kan Date: Thu Jan 5 19:17:14 2017 New Revision: 311458 URL: https://svnweb.freebsd.org/changeset/base/311458 Log: Use compiler driver to link BERI boot loaders Do not hardcode elf64-tradbigmips as output format in BERI linker scrips. Unfortunately, in-tree toolchain and external newer versions of binutils mean two different things under that. When creating elf binaries using external toolchain, gcc uses elf64-tradbigmips-freebsd and so linker script file has to match in order for ld to be able to create the final loader binary. Rather than trying to guess, remove hardcoded output format directive from the linker directive files and use CC to invoke the linker instead. Reviewed by: brooks Differential Revision:https://reviews.freebsd.org/D9050 Modified: head/sys/boot/mips/beri/boot2/Makefile head/sys/boot/mips/beri/common/common.ldscript head/sys/boot/mips/beri/loader/loader.ldscript Modified: head/sys/boot/mips/beri/boot2/Makefile == --- head/sys/boot/mips/beri/boot2/Makefile Thu Jan 5 18:32:53 2017 (r311457) +++ head/sys/boot/mips/beri/boot2/Makefile Thu Jan 5 19:17:14 2017 (r311458) @@ -71,7 +71,7 @@ LDFLAGS= -nostdlib \ CFLAGS+= -I${.CURDIR}/../common flashboot.elf: relocate.o start.o boot2.o altera_jtag_uart.o cfi.o sdcard.o - ${LD} ${_LDFLAGS} -T ${.CURDIR}/flashboot.ldscript -o ${.TARGET} \ + ${CC} ${_LDFLAGS} -T ${.CURDIR}/flashboot.ldscript -o ${.TARGET} \ ${.ALLSRC} ${LIBSTAND} flashboot: flashboot.elf ${OBJCOPY} -S -O binary ${.TARGET}.elf ${.TARGET} @@ -79,7 +79,7 @@ flashboot.md5: flashboot md5 flashboot > flashboot.md5 jtagboot: start.o boot2.o altera_jtag_uart.o cfi.o sdcard.o - ${LD} ${_LDFLAGS} -T ${.CURDIR}/jtagboot.ldscript -o ${.TARGET} \ + ${CC} ${_LDFLAGS} -T ${.CURDIR}/jtagboot.ldscript -o ${.TARGET} \ ${.ALLSRC} ${LIBSTAND} jtagboot.md5: jtagboot md5 jtagboot > jtagboot.md5 Modified: head/sys/boot/mips/beri/common/common.ldscript == --- head/sys/boot/mips/beri/common/common.ldscript Thu Jan 5 18:32:53 2017(r311457) +++ head/sys/boot/mips/beri/common/common.ldscript Thu Jan 5 19:17:14 2017(r311458) @@ -73,5 +73,4 @@ __cheri_sdcard_vaddr__ = __mips64_xkphys __kernel_base__ = 0x10; __kernel_vaddr__ = __mips64_xkphys_cached__ + __kernel_base__; -OUTPUT_FORMAT("elf64-tradbigmips"); OUTPUT_ARCH(mips) Modified: head/sys/boot/mips/beri/loader/loader.ldscript == --- head/sys/boot/mips/beri/loader/loader.ldscript Thu Jan 5 18:32:53 2017(r311457) +++ head/sys/boot/mips/beri/loader/loader.ldscript Thu Jan 5 19:17:14 2017(r311458) @@ -44,7 +44,6 @@ __loader_base_vaddr__ = __mips64_xkphys_ __loader_end__ = 0x10; __loader_end_vaddr__ = __mips64_xkphys_cached__ + __loader_end__; -OUTPUT_FORMAT("elf64-tradbigmips"); OUTPUT_ARCH(mips) ENTRY(start) SECTIONS ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r311459 - head/contrib/tcp_wrappers
Author: dim Date: Thu Jan 5 20:44:45 2017 New Revision: 311459 URL: https://svnweb.freebsd.org/changeset/base/311459 Log: Put proper prototypes in tcpd.h Clang 4.0.0 complains about tcpd.h's not-really-prototypes, e.g.: /usr/include/tcpd.h:75:24: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes] extern int hosts_access(); /* access control */ ^ To fix this, turn these declarations into real prototypes. While here, garbage collect the incompatible rfc931() function from scaffold.c, as it is never used. Reviewed by: emaste MFC after:3 days Differential Revision:https://reviews.freebsd.org/D9052 Modified: head/contrib/tcp_wrappers/scaffold.c head/contrib/tcp_wrappers/tcpd.h Modified: head/contrib/tcp_wrappers/scaffold.c == --- head/contrib/tcp_wrappers/scaffold.cThu Jan 5 19:17:14 2017 (r311458) +++ head/contrib/tcp_wrappers/scaffold.cThu Jan 5 20:44:45 2017 (r311459) @@ -235,16 +235,6 @@ struct request_info *request; exit(0); } -/* dummy function to intercept the real rfc931() */ - -/* ARGSUSED */ - -voidrfc931(request) -struct request_info *request; -{ -strcpy(request->user, unknown); -} - /* check_path - examine accessibility */ int check_path(path, st) Modified: head/contrib/tcp_wrappers/tcpd.h == --- head/contrib/tcp_wrappers/tcpd.hThu Jan 5 19:17:14 2017 (r311458) +++ head/contrib/tcp_wrappers/tcpd.hThu Jan 5 20:44:45 2017 (r311459) @@ -6,6 +6,12 @@ * $FreeBSD$ */ +#ifdef INET6 +#defineTCPD_SOCKADDR struct sockaddr +#else +#defineTCPD_SOCKADDR struct sockaddr_in +#endif + /* Structure to describe one communications endpoint. */ #defineSTRING_LENGTH 128 /* hosts, users, processes */ @@ -13,11 +19,7 @@ struct host_info { charname[STRING_LENGTH]; /* access via eval_hostname(host) */ charaddr[STRING_LENGTH]; /* access via eval_hostaddr(host) */ -#ifdef INET6 -struct sockaddr *sin; /* socket address or 0 */ -#else -struct sockaddr_in *sin; /* socket address or 0 */ -#endif +TCPD_SOCKADDR *sin;/* socket address or 0 */ struct t_unitdata *unit; /* TLI transport address or 0 */ struct request_info *request; /* for shared information */ }; @@ -67,21 +69,22 @@ extern char paranoid[]; /* Global functions. */ #if defined(TLI) || defined(PTX) || defined(TLI_SEQUENT) -extern void fromhost();/* get/validate client host info */ +extern void fromhost(struct request_info *); /* get/validate client host info */ #else -#definefromhost sock_host /* no TLI support needed */ +#definefromhost sock_host /* no TLI support needed */ #endif -extern int hosts_access(); /* access control */ -extern int hosts_ctl();/* wrapper around request_init() */ -extern void shell_cmd(); /* execute shell command */ -extern char *percent_x(); /* do % expansion */ -extern void rfc931(); /* client name from RFC 931 daemon */ -extern void clean_exit(); /* clean up and exit */ -extern void refuse(); /* clean up and exit */ -extern char *xgets(); /* fgets() on steroids */ -extern char *split_at(); /* strchr() and split */ -extern unsigned long dot_quad_addr(); /* restricted inet_addr() */ +extern int hosts_access(struct request_info *); /* access control */ +extern int hosts_ctl(char *, char *, char *, char *); /* wrapper around request_init() */ +extern void shell_cmd(char *); /* execute shell command */ +extern char *percent_x(char *, int, char *, struct request_info *);/* do % expansion */ +extern void rfc931(TCPD_SOCKADDR *, TCPD_SOCKADDR *, char *); /* client name from RFC 931 daemon */ +extern void clean_exit(struct request_info *); /* clean up and exit */ +extern void refuse(struct request_info *); /* clean up and exit */ +extern char *xgets(char *, int, FILE *); /* fgets() on steroids */ + +extern char *split_at(char *, int);/* strchr() and split */ +extern unsigned long dot_quad_addr(char *);/* restricted inet_addr() */ /* Global variables. */ @@ -98,13 +101,8 @@ extern int resident;/* > 0 if residen * attributes. Each attribute has its own key. */ -#ifdef __STDC__ -extern struct request_info *req
Re: svn commit: r311459 - head/contrib/tcp_wrappers
On Thu, Jan 05, 2017 at 08:44:45PM +, Dimitry Andric wrote: > +extern int hosts_access(struct request_info *); > /* access control */ > +extern int hosts_ctl(char *, char *, char *, char *); > /* wrapper around request_init() */ The 'extern' keywords there are redundand and could be cleaned since you are changing the code anyway. ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r311461 - head/contrib/tcp_wrappers
Author: dim Date: Thu Jan 5 21:17:10 2017 New Revision: 311461 URL: https://svnweb.freebsd.org/changeset/base/311461 Log: Also remove unnecessary extern keywords from tcpd.h. Noticed by: kib X-MFC-With: r311459 Modified: head/contrib/tcp_wrappers/tcpd.h Modified: head/contrib/tcp_wrappers/tcpd.h == --- head/contrib/tcp_wrappers/tcpd.hThu Jan 5 20:50:44 2017 (r311460) +++ head/contrib/tcp_wrappers/tcpd.hThu Jan 5 21:17:10 2017 (r311461) @@ -69,22 +69,22 @@ extern char paranoid[]; /* Global functions. */ #if defined(TLI) || defined(PTX) || defined(TLI_SEQUENT) -extern void fromhost(struct request_info *); /* get/validate client host info */ +void fromhost(struct request_info *); /* get/validate client host info */ #else -#definefromhost sock_host /* no TLI support needed */ +#definefromhost sock_host /* no TLI support needed */ #endif -extern int hosts_access(struct request_info *); /* access control */ -extern int hosts_ctl(char *, char *, char *, char *); /* wrapper around request_init() */ -extern void shell_cmd(char *); /* execute shell command */ -extern char *percent_x(char *, int, char *, struct request_info *);/* do % expansion */ -extern void rfc931(TCPD_SOCKADDR *, TCPD_SOCKADDR *, char *); /* client name from RFC 931 daemon */ -extern void clean_exit(struct request_info *); /* clean up and exit */ -extern void refuse(struct request_info *); /* clean up and exit */ -extern char *xgets(char *, int, FILE *); /* fgets() on steroids */ +int hosts_access(struct request_info *); /* access control */ +int hosts_ctl(char *, char *, char *, char *); /* wrapper around request_init() */ +void shell_cmd(char *);/* execute shell command */ +char *percent_x(char *, int, char *, struct request_info *); /* do % expansion */ +void rfc931(TCPD_SOCKADDR *, TCPD_SOCKADDR *, char *); /* client name from RFC 931 daemon */ +void clean_exit(struct request_info *);/* clean up and exit */ +void refuse(struct request_info *);/* clean up and exit */ +char *xgets(char *, int, FILE *); /* fgets() on steroids */ -extern char *split_at(char *, int);/* strchr() and split */ -extern unsigned long dot_quad_addr(char *);/* restricted inet_addr() */ +char *split_at(char *, int); /* strchr() and split */ +unsigned long dot_quad_addr(char *); /* restricted inet_addr() */ /* Global variables. */ @@ -101,8 +101,8 @@ extern int resident;/* > 0 if residen * attributes. Each attribute has its own key. */ -extern struct request_info *request_init(struct request_info *,...); /* initialize request */ -extern struct request_info *request_set(struct request_info *,...);/* update request structure */ +struct request_info *request_init(struct request_info *,...); /* initialize request */ +struct request_info *request_set(struct request_info *,...); /* update request structure */ #defineRQ_FILE 1 /* file descriptor */ #defineRQ_DAEMON 2 /* server process (argv[0]) */ @@ -122,27 +122,27 @@ extern struct request_info *request_set( * host_info structures serve as caches for the lookup results. */ -extern char *eval_user(struct request_info *); /* client user */ -extern char *eval_hostname(struct host_info *);/* printable hostname */ -extern char *eval_hostaddr(struct host_info *);/* printable host address */ -extern char *eval_hostinfo(struct host_info *);/* host name or address */ -extern char *eval_client(struct request_info *); /* whatever is available */ -extern char *eval_server(struct request_info *); /* whatever is available */ +char *eval_user(struct request_info *);/* client user */ +char *eval_hostname(struct host_info *); /* printable hostname */ +char *eval_hostaddr(struct host_info *); /* printable host address */ +char *eval_hostinfo(struct host_info *); /* host name or address */ +char *eval_client(struct request_info *); /* whatever is available */ +char *eval_server(struct request_info *); /* whatever is available */ #defineeval_daemon(r) ((r)->daemon) /* daemon process name */ #defineeval_pid(r) ((r)->pid) /* process id */ /* Socket-specific methods, including DNS hostname lookups. */
Re: svn commit: r311459 - head/contrib/tcp_wrappers
On 05 Jan 2017, at 22:05, Konstantin Belousov wrote: > > On Thu, Jan 05, 2017 at 08:44:45PM +, Dimitry Andric wrote: >> +extern int hosts_access(struct request_info *); >> /* access control */ >> +extern int hosts_ctl(char *, char *, char *, char *); >> /* wrapper around request_init() */ > > The 'extern' keywords there are redundand and could be cleaned since > you are changing the code anyway. Ah thanks, fixed that in r311461. -Dimitry signature.asc Description: Message signed with OpenPGP using GPGMail
svn commit: r311462 - in head: sys/conf sys/contrib/dev/acpica sys/contrib/dev/acpica/common sys/contrib/dev/acpica/compiler sys/contrib/dev/acpica/components/debugger sys/contrib/dev/acpica/compon...
Author: jkim Date: Thu Jan 5 21:28:25 2017 New Revision: 311462 URL: https://svnweb.freebsd.org/changeset/base/311462 Log: Merge ACPICA 20161222. Added: head/sys/contrib/dev/acpica/os_specific/service_layers/osgendbg.c - copied, changed from r310450, vendor-sys/acpica/dist/source/os_specific/service_layers/osgendbg.c Modified: head/sys/conf/files head/sys/contrib/dev/acpica/acpica_prep.sh head/sys/contrib/dev/acpica/changes.txt head/sys/contrib/dev/acpica/common/acfileio.c head/sys/contrib/dev/acpica/common/ahtable.c head/sys/contrib/dev/acpica/common/ahuuids.c head/sys/contrib/dev/acpica/compiler/aslutils.c head/sys/contrib/dev/acpica/components/debugger/dbinput.c head/sys/contrib/dev/acpica/components/debugger/dbxface.c head/sys/contrib/dev/acpica/components/disassembler/dmopcode.c head/sys/contrib/dev/acpica/components/disassembler/dmwalk.c head/sys/contrib/dev/acpica/components/executer/exconfig.c head/sys/contrib/dev/acpica/components/executer/exfldio.c head/sys/contrib/dev/acpica/components/hardware/hwesleep.c head/sys/contrib/dev/acpica/components/hardware/hwregs.c head/sys/contrib/dev/acpica/components/hardware/hwsleep.c head/sys/contrib/dev/acpica/components/parser/psargs.c head/sys/contrib/dev/acpica/components/parser/pstree.c head/sys/contrib/dev/acpica/components/utilities/utdecode.c head/sys/contrib/dev/acpica/components/utilities/utdelete.c head/sys/contrib/dev/acpica/components/utilities/utmutex.c head/sys/contrib/dev/acpica/components/utilities/utresrc.c head/sys/contrib/dev/acpica/include/acclib.h head/sys/contrib/dev/acpica/include/acdebug.h head/sys/contrib/dev/acpica/include/acdisasm.h head/sys/contrib/dev/acpica/include/acexcep.h head/sys/contrib/dev/acpica/include/acglobal.h head/sys/contrib/dev/acpica/include/aclocal.h head/sys/contrib/dev/acpica/include/acmacros.h head/sys/contrib/dev/acpica/include/acpiosxf.h head/sys/contrib/dev/acpica/include/acpixf.h head/sys/contrib/dev/acpica/include/platform/acenv.h head/sys/contrib/dev/acpica/os_specific/service_layers/osunixxf.c head/sys/dev/acpica/Osd/OsdDebug.c head/sys/dev/acpica/Osd/OsdHardware.c head/usr.sbin/acpi/acpidb/Makefile head/usr.sbin/acpi/acpidb/acpidb.c Directory Properties: head/sys/contrib/dev/acpica/ (props changed) Modified: head/sys/conf/files == --- head/sys/conf/files Thu Jan 5 21:17:10 2017(r311461) +++ head/sys/conf/files Thu Jan 5 21:28:25 2017(r311462) @@ -496,7 +496,7 @@ contrib/dev/acpica/components/utilities/ contrib/dev/acpica/components/utilities/utxface.c optional acpi contrib/dev/acpica/components/utilities/utxferror.coptional acpi contrib/dev/acpica/components/utilities/utxfinit.c optional acpi -#contrib/dev/acpica/components/utilities/utxfmutex.c optional acpi +contrib/dev/acpica/os_specific/service_layers/osgendbg.c optional acpi acpi_debug contrib/ipfilter/netinet/fil.c optional ipfilter inet \ compile-with "${NORMAL_C} ${NO_WSELF_ASSIGN} -Wno-unused -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_auth.c optional ipfilter inet \ Modified: head/sys/contrib/dev/acpica/acpica_prep.sh == --- head/sys/contrib/dev/acpica/acpica_prep.sh Thu Jan 5 21:17:10 2017 (r311461) +++ head/sys/contrib/dev/acpica/acpica_prep.sh Thu Jan 5 21:28:25 2017 (r311462) @@ -17,7 +17,7 @@ dst="$(realpath .)/acpi_ca_destination" fulldirs="common compiler components include os_specific" # files to remove -stripdirs="generate libraries tests tools" +stripdirs="generate libraries parsers preprocessor tests tools" stripfiles="Makefile README accygwin.h acdragonfly.h acdragonflyex.h \ acefi.h acefiex.h achaiku.h acintel.h aclinux.h aclinuxex.h \ acmacosx.h acmsvc.h acmsvcex.h acnetbsd.h acos2.h acqnx.h \ Modified: head/sys/contrib/dev/acpica/changes.txt == --- head/sys/contrib/dev/acpica/changes.txt Thu Jan 5 21:17:10 2017 (r311461) +++ head/sys/contrib/dev/acpica/changes.txt Thu Jan 5 21:28:25 2017 (r311462) @@ -1,4 +1,93 @@ +22 December 2016. Summary of changes for version 20161222: + + +1) ACPICA kernel-resident subsystem: + +AML Debugger: Implemented a new mechanism to simplify and enhance +debugger integration into all environments, including kernel debuggers +and user-space utilities, as well as remote debug services. This +mechanism essentially consists of new OSL interfaces to support debugger +initialization/termination, as well as wait/notify interfaces to perform +the debugger handshake with the host. Lv Zheng. + +New OSL interfaces: +AcpiOsInitializeDebugger (void) +AcpiOsTerminateDebugger (void) +AcpiO
svn commit: r311463 - head/sys/mips/ingenic
Author: kan Date: Fri Jan 6 00:07:36 2017 New Revision: 311463 URL: https://svnweb.freebsd.org/changeset/base/311463 Log: Remove redundant cache initialization in JZ4780 SMP startup code This was done out of pure paranoia when hunting for bugs in cache and is not really required. Modified: head/sys/mips/ingenic/jz4780_mpboot.S Modified: head/sys/mips/ingenic/jz4780_mpboot.S == --- head/sys/mips/ingenic/jz4780_mpboot.S Thu Jan 5 21:28:25 2017 (r311462) +++ head/sys/mips/ingenic/jz4780_mpboot.S Fri Jan 6 00:07:36 2017 (r311463) @@ -27,36 +27,19 @@ */ #include -#include -#include -#include - #include "assym.s" -#define CACHE_SIZE (32 * 1024) -#define CACHE_LINESIZE 32 - .text .setnoat .setnoreorder .section .text.mpentry_jz4780 .balign 0x1 +/* + * JZ4870 has stricter alignment requirement for + * CPU entry point. Enforce it in CPU-specific + * file. + */ GLOBAL(jz4780_mpentry) - - /* Initialize caches */ - li t0, MIPS_KSEG0_START - ori t1, t0, CACHE_SIZE - mtc0zero, MIPS_COP_0_TAG_LO - COP0_SYNC -1: cache CACHEOP_R4K_INDEX_STORE_TAG | CACHE_R4K_I, 0(t0) - cache CACHEOP_R4K_INDEX_STORE_TAG | CACHE_R4K_D, 0(t0) - bne t0, t1, 1b - addiu t0, t0, CACHE_LINESIZE - - /* Set TLB page mask */ - mtc0zero, MIPS_COP_0_TLB_PG_MASK - COP0_SYNC - j mpentry nop ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r311464 - head/sys/mips/mips
Author: jhb Date: Fri Jan 6 00:41:30 2017 New Revision: 311464 URL: https://svnweb.freebsd.org/changeset/base/311464 Log: Add uintmax_t casts to silence printf format warnings. The format strings weren't checked when stacksave_subr() used a function pointer for printf instead of directly using db_printf(). Reported by: kib Sponsored by: DARPA / AFRL Modified: head/sys/mips/mips/db_trace.c Modified: head/sys/mips/mips/db_trace.c == --- head/sys/mips/mips/db_trace.c Fri Jan 6 00:07:36 2017 (r311463) +++ head/sys/mips/mips/db_trace.c Fri Jan 6 00:41:30 2017 (r311464) @@ -117,7 +117,7 @@ loop: /* Check for bad SP: could foul up next frame. */ if (!MIPS_IS_VALID_KERNELADDR(sp)) { - db_printf("SP 0x%jx: not in kernel\n", sp); + db_printf("SP 0x%jx: not in kernel\n", (uintmax_t)sp); ra = 0; subr = 0; goto done; @@ -162,7 +162,7 @@ loop: /* Check for bad PC. */ if (!MIPS_IS_VALID_KERNELADDR(pc)) { - db_printf("PC 0x%jx: not in kernel\n", pc); + db_printf("PC 0x%jx: not in kernel\n", (uintmax_t)pc); ra = 0; goto done; } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r311469 - head/usr.sbin/ypserv
Author: ngie Date: Fri Jan 6 04:10:33 2017 New Revision: 311469 URL: https://svnweb.freebsd.org/changeset/base/311469 Log: Conditionalize wrap(3) use based on MK_TCP_WRAPPERS instead of always building support into ypserv. MFC after:2 weeks Modified: head/usr.sbin/ypserv/Makefile Modified: head/usr.sbin/ypserv/Makefile == --- head/usr.sbin/ypserv/Makefile Fri Jan 6 03:55:28 2017 (r311468) +++ head/usr.sbin/ypserv/Makefile Fri Jan 6 04:10:33 2017 (r311469) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + RPCDIR=${.CURDIR}/../../include/rpcsvc .PATH: ${RPCDIR} \ ${.CURDIR}/common @@ -10,11 +12,14 @@ SRCS= yp_svc.c yp_server.c yp_dblookup.c ypxfr_clnt.c yp.h yp_main.c yp_error.c yp_access.c yp_svc_udp.c \ yplib_host.c -CFLAGS+= -DDB_CACHE -DTCP_WRAPPER -I. +CFLAGS+= -DDB_CACHE -I. WARNS?=0 -LIBADD=wrap +.if ${MK_TCP_WRAPPERS} != "no" +CFLAGS+= -DTCP_WRAPPER +LIBADD+= wrap +.endif CLEANFILES= yp_svc.c ypxfr_clnt.c yp.h ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r311470 - head/usr.sbin/rpcbind
Author: ngie Date: Fri Jan 6 04:13:08 2017 New Revision: 311470 URL: https://svnweb.freebsd.org/changeset/base/311470 Log: Conditionalize wrap(3) use based on MK_TCP_WRAPPERS instead of always building support into rpcbind. MFC after:2 weeks Modified: head/usr.sbin/rpcbind/Makefile Modified: head/usr.sbin/rpcbind/Makefile == --- head/usr.sbin/rpcbind/Makefile Fri Jan 6 04:10:33 2017 (r311469) +++ head/usr.sbin/rpcbind/Makefile Fri Jan 6 04:13:08 2017 (r311470) @@ -8,18 +8,21 @@ MAN= rpcbind.8 SRCS= check_bound.c rpcb_stat.c rpcb_svc_4.c rpcbind.c pmap_svc.c \ rpcb_svc.c rpcb_svc_com.c security.c warmstart.c util.c -CFLAGS+= -DPORTMAP -DLIBWRAP +CFLAGS+= -DPORTMAP .if ${MK_INET6_SUPPORT} != "no" CFLAGS+= -DINET6 .endif +.if ${MK_TCP_WRAPPERS} != "no" +CFLAGS+= -DLIBWRAP +LIBADD+= wrap +.endif + .if ${MK_TESTS} != "no" SUBDIR+= tests .endif WARNS?=1 -LIBADD=wrap - .include ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r311471 - head/usr.sbin/sendmail
Author: ngie Date: Fri Jan 6 04:16:03 2017 New Revision: 311471 URL: https://svnweb.freebsd.org/changeset/base/311471 Log: Conditionalize wrap(3) use based on MK_TCP_WRAPPERS instead of always building support into sendmail. MFC after:2 weeks Modified: head/usr.sbin/sendmail/Makefile Modified: head/usr.sbin/sendmail/Makefile == --- head/usr.sbin/sendmail/Makefile Fri Jan 6 04:13:08 2017 (r311470) +++ head/usr.sbin/sendmail/Makefile Fri Jan 6 04:16:03 2017 (r311471) @@ -38,7 +38,7 @@ NIS= -DNIS MAPS= -DMAP_REGEX -DDNSMAP CFLAGS+= -I${SMDIR} -I${SENDMAIL_DIR}/include -I. -CFLAGS+= ${DBMDEF} ${NIS} -DTCPWRAPPERS ${MAPS} +CFLAGS+= ${DBMDEF} ${NIS} ${MAPS} .if ${MK_INET6_SUPPORT} != "no" CFLAGS+= -DNETINET6 @@ -46,7 +46,7 @@ CFLAGS+= -DNETINET6 WARNS?=0 -LIBADD=util wrap sm smutil +LIBADD=util sm smutil SRCS+= sm_os.h CLEANFILES+=sm_os.h @@ -57,6 +57,11 @@ CFLAGS+= -DSTARTTLS -D_FFR_TLS_1 LIBADD+= ssl crypto .endif +.if ${MK_TCP_WRAPPERS} != "no" +CFLAGS+= -DTCPWRAPPERS +LIBADD+= wrap +.endif + # User customizations to the sendmail build environment CFLAGS+=${SENDMAIL_CFLAGS} DPADD+=${SENDMAIL_DPADD} ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r311472 - in head/usr.sbin/amd: amd include
Author: ngie Date: Fri Jan 6 04:22:25 2017 New Revision: 311472 URL: https://svnweb.freebsd.org/changeset/base/311472 Log: Conditionalize wrap(3) use based on MK_TCP_WRAPPERS instead of always building support into amd(8). MFC after:2 weeks Modified: head/usr.sbin/amd/amd/Makefile head/usr.sbin/amd/include/config.h Modified: head/usr.sbin/amd/amd/Makefile == --- head/usr.sbin/amd/amd/Makefile Fri Jan 6 04:16:03 2017 (r311471) +++ head/usr.sbin/amd/amd/Makefile Fri Jan 6 04:22:25 2017 (r311472) @@ -30,7 +30,7 @@ CFLAGS+= -I${SRCTOP}/contrib/amd/amd \ -I${SRCTOP}/contrib/amd/include \ -I${.OBJDIR}/../../../include/rpcsvc -LIBADD=amu wrap +LIBADD=amu SRCS+= conf_parse.c conf_parse.h conf_tok.c SRCS+= sun_map_parse.c sun_map_parse.h sun_map_tok.c @@ -73,4 +73,9 @@ CFLAGS+= -DHAVE_MAP_HESIOD SRCS+= info_nis.c .endif +.if ${MK_TCP_WRAPPERS} != "no" +CFLAGS+= -DHAVE_LIBWRAP -DHAVE_TCPD_H +LIBADD+= wrap +.endif + .include Modified: head/usr.sbin/amd/include/config.h == --- head/usr.sbin/amd/include/config.h Fri Jan 6 04:16:03 2017 (r311471) +++ head/usr.sbin/amd/include/config.h Fri Jan 6 04:22:25 2017 (r311472) @@ -530,7 +530,7 @@ /* #undef HAVE_LIBRT */ /* does libwrap exist? */ -#define HAVE_LIBWRAP 1 +/* #undef HAVE_LIBWRAP */ /* Define to 1 if you have the header file. */ #define HAVE_LIMITS_H 1 @@ -1207,7 +1207,7 @@ #define HAVE_SYS_WAIT_H 1 /* Define to 1 if you have the header file. */ -#define HAVE_TCPD_H 1 +/* #undef HAVE_TCPD_H */ /* Define to 1 if you have the header file. */ #define HAVE_TIME_H 1 ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r311473 - head/libexec/tftpd
Author: ngie Date: Fri Jan 6 04:27:07 2017 New Revision: 311473 URL: https://svnweb.freebsd.org/changeset/base/311473 Log: Conditionalize all code that uses tcpd.h behind `LIBWRAP` guard This will allow the code to stand by itself without libwrap MFC after:2 weeks Modified: head/libexec/tftpd/Makefile head/libexec/tftpd/tftpd.c Modified: head/libexec/tftpd/Makefile == --- head/libexec/tftpd/Makefile Fri Jan 6 04:22:25 2017(r311472) +++ head/libexec/tftpd/Makefile Fri Jan 6 04:27:07 2017(r311473) @@ -1,12 +1,17 @@ # @(#)Makefile8.1 (Berkeley) 6/4/93 # $FreeBSD$ +.include + PROG= tftpd MAN= tftpd.8 SRCS= tftp-file.c tftp-io.c tftp-options.c tftp-transfer.c tftp-utils.c SRCS+= tftpd.c WFORMAT=0 +.if ${MK_TCP_WRAPPERS} != "no" +CFLAGS+= -DLIBWRAP LIBADD=wrap +.endif .include Modified: head/libexec/tftpd/tftpd.c == --- head/libexec/tftpd/tftpd.c Fri Jan 6 04:22:25 2017(r311472) +++ head/libexec/tftpd/tftpd.c Fri Jan 6 04:27:07 2017(r311473) @@ -66,7 +66,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include "tftp-file.h" @@ -75,6 +74,10 @@ __FBSDID("$FreeBSD$"); #include "tftp-transfer.h" #include "tftp-options.h" +#ifdef LIBWRAP +#include +#endif + static voidtftp_wrq(int peer, char *, ssize_t); static voidtftp_rrq(int peer, char *, ssize_t); @@ -281,6 +284,7 @@ main(int argc, char *argv[]) } } +#ifdef LIBWRAP /* * See if the client is allowed to talk to me. * (This needs to be done before the chroot()) @@ -329,6 +333,7 @@ main(int argc, char *argv[]) "Full access allowed" "in /etc/hosts.allow"); } +#endif /* * Since we exit here, we should do that only after the above ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r311474 - head/sys/compat/linux
Author: glebius Date: Fri Jan 6 04:38:38 2017 New Revision: 311474 URL: https://svnweb.freebsd.org/changeset/base/311474 Log: Use getsock_cap() instead of fgetsock(). Reviewed by: dchagin Modified: head/sys/compat/linux/linux_socket.c Modified: head/sys/compat/linux/linux_socket.c == --- head/sys/compat/linux/linux_socket.cFri Jan 6 04:27:07 2017 (r311473) +++ head/sys/compat/linux/linux_socket.cFri Jan 6 04:38:38 2017 (r311474) @@ -775,6 +775,7 @@ linux_connect(struct thread *td, struct cap_rights_t rights; struct socket *so; struct sockaddr *sa; + struct file *fp; u_int fflag; int error; @@ -792,24 +793,23 @@ linux_connect(struct thread *td, struct * Linux doesn't return EISCONN the first time it occurs, * when on a non-blocking socket. Instead it returns the * error getsockopt(SOL_SOCKET, SO_ERROR) would return on BSD. -* -* XXXRW: Instead of using fgetsock(), check that it is a -* socket and use the file descriptor reference instead of -* creating a new one. */ - error = fgetsock(td, args->s, cap_rights_init(&rights, CAP_CONNECT), - &so, &fflag); - if (error == 0) { - error = EISCONN; - if (fflag & FNONBLOCK) { - SOCK_LOCK(so); - if (so->so_emuldata == 0) - error = so->so_error; - so->so_emuldata = (void *)1; - SOCK_UNLOCK(so); - } - fputsock(so); + error = getsock_cap(td, args->s, cap_rights_init(&rights, CAP_CONNECT), + &fp, &fflag, NULL); + if (error != 0) + return (error); + + error = EISCONN; + so = fp->f_data; + if (fflag & FNONBLOCK) { + SOCK_LOCK(so); + if (so->so_emuldata == 0) + error = so->so_error; + so->so_emuldata = (void *)1; + SOCK_UNLOCK(so); } + fdrop(fp, td); + return (error); } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r311475 - head/sys/net
Author: sephe Date: Fri Jan 6 05:10:49 2017 New Revision: 311475 URL: https://svnweb.freebsd.org/changeset/base/311475 Log: if: Defer the if_up until the ifnet.if_ioctl is called. This ensures the interface is initialized by the interface driver before it can be used by the rest of the system. Reviewed by: jhb, karels, gnn MFC after:3 week Sponsored by: Microsoft Differential Revision:https://reviews.freebsd.org/D8905 Modified: head/sys/net/if.c Modified: head/sys/net/if.c == --- head/sys/net/if.c Fri Jan 6 04:38:38 2017(r311474) +++ head/sys/net/if.c Fri Jan 6 05:10:49 2017(r311475) @@ -2300,7 +2300,7 @@ static int ifhwioctl(u_long cmd, struct ifnet *ifp, caddr_t data, struct thread *td) { struct ifreq *ifr; - int error = 0; + int error = 0, do_ifup = 0; int new_flags, temp_flags; size_t namelen, onamelen; size_t descrlen; @@ -2427,7 +2427,7 @@ ifhwioctl(u_long cmd, struct ifnet *ifp, if_down(ifp); } else if (new_flags & IFF_UP && (ifp->if_flags & IFF_UP) == 0) { - if_up(ifp); + do_ifup = 1; } /* See if permanently promiscuous mode bit is about to flip */ if ((ifp->if_flags ^ new_flags) & IFF_PPROMISC) { @@ -2446,6 +2446,8 @@ ifhwioctl(u_long cmd, struct ifnet *ifp, if (ifp->if_ioctl) { (void) (*ifp->if_ioctl)(ifp, cmd, data); } + if (do_ifup) + if_up(ifp); getmicrotime(&ifp->if_lastchange); break; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r311504 - in head: contrib/xz contrib/xz/src/common contrib/xz/src/liblzma/api/lzma contrib/xz/src/liblzma/check contrib/xz/src/liblzma/common contrib/xz/src/liblzma/delta contrib/xz/sr...
Author: delphij Date: Fri Jan 6 07:54:53 2017 New Revision: 311504 URL: https://svnweb.freebsd.org/changeset/base/311504 Log: MFV r311477: xz 5.2.3. MFC after:2 weeks Modified: head/contrib/xz/ChangeLog head/contrib/xz/THANKS head/contrib/xz/src/common/tuklib_cpucores.c head/contrib/xz/src/common/tuklib_physmem.c head/contrib/xz/src/liblzma/api/lzma/version.h head/contrib/xz/src/liblzma/check/check.h head/contrib/xz/src/liblzma/common/alone_decoder.c head/contrib/xz/src/liblzma/common/alone_encoder.c head/contrib/xz/src/liblzma/common/auto_decoder.c head/contrib/xz/src/liblzma/common/block_decoder.c head/contrib/xz/src/liblzma/common/block_encoder.c head/contrib/xz/src/liblzma/common/common.h head/contrib/xz/src/liblzma/common/index.c head/contrib/xz/src/liblzma/common/index_decoder.c head/contrib/xz/src/liblzma/common/index_encoder.c head/contrib/xz/src/liblzma/common/stream_decoder.c head/contrib/xz/src/liblzma/common/stream_encoder.c head/contrib/xz/src/liblzma/common/stream_encoder_mt.c head/contrib/xz/src/liblzma/delta/delta_common.c head/contrib/xz/src/liblzma/delta/delta_decoder.c head/contrib/xz/src/liblzma/delta/delta_encoder.c head/contrib/xz/src/liblzma/delta/delta_private.h head/contrib/xz/src/liblzma/lz/lz_decoder.c head/contrib/xz/src/liblzma/lz/lz_decoder.h head/contrib/xz/src/liblzma/lz/lz_encoder.c head/contrib/xz/src/liblzma/lz/lz_encoder.h head/contrib/xz/src/liblzma/lzma/lzma2_decoder.c head/contrib/xz/src/liblzma/lzma/lzma2_encoder.c head/contrib/xz/src/liblzma/lzma/lzma_decoder.c head/contrib/xz/src/liblzma/lzma/lzma_encoder.c head/contrib/xz/src/liblzma/lzma/lzma_encoder.h head/contrib/xz/src/liblzma/lzma/lzma_encoder_optimum_fast.c head/contrib/xz/src/liblzma/lzma/lzma_encoder_optimum_normal.c head/contrib/xz/src/liblzma/lzma/lzma_encoder_presets.c head/contrib/xz/src/liblzma/lzma/lzma_encoder_private.h head/contrib/xz/src/liblzma/simple/arm.c head/contrib/xz/src/liblzma/simple/armthumb.c head/contrib/xz/src/liblzma/simple/ia64.c head/contrib/xz/src/liblzma/simple/powerpc.c head/contrib/xz/src/liblzma/simple/simple_coder.c head/contrib/xz/src/liblzma/simple/simple_private.h head/contrib/xz/src/liblzma/simple/sparc.c head/contrib/xz/src/liblzma/simple/x86.c head/contrib/xz/src/xz/args.c head/contrib/xz/src/xz/coder.c head/contrib/xz/src/xz/file_io.c head/contrib/xz/src/xz/file_io.h head/contrib/xz/src/xz/main.c head/contrib/xz/src/xz/private.h head/lib/liblzma/config.h Directory Properties: head/contrib/xz/ (props changed) Modified: head/contrib/xz/ChangeLog == --- head/contrib/xz/ChangeLog Fri Jan 6 07:54:13 2017(r311503) +++ head/contrib/xz/ChangeLog Fri Jan 6 07:54:53 2017(r311504) @@ -1,3 +1,563 @@ +commit 3d566cd519017eee1a400e7961ff14058dfaf33c +Author: Lasse Collin +Date: 2016-12-30 13:26:36 +0200 + +Bump version and soname for 5.2.3. + + src/liblzma/Makefile.am| 2 +- + src/liblzma/api/lzma/version.h | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +commit 053e624fe33795e779ff736f16ce44a129c829b5 +Author: Lasse Collin +Date: 2016-12-30 13:25:10 +0200 + +Update NEWS for 5.2.3. + + NEWS | 39 +++ + 1 file changed, 39 insertions(+) + +commit cae412b2b77d7fd88d187ed7659331709311f80d +Author: Lasse Collin +Date: 2015-04-01 14:45:25 +0300 + +xz: Fix the Capsicum rights on user_abort_pipe. + + src/xz/file_io.c | 6 +- + 1 file changed, 5 insertions(+), 1 deletion(-) + +commit 9ccbae41000572193b9a09e7102f9e84dc6d96de +Author: Lasse Collin +Date: 2016-12-28 21:05:22 +0200 + +Mention potential sandboxing bugs in INSTALL. + + INSTALL | 5 - + 1 file changed, 4 insertions(+), 1 deletion(-) + +commit e013a337d3de77cce24360dffe956ea2339489b6 +Author: Lasse Collin +Date: 2016-11-21 20:24:50 +0200 + +liblzma: Avoid multiple definitions of lzma_coder structures. + +Only one definition was visible in a translation unit. +It avoided a few casts and temp variables but seems that +this hack doesn't work with link-time optimizations in compilers +as it's not C99/C11 compliant. + +Fixes: +http://www.mail-archive.com/xz-devel@tukaani.org/msg00279.html + + src/liblzma/common/alone_decoder.c | 44 + + src/liblzma/common/alone_encoder.c | 34 --- + src/liblzma/common/auto_decoder.c | 35 --- + src/liblzma/common/block_decoder.c | 41 + src/liblzma/common/block_encoder.c | 40 + src/liblzma/common/common.h| 18 ++-- + src/liblzma/common/index_decoder.c | 33 --- + src/liblzma/common/index_encoder.c | 16 ++-- + src/liblzma/common/stream_decoder.c| 50 +- + src/liblzma/common/stream_encoder.c| 5
svn commit: r311505 - head/contrib/bsnmp/snmp_mibII
Author: ngie Date: Fri Jan 6 07:57:45 2017 New Revision: 311505 URL: https://svnweb.freebsd.org/changeset/base/311505 Log: Remove unnecessary __unused attribute attached to `ctx` in op_begemot_mibII(..) MFC after:3 days Modified: head/contrib/bsnmp/snmp_mibII/mibII_begemot.c Modified: head/contrib/bsnmp/snmp_mibII/mibII_begemot.c == --- head/contrib/bsnmp/snmp_mibII/mibII_begemot.c Fri Jan 6 07:54:53 2017(r311504) +++ head/contrib/bsnmp/snmp_mibII/mibII_begemot.c Fri Jan 6 07:57:45 2017(r311505) @@ -37,7 +37,7 @@ * Scalars */ int -op_begemot_mibII(struct snmp_context *ctx __unused, struct snmp_value *value, +op_begemot_mibII(struct snmp_context *ctx, struct snmp_value *value, u_int sub, u_int idx __unused, enum snmp_op op) { switch (op) { ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"