From ngie at FreeBSD.org Mon Sep 1 05:13:15 2014 From: ngie at FreeBSD.org (Garrett Cooper) Date: Mon, 1 Sep 2014 05:13:14 +0000 (UTC) Subject: svn commit: r270913 - stable/9/lib/clang Message-ID: <201409010513.s815DEPE097826@svn.freebsd.org> Author: ngie Date: Mon Sep 1 05:13:14 2014 New Revision: 270913 URL: http://svnweb.freebsd.org/changeset/base/270913 Log: MFC r270145: Replace DPADD with DPSRCS to fix "make checkdpadd" Phabric: D625 Approved by: jmmv (mentor) Reviewed by: dim PR: 192734 Modified: stable/9/lib/clang/clang.build.mk Directory Properties: stable/9/ (props changed) stable/9/lib/ (props changed) stable/9/lib/clang/ (props changed) Modified: stable/9/lib/clang/clang.build.mk ============================================================================== --- stable/9/lib/clang/clang.build.mk Mon Sep 1 03:49:21 2014 (r270912) +++ stable/9/lib/clang/clang.build.mk Mon Sep 1 05:13:14 2014 (r270913) @@ -233,5 +233,5 @@ Checkers.inc.h: ${CLANG_SRCS}/lib/Static .endfor SRCS+= ${TGHDRS:C/$/.inc.h/} -DPADD+= ${TGHDRS:C/$/.inc.h/} +DPSRCS+= ${TGHDRS:C/$/.inc.h/} CLEANFILES+= ${TGHDRS:C/$/.inc.h/} ${TGHDRS:C/$/.inc.d/} From ngie at FreeBSD.org Mon Sep 1 05:26:53 2014 From: ngie at FreeBSD.org (Garrett Cooper) Date: Mon, 1 Sep 2014 05:26:53 +0000 (UTC) Subject: svn commit: r270915 - stable/9/usr.sbin/nmtree Message-ID: <201409010526.s815Qrop003202@svn.freebsd.org> Author: ngie Date: Mon Sep 1 05:26:53 2014 New Revision: 270915 URL: http://svnweb.freebsd.org/changeset/base/270915 Log: MFC r270180: Add LIBMD and LIBUTIL to DPADD to fix "make checkdpadd" Approved by: jmmv (mentor) Phabric: D633 PR: 192763 Modified: stable/9/usr.sbin/nmtree/Makefile Directory Properties: stable/9/ (props changed) stable/9/usr.sbin/ (props changed) stable/9/usr.sbin/nmtree/ (props changed) Modified: stable/9/usr.sbin/nmtree/Makefile ============================================================================== --- stable/9/usr.sbin/nmtree/Makefile Mon Sep 1 05:18:20 2014 (r270914) +++ stable/9/usr.sbin/nmtree/Makefile Mon Sep 1 05:26:53 2014 (r270915) @@ -8,6 +8,7 @@ PROG= nmtree MAN= nmtree.8 SRCS= compare.c crc.c create.c excludes.c getid.c misc.c mtree.c \ spec.c specspec.c verify.c +DPADD+= ${LIBMD} ${LIBUTIL} LDADD+= -lmd -lutil CFLAGS+= -I${.CURDIR}/../../contrib/mknod From ngie at FreeBSD.org Mon Sep 1 05:35:56 2014 From: ngie at FreeBSD.org (Garrett Cooper) Date: Mon, 1 Sep 2014 05:35:56 +0000 (UTC) Subject: svn commit: r270916 - in stable/9: lib/libc share/mk Message-ID: <201409010535.s815Zujs008123@svn.freebsd.org> Author: ngie Date: Mon Sep 1 05:35:55 2014 New Revision: 270916 URL: http://svnweb.freebsd.org/changeset/base/270916 Log: MFC r270519: Fix "make checkdpadd" for lib/libc when MK_SSP != no Add LIBSSP_NONSHARED to bsd.libnames.mk and append LIBSSP_NONSHARED to DPADD in lib/libc when MK_SSP != no Approved by: rpaulo (mentor) Phabric: D675 (as part of a larger diff) PR: 192728 Modified: stable/9/lib/libc/Makefile stable/9/share/mk/bsd.libnames.mk Directory Properties: stable/9/ (props changed) stable/9/lib/ (props changed) stable/9/lib/libc/ (props changed) stable/9/share/ (props changed) stable/9/share/mk/ (props changed) Modified: stable/9/lib/libc/Makefile ============================================================================== --- stable/9/lib/libc/Makefile Mon Sep 1 05:26:53 2014 (r270915) +++ stable/9/lib/libc/Makefile Mon Sep 1 05:35:55 2014 (r270916) @@ -39,7 +39,7 @@ CFLAGS+=${CANCELPOINTS_CFLAGS} # # Only link with static libgcc.a (no libgcc_eh.a). # -DPADD+= ${LIBGCC} +DPADD+= ${LIBGCC} ${LIBSSP_NONSHARED} LDFLAGS+= -nodefaultlibs LDADD+= -lgcc -lssp_nonshared Modified: stable/9/share/mk/bsd.libnames.mk ============================================================================== --- stable/9/share/mk/bsd.libnames.mk Mon Sep 1 05:26:53 2014 (r270915) +++ stable/9/share/mk/bsd.libnames.mk Mon Sep 1 05:35:55 2014 (r270916) @@ -148,6 +148,7 @@ LIBSDP?= ${DESTDIR}${LIBDIR}/libsdp.a LIBSMB?= ${DESTDIR}${LIBDIR}/libsmb.a LIBSSH?= ${DESTDIR}${LIBPRIVATEDIR}/libssh.a LIBSSL?= ${DESTDIR}${LIBDIR}/libssl.a +LIBSSP_NONSHARED?= ${DESTDIR}${LIBDIR}/libssp_nonshared.a LIBSTAND?= ${DESTDIR}${LIBDIR}/libstand.a LIBSTDCPLUSPLUS?= ${DESTDIR}${LIBDIR}/libstdc++.a LIBTACPLUS?= ${DESTDIR}${LIBDIR}/libtacplus.a From ngie at FreeBSD.org Mon Sep 1 05:18:21 2014 From: ngie at FreeBSD.org (Garrett Cooper) Date: Mon, 1 Sep 2014 05:18:20 +0000 (UTC) Subject: svn commit: r270914 - stable/9/sbin/hastd Message-ID: <201409010518.s815IKbD098595@svn.freebsd.org> Author: ngie Date: Mon Sep 1 05:18:20 2014 New Revision: 270914 URL: http://svnweb.freebsd.org/changeset/base/270914 Log: MFC r270117: Add -ll to LDADD to fix "make checkdpadd" Phabric: D622 Approved by: rpaulo (mentor) Modified: stable/9/sbin/hastd/Makefile Directory Properties: stable/9/ (props changed) stable/9/sbin/ (props changed) stable/9/sbin/hastd/ (props changed) Modified: stable/9/sbin/hastd/Makefile ============================================================================== --- stable/9/sbin/hastd/Makefile Mon Sep 1 05:13:14 2014 (r270913) +++ stable/9/sbin/hastd/Makefile Mon Sep 1 05:18:20 2014 (r270914) @@ -30,7 +30,7 @@ CFLAGS+=-DINET6 .endif DPADD= ${LIBGEOM} ${LIBBSDXML} ${LIBSBUF} ${LIBL} ${LIBPTHREAD} ${LIBUTIL} -LDADD= -lgeom -lbsdxml -lsbuf -lpthread -lutil +LDADD= -lgeom -lbsdxml -lsbuf -ll -lpthread -lutil .if ${MK_OPENSSL} != "no" DPADD+= ${LIBCRYPTO} LDADD+= -lcrypto From ae at FreeBSD.org Mon Sep 1 07:34:37 2014 From: ae at FreeBSD.org (Andrey V. Elsukov) Date: Mon, 1 Sep 2014 07:34:37 +0000 (UTC) Subject: svn commit: r270918 - stable/9/sys/boot/common Message-ID: <201409010734.s817Ybxf063186@svn.freebsd.org> Author: ae Date: Mon Sep 1 07:34:36 2014 New Revision: 270918 URL: http://svnweb.freebsd.org/changeset/base/270918 Log: MFC r270445: The size of the GPT table can not be less than one sector. MFC r270521: Since the size of GPT entry may differ from the sizeof(struct gpt_ent), use the size from GPT header to iterate entries. Modified: stable/9/sys/boot/common/part.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/boot/ (props changed) Modified: stable/9/sys/boot/common/part.c ============================================================================== --- stable/9/sys/boot/common/part.c Mon Sep 1 07:34:16 2014 (r270917) +++ stable/9/sys/boot/common/part.c Mon Sep 1 07:34:36 2014 (r270918) @@ -212,8 +212,8 @@ gpt_checktbl(const struct gpt_hdr *hdr, return (-1); } } - ent = (struct gpt_ent *)tbl; - for (i = 0; i < cnt; i++, ent++) { + for (i = 0; i < cnt; i++) { + ent = (struct gpt_ent *)(tbl + i * hdr->hdr_entsz); uuid_letoh(&ent->ent_type); if (uuid_equal(&ent->ent_type, &gpt_uuid_unused, NULL)) continue; @@ -254,8 +254,8 @@ ptable_gptread(struct ptable *table, voi table->sectorsize); if (phdr != NULL) { /* Read the primary GPT table. */ - size = MIN(MAXTBLSZ, - phdr->hdr_entries * phdr->hdr_entsz / table->sectorsize); + size = MIN(MAXTBLSZ, (phdr->hdr_entries * phdr->hdr_entsz + + table->sectorsize - 1) / table->sectorsize); if (dread(dev, tbl, size, phdr->hdr_lba_table) == 0 && gpt_checktbl(phdr, tbl, size * table->sectorsize, table->sectors - 1) == 0) { @@ -287,8 +287,9 @@ ptable_gptread(struct ptable *table, voi hdr.hdr_entsz != phdr->hdr_entsz || hdr.hdr_crc_table != phdr->hdr_crc_table) { /* Read the backup GPT table. */ - size = MIN(MAXTBLSZ, phdr->hdr_entries * - phdr->hdr_entsz / table->sectorsize); + size = MIN(MAXTBLSZ, (phdr->hdr_entries * + phdr->hdr_entsz + table->sectorsize - 1) / + table->sectorsize); if (dread(dev, tbl, size, phdr->hdr_lba_table) == 0 && gpt_checktbl(phdr, tbl, size * table->sectorsize, table->sectors - 1) == 0) { @@ -302,10 +303,10 @@ ptable_gptread(struct ptable *table, voi table->type = PTABLE_NONE; goto out; } - ent = (struct gpt_ent *)tbl; size = MIN(hdr.hdr_entries * hdr.hdr_entsz, MAXTBLSZ * table->sectorsize); - for (i = 0; i < size / hdr.hdr_entsz; i++, ent++) { + for (i = 0; i < size / hdr.hdr_entsz; i++) { + ent = (struct gpt_ent *)(tbl + i * hdr.hdr_entsz); if (uuid_equal(&ent->ent_type, &gpt_uuid_unused, NULL)) continue; entry = malloc(sizeof(*entry)); From ae at FreeBSD.org Mon Sep 1 08:33:53 2014 From: ae at FreeBSD.org (Andrey V. Elsukov) Date: Mon, 1 Sep 2014 08:33:52 +0000 (UTC) Subject: svn commit: r270924 - stable/9/sys/netinet6 Message-ID: <201409010833.s818XqIf091478@svn.freebsd.org> Author: ae Date: Mon Sep 1 08:33:52 2014 New Revision: 270924 URL: http://svnweb.freebsd.org/changeset/base/270924 Log: MFC r257985: Fix panic with RADIX_MPATH, when RTFREE_LOCKED() called for already unlocked route. Use in6_rtalloc() instead of in6_rtalloc1. This helps simplify the code and remove several now unused variables. PR: 156283 Modified: stable/9/sys/netinet6/nd6_nbr.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet6/nd6_nbr.c ============================================================================== --- stable/9/sys/netinet6/nd6_nbr.c Mon Sep 1 08:33:38 2014 (r270923) +++ stable/9/sys/netinet6/nd6_nbr.c Mon Sep 1 08:33:52 2014 (r270924) @@ -232,41 +232,28 @@ nd6_ns_input(struct mbuf *m, int off, in /* (2) check. */ if (ifa == NULL) { - struct rtentry *rt; - struct sockaddr_in6 tsin6; - int need_proxy; -#ifdef RADIX_MPATH struct route_in6 ro; -#endif + int need_proxy; - bzero(&tsin6, sizeof tsin6); - tsin6.sin6_len = sizeof(struct sockaddr_in6); - tsin6.sin6_family = AF_INET6; - tsin6.sin6_addr = taddr6; + bzero(&ro, sizeof(ro)); + ro.ro_dst.sin6_len = sizeof(struct sockaddr_in6); + ro.ro_dst.sin6_family = AF_INET6; + ro.ro_dst.sin6_addr = taddr6; /* Always use the default FIB. */ #ifdef RADIX_MPATH - bzero(&ro, sizeof(ro)); - ro.ro_dst = tsin6; rtalloc_mpath_fib((struct route *)&ro, RTF_ANNOUNCE, RT_DEFAULT_FIB); - rt = ro.ro_rt; #else - rt = in6_rtalloc1((struct sockaddr *)&tsin6, 0, 0, - RT_DEFAULT_FIB); + in6_rtalloc(&ro, RT_DEFAULT_FIB); #endif - need_proxy = (rt && (rt->rt_flags & RTF_ANNOUNCE) != 0 && - rt->rt_gateway->sa_family == AF_LINK); - if (rt != NULL) { - /* - * Make a copy while we can be sure that rt_gateway - * is still stable before unlocking to avoid lock - * order problems. proxydl will only be used if - * proxy will be set in the next block. - */ + need_proxy = (ro.ro_rt && + (ro.ro_rt->rt_flags & RTF_ANNOUNCE) != 0 && + ro.ro_rt->rt_gateway->sa_family == AF_LINK); + if (ro.ro_rt != NULL) { if (need_proxy) - proxydl = *SDL(rt->rt_gateway); - RTFREE_LOCKED(rt); + proxydl = *SDL(ro.ro_rt->rt_gateway); + RTFREE(ro.ro_rt); } if (need_proxy) { /* From ae at FreeBSD.org Wed Sep 3 11:17:12 2014 From: ae at FreeBSD.org (Andrey V. Elsukov) Date: Wed, 3 Sep 2014 11:17:12 +0000 (UTC) Subject: svn commit: r271015 - stable/9/contrib/libarchive/tar Message-ID: <201409031117.s83BHCoh070081@svn.freebsd.org> Author: ae Date: Wed Sep 3 11:17:11 2014 New Revision: 271015 URL: http://svnweb.freebsd.org/changeset/base/271015 Log: MFC r270661: Remove leading '/' from hardlink name when removing them from the regular file name. This fixes the problem, when bsdtar can not create hardlinks to extracted files. Modified: stable/9/contrib/libarchive/tar/util.c Directory Properties: stable/9/contrib/libarchive/tar/ (props changed) Modified: stable/9/contrib/libarchive/tar/util.c ============================================================================== --- stable/9/contrib/libarchive/tar/util.c Wed Sep 3 11:07:49 2014 (r271014) +++ stable/9/contrib/libarchive/tar/util.c Wed Sep 3 11:17:11 2014 (r271015) @@ -349,6 +349,21 @@ strip_components(const char *p, int elem } } +static const char* +strip_leading_slashes(const char *p) +{ + + /* Remove leading "/../", "//", etc. */ + while (p[0] == '/' || p[0] == '\\') { + if (p[1] == '.' && p[2] == '.' && ( + p[3] == '/' || p[3] == '\\')) { + p += 3; /* Remove "/..", leave "/" for next pass. */ + } else + p += 1; /* Remove "/". */ + } + return (p); +} + /* * Handle --strip-components and any future path-rewriting options. * Returns non-zero if the pathname should not be extracted. @@ -453,16 +468,7 @@ edit_pathname(struct bsdtar *bsdtar, str p += 2; slashonly = 0; } - /* Remove leading "/../", "//", etc. */ - while (p[0] == '/' || p[0] == '\\') { - if (p[1] == '.' && p[2] == '.' && - (p[3] == '/' || p[3] == '\\')) { - p += 3; /* Remove "/..", leave "/" - * for next pass. */ - slashonly = 0; - } else - p += 1; /* Remove "/". */ - } + p = strip_leading_slashes(p); } while (rp != p); if (p != name && !bsdtar->warned_lead_slash) { @@ -483,6 +489,19 @@ edit_pathname(struct bsdtar *bsdtar, str name = "."; else name = p; + + p = archive_entry_hardlink(entry); + if (p != NULL) { + rp = strip_leading_slashes(p); + if (rp == '\0') + return (1); + if (rp != p) { + char *linkname = strdup(rp); + + archive_entry_copy_hardlink(entry, linkname); + free(linkname); + } + } } else { /* Strip redundant leading '/' characters. */ while (name[0] == '/' && name[1] == '/') From gavin at FreeBSD.org Wed Sep 3 23:06:23 2014 From: gavin at FreeBSD.org (Gavin Atkinson) Date: Wed, 3 Sep 2014 23:06:22 +0000 (UTC) Subject: svn commit: r271059 - stable/9/sbin/camcontrol Message-ID: <201409032306.s83N6M7l022329@svn.freebsd.org> Author: gavin Date: Wed Sep 3 23:06:22 2014 New Revision: 271059 URL: http://svnweb.freebsd.org/changeset/base/271059 Log: Merge 270872 from head: Fix character case in examples for "camcontrol security" - should be "-U user" not "-u user". PR: 193179 Submitted by: milios ccsys com Modified: stable/9/sbin/camcontrol/camcontrol.8 Directory Properties: stable/9/sbin/camcontrol/ (props changed) Modified: stable/9/sbin/camcontrol/camcontrol.8 ============================================================================== --- stable/9/sbin/camcontrol/camcontrol.8 Wed Sep 3 23:04:23 2014 (r271058) +++ stable/9/sbin/camcontrol/camcontrol.8 Wed Sep 3 23:06:22 2014 (r271059) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 24, 2013 +.Dd August 31, 2014 .Dt CAMCONTROL 8 .Os .Sh NAME @@ -1580,12 +1580,12 @@ camcontrol security ada0 .Pp Report security support and settings for ada0 .Bd -literal -offset indent -camcontrol security ada0 -u user -s MyPass +camcontrol security ada0 -U user -s MyPass .Ed .Pp Enable security on device ada0 with the password MyPass .Bd -literal -offset indent -camcontrol security ada0 -u user -e MyPass +camcontrol security ada0 -U user -e MyPass .Ed .Pp Secure erase ada0 which has had security enabled with user password MyPass From gavin at FreeBSD.org Wed Sep 3 23:08:49 2014 From: gavin at FreeBSD.org (Gavin Atkinson) Date: Wed, 3 Sep 2014 23:08:48 +0000 (UTC) Subject: svn commit: r271061 - stable/9/sys/dev/pccbb Message-ID: <201409032308.s83N8mab022829@svn.freebsd.org> Author: gavin Date: Wed Sep 3 23:08:48 2014 New Revision: 271061 URL: http://svnweb.freebsd.org/changeset/base/271061 Log: Merge r269488 from head: For reasons which are not clear, r254263 broke some PCMCIA and CardBus bridges in strange ways, either rendering them unable to detect insertion and removal events, or possibly unable to read from the device behind the bridge. This fixes at least one laptop, a Toshiba Tecra M5 with a Texas Instruments PCxx12 (d=0x8039 v=0c104c) bridge. The very similar Tecra M9 has the same bridge, but worked fine without this change. The bridge chip has no I/O port BAR, and there is nothing in the spec to suggest I/O decoding should be enabled; however enabling it fixes the issue. Add an XXX comment to this effect. Discussed with: jhb, imp Modified: stable/9/sys/dev/pccbb/pccbb_pci.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/pccbb/pccbb_pci.c ============================================================================== --- stable/9/sys/dev/pccbb/pccbb_pci.c Wed Sep 3 23:08:21 2014 (r271060) +++ stable/9/sys/dev/pccbb/pccbb_pci.c Wed Sep 3 23:08:48 2014 (r271061) @@ -472,6 +472,8 @@ cbb_chipinit(struct cbb_softc *sc) /* Enable memory access */ pci_enable_busmaster(sc->dev); + /* XXX: This should not be necessary, but some chipsets require it */ + PCI_MASK_CONFIG(sc->dev, PCIR_COMMAND, | PCIM_CMD_PORTEN, 2); /* disable Legacy IO */ switch (sc->chipset) { From gavin at FreeBSD.org Wed Sep 3 23:11:41 2014 From: gavin at FreeBSD.org (Gavin Atkinson) Date: Wed, 3 Sep 2014 23:11:41 +0000 (UTC) Subject: svn commit: r271063 - stable/9/share/man/man3 Message-ID: <201409032311.s83NBfFb026779@svn.freebsd.org> Author: gavin Date: Wed Sep 3 23:11:41 2014 New Revision: 271063 URL: http://svnweb.freebsd.org/changeset/base/271063 Log: Merge r269871 from head: Clarify descriptions of pthread_cond_wait() and pthread_cond_timedwait() Submitted by: Malcolm Douglas via freebsd-doc Reviewed by: jhb Modified: stable/9/share/man/man3/pthread.3 Directory Properties: stable/9/share/man/man3/ (props changed) Modified: stable/9/share/man/man3/pthread.3 ============================================================================== --- stable/9/share/man/man3/pthread.3 Wed Sep 3 23:11:39 2014 (r271062) +++ stable/9/share/man/man3/pthread.3 Wed Sep 3 23:11:41 2014 (r271063) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 8, 2010 +.Dd August 12, 2014 .Dt PTHREAD 3 .Os .Sh NAME @@ -344,13 +344,13 @@ Unblock at least one of the threads bloc .Fa "const struct timespec *abstime" .Fc .Xc -Wait no longer than the specified time for a condition -and lock the specified mutex. +Unlock the specified mutex, wait no longer than the specified time for +a condition, and then relock the mutex. .It Xo .Ft int .Fn pthread_cond_wait "pthread_cond_t *" "pthread_mutex_t *mutex" .Xc -Wait for a condition and lock the specified mutex. +Unlock the specified mutex, wait for a condition, and relock the mutex. .El .Ss Read/Write Lock Routines .Bl -tag -width indent From gavin at FreeBSD.org Wed Sep 3 23:18:09 2014 From: gavin at FreeBSD.org (Gavin Atkinson) Date: Wed, 3 Sep 2014 23:18:09 +0000 (UTC) Subject: svn commit: r271066 - stable/9/etc/pam.d Message-ID: <201409032318.s83NI9JZ027817@svn.freebsd.org> Author: gavin Date: Wed Sep 3 23:18:08 2014 New Revision: 271066 URL: http://svnweb.freebsd.org/changeset/base/271066 Log: Merge r270677 from head: Fix xref, pam(8) -> pam(3) PR: 193045 Submitted by: rsimmons0 gmail com Modified: stable/9/etc/pam.d/README Directory Properties: stable/9/etc/pam.d/ (props changed) Modified: stable/9/etc/pam.d/README ============================================================================== --- stable/9/etc/pam.d/README Wed Sep 3 23:15:54 2014 (r271065) +++ stable/9/etc/pam.d/README Wed Sep 3 23:18:08 2014 (r271066) @@ -8,7 +8,7 @@ particular service, the /etc/pam.d/other file does not exist, /etc/pam.conf is searched for entries matching the specified service or, failing that, the "other" service. -See the pam(8) manual page for an explanation of the workings of the +See the pam(3) manual page for an explanation of the workings of the PAM library and descriptions of the various files and modules. Below is a summary of the format for the pam.conf and /etc/pam.d/* files. From gavin at FreeBSD.org Wed Sep 3 23:29:02 2014 From: gavin at FreeBSD.org (Gavin Atkinson) Date: Wed, 3 Sep 2014 23:29:01 +0000 (UTC) Subject: svn commit: r271068 - stable/9/sys/dev/asmc Message-ID: <201409032329.s83NT19l032835@svn.freebsd.org> Author: gavin Date: Wed Sep 3 23:29:01 2014 New Revision: 271068 URL: http://svnweb.freebsd.org/changeset/base/271068 Log: Merge r268303 from head: Add support to asmc(4) for Macmini 3,1. PR: 190195 Submitted by: fbsdbugs2 sentry.org Relnotes: yes Modified: stable/9/sys/dev/asmc/asmc.c stable/9/sys/dev/asmc/asmcvar.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/asmc/asmc.c ============================================================================== --- stable/9/sys/dev/asmc/asmc.c Wed Sep 3 23:18:13 2014 (r271067) +++ stable/9/sys/dev/asmc/asmc.c Wed Sep 3 23:29:01 2014 (r271068) @@ -206,6 +206,15 @@ struct asmc_model asmc_models[] = { ASMC_MM_TEMPS, ASMC_MM_TEMPNAMES, ASMC_MM_TEMPDESCS }, + /* The Mac Mini 3,1 has no SMS */ + { + "Macmini3,1", "Apple SMC Mac Mini 3,1", + NULL, NULL, NULL, + ASMC_FAN_FUNCS, + NULL, NULL, NULL, + ASMC_MM31_TEMPS, ASMC_MM31_TEMPNAMES, ASMC_MM31_TEMPDESCS + }, + /* Idem for the MacPro */ { "MacPro2", "Apple SMC Mac Pro (8-core)", Modified: stable/9/sys/dev/asmc/asmcvar.h ============================================================================== --- stable/9/sys/dev/asmc/asmcvar.h Wed Sep 3 23:18:13 2014 (r271067) +++ stable/9/sys/dev/asmc/asmcvar.h Wed Sep 3 23:29:01 2014 (r271068) @@ -180,6 +180,25 @@ struct asmc_softc { #define ASMC_MM_TEMPDESCS { "Northbridge Point 1", \ "Northbridge Point 2" } +#define ASMC_MM31_TEMPS { "TC0D", "TC0H", \ + "TC0P", "TH0P", \ + "TN0D", "TN0P", \ + "TW0P", NULL } + +#define ASMC_MM31_TEMPNAMES { "cpu0_die", "cpu0_heatsink", \ + "cpu0_proximity", "hdd_bay", \ + "northbridge_die", \ + "northbridge_proximity", \ + "wireless_module", } + +#define ASMC_MM31_TEMPDESCS { "CPU0 Die Core Temperature", \ + "CPU0 Heatsink Temperature", \ + "CPU0 Proximity Temperature", \ + "HDD Bay Temperature", \ + "Northbridge Die Core Temperature", \ + "Northbridge Proximity Temperature", \ + "Wireless Module Temperature", } + #define ASMC_MP_TEMPS { "TA0P", "TCAG", "TCAH", "TCBG", "TCBH", \ "TC0C", "TC0D", "TC0P", "TC1C", "TC1D", \ "TC2C", "TC2D", "TC3C", "TC3D", "THTG", \ From pfg at FreeBSD.org Thu Sep 4 00:43:28 2014 From: pfg at FreeBSD.org (Pedro F. Giffuni) Date: Thu, 4 Sep 2014 00:43:27 +0000 (UTC) Subject: svn commit: r271072 - in stable/9/sys: amd64/amd64 i386/i386 Message-ID: <201409040043.s840hRAO070311@svn.freebsd.org> Author: pfg Date: Thu Sep 4 00:43:27 2014 New Revision: 271072 URL: http://svnweb.freebsd.org/changeset/base/271072 Log: MFC r270844: Minor space/tab cleanups. Most of them were ripped from the GSoC 2104 SMAP + kpatch project (but unrelated). Only cosmetic changes. Taken from: Oliver Pinter (op@) Modified: stable/9/sys/amd64/amd64/support.S stable/9/sys/i386/i386/db_disasm.c stable/9/sys/i386/i386/support.s Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/amd64/amd64/support.S ============================================================================== --- stable/9/sys/amd64/amd64/support.S Thu Sep 4 00:40:41 2014 (r271071) +++ stable/9/sys/amd64/amd64/support.S Thu Sep 4 00:43:27 2014 (r271072) @@ -59,7 +59,7 @@ ENTRY(bzero) stosb ret END(bzero) - + /* Address: %rdi */ ENTRY(pagezero) movq $-PAGE_SIZE,%rdx @@ -137,7 +137,7 @@ ENTRY(bcopy) cld ret END(bcopy) - + /* * Note: memcpy does not support overlapping copies */ @@ -181,10 +181,10 @@ ENTRY(pagecopy) ret END(pagecopy) -/* fillw(pat, base, cnt) */ +/* fillw(pat, base, cnt) */ /* %rdi,%rsi, %rdx */ ENTRY(fillw) - movq %rdi,%rax + movq %rdi,%rax movq %rsi,%rdi movq %rdx,%rcx cld @@ -388,7 +388,7 @@ ENTRY(fuword) movq (%rdi),%rax movq $0,PCB_ONFAULT(%rcx) ret -END(fuword64) +END(fuword64) END(fuword) ENTRY(fuword32) Modified: stable/9/sys/i386/i386/db_disasm.c ============================================================================== --- stable/9/sys/i386/i386/db_disasm.c Thu Sep 4 00:40:41 2014 (r271071) +++ stable/9/sys/i386/i386/db_disasm.c Thu Sep 4 00:43:27 2014 (r271072) @@ -782,7 +782,7 @@ static const struct inst db_inst_table[2 /*c7*/ { "mov", TRUE, LONG, op2(I, E), 0 }, /*c8*/ { "enter", FALSE, NONE, op2(Iw, Ib), 0 }, -/*c9*/ { "leave", FALSE, NONE, 0, 0 }, +/*c9*/ { "leave", FALSE, NONE, 0, 0 }, /*ca*/ { "lret", FALSE, NONE, op1(Iw), 0 }, /*cb*/ { "lret", FALSE, NONE, 0, 0 }, /*cc*/ { "int", FALSE, NONE, op1(o3), 0 }, @@ -1266,7 +1266,7 @@ db_disasm(loc, altfmt) case 0xc8: i_name = "monitor"; i_size = NONE; - i_mode = 0; + i_mode = 0; break; case 0xc9: i_name = "mwait"; Modified: stable/9/sys/i386/i386/support.s ============================================================================== --- stable/9/sys/i386/i386/support.s Thu Sep 4 00:40:41 2014 (r271071) +++ stable/9/sys/i386/i386/support.s Thu Sep 4 00:43:27 2014 (r271072) @@ -62,8 +62,8 @@ ENTRY(bzero) stosb popl %edi ret -END(bzero) - +END(bzero) + ENTRY(sse2_pagezero) pushl %ebx movl 8(%esp),%ecx @@ -694,7 +694,7 @@ ENTRY(lgdt) movl 4(%esp),%eax lgdt (%eax) #endif - + /* flush the prefetch q */ jmp 1f nop @@ -740,13 +740,13 @@ END(ssdtosd) /* void reset_dbregs() */ ENTRY(reset_dbregs) - movl $0,%eax - movl %eax,%dr7 /* disable all breapoints first */ - movl %eax,%dr0 - movl %eax,%dr1 - movl %eax,%dr2 - movl %eax,%dr3 - movl %eax,%dr6 + movl $0,%eax + movl %eax,%dr7 /* disable all breakpoints first */ + movl %eax,%dr0 + movl %eax,%dr1 + movl %eax,%dr2 + movl %eax,%dr3 + movl %eax,%dr6 ret END(reset_dbregs) From dumbbell at FreeBSD.org Thu Sep 4 09:49:22 2014 From: dumbbell at FreeBSD.org (Jean-Sebastien Pedron) Date: Thu, 4 Sep 2014 09:49:21 +0000 (UTC) Subject: svn commit: r271091 - stable/9/sys/dev/drm2/radeon Message-ID: <201409040949.s849nLkW019937@svn.freebsd.org> Author: dumbbell Date: Thu Sep 4 09:49:21 2014 New Revision: 271091 URL: http://svnweb.freebsd.org/changeset/base/271091 Log: drm/radeon: Fix a memory leak when radeonkms is unloaded This an MFC of r270750. Modified: stable/9/sys/dev/drm2/radeon/radeon_fb.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/drm2/radeon/radeon_fb.c ============================================================================== --- stable/9/sys/dev/drm2/radeon/radeon_fb.c Thu Sep 4 09:42:36 2014 (r271090) +++ stable/9/sys/dev/drm2/radeon/radeon_fb.c Thu Sep 4 09:49:21 2014 (r271091) @@ -291,6 +291,7 @@ static int radeon_fbdev_destroy(struct d if (rfbdev->helper.fbdev) { info = rfbdev->helper.fbdev; + free(info->fb_priv, DRM_MEM_KMS); free(info, DRM_MEM_KMS); } From ngie at FreeBSD.org Thu Sep 4 20:07:45 2014 From: ngie at FreeBSD.org (Garrett Cooper) Date: Thu, 4 Sep 2014 20:07:45 +0000 (UTC) Subject: svn commit: r271126 - stable/9/sbin/hastd Message-ID: <201409042007.s84K7jCA023216@svn.freebsd.org> Author: ngie Date: Thu Sep 4 20:07:44 2014 New Revision: 271126 URL: http://svnweb.freebsd.org/changeset/base/271126 Log: MFC r270433: Garbage collect libl dependency The application links and runs without libl Approved by: rpaulo (mentor) Phabric: D673 Submitted by: trociny Modified: stable/9/sbin/hastd/Makefile Directory Properties: stable/9/ (props changed) stable/9/sbin/ (props changed) stable/9/sbin/hastd/ (props changed) Modified: stable/9/sbin/hastd/Makefile ============================================================================== --- stable/9/sbin/hastd/Makefile Thu Sep 4 20:02:28 2014 (r271125) +++ stable/9/sbin/hastd/Makefile Thu Sep 4 20:07:44 2014 (r271126) @@ -29,8 +29,8 @@ CFLAGS+=-DINET CFLAGS+=-DINET6 .endif -DPADD= ${LIBGEOM} ${LIBBSDXML} ${LIBSBUF} ${LIBL} ${LIBPTHREAD} ${LIBUTIL} -LDADD= -lgeom -lbsdxml -lsbuf -ll -lpthread -lutil +DPADD= ${LIBGEOM} ${LIBBSDXML} ${LIBSBUF} ${LIBPTHREAD} ${LIBUTIL} +LDADD= -lgeom -lbsdxml -lsbuf -lpthread -lutil .if ${MK_OPENSSL} != "no" DPADD+= ${LIBCRYPTO} LDADD+= -lcrypto From jhb at FreeBSD.org Fri Sep 5 17:22:22 2014 From: jhb at FreeBSD.org (John Baldwin) Date: Fri, 5 Sep 2014 17:22:21 +0000 (UTC) Subject: svn commit: r271176 - in stable: 10/usr.bin/ktrace 8/usr.bin/ktrace 9/usr.bin/ktrace Message-ID: <201409051722.s85HMLp6028666@svn.freebsd.org> Author: jhb Date: Fri Sep 5 17:22:20 2014 New Revision: 271176 URL: http://svnweb.freebsd.org/changeset/base/271176 Log: MFC 270674: Clarify that the -c argument clears the list of tracepoints specified by -t (it does not clear all tracepoints). Approved by: re (gjb for 10) Modified: stable/9/usr.bin/ktrace/ktrace.1 Directory Properties: stable/9/usr.bin/ktrace/ (props changed) Changes in other areas also in this revision: Modified: stable/10/usr.bin/ktrace/ktrace.1 stable/8/usr.bin/ktrace/ktrace.1 Directory Properties: stable/10/ (props changed) stable/8/usr.bin/ktrace/ (props changed) Modified: stable/9/usr.bin/ktrace/ktrace.1 ============================================================================== --- stable/9/usr.bin/ktrace/ktrace.1 Fri Sep 5 17:05:51 2014 (r271175) +++ stable/9/usr.bin/ktrace/ktrace.1 Fri Sep 5 17:22:20 2014 (r271176) @@ -28,7 +28,7 @@ .\" @(#)ktrace.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd May 31, 2012 +.Dd August 26, 2014 .Dt KTRACE 1 .Os .Sh NAME @@ -81,7 +81,7 @@ Append to the trace file instead of recr Disable tracing on all user-owned processes, and, if executed by root, all processes in the system. .It Fl c -Clear the trace points associated with the specified file or processes. +Clear the specified trace points associated with the given file or processes. .It Fl d Descendants; perform the operation for all current children of the designated processes. @@ -102,8 +102,10 @@ Enable (disable) tracing on the indicate .Fl p flag is permitted). .It Fl t Ar trstr -The string argument represents the kernel trace points, one per letter. -The following table equates the letters with the tracepoints: +Specify the list of trace points to enable or disable, one per letter. +If an explicit list is not specified, the default set of trace points is used. +.Pp +The following trace points are supported: .Pp .Bl -tag -width flag -compact .It Cm c From jhb at FreeBSD.org Fri Sep 5 17:44:12 2014 From: jhb at FreeBSD.org (John Baldwin) Date: Fri, 5 Sep 2014 17:44:11 +0000 (UTC) Subject: svn commit: r271177 - in stable: 10/sbin/gbde 8/sbin/gbde 9/sbin/gbde Message-ID: <201409051744.s85HiBYu038496@svn.freebsd.org> Author: jhb Date: Fri Sep 5 17:44:10 2014 New Revision: 271177 URL: http://svnweb.freebsd.org/changeset/base/271177 Log: MFC 270722: Correct the destroy example. The -n argument is not needed (and is not valid). Approved by: re (gjb for 10) Modified: stable/9/sbin/gbde/gbde.8 Directory Properties: stable/9/sbin/gbde/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sbin/gbde/gbde.8 stable/8/sbin/gbde/gbde.8 Directory Properties: stable/10/ (props changed) stable/8/sbin/gbde/ (props changed) Modified: stable/9/sbin/gbde/gbde.8 ============================================================================== --- stable/9/sbin/gbde/gbde.8 Fri Sep 5 17:22:20 2014 (r271176) +++ stable/9/sbin/gbde/gbde.8 Fri Sep 5 17:44:10 2014 (r271177) @@ -31,7 +31,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 1, 2013 +.Dd August 27, 2014 .Dt GBDE 8 .Os .Sh NAME @@ -235,7 +235,7 @@ pass-phrase: .Pp To destroy all copies of the masterkey: .Pp -.Dl "gbde destroy ada0s1f -n -1" +.Dl "gbde destroy ada0s1f" .Sh SEE ALSO .Xr gbde 4 , .Xr geom 4 From markj at FreeBSD.org Sat Sep 6 04:33:38 2014 From: markj at FreeBSD.org (Mark Johnston) Date: Sat, 6 Sep 2014 04:33:37 +0000 (UTC) Subject: svn commit: r271184 - in stable/9: sys/netinet6 usr.bin/netstat Message-ID: <201409060433.s864Xbc8051396@svn.freebsd.org> Author: markj Date: Sat Sep 6 04:33:37 2014 New Revision: 271184 URL: http://svnweb.freebsd.org/changeset/base/271184 Log: MFC r270348: Add some missing checks for unsupported interfaces (e.g. pflog(4)) when handling ioctls. While here, remove duplicated checks for a NULL ifp in in6_control(): this check is already done near the beginning of the function. MFC r270349: Suppress warnings when retrieving protocol stats from interfaces that don't support IPv6 (e.g. pflog(4)). PR: 189117 Modified: stable/9/sys/netinet6/in6.c stable/9/sys/netinet6/scope6.c stable/9/sys/netinet6/scope6_var.h stable/9/usr.bin/netstat/inet6.c Directory Properties: stable/9/sys/ (props changed) stable/9/usr.bin/netstat/ (props changed) Modified: stable/9/sys/netinet6/in6.c ============================================================================== --- stable/9/sys/netinet6/in6.c Fri Sep 5 23:56:25 2014 (r271183) +++ stable/9/sys/netinet6/in6.c Sat Sep 6 04:33:37 2014 (r271184) @@ -284,7 +284,7 @@ in6_control(struct socket *so, u_long cm return (mrt6_ioctl ? mrt6_ioctl(cmd, data) : EOPNOTSUPP); } - switch(cmd) { + switch (cmd) { case SIOCAADDRCTL_POLICY: case SIOCDADDRCTL_POLICY: if (td != NULL) { @@ -356,14 +356,10 @@ in6_control(struct socket *so, u_long cm if (error) return (error); } - return (scope6_set(ifp, - (struct scope6_id *)ifr->ifr_ifru.ifru_scope_id)); + /* FALLTHROUGH */ case SIOCGSCOPE6: - return (scope6_get(ifp, - (struct scope6_id *)ifr->ifr_ifru.ifru_scope_id)); case SIOCGSCOPE6DEF: - return (scope6_get_default((struct scope6_id *) - ifr->ifr_ifru.ifru_scope_id)); + return (scope6_ioctl(cmd, data, ifp)); } switch (cmd) { @@ -494,6 +490,13 @@ in6_control(struct socket *so, u_long cm if (error) goto out; } + /* FALLTHROUGH */ + case SIOCGIFSTAT_IN6: + case SIOCGIFSTAT_ICMP6: + if (ifp->if_afdata[AF_INET6] == NULL) { + error = EPFNOSUPPORT; + goto out; + } break; case SIOCGIFADDR_IN6: @@ -569,10 +572,6 @@ in6_control(struct socket *so, u_long cm break; case SIOCGIFSTAT_IN6: - if (ifp == NULL) { - error = EINVAL; - goto out; - } bzero(&ifr->ifr_ifru.ifru_stat, sizeof(ifr->ifr_ifru.ifru_stat)); ifr->ifr_ifru.ifru_stat = @@ -580,10 +579,6 @@ in6_control(struct socket *so, u_long cm break; case SIOCGIFSTAT_ICMP6: - if (ifp == NULL) { - error = EINVAL; - goto out; - } bzero(&ifr->ifr_ifru.ifru_icmp6stat, sizeof(ifr->ifr_ifru.ifru_icmp6stat)); ifr->ifr_ifru.ifru_icmp6stat = @@ -799,7 +794,7 @@ in6_control(struct socket *so, u_long cm } default: - if (ifp == NULL || ifp->if_ioctl == 0) { + if (ifp->if_ioctl == NULL) { error = EOPNOTSUPP; goto out; } Modified: stable/9/sys/netinet6/scope6.c ============================================================================== --- stable/9/sys/netinet6/scope6.c Fri Sep 5 23:56:25 2014 (r271183) +++ stable/9/sys/netinet6/scope6.c Sat Sep 6 04:33:37 2014 (r271184) @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -72,6 +73,9 @@ static VNET_DEFINE(struct scope6_id, sid #define SID(ifp) \ (((struct in6_ifextra *)(ifp)->if_afdata[AF_INET6])->scope6_id) +static int scope6_get(struct ifnet *, struct scope6_id *); +static int scope6_set(struct ifnet *, struct scope6_id *); + void scope6_init(void) { @@ -115,6 +119,30 @@ scope6_ifdetach(struct scope6_id *sid) } int +scope6_ioctl(u_long cmd, caddr_t data, struct ifnet *ifp) +{ + struct in6_ifreq *ifr; + + if (ifp->if_afdata[AF_INET6] == NULL) + return (EPFNOSUPPORT); + + ifr = (struct in6_ifreq *)data; + switch (cmd) { + case SIOCSSCOPE6: + return (scope6_set(ifp, + (struct scope6_id *)ifr->ifr_ifru.ifru_scope_id)); + case SIOCGSCOPE6: + return (scope6_get(ifp, + (struct scope6_id *)ifr->ifr_ifru.ifru_scope_id)); + case SIOCGSCOPE6DEF: + return (scope6_get_default( + (struct scope6_id *)ifr->ifr_ifru.ifru_scope_id)); + default: + return (EOPNOTSUPP); + } +} + +static int scope6_set(struct ifnet *ifp, struct scope6_id *idlist) { int i; @@ -177,7 +205,7 @@ scope6_set(struct ifnet *ifp, struct sco return (error); } -int +static int scope6_get(struct ifnet *ifp, struct scope6_id *idlist) { struct scope6_id *sid; @@ -196,7 +224,6 @@ scope6_get(struct ifnet *ifp, struct sco return (0); } - /* * Get a scope of the address. Node-local, link-local, site-local or global. */ Modified: stable/9/sys/netinet6/scope6_var.h ============================================================================== --- stable/9/sys/netinet6/scope6_var.h Fri Sep 5 23:56:25 2014 (r271183) +++ stable/9/sys/netinet6/scope6_var.h Sat Sep 6 04:33:37 2014 (r271184) @@ -45,8 +45,7 @@ struct scope6_id { void scope6_init(void); struct scope6_id *scope6_ifattach(struct ifnet *); void scope6_ifdetach(struct scope6_id *); -int scope6_set(struct ifnet *, struct scope6_id *); -int scope6_get(struct ifnet *, struct scope6_id *); +int scope6_ioctl(u_long cmd, caddr_t data, struct ifnet *); void scope6_setdefault(struct ifnet *); int scope6_get_default(struct scope6_id *); u_int32_t scope6_addr2default(struct in6_addr *); Modified: stable/9/usr.bin/netstat/inet6.c ============================================================================== --- stable/9/usr.bin/netstat/inet6.c Fri Sep 5 23:56:25 2014 (r271183) +++ stable/9/usr.bin/netstat/inet6.c Sat Sep 6 04:33:37 2014 (r271184) @@ -540,13 +540,13 @@ ip6_ifstats(char *ifname) } strcpy(ifr.ifr_name, ifname); - printf("ip6 on %s:\n", ifr.ifr_name); - if (ioctl(s, SIOCGIFSTAT_IN6, (char *)&ifr) < 0) { - perror("Warning: ioctl(SIOCGIFSTAT_IN6)"); + if (errno != EPFNOSUPPORT) + perror("Warning: ioctl(SIOCGIFSTAT_IN6)"); goto end; } + printf("ip6 on %s:\n", ifr.ifr_name); p(ifs6_in_receive, "\t%ju total input datagram%s\n"); p(ifs6_in_hdrerr, "\t%ju datagram%s with invalid header received\n"); p(ifs6_in_toobig, "\t%ju datagram%s exceeded MTU received\n"); @@ -945,13 +945,13 @@ icmp6_ifstats(char *ifname) } strcpy(ifr.ifr_name, ifname); - printf("icmp6 on %s:\n", ifr.ifr_name); - if (ioctl(s, SIOCGIFSTAT_ICMP6, (char *)&ifr) < 0) { - perror("Warning: ioctl(SIOCGIFSTAT_ICMP6)"); + if (errno != EPFNOSUPPORT) + perror("Warning: ioctl(SIOCGIFSTAT_ICMP6)"); goto end; } + printf("icmp6 on %s:\n", ifr.ifr_name); p(ifs6_in_msg, "\t%ju total input message%s\n"); p(ifs6_in_error, "\t%ju total input error message%s\n"); p(ifs6_in_dstunreach, "\t%ju input destination unreachable error%s\n"); From mav at FreeBSD.org Sat Sep 6 15:30:58 2014 From: mav at FreeBSD.org (Alexander Motin) Date: Sat, 6 Sep 2014 15:30:57 +0000 (UTC) Subject: svn commit: r271195 - stable/9/sys/kern Message-ID: <201409061530.s86FUvCl059859@svn.freebsd.org> Author: mav Date: Sat Sep 6 15:30:57 2014 New Revision: 271195 URL: http://svnweb.freebsd.org/changeset/base/271195 Log: MFC r270423: Restore pre-r239157 handling of sched_yield(), when thread time slice was aborted, allowing other threads to run. Without this change thread is just rescheduled again, that was illustrated by provided test tool. PR: 192926 Submitted by: eric at vangyzen.net Modified: stable/9/sys/kern/sched_4bsd.c stable/9/sys/kern/sched_ule.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/kern/sched_4bsd.c ============================================================================== --- stable/9/sys/kern/sched_4bsd.c Sat Sep 6 15:26:38 2014 (r271194) +++ stable/9/sys/kern/sched_4bsd.c Sat Sep 6 15:30:57 2014 (r271195) @@ -983,7 +983,8 @@ sched_switch(struct thread *td, struct t sched_load_rem(); td->td_lastcpu = td->td_oncpu; - preempted = !(td->td_flags & TDF_SLICEEND); + preempted = !((td->td_flags & TDF_SLICEEND) || + (flags & SWT_RELINQUISH)); td->td_flags &= ~(TDF_NEEDRESCHED | TDF_SLICEEND); td->td_owepreempt = 0; td->td_oncpu = NOCPU; Modified: stable/9/sys/kern/sched_ule.c ============================================================================== --- stable/9/sys/kern/sched_ule.c Sat Sep 6 15:26:38 2014 (r271194) +++ stable/9/sys/kern/sched_ule.c Sat Sep 6 15:30:57 2014 (r271195) @@ -1830,7 +1830,8 @@ sched_switch(struct thread *td, struct t ts->ts_rltick = ticks; td->td_lastcpu = td->td_oncpu; td->td_oncpu = NOCPU; - preempted = !(td->td_flags & TDF_SLICEEND); + preempted = !((td->td_flags & TDF_SLICEEND) || + (flags & SWT_RELINQUISH)); td->td_flags &= ~(TDF_NEEDRESCHED | TDF_SLICEEND); td->td_owepreempt = 0; if (!TD_IS_IDLETHREAD(td)) From gjb at FreeBSD.org Sun Sep 7 00:46:58 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Sun, 7 Sep 2014 00:46:58 +0000 (UTC) Subject: svn commit: r271215 - stable/9/etc/rc.d Message-ID: <201409070046.s870kwa5029598@svn.freebsd.org> Author: gjb Date: Sun Sep 7 00:46:57 2014 New Revision: 271215 URL: http://svnweb.freebsd.org/changeset/base/271215 Log: MFC r271078: Fix typo: s/_maske/_mask/ Sponsored by: The FreeBSD Foundation Modified: stable/9/etc/rc.d/jail Directory Properties: stable/9/etc/ (props changed) stable/9/etc/rc.d/ (props changed) Modified: stable/9/etc/rc.d/jail ============================================================================== --- stable/9/etc/rc.d/jail Sun Sep 7 00:44:59 2014 (r271214) +++ stable/9/etc/rc.d/jail Sun Sep 7 00:46:57 2014 (r271215) @@ -439,7 +439,7 @@ jail_extract_address() _mask=${_mask:-/32} elif [ "${_type}" = "inet6" ]; then - # In case _maske is not set for IPv6, use /128. + # In case _mask is not set for IPv6, use /128. _mask=${_mask:-/128} fi } From markj at FreeBSD.org Sun Sep 7 18:42:47 2014 From: markj at FreeBSD.org (Mark Johnston) Date: Sun, 7 Sep 2014 18:42:46 +0000 (UTC) Subject: svn commit: r271233 - in stable/9/sys: amd64/conf conf i386/conf Message-ID: <201409071842.s87IgkXr040288@svn.freebsd.org> Author: markj Date: Sun Sep 7 18:42:45 2014 New Revision: 271233 URL: http://svnweb.freebsd.org/changeset/base/271233 Log: MFC r271137: Add mrsas(4) to GENERIC for i386 and amd64. Modified: stable/9/sys/amd64/conf/GENERIC stable/9/sys/conf/NOTES stable/9/sys/i386/conf/GENERIC Directory Properties: stable/9/sys/ (props changed) stable/9/sys/conf/ (props changed) Modified: stable/9/sys/amd64/conf/GENERIC ============================================================================== --- stable/9/sys/amd64/conf/GENERIC Sun Sep 7 18:32:42 2014 (r271232) +++ stable/9/sys/amd64/conf/GENERIC Sun Sep 7 18:42:45 2014 (r271233) @@ -151,6 +151,7 @@ device aacraid # Adaptec by PMC RAID device ida # Compaq Smart RAID device mfi # LSI MegaRAID SAS device mlx # Mylex DAC960 family +device mrsas # LSI/Avago MegaRAID SAS/SATA, 6Gb/s and 12Gb/s #XXX pointer/int warnings #device pst # Promise Supertrak SX6000 device twe # 3ware ATA RAID Modified: stable/9/sys/conf/NOTES ============================================================================== --- stable/9/sys/conf/NOTES Sun Sep 7 18:32:42 2014 (r271232) +++ stable/9/sys/conf/NOTES Sun Sep 7 18:42:45 2014 (r271233) @@ -1673,6 +1673,7 @@ device amrp # SCSI Passthrough interfa device mfi # LSI MegaRAID SAS device mfip # LSI MegaRAID SAS passthrough, requires CAM options MFI_DEBUG +device mrsas # LSI/Avago MegaRAID SAS/SATA, 6Gb/s and 12Gb/s # # 3ware ATA RAID Modified: stable/9/sys/i386/conf/GENERIC ============================================================================== --- stable/9/sys/i386/conf/GENERIC Sun Sep 7 18:32:42 2014 (r271232) +++ stable/9/sys/i386/conf/GENERIC Sun Sep 7 18:42:45 2014 (r271233) @@ -158,6 +158,7 @@ device aacraid # Adaptec by PMC RAID device ida # Compaq Smart RAID device mfi # LSI MegaRAID SAS device mlx # Mylex DAC960 family +device mrsas # LSI/Avago MegaRAID SAS/SATA, 6Gb/s and 12Gb/s device pst # Promise Supertrak SX6000 device twe # 3ware ATA RAID From gjb at FreeBSD.org Tue Sep 9 17:38:56 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Tue, 9 Sep 2014 17:38:56 +0000 (UTC) Subject: svn commit: r271324 - in stable: 10/release/doc/en_US.ISO8859-1/errata 9/release/doc/en_US.ISO8859-1/errata Message-ID: <201409091738.s89HcuaU088836@svn.freebsd.org> Author: gjb Date: Tue Sep 9 17:38:55 2014 New Revision: 271324 URL: http://svnweb.freebsd.org/changeset/base/271324 Log: Document SA-14:18. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/errata/article.xml Changes in other areas also in this revision: Modified: stable/10/release/doc/en_US.ISO8859-1/errata/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/errata/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/errata/article.xml Tue Sep 9 17:22:39 2014 (r271323) +++ stable/9/release/doc/en_US.ISO8859-1/errata/article.xml Tue Sep 9 17:38:55 2014 (r271324) @@ -179,6 +179,12 @@ Kernel memory disclosure in control messages and SCTP notifications + + + SA-14:18.openssl + 9 September 2014 + Multiple vulnerabilities + From gjb at FreeBSD.org Tue Sep 9 17:48:09 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Tue, 9 Sep 2014 17:48:08 +0000 (UTC) Subject: svn commit: r271325 - stable/9/release/doc/en_US.ISO8859-1/errata Message-ID: <201409091748.s89Hm81G093591@svn.freebsd.org> Author: gjb Date: Tue Sep 9 17:48:08 2014 New Revision: 271325 URL: http://svnweb.freebsd.org/changeset/base/271325 Log: Trim advisories that do not affect stable/9 since the 9.3-RELEASE. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/errata/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/errata/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/errata/article.xml Tue Sep 9 17:38:55 2014 (r271324) +++ stable/9/release/doc/en_US.ISO8859-1/errata/article.xml Tue Sep 9 17:48:08 2014 (r271325) @@ -49,7 +49,7 @@ &os;. This errata document for &os; &release.current; - will be maintained until the release of &os; &release.next;. + will be maintained until the EoL of &os; &release.branch;. @@ -101,86 +101,6 @@ - SA-14:01.bsnmpd - 1 January 2014 - Fix bsnmpd remote denial of service - vulnerability - - - - SA-14:02.ntpd - 1 January 2014 - Fix ntpd distributed reflection Denial of - Service vulnerability - - - - SA-14:03.ntpd - 1 January 2014 - Fix BIND remote denial of service - vulnerability - - - - SA-14:05.nfsserver - 8 April 2014 - Fix NFS deadlock vulnerability - - - - SA-14:06.openssl - 8 April 2014 - Fix ECDSA Cache Side-channel - Attack - - - - SA-14:08.tcp - 30 April 2014 - Fix TCP reassembly - vulnerability - - - - SA-14:11.sendmail - 3 June 2014 - Fix sendmail improper close-on-exec flag - handling - - - - SA-14:12.ktrace - 3 June 2014 - Fix ktrace memory disclosure - - - - SA-14:13.pam - 3 June 2014 - Fix incorrect error handling in PAM policy - parser - - - - SA-14:14.openssl - 5 June 2014 - Multiple vulnerabilities - - - - SA-14:16.file - 24 June 2014 - Multiple vulnerabilities - - - - SA-14:17.kmem - 8 July 2014 - Kernel memory disclosure in control messages - and SCTP notifications - - - SA-14:18.openssl 9 September 2014 Multiple vulnerabilities From gjb at FreeBSD.org Tue Sep 9 17:52:28 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Tue, 9 Sep 2014 17:52:28 +0000 (UTC) Subject: svn commit: r271326 - stable/9/release/doc/en_US.ISO8859-1/share/xml Message-ID: <201409091752.s89HqSbk097684@svn.freebsd.org> Author: gjb Date: Tue Sep 9 17:52:27 2014 New Revision: 271326 URL: http://svnweb.freebsd.org/changeset/base/271326 Log: Fix mailing list in footer. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/share/xml/release.xsl Modified: stable/9/release/doc/en_US.ISO8859-1/share/xml/release.xsl ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/share/xml/release.xsl Tue Sep 9 17:48:08 2014 (r271325) +++ stable/9/release/doc/en_US.ISO8859-1/share/xml/release.xsl Tue Sep 9 17:52:27 2014 (r271326) @@ -18,7 +18,7 @@ contacting <questions at FreeBSD.org>.

All users of FreeBSD should - subscribe to the <current at FreeBSD.org> + subscribe to the <stable at FreeBSD.org> mailing list.

For questions about this documentation, From gjb at FreeBSD.org Wed Sep 10 00:19:35 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Wed, 10 Sep 2014 00:19:35 +0000 (UTC) Subject: svn commit: r271341 - head/sys/sys stable/10/sys/sys stable/8/sys/sys stable/9/sys/sys Message-ID: <201409100019.s8A0JZp3082312@svn.freebsd.org> Author: gjb Date: Wed Sep 10 00:19:33 2014 New Revision: 271341 URL: http://svnweb.freebsd.org/changeset/base/271341 Log: Bump __FreeBSD_version after SA-14:18 Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/9/sys/sys/param.h Changes in other areas also in this revision: Modified: head/sys/sys/param.h stable/10/sys/sys/param.h stable/8/sys/sys/param.h Modified: stable/9/sys/sys/param.h ============================================================================== --- stable/9/sys/sys/param.h Tue Sep 9 23:39:43 2014 (r271340) +++ stable/9/sys/sys/param.h Wed Sep 10 00:19:33 2014 (r271341) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 903502 /* Master, propagated to newvers */ +#define __FreeBSD_version 903503 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From hselasky at FreeBSD.org Wed Sep 10 06:54:06 2014 From: hselasky at FreeBSD.org (Hans Petter Selasky) Date: Wed, 10 Sep 2014 06:54:05 +0000 (UTC) Subject: svn commit: r271356 - stable/9/sys/dev/usb/net Message-ID: <201409100654.s8A6s5CF067536@svn.freebsd.org> Author: hselasky Date: Wed Sep 10 06:54:05 2014 New Revision: 271356 URL: http://svnweb.freebsd.org/changeset/base/271356 Log: MFC r270992: Fix logical error. Modified: stable/9/sys/dev/usb/net/if_aue.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/net/if_aue.c ============================================================================== --- stable/9/sys/dev/usb/net/if_aue.c Wed Sep 10 06:48:23 2014 (r271355) +++ stable/9/sys/dev/usb/net/if_aue.c Wed Sep 10 06:54:05 2014 (r271356) @@ -745,7 +745,7 @@ aue_intr_callback(struct usb_xfer *xfer, if (pkt.aue_txstat0) ifp->if_oerrors++; - if (pkt.aue_txstat0 & (AUE_TXSTAT0_LATECOLL & + if (pkt.aue_txstat0 & (AUE_TXSTAT0_LATECOLL | AUE_TXSTAT0_EXCESSCOLL)) ifp->if_collisions++; } From hselasky at FreeBSD.org Wed Sep 10 06:57:25 2014 From: hselasky at FreeBSD.org (Hans Petter Selasky) Date: Wed, 10 Sep 2014 06:57:24 +0000 (UTC) Subject: svn commit: r271359 - in stable/9/sys/dev/usb: . quirk Message-ID: <201409100657.s8A6vORY068177@svn.freebsd.org> Author: hselasky Date: Wed Sep 10 06:57:24 2014 New Revision: 271359 URL: http://svnweb.freebsd.org/changeset/base/271359 Log: MFC r271017 and r271018: Add new quirk. PR: 193279 Modified: stable/9/sys/dev/usb/quirk/usb_quirk.c stable/9/sys/dev/usb/usbdevs Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/quirk/usb_quirk.c ============================================================================== --- stable/9/sys/dev/usb/quirk/usb_quirk.c Wed Sep 10 06:56:45 2014 (r271358) +++ stable/9/sys/dev/usb/quirk/usb_quirk.c Wed Sep 10 06:57:24 2014 (r271359) @@ -130,6 +130,8 @@ static struct usb_quirk_entry usb_quirks USB_QUIRK(MICROSOFT, WLINTELLIMOUSE, 0x0000, 0xffff, UQ_MS_LEADING_BYTE), /* Quirk for Corsair Vengeance K60 keyboard */ USB_QUIRK(CORSAIR, K60, 0x0000, 0xffff, UQ_KBD_BOOTPROTO), + /* Quirk for Corsair Vengeance K70 keyboard */ + USB_QUIRK(CORSAIR, K70, 0x0000, 0xffff, UQ_KBD_BOOTPROTO), /* umodem(4) device quirks */ USB_QUIRK(METRICOM, RICOCHET_GS, 0x100, 0x100, UQ_ASSUME_CM_OVER_DATA), USB_QUIRK(SANYO, SCP4900, 0x000, 0x000, UQ_ASSUME_CM_OVER_DATA), Modified: stable/9/sys/dev/usb/usbdevs ============================================================================== --- stable/9/sys/dev/usb/usbdevs Wed Sep 10 06:56:45 2014 (r271358) +++ stable/9/sys/dev/usb/usbdevs Wed Sep 10 06:57:24 2014 (r271359) @@ -1483,6 +1483,7 @@ product COREGA FETHER_USB_TXC 0x9601 FEt /* Corsair products */ product CORSAIR K60 0x0a60 Corsair Vengeance K60 keyboard +product CORSAIR K70 0x1b09 Corsair Vengeance K70 keyboard /* Creative products */ product CREATIVE NOMAD_II 0x1002 Nomad II MP3 player From hselasky at FreeBSD.org Wed Sep 10 07:19:09 2014 From: hselasky at FreeBSD.org (Hans Petter Selasky) Date: Wed, 10 Sep 2014 07:19:09 +0000 (UTC) Subject: svn commit: r271363 - stable/9/sys/dev/sound/usb Message-ID: <201409100719.s8A7J9v8078128@svn.freebsd.org> Author: hselasky Date: Wed Sep 10 07:19:08 2014 New Revision: 271363 URL: http://svnweb.freebsd.org/changeset/base/271363 Log: MFC r271218: Update mixer description for FastTrackPro. Modified: stable/9/sys/dev/sound/usb/uaudio.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/sound/usb/uaudio.c ============================================================================== --- stable/9/sys/dev/sound/usb/uaudio.c Wed Sep 10 07:16:17 2014 (r271362) +++ stable/9/sys/dev/sound/usb/uaudio.c Wed Sep 10 07:19:08 2014 (r271363) @@ -2730,14 +2730,14 @@ uaudio_mixer_controls_create_ftu(struct uaudio_mixer_add_ctl(sc, &MIX(sc)); - MIX(sc).wValue[0] = MAKE_WORD(9, chy + 1); + MIX(sc).wValue[0] = MAKE_WORD(9, chy + 1 + 8); MIX(sc).type = MIX_SIGNED_16; MIX(sc).ctl = SOUND_MIXER_NRDEVICES; MIX(sc).name = "effect_send"; MIX(sc).nchan = 1; MIX(sc).update[0] = 1; snprintf(MIX(sc).desc, sizeof(MIX(sc).desc), - "Effect Send DIn%d Volume", chy + 1 + 8); + "Effect Send DIn%d Volume", chy + 1); uaudio_mixer_add_ctl(sc, &MIX(sc)); } From jhb at FreeBSD.org Wed Sep 10 15:45:20 2014 From: jhb at FreeBSD.org (John Baldwin) Date: Wed, 10 Sep 2014 15:45:19 +0000 (UTC) Subject: svn commit: r271399 - in stable: 10/sys/kern 10/sys/sys 8/sys/kern 8/sys/sys 9/sys/kern 9/sys/sys Message-ID: <201409101545.s8AFjJmj032176@svn.freebsd.org> Author: jhb Date: Wed Sep 10 15:45:18 2014 New Revision: 271399 URL: http://svnweb.freebsd.org/changeset/base/271399 Log: MFC 270823,270825,270829: Use a unit number allocator to provide suitable st_dev and st_ino values for POSIX shared memory descriptors. The implementation is similar to that used for pipes. Approved by: re (gjb for 10) Modified: stable/9/sys/kern/uipc_shm.c stable/9/sys/sys/mman.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/sys/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/kern/uipc_shm.c stable/10/sys/sys/mman.h stable/8/sys/kern/uipc_shm.c stable/8/sys/sys/mman.h Directory Properties: stable/10/ (props changed) stable/8/sys/ (props changed) stable/8/sys/kern/ (props changed) stable/8/sys/sys/ (props changed) Modified: stable/9/sys/kern/uipc_shm.c ============================================================================== --- stable/9/sys/kern/uipc_shm.c Wed Sep 10 15:25:15 2014 (r271398) +++ stable/9/sys/kern/uipc_shm.c Wed Sep 10 15:45:18 2014 (r271399) @@ -48,6 +48,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -95,12 +96,14 @@ static LIST_HEAD(, shm_mapping) *shm_dic static struct sx shm_dict_lock; static struct mtx shm_timestamp_lock; static u_long shm_hash; +static struct unrhdr *shm_ino_unr; +static dev_t shm_dev_ino; #define SHM_HASH(fnv) (&shm_dictionary[(fnv) & shm_hash]) static int shm_access(struct shmfd *shmfd, struct ucred *ucred, int flags); static struct shmfd *shm_alloc(struct ucred *ucred, mode_t mode); -static void shm_dict_init(void *arg); +static void shm_init(void *arg); static void shm_drop(struct shmfd *shmfd); static struct shmfd *shm_hold(struct shmfd *shmfd); static void shm_insert(char *path, Fnv32_t fnv, struct shmfd *shmfd); @@ -227,6 +230,8 @@ shm_stat(struct file *fp, struct stat *s sb->st_uid = shmfd->shm_uid; sb->st_gid = shmfd->shm_gid; mtx_unlock(&shm_timestamp_lock); + sb->st_dev = shm_dev_ino; + sb->st_ino = shmfd->shm_ino; return (0); } @@ -361,6 +366,7 @@ static struct shmfd * shm_alloc(struct ucred *ucred, mode_t mode) { struct shmfd *shmfd; + int ino; shmfd = malloc(sizeof(*shmfd), M_SHMFD, M_WAITOK | M_ZERO); shmfd->shm_size = 0; @@ -377,6 +383,11 @@ shm_alloc(struct ucred *ucred, mode_t mo vfs_timestamp(&shmfd->shm_birthtime); shmfd->shm_atime = shmfd->shm_mtime = shmfd->shm_ctime = shmfd->shm_birthtime; + ino = alloc_unr(shm_ino_unr); + if (ino == -1) + shmfd->shm_ino = 0; + else + shmfd->shm_ino = ino; refcount_init(&shmfd->shm_refs, 1); #ifdef MAC mac_posixshm_init(shmfd); @@ -403,6 +414,8 @@ shm_drop(struct shmfd *shmfd) mac_posixshm_destroy(shmfd); #endif vm_object_deallocate(shmfd->shm_object); + if (shmfd->shm_ino != 0) + free_unr(shm_ino_unr, shmfd->shm_ino); free(shmfd, M_SHMFD); } } @@ -435,14 +448,18 @@ shm_access(struct shmfd *shmfd, struct u * the mappings in a hash table. */ static void -shm_dict_init(void *arg) +shm_init(void *arg) { mtx_init(&shm_timestamp_lock, "shm timestamps", NULL, MTX_DEF); sx_init(&shm_dict_lock, "shm dictionary"); shm_dictionary = hashinit(1024, M_SHMFD, &shm_hash); + shm_ino_unr = new_unrhdr(1, INT32_MAX, NULL); + KASSERT(shm_ino_unr != NULL, ("shm fake inodes not initialized")); + shm_dev_ino = devfs_alloc_cdp_inode(); + KASSERT(shm_dev_ino > 0, ("shm dev inode not initialized")); } -SYSINIT(shm_dict_init, SI_SUB_SYSV_SHM, SI_ORDER_ANY, shm_dict_init, NULL); +SYSINIT(shm_init, SI_SUB_SYSV_SHM, SI_ORDER_ANY, shm_init, NULL); static struct shmfd * shm_lookup(char *path, Fnv32_t fnv) Modified: stable/9/sys/sys/mman.h ============================================================================== --- stable/9/sys/sys/mman.h Wed Sep 10 15:25:15 2014 (r271398) +++ stable/9/sys/sys/mman.h Wed Sep 10 15:45:18 2014 (r271399) @@ -211,6 +211,7 @@ struct shmfd { struct timespec shm_mtime; struct timespec shm_ctime; struct timespec shm_birthtime; + ino_t shm_ino; struct label *shm_label; /* MAC label */ const char *shm_path; From gjb at FreeBSD.org Fri Sep 12 17:02:14 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Fri, 12 Sep 2014 17:02:13 +0000 (UTC) Subject: svn commit: r271472 - in stable/9/release/doc: en_US.ISO8859-1/share/xml share/mk share/xml Message-ID: <201409121702.s8CH2DUj046003@svn.freebsd.org> Author: gjb Date: Fri Sep 12 17:02:13 2014 New Revision: 271472 URL: http://svnweb.freebsd.org/changeset/base/271472 Log: MFC r271331: Change how the recommended mailing list to track is added to the footer of the release/doc/ pages by moving a hard-coded value (that is subject to human error to change) to release.ent where other values are regularly changed, and adding parsing logic to release.xsl. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/share/xml/release.xsl stable/9/release/doc/share/mk/doc.relnotes.mk stable/9/release/doc/share/xml/release.ent stable/9/release/doc/share/xml/release.xsl Directory Properties: stable/9/release/doc/ (props changed) Modified: stable/9/release/doc/en_US.ISO8859-1/share/xml/release.xsl ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/share/xml/release.xsl Fri Sep 12 17:01:14 2014 (r271471) +++ stable/9/release/doc/en_US.ISO8859-1/share/xml/release.xsl Fri Sep 12 17:02:13 2014 (r271472) @@ -8,6 +8,7 @@ +

This file, and other release-related documents, @@ -18,7 +19,7 @@ contacting <questions at FreeBSD.org>.

All users of FreeBSD should - subscribe to the <stable at FreeBSD.org> + subscribe to the <@FreeBSD.org> mailing list.

For questions about this documentation, Modified: stable/9/release/doc/share/mk/doc.relnotes.mk ============================================================================== --- stable/9/release/doc/share/mk/doc.relnotes.mk Fri Sep 12 17:01:14 2014 (r271471) +++ stable/9/release/doc/share/mk/doc.relnotes.mk Fri Sep 12 17:02:13 2014 (r271472) @@ -6,6 +6,7 @@ DOC_PREFIX?= ${RELN_ROOT}/../../../doc RELEASETYPE!= grep -o 'release.type "[a-z]*"' ${RELN_ROOT}/share/xml/release.ent | sed 's|[a-z.]* "\([a-z]*\)"|\1|' RELEASEURL!= grep -o 'release.url \"[^\"]*\"' ${RELN_ROOT}/share/xml/release.ent | sed 's|[^ ]* "\([^"]*\)"|\1|' RELEASEBRANCH!= grep -o 'release.branch "\([^"]*\)"' ${RELN_ROOT}/share/xml/release.ent | sed 's|[^ ]* "\([^"]*\)"|\1|' +RELEASEMAILLIST!= grep -o 'release.maillist "\([^"]*\)"' ${RELN_ROOT}/share/xml/release.ent | sed 's|[^ ]* "\([^"]*\)"|\1|' .if ${RELEASETYPE} == "current" PROFILING+= --param profile.attribute "'releasetype'" --param profile.value "'current'" .elif ${RELEASETYPE} == "snapshot" @@ -15,6 +16,7 @@ PROFILING+= --param profile.attribute "' .endif XSLTPROCFLAGS+= --param release.url "'${RELEASEURL}'" XSLTPROCFLAGS+= --param release.branch "'${RELEASEBRANCH}'" +XSLTPROCFLAGS+= --param release.maillist "'${RELEASEMAILLIST}'" # Find the RELNOTESng document catalogs EXTRA_CATALOGS+= file://${RELN_ROOT}/${LANGCODE}/share/xml/catalog.xml \ Modified: stable/9/release/doc/share/xml/release.ent ============================================================================== --- stable/9/release/doc/share/xml/release.ent Fri Sep 12 17:01:14 2014 (r271471) +++ stable/9/release/doc/share/xml/release.ent Fri Sep 12 17:02:13 2014 (r271472) @@ -22,6 +22,9 @@ + + + Modified: stable/9/release/doc/share/xml/release.xsl ============================================================================== --- stable/9/release/doc/share/xml/release.xsl Fri Sep 12 17:01:14 2014 (r271471) +++ stable/9/release/doc/share/xml/release.xsl Fri Sep 12 17:02:13 2014 (r271472) @@ -12,6 +12,7 @@ + From gjb at FreeBSD.org Fri Sep 12 17:07:20 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Fri, 12 Sep 2014 17:07:19 +0000 (UTC) Subject: svn commit: r271474 - stable/9/crypto/heimdal/tools Message-ID: <201409121707.s8CH7JwO047093@svn.freebsd.org> Author: gjb Date: Fri Sep 12 17:07:19 2014 New Revision: 271474 URL: http://svnweb.freebsd.org/changeset/base/271474 Log: MFC r271284: Include the gssapi_krb5 library in KRB5_LDFLAGS. PR: 156245 Sponsored by: The FreeBSD Foundation Modified: stable/9/crypto/heimdal/tools/krb5-config.in Directory Properties: stable/9/crypto/heimdal/ (props changed) Modified: stable/9/crypto/heimdal/tools/krb5-config.in ============================================================================== --- stable/9/crypto/heimdal/tools/krb5-config.in Fri Sep 12 17:06:55 2014 (r271473) +++ stable/9/crypto/heimdal/tools/krb5-config.in Fri Sep 12 17:07:19 2014 (r271474) @@ -93,7 +93,7 @@ if test "$do_libs" = "yes"; then lib_flags="-L${libdir}" case $library in gssapi) - lib_flags="$lib_flags -lgssapi -lheimntlm" + lib_flags="$lib_flags -lgssapi -lgssapi_krb5 -lheimntlm" ;; kadm-client) lib_flags="$lib_flags -lkadm5clnt" From davidcs at FreeBSD.org Fri Sep 12 18:20:37 2014 From: davidcs at FreeBSD.org (David C Somayajulu) Date: Fri, 12 Sep 2014 18:20:35 +0000 (UTC) Subject: svn commit: r271476 - stable/9/sys/dev/bxe Message-ID: <201409121820.s8CIKZqt081686@svn.freebsd.org> Author: davidcs Date: Fri Sep 12 18:20:35 2014 New Revision: 271476 URL: http://svnweb.freebsd.org/changeset/base/271476 Log: MFC r268854 Initiate error recovery stats fail to update after 3 retries. Change bxe_panic() ECORE_DBG_BREAK_IF() ECORE_BUG() ECORE_BUG_ON() to panic only if ECORE_STOP_ON_ERROR is defined. Modified: stable/9/sys/dev/bxe/bxe.c stable/9/sys/dev/bxe/bxe.h stable/9/sys/dev/bxe/bxe_stats.c stable/9/sys/dev/bxe/ecore_reg.h stable/9/sys/dev/bxe/ecore_sp.h Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/bxe/bxe.c ============================================================================== --- stable/9/sys/dev/bxe/bxe.c Fri Sep 12 17:32:28 2014 (r271475) +++ stable/9/sys/dev/bxe/bxe.c Fri Sep 12 18:20:35 2014 (r271476) @@ -11486,6 +11486,10 @@ bxe_process_kill(struct bxe_softc *sc, bxe_process_kill_chip_reset(sc, global); mb(); + /* clear errors in PGB */ + if (!CHIP_IS_E1(sc)) + REG_WR(sc, PGLUE_B_REG_LATCHED_ERRORS_CLR, 0x7f); + /* Recover after reset: */ /* MCP */ if (global && bxe_reset_mcp_comp(sc, val)) { Modified: stable/9/sys/dev/bxe/bxe.h ============================================================================== --- stable/9/sys/dev/bxe/bxe.h Fri Sep 12 17:32:28 2014 (r271475) +++ stable/9/sys/dev/bxe/bxe.h Fri Sep 12 18:20:35 2014 (r271476) @@ -2301,11 +2301,20 @@ void ecore_storm_memset_struct(struct bx } \ } while(0) +#ifdef ECORE_STOP_ON_ERROR + #define bxe_panic(sc, msg) \ do { \ panic msg; \ } while (0) +#else + +#define bxe_panic(sc, msg) \ + device_printf((sc)->dev, "%s (%s,%d)\n", __FUNCTION__, __FILE__, __LINE__); + +#endif + #define CATC_TRIGGER(sc, data) REG_WR((sc), 0x2000, (data)); #define CATC_TRIGGER_START(sc) CATC_TRIGGER((sc), 0xcafecafe) Modified: stable/9/sys/dev/bxe/bxe_stats.c ============================================================================== --- stable/9/sys/dev/bxe/bxe_stats.c Fri Sep 12 17:32:28 2014 (r271475) +++ stable/9/sys/dev/bxe/bxe_stats.c Fri Sep 12 18:20:35 2014 (r271476) @@ -1306,7 +1306,10 @@ bxe_stats_update(struct bxe_softc *sc) if (bxe_storm_stats_update(sc)) { if (sc->stats_pending++ == 3) { - bxe_panic(sc, ("storm stats not updated for 3 times\n")); + if (sc->ifnet->if_drv_flags & IFF_DRV_RUNNING) { + atomic_store_rel_long(&sc->chip_tq_flags, CHIP_TQ_REINIT); + taskqueue_enqueue(sc->chip_tq, &sc->chip_tq_task); + } } return; } Modified: stable/9/sys/dev/bxe/ecore_reg.h ============================================================================== --- stable/9/sys/dev/bxe/ecore_reg.h Fri Sep 12 17:32:28 2014 (r271475) +++ stable/9/sys/dev/bxe/ecore_reg.h Fri Sep 12 18:20:35 2014 (r271476) @@ -1039,6 +1039,8 @@ __FBSDID("$FreeBSD$"); 0x942cUL #define PGLUE_B_REG_INTERNAL_PFID_ENABLE_TARGET_READ \ 0x9430UL +#define PGLUE_B_REG_LATCHED_ERRORS_CLR \ + 0x943CUL #define PGLUE_B_REG_PGLUE_B_INT_STS \ 0x9298UL #define PGLUE_B_REG_PGLUE_B_INT_STS_CLR \ Modified: stable/9/sys/dev/bxe/ecore_sp.h ============================================================================== --- stable/9/sys/dev/bxe/ecore_sp.h Fri Sep 12 17:32:28 2014 (r271475) +++ stable/9/sys/dev/bxe/ecore_sp.h Fri Sep 12 18:20:35 2014 (r271476) @@ -223,6 +223,8 @@ ECORE_CRC32_LE(uint32_t seed, uint8_t *m #define ecore_sp_post(_sc, _a, _b, _c, _d) \ bxe_sp_post(_sc, _a, _b, U64_HI(_c), U64_LO(_c), _d) +#ifdef ECORE_STOP_ON_ERROR + #define ECORE_DBG_BREAK_IF(exp) \ do { \ if (__predict_false(exp)) { \ @@ -242,6 +244,20 @@ ECORE_CRC32_LE(uint32_t seed, uint8_t *m } \ } while (0) +#else + +#define ECORE_DBG_BREAK_IF(exp) \ + printf("%s (%s,%d)\n", __FUNCTION__, __FILE__, __LINE__); + +#define ECORE_BUG(exp) \ + printf("%s (%s,%d)\n", __FUNCTION__, __FILE__, __LINE__); + +#define ECORE_BUG_ON(exp) \ + printf("%s (%s,%d)\n", __FUNCTION__, __FILE__, __LINE__); + + +#endif /* #ifdef ECORE_STOP_ON_ERROR */ + #define ECORE_ERR(str, ...) \ BLOGE(sc, "ECORE: " str, ##__VA_ARGS__) From bz at FreeBSD.org Sat Sep 13 13:36:18 2014 From: bz at FreeBSD.org (Bjoern A. Zeeb) Date: Sat, 13 Sep 2014 13:36:18 +0000 (UTC) Subject: svn commit: r271508 - stable/9/sbin/mount_nfs Message-ID: <201409131336.s8DDaIWW023382@svn.freebsd.org> Author: bz Date: Sat Sep 13 13:36:17 2014 New Revision: 271508 URL: http://svnweb.freebsd.org/changeset/base/271508 Log: MFC r269583: Provide -o vers= support for mount_nfs. Our mount_nfs does use -o nfsv<2|3|4> or -2 or -3 to specify the version. OSX (these days), Solaris, and Linux use -o vers=<2,3,4>. With the upcoming autofs support we can make a lot of (entrerprisy) setups getting mount options from LDAP just work by providing -o vers= compatibility. Reviewed by: wblock, bjk (man page), rmacklem, emaste Sponsored by: DARPA,AFRL PR: 192379 Modified: stable/9/sbin/mount_nfs/mount_nfs.8 stable/9/sbin/mount_nfs/mount_nfs.c Directory Properties: stable/9/sbin/mount_nfs/ (props changed) Modified: stable/9/sbin/mount_nfs/mount_nfs.8 ============================================================================== --- stable/9/sbin/mount_nfs/mount_nfs.8 Sat Sep 13 10:34:23 2014 (r271507) +++ stable/9/sbin/mount_nfs/mount_nfs.8 Sat Sep 13 13:36:17 2014 (r271508) @@ -28,7 +28,7 @@ .\" @(#)mount_nfs.8 8.3 (Berkeley) 3/29/95 .\" $FreeBSD$ .\" -.Dd December 7, 2013 +.Dd August 5, 2014 .Dt MOUNT_NFS 8 .Os .Sh NAME @@ -335,6 +335,14 @@ tune the timeout interval.) .It Cm udp Use UDP transport. +.It Cm vers Ns = Ns Aq Ar vers_number +Use the specified version number for NFS requests. +See the +.Cm nfsv2 , +.Cm nfsv3 , +and +.Cm nfsv4 +options for details. .It Cm wcommitsize Ns = Ns Aq Ar value Set the maximum pending write commit size to the specified value. This determines the maximum amount of pending write data that the NFS @@ -430,6 +438,26 @@ Same as Same as .Fl o Cm retrans Ns = Ns Aq Ar value .El +.Pp +The following +.Fl o +named options are equivalent to other +.Fl o +named options and are supported for compatibility with other +operating systems (e.g., Linux, Solaris, and OSX) to ease usage of +.Xr autofs 5 +support. +.Bl -tag -width indent +.It Fl o Cm vers Ns = Ns 2 +Same as +.Fl o Cm nfsv2 +.It Fl o Cm vers Ns = Ns 3 +Same as +.Fl o Cm nfsv3 +.It Fl o Cm vers Ns = Ns 4 +Same as +.Fl o Cm nfsv4 +.El .Sh SEE ALSO .Xr nmount 2 , .Xr unmount 2 , Modified: stable/9/sbin/mount_nfs/mount_nfs.c ============================================================================== --- stable/9/sbin/mount_nfs/mount_nfs.c Sat Sep 13 10:34:23 2014 (r271507) +++ stable/9/sbin/mount_nfs/mount_nfs.c Sat Sep 13 13:36:17 2014 (r271508) @@ -311,6 +311,32 @@ main(int argc, char *argv[]) if (*p || num <= 0) errx(1, "illegal maxgroups value -- %s", val); //set_rpc_maxgrouplist(num); + } else if (strcmp(opt, "vers") == 0) { + num = strtol(val, &p, 10); + if (*p || num <= 0) + errx(1, "illegal vers value -- " + "%s", val); + switch (num) { + case 2: + mountmode = V2; + break; + case 3: + mountmode = V3; + build_iovec(&iov, &iovlen, + "nfsv3", NULL, 0); + break; + case 4: + mountmode = V4; + fstype = "nfs"; + nfsproto = IPPROTO_TCP; + if (portspec == NULL) + portspec = "2049"; + break; + default: + errx(1, "illegal nfs version " + "value -- %s", val); + } + pass_flag_to_nmount=0; } if (pass_flag_to_nmount) build_iovec(&iov, &iovlen, opt, val, From mav at FreeBSD.org Sat Sep 13 15:20:50 2014 From: mav at FreeBSD.org (Alexander Motin) Date: Sat, 13 Sep 2014 15:20:50 +0000 (UTC) Subject: svn commit: r271513 - stable/9/sys/dev/sound/pcm Message-ID: <201409131520.s8DFKoqB078538@svn.freebsd.org> Author: mav Date: Sat Sep 13 15:20:49 2014 New Revision: 271513 URL: http://svnweb.freebsd.org/changeset/base/271513 Log: MFC r269228: Add support for SOUND_MIXER_INFO IOCTL, used by gstreamer. Submitted by: Dmitry Luhtionov Modified: stable/9/sys/dev/sound/pcm/mixer.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/sound/pcm/mixer.c ============================================================================== --- stable/9/sys/dev/sound/pcm/mixer.c Sat Sep 13 15:05:10 2014 (r271512) +++ stable/9/sys/dev/sound/pcm/mixer.c Sat Sep 13 15:20:49 2014 (r271513) @@ -1222,6 +1222,15 @@ mixer_ioctl(struct cdev *i_dev, u_long c return (ret); } +static void +mixer_mixerinfo(struct snd_mixer *m, mixer_info *mi) +{ + bzero((void *)mi, sizeof(*mi)); + strlcpy(mi->id, m->name, sizeof(mi->id)); + strlcpy(mi->name, device_get_desc(m->dev), sizeof(mi->name)); + mi->modify_counter = m->modify_counter; +} + /* * XXX Make sure you can guarantee concurrency safety before calling this * function, be it through Giant, PCM_*, etc ! @@ -1280,6 +1289,10 @@ mixer_ioctl_cmd(struct cdev *i_dev, u_lo *arg_i = SOUND_VERSION; ret = 0; goto done; + case SOUND_MIXER_INFO: + mixer_mixerinfo(m, (mixer_info *)arg); + ret = 0; + goto done; } if ((cmd & ~0xff) == MIXER_WRITE(0)) { if (j == SOUND_MIXER_RECSRC) From mav at FreeBSD.org Sat Sep 13 16:07:44 2014 From: mav at FreeBSD.org (Alexander Motin) Date: Sat, 13 Sep 2014 16:07:43 +0000 (UTC) Subject: svn commit: r271525 - in stable/9/sys/dev: ahci usb/wlan Message-ID: <201409131607.s8DG7hgX099574@svn.freebsd.org> Author: mav Date: Sat Sep 13 16:07:43 2014 New Revision: 271525 URL: http://svnweb.freebsd.org/changeset/base/271525 Log: MFC r271163, r271196: Invert AHCI_Q_NOBSYRES quirk meaning, waiting for readiness by default. I gave up to update list of Marvell chips that require this quirk. The final nail was growing number of PCIe/M.2 SSDs where Marvell chips have PCI IDs of different vendors. Modified: stable/9/sys/dev/ahci/ahci.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/forth/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/i386/gptboot/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/dev/run/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/dev/e1000/ (props changed) stable/9/sys/dev/isp/ (props changed) stable/9/sys/dev/ixgbe/ (props changed) stable/9/sys/dev/puc/ (props changed) stable/9/sys/dev/usb/wlan/if_run.c (props changed) stable/9/sys/dev/usb/wlan/if_runreg.h (props changed) stable/9/sys/fs/ (props changed) stable/9/sys/fs/ntfs/ (props changed) stable/9/sys/modules/ (props changed) stable/9/sys/modules/ixgbe/ (props changed) stable/9/sys/modules/svr4/ (props changed) stable/9/sys/net/ (props changed) stable/9/sys/netpfil/ (props changed) stable/9/sys/sys/ (props changed) Modified: stable/9/sys/dev/ahci/ahci.c ============================================================================== --- stable/9/sys/dev/ahci/ahci.c Sat Sep 13 16:04:55 2014 (r271524) +++ stable/9/sys/dev/ahci/ahci.c Sat Sep 13 16:07:43 2014 (r271525) @@ -261,31 +261,31 @@ static struct { AHCI_Q_EDGEIS | AHCI_Q_NONCQ | AHCI_Q_NOCOUNT}, {0x614511ab, 0x00, "Marvell 88SE6145", AHCI_Q_NOFORCE | AHCI_Q_4CH | AHCI_Q_EDGEIS | AHCI_Q_NONCQ | AHCI_Q_NOCOUNT}, - {0x91201b4b, 0x00, "Marvell 88SE912x", AHCI_Q_EDGEIS|AHCI_Q_NOBSYRES}, - {0x91231b4b, 0x11, "Marvell 88SE912x", AHCI_Q_NOBSYRES|AHCI_Q_ALTSIG}, - {0x91231b4b, 0x00, "Marvell 88SE912x", AHCI_Q_EDGEIS|AHCI_Q_SATA2|AHCI_Q_NOBSYRES}, - {0x91251b4b, 0x00, "Marvell 88SE9125", AHCI_Q_NOBSYRES}, - {0x91281b4b, 0x00, "Marvell 88SE9128", AHCI_Q_NOBSYRES|AHCI_Q_ALTSIG}, - {0x91301b4b, 0x00, "Marvell 88SE9130", AHCI_Q_NOBSYRES|AHCI_Q_ALTSIG}, - {0x91721b4b, 0x00, "Marvell 88SE9172", AHCI_Q_NOBSYRES}, - {0x91821b4b, 0x00, "Marvell 88SE9182", AHCI_Q_NOBSYRES}, - {0x91831b4b, 0x00, "Marvell 88SS9183", AHCI_Q_NOBSYRES}, - {0x91a01b4b, 0x00, "Marvell 88SE91Ax", AHCI_Q_NOBSYRES}, - {0x92151b4b, 0x00, "Marvell 88SE9215", AHCI_Q_NOBSYRES}, - {0x92201b4b, 0x00, "Marvell 88SE9220", AHCI_Q_NOBSYRES|AHCI_Q_ALTSIG}, - {0x92301b4b, 0x00, "Marvell 88SE9230", AHCI_Q_NOBSYRES|AHCI_Q_ALTSIG}, - {0x92351b4b, 0x00, "Marvell 88SE9235", AHCI_Q_NOBSYRES}, - {0x06201103, 0x00, "HighPoint RocketRAID 620", AHCI_Q_NOBSYRES}, - {0x06201b4b, 0x00, "HighPoint RocketRAID 620", AHCI_Q_NOBSYRES}, - {0x06221103, 0x00, "HighPoint RocketRAID 622", AHCI_Q_NOBSYRES}, - {0x06221b4b, 0x00, "HighPoint RocketRAID 622", AHCI_Q_NOBSYRES}, - {0x06401103, 0x00, "HighPoint RocketRAID 640", AHCI_Q_NOBSYRES}, - {0x06401b4b, 0x00, "HighPoint RocketRAID 640", AHCI_Q_NOBSYRES}, - {0x06441103, 0x00, "HighPoint RocketRAID 644", AHCI_Q_NOBSYRES}, - {0x06441b4b, 0x00, "HighPoint RocketRAID 644", AHCI_Q_NOBSYRES}, - {0x06411103, 0x00, "HighPoint RocketRAID 640L", AHCI_Q_NOBSYRES}, - {0x06421103, 0x00, "HighPoint RocketRAID 642L", AHCI_Q_NOBSYRES}, - {0x06451103, 0x00, "HighPoint RocketRAID 644L", AHCI_Q_NOBSYRES}, + {0x91201b4b, 0x00, "Marvell 88SE912x", AHCI_Q_EDGEIS}, + {0x91231b4b, 0x11, "Marvell 88SE912x", AHCI_Q_ALTSIG}, + {0x91231b4b, 0x00, "Marvell 88SE912x", AHCI_Q_EDGEIS|AHCI_Q_SATA2}, + {0x91251b4b, 0x00, "Marvell 88SE9125", 0}, + {0x91281b4b, 0x00, "Marvell 88SE9128", AHCI_Q_ALTSIG}, + {0x91301b4b, 0x00, "Marvell 88SE9130", AHCI_Q_ALTSIG}, + {0x91721b4b, 0x00, "Marvell 88SE9172", 0}, + {0x91821b4b, 0x00, "Marvell 88SE9182", 0}, + {0x91831b4b, 0x00, "Marvell 88SS9183", 0}, + {0x91a01b4b, 0x00, "Marvell 88SE91Ax", 0}, + {0x92151b4b, 0x00, "Marvell 88SE9215", 0}, + {0x92201b4b, 0x00, "Marvell 88SE9220", AHCI_Q_ALTSIG}, + {0x92301b4b, 0x00, "Marvell 88SE9230", AHCI_Q_ALTSIG}, + {0x92351b4b, 0x00, "Marvell 88SE9235", 0}, + {0x06201103, 0x00, "HighPoint RocketRAID 620", 0}, + {0x06201b4b, 0x00, "HighPoint RocketRAID 620", 0}, + {0x06221103, 0x00, "HighPoint RocketRAID 622", 0}, + {0x06221b4b, 0x00, "HighPoint RocketRAID 622", 0}, + {0x06401103, 0x00, "HighPoint RocketRAID 640", 0}, + {0x06401b4b, 0x00, "HighPoint RocketRAID 640", 0}, + {0x06441103, 0x00, "HighPoint RocketRAID 644", 0}, + {0x06441b4b, 0x00, "HighPoint RocketRAID 644", 0}, + {0x06411103, 0x00, "HighPoint RocketRAID 640L", 0}, + {0x06421103, 0x00, "HighPoint RocketRAID 642L", 0}, + {0x06451103, 0x00, "HighPoint RocketRAID 644L", 0}, {0x044c10de, 0x00, "NVIDIA MCP65", AHCI_Q_NOAA}, {0x044d10de, 0x00, "NVIDIA MCP65", AHCI_Q_NOAA}, {0x044e10de, 0x00, "NVIDIA MCP65", AHCI_Q_NOAA}, @@ -487,10 +487,9 @@ ahci_attach(device_t dev) ctlr->ichannels = ATA_INL(ctlr->r_mem, AHCI_PI); /* Identify and set separate quirks for HBA and RAID f/w Marvells. */ - if ((ctlr->quirks & AHCI_Q_NOBSYRES) && - (ctlr->quirks & AHCI_Q_ALTSIG) && + if ((ctlr->quirks & AHCI_Q_ALTSIG) && (ctlr->caps & AHCI_CAP_SPM) == 0) - ctlr->quirks &= ~AHCI_Q_NOBSYRES; + ctlr->quirks |= AHCI_Q_NOBSYRES; if (ctlr->quirks & AHCI_Q_1CH) { ctlr->caps &= ~AHCI_CAP_NPMASK; @@ -1972,9 +1971,15 @@ ahci_execute_transaction(struct ahci_slo } } - /* Marvell controllers do not wait for readyness. */ - if ((ch->quirks & AHCI_Q_NOBSYRES) && softreset == 2 && - et == AHCI_ERR_NONE) { + /* + * Marvell HBAs with non-RAID firmware do not wait for + * readiness after soft reset, so we have to wait here. + * Marvell RAIDs do not have this problem, but instead + * sometimes forget to update FIS receive area, breaking + * this wait. + */ + if ((ch->quirks & AHCI_Q_NOBSYRES) == 0 && + softreset == 2 && et == AHCI_ERR_NONE) { while ((val = fis[2]) & ATA_S_BUSY) { DELAY(10); if (count++ >= timeout) From mav at FreeBSD.org Sat Sep 13 17:14:02 2014 From: mav at FreeBSD.org (Alexander Motin) Date: Sat, 13 Sep 2014 17:14:02 +0000 (UTC) Subject: svn commit: r271531 - stable/9/sys/cam/scsi Message-ID: <201409131714.s8DHE2o1032463@svn.freebsd.org> Author: mav Date: Sat Sep 13 17:14:01 2014 New Revision: 271531 URL: http://svnweb.freebsd.org/changeset/base/271531 Log: MFC r271407: Extend UNMAP blacklist on all STEC SSD models. None of existing STEC devices need UNMAP or even support it well, having many limitations and even hanging sometimes executing those commands. New devices that may use UNMAP going to be released under HGST name. Modified: stable/9/sys/cam/scsi/scsi_da.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/cam/scsi/scsi_da.c ============================================================================== --- stable/9/sys/cam/scsi/scsi_da.c Sat Sep 13 17:13:04 2014 (r271530) +++ stable/9/sys/cam/scsi/scsi_da.c Sat Sep 13 17:14:01 2014 (r271531) @@ -355,9 +355,9 @@ static struct da_quirk_entry da_quirk_ta }, { /* - * The STEC 842 sometimes hang on UNMAP. + * The STEC SSDs sometimes hang on UNMAP. */ - {T_DIRECT, SIP_MEDIA_FIXED, "STEC", "S842E800M2", "*"}, + {T_DIRECT, SIP_MEDIA_FIXED, "STEC", "*", "*"}, /*quirks*/ DA_Q_NO_UNMAP }, /* USB mass storage devices supported by umass(4) */ From pfg at FreeBSD.org Sat Sep 13 18:34:57 2014 From: pfg at FreeBSD.org (Pedro F. Giffuni) Date: Sat, 13 Sep 2014 18:34:57 +0000 (UTC) Subject: svn commit: r271542 - in stable/9/sys: amd64/amd64 i386/i386 Message-ID: <201409131834.s8DIYv85074052@svn.freebsd.org> Author: pfg Date: Sat Sep 13 18:34:56 2014 New Revision: 271542 URL: http://svnweb.freebsd.org/changeset/base/271542 Log: MFC r271149: Apply known workarounds for less modern MacBooks. The legacy USB circuit tends to give trouble on older MacBooks. While the original report covered MacBook4, extend the fix preemptively for the newer MacBookPro4 too. PR: 191693 Reviewed by: emaste Modified: stable/9/sys/amd64/amd64/machdep.c stable/9/sys/i386/i386/machdep.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/amd64/amd64/machdep.c ============================================================================== --- stable/9/sys/amd64/amd64/machdep.c Sat Sep 13 18:27:47 2014 (r271541) +++ stable/9/sys/amd64/amd64/machdep.c Sat Sep 13 18:34:56 2014 (r271542) @@ -230,9 +230,11 @@ cpu_startup(dummy) if (sysenv != NULL) { if (strncmp(sysenv, "MacBook1,1", 10) == 0 || strncmp(sysenv, "MacBook3,1", 10) == 0 || + strncmp(sysenv, "MacBook4,1", 10) == 0 || strncmp(sysenv, "MacBookPro1,1", 13) == 0 || strncmp(sysenv, "MacBookPro1,2", 13) == 0 || strncmp(sysenv, "MacBookPro3,1", 13) == 0 || + strncmp(sysenv, "MacBookPro4,1", 13) == 0 || strncmp(sysenv, "Macmini1,1", 10) == 0) { if (bootverbose) printf("Disabling LEGACY_USB_EN bit on " Modified: stable/9/sys/i386/i386/machdep.c ============================================================================== --- stable/9/sys/i386/i386/machdep.c Sat Sep 13 18:27:47 2014 (r271541) +++ stable/9/sys/i386/i386/machdep.c Sat Sep 13 18:34:56 2014 (r271542) @@ -269,9 +269,11 @@ cpu_startup(dummy) if (sysenv != NULL) { if (strncmp(sysenv, "MacBook1,1", 10) == 0 || strncmp(sysenv, "MacBook3,1", 10) == 0 || + strncmp(sysenv, "MacBook4,1", 10) == 0 || strncmp(sysenv, "MacBookPro1,1", 13) == 0 || strncmp(sysenv, "MacBookPro1,2", 13) == 0 || strncmp(sysenv, "MacBookPro3,1", 13) == 0 || + strncmp(sysenv, "MacBookPro4,1", 13) == 0 || strncmp(sysenv, "Macmini1,1", 10) == 0) { if (bootverbose) printf("Disabling LEGACY_USB_EN bit on " From wblock at FreeBSD.org Sun Sep 14 03:01:19 2014 From: wblock at FreeBSD.org (Warren Block) Date: Sun, 14 Sep 2014 03:01:18 +0000 (UTC) Subject: svn commit: r271569 - stable/9/etc Message-ID: <201409140301.s8E31IMm019530@svn.freebsd.org> Author: wblock (doc committer) Date: Sun Sep 14 03:01:18 2014 New Revision: 271569 URL: http://svnweb.freebsd.org/changeset/base/271569 Log: MFC r271434: Update motd, clarifying the information and adding pointers to other resources. Modified: stable/9/etc/motd Directory Properties: stable/9/etc/ (props changed) Modified: stable/9/etc/motd ============================================================================== --- stable/9/etc/motd Sun Sep 14 02:55:17 2014 (r271568) +++ stable/9/etc/motd Sun Sep 14 03:01:18 2014 (r271569) @@ -1,25 +1,21 @@ FreeBSD ?.?.? (UNKNOWN) -Welcome to FreeBSD! +Welcome to FreeBSD! Handy technical support resources: -Before seeking technical support, please use the following resources: +Security advisories and errata: https://www.FreeBSD.org/releases/ +Handbook: https://www.FreeBSD.org/handbook/ +FAQ: https://www.FreeBSD.org/faq/ +Mailing list: https://lists.FreeBSD.org/mailman/listinfo/freebsd-questions/ +Forums: https://forums.FreeBSD.org/ + +Documents installed with the system are in the /usr/local/share/doc/freebsd/ +directory, or can be installed later with: pkg install en-freebsd-doc +For other languages, replace "en" with a language code like de or fr. -o Security advisories and updated errata information for all releases are - at http://www.FreeBSD.org/releases/ - always consult the ERRATA section - for your release first as it's updated frequently. - -o The Handbook and FAQ documents are at http://www.FreeBSD.org/ and, - along with the mailing lists, can be searched by going to - http://www.FreeBSD.org/search/. If the doc package has been installed - (or fetched via pkg_add -r lang-freebsd-doc, where lang is the - 2-letter language code, e.g. en), they are also available formatted - in /usr/local/share/doc/freebsd. - -If you still have a question or problem, please take the output of -`uname -a', along with any relevant error messages, and email it -as a question to the questions at FreeBSD.org mailing list. If you are -unfamiliar with FreeBSD's directory layout, please refer to the hier(7) -manual page. If you are not familiar with manual pages, type `man man'. +Show the version of FreeBSD installed: uname -a +Please include that output and any error messages when posting questions. -Edit /etc/motd to change this login announcement. +Introduction to manual pages: man man +FreeBSD directory layout: man hier +Edit /etc/motd to change this login announcement. From brueffer at FreeBSD.org Mon Sep 15 12:44:45 2014 From: brueffer at FreeBSD.org (Christian Brueffer) Date: Mon, 15 Sep 2014 12:44:44 +0000 (UTC) Subject: svn commit: r271621 - stable/9/sys/dev/ixgbe Message-ID: <201409151244.s8FCiiqE071632@svn.freebsd.org> Author: brueffer Date: Mon Sep 15 12:44:44 2014 New Revision: 271621 URL: http://svnweb.freebsd.org/changeset/base/271621 Log: MFC: r271286 Use the right constants in comparisons. This is currently a nop, as MIN_RXD == MIN_TXD and MAX_RXD == MAX_TXD. Reviewed by: Eric Joyner @ Intel Approved by: re (kib) Modified: stable/9/sys/dev/ixgbe/ixgbe.c stable/9/sys/dev/ixgbe/ixv.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/dev/ixgbe/ (props changed) Modified: stable/9/sys/dev/ixgbe/ixgbe.c ============================================================================== --- stable/9/sys/dev/ixgbe/ixgbe.c Mon Sep 15 12:36:40 2014 (r271620) +++ stable/9/sys/dev/ixgbe/ixgbe.c Mon Sep 15 12:44:44 2014 (r271621) @@ -517,7 +517,7 @@ ixgbe_attach(device_t dev) } if (((ixgbe_rxd * sizeof(union ixgbe_adv_rx_desc)) % DBA_ALIGN) != 0 || - ixgbe_rxd < MIN_TXD || ixgbe_rxd > MAX_TXD) { + ixgbe_rxd < MIN_RXD || ixgbe_rxd > MAX_RXD) { device_printf(dev, "RXD config issue, using default!\n"); adapter->num_rx_desc = DEFAULT_RXD; } else Modified: stable/9/sys/dev/ixgbe/ixv.c ============================================================================== --- stable/9/sys/dev/ixgbe/ixv.c Mon Sep 15 12:36:40 2014 (r271620) +++ stable/9/sys/dev/ixgbe/ixv.c Mon Sep 15 12:44:44 2014 (r271621) @@ -347,7 +347,7 @@ ixv_attach(device_t dev) adapter->num_tx_desc = ixv_txd; if (((ixv_rxd * sizeof(union ixgbe_adv_rx_desc)) % DBA_ALIGN) != 0 || - ixv_rxd < MIN_TXD || ixv_rxd > MAX_TXD) { + ixv_rxd < MIN_RXD || ixv_rxd > MAX_RXD) { device_printf(dev, "RXD config issue, using default!\n"); adapter->num_rx_desc = DEFAULT_RXD; } else From brueffer at FreeBSD.org Mon Sep 15 12:54:23 2014 From: brueffer at FreeBSD.org (Christian Brueffer) Date: Mon, 15 Sep 2014 14:54:12 +0200 Subject: svn commit: r271621 - stable/9/sys/dev/ixgbe In-Reply-To: <201409151244.s8FCiiqE071632@svn.freebsd.org> References: <201409151244.s8FCiiqE071632@svn.freebsd.org> Message-ID: <5416E174.5040409@FreeBSD.org> Not approved by RE of course, since stable/9 is open. Chris On 2014-09-15 14:44, Christian Brueffer wrote: > Author: brueffer > Date: Mon Sep 15 12:44:44 2014 > New Revision: 271621 > URL: http://svnweb.freebsd.org/changeset/base/271621 > > Log: > MFC: r271286 > > Use the right constants in comparisons. This is currently a nop, as > MIN_RXD == MIN_TXD and MAX_RXD == MAX_TXD. > > Reviewed by: Eric Joyner @ Intel > Approved by: re (kib) > > Modified: > stable/9/sys/dev/ixgbe/ixgbe.c > stable/9/sys/dev/ixgbe/ixv.c > Directory Properties: > stable/9/sys/ (props changed) > stable/9/sys/dev/ (props changed) > stable/9/sys/dev/ixgbe/ (props changed) > > Modified: stable/9/sys/dev/ixgbe/ixgbe.c > ============================================================================== > --- stable/9/sys/dev/ixgbe/ixgbe.c Mon Sep 15 12:36:40 2014 (r271620) > +++ stable/9/sys/dev/ixgbe/ixgbe.c Mon Sep 15 12:44:44 2014 (r271621) > @@ -517,7 +517,7 @@ ixgbe_attach(device_t dev) > } > > if (((ixgbe_rxd * sizeof(union ixgbe_adv_rx_desc)) % DBA_ALIGN) != 0 || > - ixgbe_rxd < MIN_TXD || ixgbe_rxd > MAX_TXD) { > + ixgbe_rxd < MIN_RXD || ixgbe_rxd > MAX_RXD) { > device_printf(dev, "RXD config issue, using default!\n"); > adapter->num_rx_desc = DEFAULT_RXD; > } else > > Modified: stable/9/sys/dev/ixgbe/ixv.c > ============================================================================== > --- stable/9/sys/dev/ixgbe/ixv.c Mon Sep 15 12:36:40 2014 (r271620) > +++ stable/9/sys/dev/ixgbe/ixv.c Mon Sep 15 12:44:44 2014 (r271621) > @@ -347,7 +347,7 @@ ixv_attach(device_t dev) > adapter->num_tx_desc = ixv_txd; > > if (((ixv_rxd * sizeof(union ixgbe_adv_rx_desc)) % DBA_ALIGN) != 0 || > - ixv_rxd < MIN_TXD || ixv_rxd > MAX_TXD) { > + ixv_rxd < MIN_RXD || ixv_rxd > MAX_RXD) { > device_printf(dev, "RXD config issue, using default!\n"); > adapter->num_rx_desc = DEFAULT_RXD; > } else > From lstewart at FreeBSD.org Tue Sep 16 00:04:39 2014 From: lstewart at FreeBSD.org (Lawrence Stewart) Date: Tue, 16 Sep 2014 00:04:39 +0000 (UTC) Subject: svn commit: r271653 - stable/9/sys/netinet/cc Message-ID: <201409160004.s8G04d8D093978@svn.freebsd.org> Author: lstewart Date: Tue Sep 16 00:04:38 2014 New Revision: 271653 URL: http://svnweb.freebsd.org/changeset/base/271653 Log: MFC r270160: Destroy the "qdiffsample_zone" UMA zone on unload to avoid a use-after-unload panic easily triggered by running "sysctl -a" after unload. Reported and tested by: Grenville Armitage Modified: stable/9/sys/netinet/cc/cc_cdg.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/cc/cc_cdg.c ============================================================================== --- stable/9/sys/netinet/cc/cc_cdg.c Mon Sep 15 23:43:01 2014 (r271652) +++ stable/9/sys/netinet/cc/cc_cdg.c Tue Sep 16 00:04:38 2014 (r271653) @@ -226,6 +226,7 @@ static VNET_DEFINE(uint32_t, cdg_hold_ba /* Function prototypes. */ static int cdg_mod_init(void); +static int cdg_mod_destroy(void); static void cdg_conn_init(struct cc_var *ccv); static int cdg_cb_init(struct cc_var *ccv); static void cdg_cb_destroy(struct cc_var *ccv); @@ -239,7 +240,8 @@ struct cc_algo cdg_cc_algo = { .cb_destroy = cdg_cb_destroy, .cb_init = cdg_cb_init, .conn_init = cdg_conn_init, - .cong_signal = cdg_cong_signal + .cong_signal = cdg_cong_signal, + .mod_destroy = cdg_mod_destroy }; /* Vnet created and being initialised. */ @@ -283,6 +285,14 @@ cdg_mod_init(void) } static int +cdg_mod_destroy(void) +{ + + uma_zdestroy(qdiffsample_zone); + return (0); +} + +static int cdg_cb_init(struct cc_var *ccv) { struct cdg *cdg_data; From delphij at FreeBSD.org Tue Sep 16 09:49:12 2014 From: delphij at FreeBSD.org (Xin LI) Date: Tue, 16 Sep 2014 09:49:12 +0000 (UTC) Subject: svn commit: r271668 - in stable: 8/sys/netinet 9/sys/netinet Message-ID: <201409160949.s8G9nCV3062942@svn.freebsd.org> Author: delphij Date: Tue Sep 16 09:49:11 2014 New Revision: 271668 URL: http://svnweb.freebsd.org/changeset/base/271668 Log: Fix Denial of Service in TCP packet processing. Security: FreeBSD-SA-14:19.tcp Modified: stable/9/sys/netinet/tcp_input.c Changes in other areas also in this revision: Modified: stable/8/sys/netinet/tcp_input.c Modified: stable/9/sys/netinet/tcp_input.c ============================================================================== --- stable/9/sys/netinet/tcp_input.c Tue Sep 16 09:48:35 2014 (r271667) +++ stable/9/sys/netinet/tcp_input.c Tue Sep 16 09:49:11 2014 (r271668) @@ -2184,11 +2184,7 @@ tcp_do_segment(struct mbuf *m, struct tc todrop = tp->rcv_nxt - th->th_seq; if (todrop > 0) { - /* - * If this is a duplicate SYN for our current connection, - * advance over it and pretend and it's not a SYN. - */ - if (thflags & TH_SYN && th->th_seq == tp->irs) { + if (thflags & TH_SYN) { thflags &= ~TH_SYN; th->th_seq++; if (th->th_urp > 1) From gjb at FreeBSD.org Tue Sep 16 19:20:08 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Tue, 16 Sep 2014 19:20:07 +0000 (UTC) Subject: svn commit: r271686 - head/sys/sys stable/10/sys/sys stable/8/sys/sys stable/9/sys/sys Message-ID: <201409161920.s8GJK7aS036468@svn.freebsd.org> Author: gjb Date: Tue Sep 16 19:20:06 2014 New Revision: 271686 URL: http://svnweb.freebsd.org/changeset/base/271686 Log: Bump __FreeBSD_version after SA-14:19.tcp Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/9/sys/sys/param.h Changes in other areas also in this revision: Modified: head/sys/sys/param.h stable/10/sys/sys/param.h stable/8/sys/sys/param.h Modified: stable/9/sys/sys/param.h ============================================================================== --- stable/9/sys/sys/param.h Tue Sep 16 19:08:54 2014 (r271685) +++ stable/9/sys/sys/param.h Tue Sep 16 19:20:06 2014 (r271686) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 903503 /* Master, propagated to newvers */ +#define __FreeBSD_version 903504 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From gjb at FreeBSD.org Tue Sep 16 19:25:28 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Tue, 16 Sep 2014 19:25:28 +0000 (UTC) Subject: svn commit: r271687 - in stable: 10/release/doc/en_US.ISO8859-1/errata 9/release/doc/en_US.ISO8859-1/errata Message-ID: <201409161925.s8GJPSl4040580@svn.freebsd.org> Author: gjb Date: Tue Sep 16 19:25:27 2014 New Revision: 271687 URL: http://svnweb.freebsd.org/changeset/base/271687 Log: Document SA-14:19 Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/errata/article.xml Changes in other areas also in this revision: Modified: stable/10/release/doc/en_US.ISO8859-1/errata/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/errata/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/errata/article.xml Tue Sep 16 19:20:06 2014 (r271686) +++ stable/9/release/doc/en_US.ISO8859-1/errata/article.xml Tue Sep 16 19:25:27 2014 (r271687) @@ -105,6 +105,13 @@ 9 September 2014 Multiple vulnerabilities + + + SA-14:19.tcp + 16 September 2014 + Denial of Service in TCP packet + processing. + From mav at FreeBSD.org Wed Sep 17 14:07:41 2014 From: mav at FreeBSD.org (Alexander Motin) Date: Wed, 17 Sep 2014 14:07:41 +0000 (UTC) Subject: svn commit: r271708 - stable/9/sys/kern Message-ID: <201409171407.s8HE7f1N071682@svn.freebsd.org> Author: mav Date: Wed Sep 17 14:07:40 2014 New Revision: 271708 URL: http://svnweb.freebsd.org/changeset/base/271708 Log: MFC r271604, r271616: Add couple memory barriers to order tdq_cpu_idle and tdq_load accesses. This change fixes transient performance drops in some of my benchmarks, vanishing as soon as I am trying to collect any stats from the scheduler. It looks like reordered access to those variables sometimes caused loss of IPI_PREEMPT, that delayed thread execution until some later interrupt. Modified: stable/9/sys/kern/sched_ule.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/kern/sched_ule.c ============================================================================== --- stable/9/sys/kern/sched_ule.c Wed Sep 17 14:06:21 2014 (r271707) +++ stable/9/sys/kern/sched_ule.c Wed Sep 17 14:07:40 2014 (r271708) @@ -1006,6 +1006,14 @@ tdq_notify(struct tdq *tdq, struct threa ctd = pcpu_find(cpu)->pc_curthread; if (!sched_shouldpreempt(pri, ctd->td_priority, 1)) return; + + /* + * Make sure that tdq_load updated before calling this function + * is globally visible before we read tdq_cpu_idle. Idle thread + * accesses both of them without locks, and the order is important. + */ + mb(); + if (TD_IS_IDLETHREAD(ctd)) { /* * If the MD code has an idle wakeup routine try that before @@ -2607,6 +2615,12 @@ sched_idletd(void *dummy) /* Run main MD idle handler. */ tdq->tdq_cpu_idle = 1; + /* + * Make sure that tdq_cpu_idle update is globally visible + * before cpu_idle() read tdq_load. The order is important + * to avoid race with tdq_notify. + */ + mb(); cpu_idle(switchcnt * 4 > sched_idlespinthresh); tdq->tdq_cpu_idle = 0; From mav at FreeBSD.org Wed Sep 17 14:20:04 2014 From: mav at FreeBSD.org (Alexander Motin) Date: Wed, 17 Sep 2014 14:20:04 +0000 (UTC) Subject: svn commit: r271710 - in stable/9/sys/dev: ahci usb/wlan Message-ID: <201409171420.s8HEK4pr077241@svn.freebsd.org> Author: mav Date: Wed Sep 17 14:20:04 2014 New Revision: 271710 URL: http://svnweb.freebsd.org/changeset/base/271710 Log: MFC r271403: Add PCI ID for Promise TX8660 8-port 3Gbps HBA. This device reports RAID subclass, but appears to be AHCI compatible. Submitted by: Yuri Perejilin Modified: stable/9/sys/dev/ahci/ahci.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/forth/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/i386/gptboot/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/dev/run/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/dev/e1000/ (props changed) stable/9/sys/dev/isp/ (props changed) stable/9/sys/dev/ixgbe/ (props changed) stable/9/sys/dev/puc/ (props changed) stable/9/sys/dev/usb/wlan/if_run.c (props changed) stable/9/sys/dev/usb/wlan/if_runreg.h (props changed) stable/9/sys/fs/ (props changed) stable/9/sys/fs/ntfs/ (props changed) stable/9/sys/modules/ (props changed) stable/9/sys/modules/ixgbe/ (props changed) stable/9/sys/modules/svr4/ (props changed) stable/9/sys/net/ (props changed) stable/9/sys/netpfil/ (props changed) stable/9/sys/sys/ (props changed) Modified: stable/9/sys/dev/ahci/ahci.c ============================================================================== --- stable/9/sys/dev/ahci/ahci.c Wed Sep 17 14:17:39 2014 (r271709) +++ stable/9/sys/dev/ahci/ahci.c Wed Sep 17 14:20:04 2014 (r271710) @@ -355,6 +355,7 @@ static struct { {0x0d8d10de, 0x00, "NVIDIA MCP89", AHCI_Q_NOAA}, {0x0d8e10de, 0x00, "NVIDIA MCP89", AHCI_Q_NOAA}, {0x0d8f10de, 0x00, "NVIDIA MCP89", AHCI_Q_NOAA}, + {0x3781105a, 0x00, "Promise TX8660", 0}, {0x33491106, 0x00, "VIA VT8251", AHCI_Q_NOPMP|AHCI_Q_NONCQ}, {0x62871106, 0x00, "VIA VT8251", AHCI_Q_NOPMP|AHCI_Q_NONCQ}, {0x11841039, 0x00, "SiS 966", 0}, From jhb at FreeBSD.org Wed Sep 17 18:17:20 2014 From: jhb at FreeBSD.org (John Baldwin) Date: Wed, 17 Sep 2014 18:17:19 +0000 (UTC) Subject: svn commit: r271714 - in stable: 10/sys/dev/if_ndis 9/sys/dev/if_ndis Message-ID: <201409171817.s8HIHJR6091645@svn.freebsd.org> Author: jhb Date: Wed Sep 17 18:17:18 2014 New Revision: 271714 URL: http://svnweb.freebsd.org/changeset/base/271714 Log: MFC 270830: When anouncing link state changes on an 802.11 interface with a vap, announce the change on the vap's ifnet instead of the main ifnet. This matches the behavior of other wireless drivers in the tree and allows the default devd configuration to correctly start dhclient automatically after an ndis wireless device associates. Approved by: re (marius for 10) Modified: stable/9/sys/dev/if_ndis/if_ndis.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/dev/if_ndis/if_ndis.c Directory Properties: stable/10/ (props changed) Modified: stable/9/sys/dev/if_ndis/if_ndis.c ============================================================================== --- stable/9/sys/dev/if_ndis/if_ndis.c Wed Sep 17 17:43:32 2014 (r271713) +++ stable/9/sys/dev/if_ndis/if_ndis.c Wed Sep 17 18:17:18 2014 (r271714) @@ -1710,23 +1710,26 @@ ndis_ticktask(d, xsc) if (sc->ndis_link == 0 && sc->ndis_sts == NDIS_STATUS_MEDIA_CONNECT) { sc->ndis_link = 1; - NDIS_UNLOCK(sc); if ((sc->ndis_80211 != 0) && (vap != NULL)) { + NDIS_UNLOCK(sc); ndis_getstate_80211(sc); ieee80211_new_state(vap, IEEE80211_S_RUN, -1); - } - NDIS_LOCK(sc); - if_link_state_change(sc->ifp, LINK_STATE_UP); + NDIS_LOCK(sc); + if_link_state_change(vap->iv_ifp, LINK_STATE_UP); + } else + if_link_state_change(sc->ifp, LINK_STATE_UP); } if (sc->ndis_link == 1 && sc->ndis_sts == NDIS_STATUS_MEDIA_DISCONNECT) { sc->ndis_link = 0; - NDIS_UNLOCK(sc); - if ((sc->ndis_80211 != 0) && (vap != NULL)) + if ((sc->ndis_80211 != 0) && (vap != NULL)) { + NDIS_UNLOCK(sc); ieee80211_new_state(vap, IEEE80211_S_SCAN, 0); - NDIS_LOCK(sc); - if_link_state_change(sc->ifp, LINK_STATE_DOWN); + NDIS_LOCK(sc); + if_link_state_change(vap->iv_ifp, LINK_STATE_DOWN); + } else + if_link_state_change(sc->ifp, LINK_STATE_DOWN); } NDIS_UNLOCK(sc); From dim at FreeBSD.org Thu Sep 18 05:40:34 2014 From: dim at FreeBSD.org (Dimitry Andric) Date: Thu, 18 Sep 2014 05:40:33 +0000 (UTC) Subject: svn commit: r271737 - stable/9/contrib/llvm/lib/Target/X86 Message-ID: <201409180540.s8I5eXYF015555@svn.freebsd.org> Author: dim Date: Thu Sep 18 05:40:33 2014 New Revision: 271737 URL: http://svnweb.freebsd.org/changeset/base/271737 Log: MFC r271597: Pull in r217410 from upstream llvm trunk (by Bob Wilson): Set trunc store action to Expand for all X86 targets. When compiling without SSE2, isTruncStoreLegal(F64, F32) would return Legal, whereas with SSE2 it would return Expand. And since the Target doesn't seem to actually handle a truncstore for double -> float, it would just output a store of a full double in the space for a float hence overwriting other bits on the stack. Patch by Luqman Aden! This should fix clang -O0 on i386 assigning garbage to floats, in certain scenarios. PR: 187437 Submitted by: cebd at gmail.com Obtained from: http://llvm.org/viewvc/llvm-project?rev=217410&view=rev Modified: stable/9/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp Directory Properties: stable/9/contrib/llvm/ (props changed) Modified: stable/9/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp ============================================================================== --- stable/9/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp Thu Sep 18 03:11:59 2014 (r271736) +++ stable/9/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp Thu Sep 18 05:40:33 2014 (r271737) @@ -300,6 +300,8 @@ void X86TargetLowering::resetOperationAc setTruncStoreAction(MVT::i32, MVT::i8 , Expand); setTruncStoreAction(MVT::i16, MVT::i8, Expand); + setTruncStoreAction(MVT::f64, MVT::f32, Expand); + // SETOEQ and SETUNE require checking two conditions. setCondCodeAction(ISD::SETOEQ, MVT::f32, Expand); setCondCodeAction(ISD::SETOEQ, MVT::f64, Expand); @@ -1011,8 +1013,6 @@ void X86TargetLowering::resetOperationAc AddPromotedToType (ISD::SELECT, VT, MVT::v2i64); } - setTruncStoreAction(MVT::f64, MVT::f32, Expand); - // Custom lower v2i64 and v2f64 selects. setOperationAction(ISD::LOAD, MVT::v2f64, Legal); setOperationAction(ISD::LOAD, MVT::v2i64, Legal); From mav at FreeBSD.org Thu Sep 18 09:22:37 2014 From: mav at FreeBSD.org (Alexander Motin) Date: Thu, 18 Sep 2014 09:22:37 +0000 (UTC) Subject: svn commit: r271749 - stable/9/sys/cam/scsi Message-ID: <201409180922.s8I9MbgX020731@svn.freebsd.org> Author: mav Date: Thu Sep 18 09:22:37 2014 New Revision: 271749 URL: http://svnweb.freebsd.org/changeset/base/271749 Log: MFC r271644: Add quirks to disable READ CAPACITY (16) for PNY USB 3.0 Flash Drives. Submitted by: Sean Fagan Modified: stable/9/sys/cam/scsi/scsi_da.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/cam/scsi/scsi_da.c ============================================================================== --- stable/9/sys/cam/scsi/scsi_da.c Thu Sep 18 09:21:29 2014 (r271748) +++ stable/9/sys/cam/scsi/scsi_da.c Thu Sep 18 09:22:37 2014 (r271749) @@ -548,6 +548,13 @@ static struct da_quirk_entry da_quirk_ta }, { /* + * PNY USB 3.0 Flash Drives + */ + {T_DIRECT, SIP_MEDIA_REMOVABLE, "PNY", "USB 3.0 FD*", + "*"}, /*quirks*/ DA_Q_NO_SYNC_CACHE | DA_Q_NO_RC16 + }, + { + /* * PNY USB Flash keys * PR: usb/75578, usb/72344, usb/65436 */ From des at FreeBSD.org Thu Sep 18 14:31:18 2014 From: des at FreeBSD.org (Dag-Erling Smørgrav) Date: Thu, 18 Sep 2014 14:31:18 +0000 (UTC) Subject: svn commit: r271767 - stable/9/lib/libpam/modules/pam_login_access Message-ID: <201409181431.s8IEVI4C068892@svn.freebsd.org> Author: des Date: Thu Sep 18 14:31:18 2014 New Revision: 271767 URL: http://svnweb.freebsd.org/changeset/base/271767 Log: MFH (r271256, r271617): avoid segfault if PAM_RHOST nor PAM_TTY are unset. PR: 83099 Modified: stable/9/lib/libpam/modules/pam_login_access/pam_login_access.c Directory Properties: stable/9/lib/libpam/ (props changed) Modified: stable/9/lib/libpam/modules/pam_login_access/pam_login_access.c ============================================================================== --- stable/9/lib/libpam/modules/pam_login_access/pam_login_access.c Thu Sep 18 14:27:37 2014 (r271766) +++ stable/9/lib/libpam/modules/pam_login_access/pam_login_access.c Thu Sep 18 14:31:18 2014 (r271767) @@ -79,7 +79,14 @@ pam_sm_acct_mgmt(pam_handle_t *pamh, int gethostname(hostname, sizeof hostname); - if (rhost == NULL || *(const char *)rhost == '\0') { + if (rhost != NULL && *(const char *)rhost != '\0') { + PAM_LOG("Checking login.access for user %s from host %s", + (const char *)user, (const char *)rhost); + if (login_access(user, rhost) != 0) + return (PAM_SUCCESS); + PAM_VERBOSE_ERROR("%s is not allowed to log in from %s", + user, rhost); + } else if (tty != NULL && *(const char *)tty != '\0') { PAM_LOG("Checking login.access for user %s on tty %s", (const char *)user, (const char *)tty); if (login_access(user, tty) != 0) @@ -87,12 +94,8 @@ pam_sm_acct_mgmt(pam_handle_t *pamh, int PAM_VERBOSE_ERROR("%s is not allowed to log in on %s", user, tty); } else { - PAM_LOG("Checking login.access for user %s from host %s", - (const char *)user, (const char *)rhost); - if (login_access(user, rhost) != 0) - return (PAM_SUCCESS); - PAM_VERBOSE_ERROR("%s is not allowed to log in from %s", - user, rhost); + PAM_VERBOSE_ERROR("PAM_RHOST or PAM_TTY required"); + return (PAM_AUTHINFO_UNAVAIL); } return (PAM_AUTH_ERR); From asomers at FreeBSD.org Thu Sep 18 20:17:43 2014 From: asomers at FreeBSD.org (Alan Somers) Date: Thu, 18 Sep 2014 20:17:42 +0000 (UTC) Subject: svn commit: r271809 - stable/9/sys/netinet Message-ID: <201409182017.s8IKHgVQ038756@svn.freebsd.org> Author: asomers Date: Thu Sep 18 20:17:42 2014 New Revision: 271809 URL: http://svnweb.freebsd.org/changeset/base/271809 Log: MFC 263779, except for the ATF test change. Correct ARP update handling when the routes for network interfaces are restricted to a single FIB in a multifib system. Restricting an interface's routes to the FIB to which it is assigned (by setting net.add_addr_allfibs=0) causes ARP updates to fail with "arpresolve: can't allocate llinfo for x.x.x.x". This is due to the ARP update code hard coding it's lookup for existing routing entries to FIB 0. sys/netinet/in.c: When dealing with RTM_ADD (add route) requests for an interface, use the interface's assigned FIB instead of the default (FIB 0). sys/netinet/if_ether.c: In arpresolve(), enhance error message generated when an lla_lookup() fails so that the interface causing the error is visible in logs. PR: kern/167947 Modified: stable/9/sys/netinet/if_ether.c stable/9/sys/netinet/in.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/if_ether.c ============================================================================== --- stable/9/sys/netinet/if_ether.c Thu Sep 18 20:17:27 2014 (r271808) +++ stable/9/sys/netinet/if_ether.c Thu Sep 18 20:17:42 2014 (r271809) @@ -326,8 +326,8 @@ retry: if (la == NULL) { if (flags & LLE_CREATE) log(LOG_DEBUG, - "arpresolve: can't allocate llinfo for %s\n", - inet_ntoa(SIN(dst)->sin_addr)); + "arpresolve: can't allocate llinfo for %s on %s\n", + inet_ntoa(SIN(dst)->sin_addr), ifp->if_xname); m_freem(m); return (EINVAL); } Modified: stable/9/sys/netinet/in.c ============================================================================== --- stable/9/sys/netinet/in.c Thu Sep 18 20:17:27 2014 (r271808) +++ stable/9/sys/netinet/in.c Thu Sep 18 20:17:42 2014 (r271809) @@ -1366,8 +1366,9 @@ in_lltable_rtcheck(struct ifnet *ifp, u_ KASSERT(l3addr->sa_family == AF_INET, ("sin_family %d", l3addr->sa_family)); - /* XXX rtalloc1 should take a const param */ - rt = rtalloc1(__DECONST(struct sockaddr *, l3addr), 0, 0); + /* XXX rtalloc1_fib should take a const param */ + rt = rtalloc1_fib(__DECONST(struct sockaddr *, l3addr), 0, 0, + ifp->if_fib); if (rt == NULL) return (EINVAL); From asomers at FreeBSD.org Thu Sep 18 20:53:38 2014 From: asomers at FreeBSD.org (Alan Somers) Date: Thu, 18 Sep 2014 20:53:37 +0000 (UTC) Subject: svn commit: r271825 - in stable/9/sys: net netinet Message-ID: <201409182053.s8IKrbBa058668@svn.freebsd.org> Author: asomers Date: Thu Sep 18 20:53:36 2014 New Revision: 271825 URL: http://svnweb.freebsd.org/changeset/base/271825 Log: MFC r264887, except for the ATF test change. Also, ifa_switch_loopback_route doesn't exist in stable/9, so the relevant change to that function went into in_scrubprefix instead. Fix host and network routes for new interfaces when net.add_addr_allfibs=0 sys/net/route.c In rtinit1, use the interface fib instead of the process fib. The latter wasn't very useful because ifconfig(8) is usually invoked with the default process fib. Changing ifconfig(8) to use setfib(2) would be redundant, because it already sets the interface fib. tests/sys/netinet/fibs_test.sh Clear the expected ATF failure sys/net/if.c Pass the interface fib in calls to rtrequest1_fib and rtalloc1_fib sys/netinet/in.c sys/net/if_var.h Add a fibnum argument to ifa_switch_loopback_route, a subroutine of in_scrubprefix. Pass it the interface fib. PR: kern/187549 Modified: stable/9/sys/net/if.c stable/9/sys/net/route.c stable/9/sys/netinet/in.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) stable/9/sys/net/ (props changed) Modified: stable/9/sys/net/if.c ============================================================================== --- stable/9/sys/net/if.c Thu Sep 18 20:53:02 2014 (r271824) +++ stable/9/sys/net/if.c Thu Sep 18 20:53:36 2014 (r271825) @@ -1479,7 +1479,7 @@ ifa_add_loopback_route(struct ifaddr *if info.rti_flags = ifa->ifa_flags | RTF_HOST | RTF_STATIC; info.rti_info[RTAX_DST] = ia; info.rti_info[RTAX_GATEWAY] = (struct sockaddr *)&null_sdl; - error = rtrequest1_fib(RTM_ADD, &info, &rt, 0); + error = rtrequest1_fib(RTM_ADD, &info, &rt, ifa->ifa_ifp->if_fib); if (error == 0 && rt != NULL) { RT_LOCK(rt); @@ -1511,7 +1511,7 @@ ifa_del_loopback_route(struct ifaddr *if info.rti_flags = ifa->ifa_flags | RTF_HOST | RTF_STATIC; info.rti_info[RTAX_DST] = ia; info.rti_info[RTAX_GATEWAY] = (struct sockaddr *)&null_sdl; - error = rtrequest1_fib(RTM_DELETE, &info, NULL, 0); + error = rtrequest1_fib(RTM_DELETE, &info, NULL, ifa->ifa_ifp->if_fib); if (error != 0) log(LOG_INFO, "ifa_del_loopback_route: deletion failed\n"); Modified: stable/9/sys/net/route.c ============================================================================== --- stable/9/sys/net/route.c Thu Sep 18 20:53:02 2014 (r271824) +++ stable/9/sys/net/route.c Thu Sep 18 20:53:36 2014 (r271825) @@ -1527,7 +1527,7 @@ rtinit1(struct ifaddr *ifa, int cmd, int } if (fibnum == RT_ALL_FIBS) { if (rt_add_addr_allfibs == 0 && cmd == (int)RTM_ADD) { - startfib = endfib = curthread->td_proc->p_fibnum; + startfib = endfib = ifa->ifa_ifp->if_fib; } else { startfib = 0; endfib = rt_numfibs - 1; Modified: stable/9/sys/netinet/in.c ============================================================================== --- stable/9/sys/netinet/in.c Thu Sep 18 20:53:02 2014 (r271824) +++ stable/9/sys/netinet/in.c Thu Sep 18 20:53:36 2014 (r271825) @@ -1069,7 +1069,7 @@ in_scrubprefix(struct in_ifaddr *target, bzero(&ia_ro, sizeof(ia_ro)); *((struct sockaddr_in *)(&ia_ro.ro_dst)) = target->ia_addr; - rtalloc_ign_fib(&ia_ro, 0, 0); + rtalloc_ign_fib(&ia_ro, 0, fibnum); if ((ia_ro.ro_rt != NULL) && (ia_ro.ro_rt->rt_ifp != NULL) && (ia_ro.ro_rt->rt_ifp == V_loif)) { RT_LOCK(ia_ro.ro_rt); From asomers at FreeBSD.org Thu Sep 18 21:48:07 2014 From: asomers at FreeBSD.org (Alan Somers) Date: Thu, 18 Sep 2014 21:48:06 +0000 (UTC) Subject: svn commit: r271840 - in stable/9/sys: net netinet Message-ID: <201409182148.s8ILm6il084424@svn.freebsd.org> Author: asomers Date: Thu Sep 18 21:48:05 2014 New Revision: 271840 URL: http://svnweb.freebsd.org/changeset/base/271840 Log: MFC r264905 and r266860, except for the ATF parts. r266860 Fix unintended KBI change from r264905. Add _fib versions of ifa_ifwithnet() and ifa_ifwithdstaddr() The legacy functions will call the _fib() versions with RT_ALL_FIBS, preserving legacy behavior. sys/net/if_var.h sys/net/if.c Add legacy-compatible functions as described above. Ensure legacy behavior when RT_ALL_FIBS is passed as fibnum. sys/netinet/in_pcb.c sys/netinet/ip_output.c sys/netinet/ip_options.c sys/net/route.c sys/net/rtsock.c sys/netinet6/nd6.c Call with _fib() functions if we must use a specific fib, or the legacy functions otherwise. r264905 Fix subnet and default routes on different FIBs on the same subnet. These two bugs are closely related. The root cause is that ifa_ifwithnet does not consider FIBs when searching for an interface address. sys/net/if_var.h sys/net/if.c Add a fib argument to ifa_ifwithnet and ifa_ifwithdstadddr. Those functions will only return an address whose interface fib equals the argument. sys/net/route.c Update calls to ifa_ifwithnet and ifa_ifwithdstaddr with fib arguments. sys/netinet/in.c Update in_addprefix to consider the interface fib when adding prefixes. This will prevent it from not adding a subnet route when one already exists on a different fib. sys/net/rtsock.c sys/netinet/in_pcb.c sys/netinet/ip_output.c sys/netinet/ip_options.c sys/netinet6/nd6.c Add RT_DEFAULT_FIB arguments to ifa_ifwithdstaddr and ifa_ifwithnet. In some cases it there wasn't a clear specific fib number to use. In others, I was unable to test those functions so I chose RT_DEFAULT_FIB to minimize divergence from current behavior. I will fix some of the latter changes along with PR kern/187553. PR: kern/187550 PR: kern/187552 Modified: stable/9/sys/net/if.c stable/9/sys/net/if_var.h stable/9/sys/net/route.c stable/9/sys/netinet/in.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) stable/9/sys/net/ (props changed) Modified: stable/9/sys/net/if.c ============================================================================== --- stable/9/sys/net/if.c Thu Sep 18 21:39:00 2014 (r271839) +++ stable/9/sys/net/if.c Thu Sep 18 21:48:05 2014 (r271840) @@ -1628,7 +1628,7 @@ done: */ /*ARGSUSED*/ struct ifaddr * -ifa_ifwithdstaddr(struct sockaddr *addr) +ifa_ifwithdstaddr_fib(struct sockaddr *addr, int fibnum) { struct ifnet *ifp; struct ifaddr *ifa; @@ -1637,6 +1637,8 @@ ifa_ifwithdstaddr(struct sockaddr *addr) TAILQ_FOREACH(ifp, &V_ifnet, if_link) { if ((ifp->if_flags & IFF_POINTOPOINT) == 0) continue; + if ((fibnum != RT_ALL_FIBS) && (ifp->if_fib != fibnum)) + continue; IF_ADDR_RLOCK(ifp); TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { if (ifa->ifa_addr->sa_family != addr->sa_family) @@ -1656,12 +1658,19 @@ done: return (ifa); } +struct ifaddr * +ifa_ifwithdstaddr(struct sockaddr *addr) +{ + + return (ifa_ifwithdstaddr_fib(addr, RT_ALL_FIBS)); +} + /* * Find an interface on a specific network. If many, choice * is most specific found. */ struct ifaddr * -ifa_ifwithnet(struct sockaddr *addr, int ignore_ptp) +ifa_ifwithnet_fib(struct sockaddr *addr, int ignore_ptp, int fibnum) { struct ifnet *ifp; struct ifaddr *ifa; @@ -1681,12 +1690,14 @@ ifa_ifwithnet(struct sockaddr *addr, int /* * Scan though each interface, looking for ones that have addresses - * in this address family. Maintain a reference on ifa_maybe once - * we find one, as we release the IF_ADDR_RLOCK() that kept it stable - * when we move onto the next interface. + * in this address family and the requested fib. Maintain a reference + * on ifa_maybe once we find one, as we release the IF_ADDR_RLOCK() that + * kept it stable when we move onto the next interface. */ IFNET_RLOCK_NOSLEEP(); TAILQ_FOREACH(ifp, &V_ifnet, if_link) { + if ((fibnum != RT_ALL_FIBS) && (ifp->if_fib != fibnum)) + continue; IF_ADDR_RLOCK(ifp); TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { char *cp, *cp2, *cp3; @@ -1768,6 +1779,13 @@ done: return (ifa); } +struct ifaddr * +ifa_ifwithnet(struct sockaddr *addr, int ignore_ptp) +{ + + return (ifa_ifwithnet_fib(addr, ignore_ptp, RT_ALL_FIBS)); +} + /* * Find an interface address specific to an interface best matching * a given address. Modified: stable/9/sys/net/if_var.h ============================================================================== --- stable/9/sys/net/if_var.h Thu Sep 18 21:39:00 2014 (r271839) +++ stable/9/sys/net/if_var.h Thu Sep 18 21:48:05 2014 (r271840) @@ -940,7 +940,9 @@ struct ifaddr *ifa_ifwithaddr(struct soc int ifa_ifwithaddr_check(struct sockaddr *); struct ifaddr *ifa_ifwithbroadaddr(struct sockaddr *); struct ifaddr *ifa_ifwithdstaddr(struct sockaddr *); +struct ifaddr *ifa_ifwithdstaddr_fib(struct sockaddr *, int); struct ifaddr *ifa_ifwithnet(struct sockaddr *, int); +struct ifaddr *ifa_ifwithnet_fib(struct sockaddr *, int, int); struct ifaddr *ifa_ifwithroute(int, struct sockaddr *, struct sockaddr *); struct ifaddr *ifa_ifwithroute_fib(int, struct sockaddr *, struct sockaddr *, u_int); Modified: stable/9/sys/net/route.c ============================================================================== --- stable/9/sys/net/route.c Thu Sep 18 21:39:00 2014 (r271839) +++ stable/9/sys/net/route.c Thu Sep 18 21:48:05 2014 (r271840) @@ -553,7 +553,7 @@ rtredirect_fib(struct sockaddr *dst, } /* verify the gateway is directly reachable */ - if ((ifa = ifa_ifwithnet(gateway, 0)) == NULL) { + if ((ifa = ifa_ifwithnet_fib(gateway, 0, fibnum)) == NULL) { error = ENETUNREACH; goto out; } @@ -710,7 +710,7 @@ ifa_ifwithroute_fib(int flags, struct so */ ifa = NULL; if (flags & RTF_HOST) - ifa = ifa_ifwithdstaddr(dst); + ifa = ifa_ifwithdstaddr_fib(dst, fibnum); if (ifa == NULL) ifa = ifa_ifwithaddr(gateway); } else { @@ -719,10 +719,10 @@ ifa_ifwithroute_fib(int flags, struct so * or host, the gateway may still be on the * other end of a pt to pt link. */ - ifa = ifa_ifwithdstaddr(gateway); + ifa = ifa_ifwithdstaddr_fib(gateway, fibnum); } if (ifa == NULL) - ifa = ifa_ifwithnet(gateway, 0); + ifa = ifa_ifwithnet_fib(gateway, 0, fibnum); if (ifa == NULL) { struct rtentry *rt = rtalloc1_fib(gateway, 0, RTF_RNH_LOCKED, fibnum); if (rt == NULL) @@ -836,7 +836,7 @@ rt_getifa_fib(struct rt_addrinfo *info, */ if (info->rti_ifp == NULL && ifpaddr != NULL && ifpaddr->sa_family == AF_LINK && - (ifa = ifa_ifwithnet(ifpaddr, 0)) != NULL) { + (ifa = ifa_ifwithnet_fib(ifpaddr, 0, fibnum)) != NULL) { info->rti_ifp = ifa->ifa_ifp; ifa_free(ifa); } Modified: stable/9/sys/netinet/in.c ============================================================================== --- stable/9/sys/netinet/in.c Thu Sep 18 21:39:00 2014 (r271839) +++ stable/9/sys/netinet/in.c Thu Sep 18 21:48:05 2014 (r271840) @@ -968,7 +968,7 @@ in_addprefix(struct in_ifaddr *target, i { struct in_ifaddr *ia; struct in_addr prefix, mask, p, m; - int error, fibnum; + int error; if ((flags & RTF_HOST) != 0) { prefix = target->ia_dstaddr.sin_addr; @@ -979,9 +979,8 @@ in_addprefix(struct in_ifaddr *target, i prefix.s_addr &= mask.s_addr; } - fibnum = rt_add_addr_allfibs ? RT_ALL_FIBS : target->ia_ifp->if_fib; - IN_IFADDR_RLOCK(); + /* Look for an existing address with the same prefix, mask, and fib */ TAILQ_FOREACH(ia, &V_in_ifaddrhead, ia_link) { if (rtinitflags(ia)) { p = ia->ia_dstaddr.sin_addr; @@ -997,6 +996,8 @@ in_addprefix(struct in_ifaddr *target, i mask.s_addr != m.s_addr) continue; } + if (target->ia_ifp->if_fib != ia->ia_ifp->if_fib) + continue; /* * If we got a matching prefix route inserted by other @@ -1017,6 +1018,10 @@ in_addprefix(struct in_ifaddr *target, i IN_IFADDR_RUNLOCK(); return (EEXIST); } else { + int fibnum; + + fibnum = rt_add_addr_allfibs ? RT_ALL_FIBS : + target->ia_ifp->if_fib; rt_addrmsg(RTM_ADD, &target->ia_ifa, fibnum); IN_IFADDR_RUNLOCK(); return (0); From asomers at FreeBSD.org Thu Sep 18 22:12:52 2014 From: asomers at FreeBSD.org (Alan Somers) Date: Thu, 18 Sep 2014 22:12:52 +0000 (UTC) Subject: svn commit: r271842 - stable/9/sys/netinet Message-ID: <201409182212.s8IMCqNw097875@svn.freebsd.org> Author: asomers Date: Thu Sep 18 22:12:52 2014 New Revision: 271842 URL: http://svnweb.freebsd.org/changeset/base/271842 Log: MFC r265092, except for the ATF bits. Fix a panic when removing an IP address from an interface, if the same address exists on another interface. The panic was introduced by change 264887, which changed the fibnum parameter in the call to rtalloc1_fib() in ifa_switch_loopback_route() from RT_DEFAULT_FIB to RT_ALL_FIBS. The solution is to use the interface fib in that call. For the majority of users, that will be equivalent to the legacy behavior. PR: kern/189089 Modified: stable/9/sys/netinet/in.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/in.c ============================================================================== --- stable/9/sys/netinet/in.c Thu Sep 18 22:10:49 2014 (r271841) +++ stable/9/sys/netinet/in.c Thu Sep 18 22:12:52 2014 (r271842) @@ -1051,11 +1051,9 @@ in_scrubprefix(struct in_ifaddr *target, { struct in_ifaddr *ia; struct in_addr prefix, mask, p; - int error = 0, fibnum; + int error = 0; struct sockaddr_in prefix0, mask0; - fibnum = rt_add_addr_allfibs ? RT_ALL_FIBS : target->ia_ifp->if_fib; - /* * Remove the loopback route to the interface address. * The "useloopback" setting is not consulted because if the @@ -1071,9 +1069,11 @@ in_scrubprefix(struct in_ifaddr *target, (target->ia_flags & IFA_RTSELF)) { struct route ia_ro; int freeit = 0; + int fibnum; bzero(&ia_ro, sizeof(ia_ro)); *((struct sockaddr_in *)(&ia_ro.ro_dst)) = target->ia_addr; + fibnum = target->ia_ifp->if_fib; rtalloc_ign_fib(&ia_ro, 0, fibnum); if ((ia_ro.ro_rt != NULL) && (ia_ro.ro_rt->rt_ifp != NULL) && (ia_ro.ro_rt->rt_ifp == V_loif)) { @@ -1107,6 +1107,10 @@ in_scrubprefix(struct in_ifaddr *target, } if ((target->ia_flags & IFA_ROUTE) == 0) { + int fibnum; + + fibnum = rt_add_addr_allfibs ? RT_ALL_FIBS : + target->ia_ifp->if_fib; rt_addrmsg(RTM_DELETE, &target->ia_ifa, fibnum); return (0); } From hselasky at FreeBSD.org Sat Sep 20 08:01:51 2014 From: hselasky at FreeBSD.org (Hans Petter Selasky) Date: Sat, 20 Sep 2014 08:01:50 +0000 (UTC) Subject: svn commit: r271897 - stable/9/sys/dev/usb/serial Message-ID: <201409200801.s8K81o3P048718@svn.freebsd.org> Author: hselasky Date: Sat Sep 20 08:01:50 2014 New Revision: 271897 URL: http://svnweb.freebsd.org/changeset/base/271897 Log: MFC r271492: Workaround for receiving Voice Calls using the E1750 dongle from Huawei. It might appear as if the firmware is allocating memory blocks according to the USB transfer size and if there is initially a lot of data, like at the answering machine prompt, it simply dies without any apparent reason. The simple workaround for this is to force a zero length packet at hardware level after every 512 bytes of data. This will force the other side to use smaller memory blocks aswell. Modified: stable/9/sys/dev/usb/serial/u3g.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/serial/u3g.c ============================================================================== --- stable/9/sys/dev/usb/serial/u3g.c Sat Sep 20 07:59:34 2014 (r271896) +++ stable/9/sys/dev/usb/serial/u3g.c Sat Sep 20 08:01:50 2014 (r271897) @@ -75,6 +75,8 @@ SYSCTL_INT(_hw_usb_u3g, OID_AUTO, debug, #define U3G_MAXPORTS 12 #define U3G_CONFIG_INDEX 0 #define U3G_BSIZE 2048 +#define U3G_TXSIZE (U3G_BSIZE / U3G_TXFRAMES) +#define U3G_TXFRAMES 4 #define U3GSP_GPRS 0 #define U3GSP_EDGE 1 @@ -153,6 +155,7 @@ static const struct usb_config u3g_confi .endpoint = UE_ADDR_ANY, .direction = UE_DIR_OUT, .bufsize = U3G_BSIZE,/* bytes */ + .frames = U3G_TXFRAMES, .flags = {.pipe_bof = 1,.force_short_xfer = 1,}, .callback = &u3g_write_callback, }, @@ -1013,14 +1016,22 @@ u3g_write_callback(struct usb_xfer *xfer struct ucom_softc *ucom = usbd_xfer_softc(xfer); struct usb_page_cache *pc; uint32_t actlen; + uint32_t frame; switch (USB_GET_STATE(xfer)) { case USB_ST_TRANSFERRED: case USB_ST_SETUP: tr_setup: - pc = usbd_xfer_get_frame(xfer, 0); - if (ucom_get_data(ucom, pc, 0, U3G_BSIZE, &actlen)) { - usbd_xfer_set_frame_len(xfer, 0, actlen); + for (frame = 0; frame != U3G_TXFRAMES; frame++) { + usbd_xfer_set_frame_offset(xfer, frame * U3G_TXSIZE, frame); + + pc = usbd_xfer_get_frame(xfer, frame); + if (ucom_get_data(ucom, pc, 0, U3G_TXSIZE, &actlen) == 0) + break; + usbd_xfer_set_frame_len(xfer, frame, actlen); + } + if (frame != 0) { + usbd_xfer_set_frames(xfer, frame); usbd_transfer_submit(xfer); } break; From jilles at FreeBSD.org Sat Sep 20 12:59:28 2014 From: jilles at FreeBSD.org (Jilles Tjoelker) Date: Sat, 20 Sep 2014 12:59:28 +0000 (UTC) Subject: svn commit: r271902 - stable/9/usr.bin/pathchk Message-ID: <201409201259.s8KCxSs1085720@svn.freebsd.org> Author: jilles Date: Sat Sep 20 12:59:28 2014 New Revision: 271902 URL: http://svnweb.freebsd.org/changeset/base/271902 Log: MFC r256800: pathchk: Ensure bytes >= 128 are considered non-portable characters. This was not broken on architectures such as ARM where char is unsigned. Also, remove the first non-portable character from the output. POSIX does not require this, and printing the first byte may yield an invalid byte sequence with UTF-8. PR: 165988 Reported by: Nicolas Rachinsky Relnotes: yes Modified: stable/9/usr.bin/pathchk/pathchk.c Directory Properties: stable/9/usr.bin/pathchk/ (props changed) Modified: stable/9/usr.bin/pathchk/pathchk.c ============================================================================== --- stable/9/usr.bin/pathchk/pathchk.c Sat Sep 20 09:18:58 2014 (r271901) +++ stable/9/usr.bin/pathchk/pathchk.c Sat Sep 20 12:59:28 2014 (r271902) @@ -98,7 +98,7 @@ check(const char *path) { struct stat sb; long complen, namemax, pathmax, svnamemax; - int badch, last; + int last; char *end, *p, *pathd; if ((pathd = strdup(path)) == NULL) @@ -142,9 +142,9 @@ check(const char *path) goto bad; } - if (pflag && (badch = portable(p)) >= 0) { + if (pflag && !portable(p)) { warnx("%s: %s: component contains non-portable " - "character `%c'", path, p, badch); + "character", path, p); goto bad; } @@ -183,8 +183,7 @@ bad: free(pathd); } /* - * Check whether a path component contains only portable characters. Return - * the first non-portable character found. + * Check whether a path component contains only portable characters. */ static int portable(const char *path) @@ -197,7 +196,7 @@ portable(const char *path) s = strspn(path, charset); if (path[s] != '\0') - return (path[s]); + return (0); - return (-1); + return (1); } From davidcs at FreeBSD.org Mon Sep 22 19:28:22 2014 From: davidcs at FreeBSD.org (David C Somayajulu) Date: Mon, 22 Sep 2014 19:28:21 +0000 (UTC) Subject: svn commit: r271993 - stable/9/sys/modules/bxe Message-ID: <201409221928.s8MJSLs8071234@svn.freebsd.org> Author: davidcs Date: Mon Sep 22 19:28:21 2014 New Revision: 271993 URL: http://svnweb.freebsd.org/changeset/base/271993 Log: MFC r271726 remove clean option from Makefile Modified: stable/9/sys/modules/bxe/Makefile Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) stable/9/sys/modules/ (props changed) Modified: stable/9/sys/modules/bxe/Makefile ============================================================================== --- stable/9/sys/modules/bxe/Makefile Mon Sep 22 19:14:27 2014 (r271992) +++ stable/9/sys/modules/bxe/Makefile Mon Sep 22 19:28:21 2014 (r271993) @@ -15,9 +15,4 @@ SRCS += bxe.c \ CFLAGS += -I${BXE} -clean: - rm -f opt_bdg.h device_if.h bus_if.h pci_if.h export_syms - rm -f *.o *.kld *.ko - rm -f @ machine x86 - .include From davidcs at FreeBSD.org Mon Sep 22 19:37:04 2014 From: davidcs at FreeBSD.org (David C Somayajulu) Date: Mon, 22 Sep 2014 19:37:03 +0000 (UTC) Subject: svn commit: r271994 - stable/9/sys/modules/bce Message-ID: <201409221937.s8MJb3ls076073@svn.freebsd.org> Author: davidcs Date: Mon Sep 22 19:37:03 2014 New Revision: 271994 URL: http://svnweb.freebsd.org/changeset/base/271994 Log: MFC r271727 remove clean option from Makefile Modified: stable/9/sys/modules/bce/Makefile Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) stable/9/sys/modules/ (props changed) Modified: stable/9/sys/modules/bce/Makefile ============================================================================== --- stable/9/sys/modules/bce/Makefile Mon Sep 22 19:28:21 2014 (r271993) +++ stable/9/sys/modules/bce/Makefile Mon Sep 22 19:37:03 2014 (r271994) @@ -5,9 +5,4 @@ SRCS= opt_bce.h if_bce.c miibus_if.h mii #CFLAGS += -DBCE_DEBUG=0 -clean: - rm -f opt_bdg.h device_if.h bus_if.h pci_if.h export_syms - rm -f *.o *.kld *.ko - rm -f @ machine x86 miibus_if.h miidevs.h opt_bce.h - .include From davidcs at FreeBSD.org Mon Sep 22 19:42:19 2014 From: davidcs at FreeBSD.org (David C Somayajulu) Date: Mon, 22 Sep 2014 19:42:18 +0000 (UTC) Subject: svn commit: r271995 - stable/9/sys/dev/bxe Message-ID: <201409221942.s8MJgIYE080379@svn.freebsd.org> Author: davidcs Date: Mon Sep 22 19:42:18 2014 New Revision: 271995 URL: http://svnweb.freebsd.org/changeset/base/271995 Log: MFC r271728 For ECORE_DBG_BREAK_IF() ECORE_BUG() ECORE_BUG_ON() check bxe_debug flag before printing error message. Modified: stable/9/sys/dev/bxe/ecore_sp.h Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/bxe/ecore_sp.h ============================================================================== --- stable/9/sys/dev/bxe/ecore_sp.h Mon Sep 22 19:37:03 2014 (r271994) +++ stable/9/sys/dev/bxe/ecore_sp.h Mon Sep 22 19:42:18 2014 (r271995) @@ -246,14 +246,23 @@ ECORE_CRC32_LE(uint32_t seed, uint8_t *m #else +extern unsigned long bxe_debug; + +#define BXE_DEBUG_ECORE_DBG_BREAK_IF 0x01 +#define BXE_DEBUG_ECORE_BUG 0x02 +#define BXE_DEBUG_ECORE_BUG_ON 0x04 + #define ECORE_DBG_BREAK_IF(exp) \ - printf("%s (%s,%d)\n", __FUNCTION__, __FILE__, __LINE__); + if (bxe_debug & BXE_DEBUG_ECORE_DBG_BREAK_IF) \ + printf("%s (%s,%d)\n", __FUNCTION__, __FILE__, __LINE__); #define ECORE_BUG(exp) \ - printf("%s (%s,%d)\n", __FUNCTION__, __FILE__, __LINE__); + if (bxe_debug & BXE_DEBUG_ECORE_BUG) \ + printf("%s (%s,%d)\n", __FUNCTION__, __FILE__, __LINE__); #define ECORE_BUG_ON(exp) \ - printf("%s (%s,%d)\n", __FUNCTION__, __FILE__, __LINE__); + if (bxe_debug & BXE_DEBUG_ECORE_BUG_ON) \ + printf("%s (%s,%d)\n", __FUNCTION__, __FILE__, __LINE__); #endif /* #ifdef ECORE_STOP_ON_ERROR */ From bz at FreeBSD.org Tue Sep 23 16:04:02 2014 From: bz at FreeBSD.org (Bjoern A. Zeeb) Date: Tue, 23 Sep 2014 16:03:58 +0000 (UTC) Subject: svn commit: r272029 - in stable/9/sys: amd64/linux32 compat/linux conf i386/linux kern modules/linux sys Message-ID: <201409231603.s8NG3wVK065938@svn.freebsd.org> Author: bz Date: Tue Sep 23 16:03:57 2014 New Revision: 272029 URL: http://svnweb.freebsd.org/changeset/base/272029 Log: MFC r269669,271743: Split up sys_ktimer_getoverrun() into a sys_ and a kern_ variant and export the kern_ version needed by an upcoming linuxolator change. Implement most of timer_{create,settime,gettime,getoverrun,delete} for amd64/linux32. Fix the entirely bogus (untested) version from r161310 for i386/linux using the same shared code in compat/linux. Reviewed by: jhb Differential Revision: D784 Sponsored by: DARPA/AFRL Added: stable/9/sys/compat/linux/linux_timer.c - copied unchanged from r271743, head/sys/compat/linux/linux_timer.c stable/9/sys/compat/linux/linux_timer.h - copied unchanged from r271743, head/sys/compat/linux/linux_timer.h Modified: stable/9/sys/amd64/linux32/linux.h stable/9/sys/amd64/linux32/linux32_dummy.c stable/9/sys/amd64/linux32/syscalls.master stable/9/sys/conf/files.amd64 stable/9/sys/conf/files.i386 stable/9/sys/conf/files.pc98 stable/9/sys/i386/linux/linux.h stable/9/sys/i386/linux/linux_machdep.c stable/9/sys/i386/linux/syscalls.master stable/9/sys/kern/kern_time.c stable/9/sys/modules/linux/Makefile stable/9/sys/sys/syscallsubr.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/modules/ (props changed) stable/9/sys/sys/ (props changed) Modified: stable/9/sys/amd64/linux32/linux.h ============================================================================== --- stable/9/sys/amd64/linux32/linux.h Tue Sep 23 13:58:39 2014 (r272028) +++ stable/9/sys/amd64/linux32/linux.h Tue Sep 23 16:03:57 2014 (r272029) @@ -61,6 +61,11 @@ MALLOC_DECLARE(M_LINUX); #define PTRIN(v) (void *)(uintptr_t)(v) #define PTROUT(v) (l_uintptr_t)(uintptr_t)(v) +#define CP(src,dst,fld) do { (dst).fld = (src).fld; } while (0) +#define CP2(src,dst,sfld,dfld) do { (dst).dfld = (src).sfld; } while (0) +#define PTRIN_CP(src,dst,fld) \ + do { (dst).fld = PTRIN((src).fld); } while (0) + /* * Provide a separate set of types for the Linux types. */ Modified: stable/9/sys/amd64/linux32/linux32_dummy.c ============================================================================== --- stable/9/sys/amd64/linux32/linux32_dummy.c Tue Sep 23 13:58:39 2014 (r272028) +++ stable/9/sys/amd64/linux32/linux32_dummy.c Tue Sep 23 16:03:57 2014 (r272029) @@ -74,11 +74,6 @@ DUMMY(epoll_create); DUMMY(epoll_ctl); DUMMY(epoll_wait); DUMMY(remap_file_pages); -DUMMY(timer_create); -DUMMY(timer_settime); -DUMMY(timer_gettime); -DUMMY(timer_getoverrun); -DUMMY(timer_delete); DUMMY(fstatfs64); DUMMY(mbind); DUMMY(get_mempolicy); Modified: stable/9/sys/amd64/linux32/syscalls.master ============================================================================== --- stable/9/sys/amd64/linux32/syscalls.master Tue Sep 23 13:58:39 2014 (r272028) +++ stable/9/sys/amd64/linux32/syscalls.master Tue Sep 23 16:03:57 2014 (r272029) @@ -435,11 +435,13 @@ 256 AUE_NULL STD { int linux_epoll_wait(void); } 257 AUE_NULL STD { int linux_remap_file_pages(void); } 258 AUE_NULL STD { int linux_set_tid_address(int *tidptr); } -259 AUE_NULL STD { int linux_timer_create(void); } -260 AUE_NULL STD { int linux_timer_settime(void); } -261 AUE_NULL STD { int linux_timer_gettime(void); } -262 AUE_NULL STD { int linux_timer_getoverrun(void); } -263 AUE_NULL STD { int linux_timer_delete(void); } +259 AUE_NULL STD { int linux_timer_create(clockid_t clock_id, \ + struct sigevent *evp, l_timer_t *timerid); } +260 AUE_NULL STD { int linux_timer_settime(l_timer_t timerid, l_int flags, \ + const struct itimerspec *new, struct itimerspec *old); } +261 AUE_NULL STD { int linux_timer_gettime(l_timer_t timerid, struct itimerspec *setting); } +262 AUE_NULL STD { int linux_timer_getoverrun(l_timer_t timerid); } +263 AUE_NULL STD { int linux_timer_delete(l_timer_t timerid); } 264 AUE_CLOCK_SETTIME STD { int linux_clock_settime(clockid_t which, struct l_timespec *tp); } 265 AUE_NULL STD { int linux_clock_gettime(clockid_t which, struct l_timespec *tp); } 266 AUE_NULL STD { int linux_clock_getres(clockid_t which, struct l_timespec *tp); } Copied: stable/9/sys/compat/linux/linux_timer.c (from r271743, head/sys/compat/linux/linux_timer.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/sys/compat/linux/linux_timer.c Tue Sep 23 16:03:57 2014 (r272029, copy of r271743, head/sys/compat/linux/linux_timer.c) @@ -0,0 +1,182 @@ +/*- + * Copyright (c) 2014 Bjoern A. Zeeb + * All rights reserved. + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory under DARPA/AFRL contract FA8750-11-C-0249 + * ("MRC2"), as part of the DARPA MRC research programme. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ +#include +__FBSDID("$FreeBSD$"); + +#include "opt_compat.h" + +#include +#include +#include +#include +#include +#include +#include + +#ifdef COMPAT_LINUX32 +#include +#include +#else +#include +#include +#endif +#include + +static int +linux_convert_l_clockid(clockid_t *clock_id) +{ + + switch (*clock_id) { + case LINUX_CLOCK_REALTIME: + *clock_id = CLOCK_REALTIME; + break; + case LINUX_CLOCK_MONOTONIC: + *clock_id = CLOCK_MONOTONIC; + break; + default: + return (EINVAL); + } + + return (0); +} + +static int +linux_convert_l_sigevent(struct l_sigevent *l_sig, struct sigevent *sig) +{ + + CP(*l_sig, *sig, sigev_notify); + switch (l_sig->sigev_notify) { + case L_SIGEV_SIGNAL: + sig->sigev_notify = SIGEV_SIGNAL; + CP(*l_sig, *sig, sigev_signo); + PTRIN_CP(*l_sig, *sig, sigev_value.sival_ptr); + break; + case L_SIGEV_NONE: + sig->sigev_notify = SIGEV_NONE; + break; + case L_SIGEV_THREAD: +#if 0 + /* Seems to not be used anywhere (anymore)? */ + sig->sigev_notify = SIGEV_THREAD; + return (ENOSYS); +#else + return (EINVAL); +#endif + case L_SIGEV_THREAD_ID: + sig->sigev_notify = SIGEV_THREAD_ID; + CP2(*l_sig, *sig, _l_sigev_un._tid, sigev_notify_thread_id); + CP(*l_sig, *sig, sigev_signo); + PTRIN_CP(*l_sig, *sig, sigev_value.sival_ptr); + break; + default: + return (EINVAL); + } + return (0); +} + +int +linux_timer_create(struct thread *td, struct linux_timer_create_args *uap) +{ + struct l_sigevent l_ev; + struct sigevent ev, *evp; + int error, id; + + if (uap->evp == NULL) { + evp = NULL; + } else { + error = copyin(uap->evp, &l_ev, sizeof(l_ev)); + if (error != 0) + return (error); + error = linux_convert_l_sigevent(&l_ev, &ev); + if (error != 0) + return (error); + evp = &ev; + } + error = linux_convert_l_clockid(&uap->clock_id); + if (error != 0) + return (error); + error = kern_ktimer_create(td, uap->clock_id, evp, &id, -1); + if (error == 0) { + error = copyout(&id, uap->timerid, sizeof(int)); + if (error != 0) + kern_ktimer_delete(td, id); + } + return (error); +} + +int +linux_timer_settime(struct thread *td, struct linux_timer_settime_args *uap) +{ + struct l_itimerspec l_val, l_oval; + struct itimerspec val, oval, *ovalp; + int error; + + error = copyin(uap->new, &l_val, sizeof(l_val)); + if (error != 0) + return (error); + ITS_CP(l_val, val); + ovalp = uap->old != NULL ? &oval : NULL; + error = kern_ktimer_settime(td, uap->timerid, uap->flags, &val, ovalp); + if (error == 0 && uap->old != NULL) { + ITS_CP(oval, l_oval); + error = copyout(&l_oval, uap->old, sizeof(l_oval)); + } + return (error); +} + +int +linux_timer_gettime(struct thread *td, struct linux_timer_gettime_args *uap) +{ + struct l_itimerspec l_val; + struct itimerspec val; + int error; + + error = kern_ktimer_gettime(td, uap->timerid, &val); + if (error == 0) { + ITS_CP(val, l_val); + error = copyout(&l_val, uap->setting, sizeof(l_val)); + } + return (error); +} + +int +linux_timer_getoverrun(struct thread *td, struct linux_timer_getoverrun_args *uap) +{ + + return (kern_ktimer_getoverrun(td, uap->timerid)); +} + +int +linux_timer_delete(struct thread *td, struct linux_timer_delete_args *uap) +{ + + return (kern_ktimer_delete(td, uap->timerid)); +} + Copied: stable/9/sys/compat/linux/linux_timer.h (from r271743, head/sys/compat/linux/linux_timer.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/sys/compat/linux/linux_timer.h Tue Sep 23 16:03:57 2014 (r272029, copy of r271743, head/sys/compat/linux/linux_timer.h) @@ -0,0 +1,97 @@ +/*- + * Copyright (c) 2014 Bjoern A. Zeeb + * All rights reserved. + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory under DARPA/AFRL contract FA8750-11-C-0249 + * ("MRC2"), as part of the DARPA MRC research programme. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _LINUX_TIMER_H +#define _LINUX_TIMER_H + +#ifndef __LINUX_ARCH_SIGEV_PREAMBLE_SIZE +#define __LINUX_ARCH_SIGEV_PREAMBLE_SIZE \ + (sizeof(l_int) * 2 + sizeof(l_sigval_t)) +#endif + +#define LINUX_SIGEV_MAX_SIZE 64 +#define LINUX_SIGEV_PAD_SIZE \ + ((LINUX_SIGEV_MAX_SIZE - __LINUX_ARCH_SIGEV_PREAMBLE_SIZE) / \ + sizeof(l_int)) + +#define LINUX_CLOCK_REALTIME 0 +#define LINUX_CLOCK_MONOTONIC 1 +#define LINUX_CLOCK_PROCESS_CPUTIME_ID 2 +#define LINUX_CLOCK_THREAD_CPUTIME_ID 3 +#define LINUX_CLOCK_MONOTONIC_RAW 4 +#define LINUX_CLOCK_REALTIME_COARSE 5 +#define LINUX_CLOCK_MONOTONIC_COARSE 6 +#define LINUX_CLOCK_BOOTTIME 7 +#define LINUX_CLOCK_REALTIME_ALARM 8 +#define LINUX_CLOCK_BOOTTIME_ALARM 9 +#define LINUX_CLOCK_SGI_CYCLE 10 +#define LINUX_CLOCK_TAI 11 + +#define L_SIGEV_SIGNAL 0 +#define L_SIGEV_NONE 1 +#define L_SIGEV_THREAD 2 +#define L_SIGEV_THREAD_ID 4 + +#define TS_CP(src,dst,fld) do { \ + CP((src).fld,(dst).fld,tv_sec); \ + CP((src).fld,(dst).fld,tv_nsec); \ +} while (0) + +#define ITS_CP(src, dst) do { \ + TS_CP((src), (dst), it_interval); \ + TS_CP((src), (dst), it_value); \ +} while (0) + +struct l_sigevent { + l_sigval_t sigev_value; + l_int sigev_signo; + l_int sigev_notify; + union { + l_int _pad[LINUX_SIGEV_PAD_SIZE]; + l_int _tid; + struct { + l_uintptr_t _function; + l_uintptr_t _attribute; + } _l_sigev_thread; + } _l_sigev_un; +} +#if defined(__amd64__) && defined(COMPAT_LINUX32) +__packed +#endif +; + +struct l_itimerspec { + struct l_timespec it_interval; + struct l_timespec it_value; +}; + +#endif /* _LINUX_TIMER_H */ Modified: stable/9/sys/conf/files.amd64 ============================================================================== --- stable/9/sys/conf/files.amd64 Tue Sep 23 13:58:39 2014 (r272028) +++ stable/9/sys/conf/files.amd64 Tue Sep 23 16:03:57 2014 (r272029) @@ -477,6 +477,7 @@ compat/linux/linux_socket.c optional com compat/linux/linux_stats.c optional compat_linux32 compat/linux/linux_sysctl.c optional compat_linux32 compat/linux/linux_time.c optional compat_linux32 +compat/linux/linux_timer.c optional compat_linux32 compat/linux/linux_uid16.c optional compat_linux32 compat/linux/linux_util.c optional compat_linux32 dev/amr/amr_linux.c optional compat_linux32 amr Modified: stable/9/sys/conf/files.i386 ============================================================================== --- stable/9/sys/conf/files.i386 Tue Sep 23 13:58:39 2014 (r272028) +++ stable/9/sys/conf/files.i386 Tue Sep 23 16:03:57 2014 (r272029) @@ -93,6 +93,7 @@ compat/linux/linux_socket.c optional com compat/linux/linux_stats.c optional compat_linux compat/linux/linux_sysctl.c optional compat_linux compat/linux/linux_time.c optional compat_linux +compat/linux/linux_timer.c optional compat_linux compat/linux/linux_uid16.c optional compat_linux compat/linux/linux_util.c optional compat_linux compat/ndis/kern_ndis.c optional ndisapi pci Modified: stable/9/sys/conf/files.pc98 ============================================================================== --- stable/9/sys/conf/files.pc98 Tue Sep 23 13:58:39 2014 (r272028) +++ stable/9/sys/conf/files.pc98 Tue Sep 23 16:03:57 2014 (r272029) @@ -54,6 +54,7 @@ compat/linux/linux_socket.c optional com compat/linux/linux_stats.c optional compat_linux compat/linux/linux_sysctl.c optional compat_linux compat/linux/linux_time.c optional compat_linux +compat/linux/linux_timer.c optional compat_linux compat/linux/linux_uid16.c optional compat_linux compat/linux/linux_util.c optional compat_linux compat/svr4/imgact_svr4.c optional compat_svr4 Modified: stable/9/sys/i386/linux/linux.h ============================================================================== --- stable/9/sys/i386/linux/linux.h Tue Sep 23 13:58:39 2014 (r272028) +++ stable/9/sys/i386/linux/linux.h Tue Sep 23 16:03:57 2014 (r272029) @@ -54,6 +54,11 @@ MALLOC_DECLARE(M_LINUX); #define PTRIN(v) (void *)(v) #define PTROUT(v) (l_uintptr_t)(v) +#define CP(src,dst,fld) do { (dst).fld = (src).fld; } while (0) +#define CP2(src,dst,sfld,dfld) do { (dst).dfld = (src).sfld; } while (0) +#define PTRIN_CP(src,dst,fld) \ + do { (dst).fld = PTRIN((src).fld); } while (0) + /* * Provide a separate set of types for the Linux types. */ Modified: stable/9/sys/i386/linux/linux_machdep.c ============================================================================== --- stable/9/sys/i386/linux/linux_machdep.c Tue Sep 23 13:58:39 2014 (r272028) +++ stable/9/sys/i386/linux/linux_machdep.c Tue Sep 23 16:03:57 2014 (r272029) @@ -977,37 +977,6 @@ linux_get_thread_area(struct thread *td, return (0); } -/* copied from kern/kern_time.c */ -int -linux_timer_create(struct thread *td, struct linux_timer_create_args *args) -{ - return sys_ktimer_create(td, (struct ktimer_create_args *) args); -} - -int -linux_timer_settime(struct thread *td, struct linux_timer_settime_args *args) -{ - return sys_ktimer_settime(td, (struct ktimer_settime_args *) args); -} - -int -linux_timer_gettime(struct thread *td, struct linux_timer_gettime_args *args) -{ - return sys_ktimer_gettime(td, (struct ktimer_gettime_args *) args); -} - -int -linux_timer_getoverrun(struct thread *td, struct linux_timer_getoverrun_args *args) -{ - return sys_ktimer_getoverrun(td, (struct ktimer_getoverrun_args *) args); -} - -int -linux_timer_delete(struct thread *td, struct linux_timer_delete_args *args) -{ - return sys_ktimer_delete(td, (struct ktimer_delete_args *) args); -} - /* XXX: this wont work with module - convert it */ int linux_mq_open(struct thread *td, struct linux_mq_open_args *args) Modified: stable/9/sys/i386/linux/syscalls.master ============================================================================== --- stable/9/sys/i386/linux/syscalls.master Tue Sep 23 13:58:39 2014 (r272028) +++ stable/9/sys/i386/linux/syscalls.master Tue Sep 23 16:03:57 2014 (r272029) @@ -439,7 +439,7 @@ 258 AUE_NULL STD { int linux_set_tid_address(int *tidptr); } 259 AUE_NULL STD { int linux_timer_create(clockid_t clock_id, \ struct sigevent *evp, l_timer_t *timerid); } -260 AUE_NULL STD { int linux_timer_settime(l_timer_t timerid, \ +260 AUE_NULL STD { int linux_timer_settime(l_timer_t timerid, l_int flags, \ const struct itimerspec *new, struct itimerspec *old); } 261 AUE_NULL STD { int linux_timer_gettime(l_timer_t timerid, struct itimerspec *setting); } 262 AUE_NULL STD { int linux_timer_getoverrun(l_timer_t timerid); } Modified: stable/9/sys/kern/kern_time.c ============================================================================== --- stable/9/sys/kern/kern_time.c Tue Sep 23 13:58:39 2014 (r272028) +++ stable/9/sys/kern/kern_time.c Tue Sep 23 16:03:57 2014 (r272029) @@ -1340,13 +1340,20 @@ struct timer_getoverrun_args { int sys_ktimer_getoverrun(struct thread *td, struct ktimer_getoverrun_args *uap) { + + return (kern_ktimer_getoverrun(td, uap->timerid)); +} + +int +kern_ktimer_getoverrun(struct thread *td, int timer_id) +{ struct proc *p = td->td_proc; struct itimer *it; int error ; PROC_LOCK(p); - if (uap->timerid < 3 || - (it = itimer_find(p, uap->timerid)) == NULL) { + if (timer_id < 3 || + (it = itimer_find(p, timer_id)) == NULL) { PROC_UNLOCK(p); error = EINVAL; } else { Modified: stable/9/sys/modules/linux/Makefile ============================================================================== --- stable/9/sys/modules/linux/Makefile Tue Sep 23 13:58:39 2014 (r272028) +++ stable/9/sys/modules/linux/Makefile Tue Sep 23 16:03:57 2014 (r272029) @@ -13,6 +13,7 @@ SRCS= linux_fork.c linux${SFX}_dummy.c l linux${SFX}_machdep.c linux_mib.c linux_misc.c linux_signal.c \ linux_socket.c linux_stats.c linux_sysctl.c linux${SFX}_sysent.c \ linux${SFX}_sysvec.c linux_uid16.c linux_util.c linux_time.c \ + linux_timer.c \ opt_inet6.h opt_compat.h opt_kdtrace.h opt_posix.h opt_usb.h \ vnode_if.h device_if.h bus_if.h assym.s Modified: stable/9/sys/sys/syscallsubr.h ============================================================================== --- stable/9/sys/sys/syscallsubr.h Tue Sep 23 13:58:39 2014 (r272028) +++ stable/9/sys/sys/syscallsubr.h Tue Sep 23 16:03:57 2014 (r272029) @@ -233,6 +233,7 @@ int kern_ktimer_settime(struct thread *t struct itimerspec *val, struct itimerspec *oval); int kern_ktimer_gettime(struct thread *td, int timer_id, struct itimerspec *val); +int kern_ktimer_getoverrun(struct thread *td, int timer_id); int kern_thr_new(struct thread *td, struct thr_param *param); int kern_thr_suspend(struct thread *td, struct timespec *tsp); int kern_truncate(struct thread *td, char *path, enum uio_seg pathseg, From bz at FreeBSD.org Tue Sep 23 16:06:31 2014 From: bz at FreeBSD.org (Bjoern A. Zeeb) Date: Tue, 23 Sep 2014 16:06:28 +0000 (UTC) Subject: svn commit: r272031 - in stable/9/sys: amd64/linux32 i386/linux Message-ID: <201409231606.s8NG6SPQ066515@svn.freebsd.org> Author: bz Date: Tue Sep 23 16:06:28 2014 New Revision: 272031 URL: http://svnweb.freebsd.org/changeset/base/272031 Log: This is a direct commit rather than an MFC of r271744. Re-gen after r272029 (r271743 in head) implementing most of timer_{create,settime,gettime,getoverrun,delete}. Sponsored by: DARPA/AFRL Modified: stable/9/sys/amd64/linux32/linux32_proto.h stable/9/sys/amd64/linux32/linux32_syscall.h stable/9/sys/amd64/linux32/linux32_syscalls.c stable/9/sys/amd64/linux32/linux32_sysent.c stable/9/sys/amd64/linux32/linux32_systrace_args.c stable/9/sys/i386/linux/linux_proto.h stable/9/sys/i386/linux/linux_syscall.h stable/9/sys/i386/linux/linux_syscalls.c stable/9/sys/i386/linux/linux_sysent.c stable/9/sys/i386/linux/linux_systrace_args.c Modified: stable/9/sys/amd64/linux32/linux32_proto.h ============================================================================== --- stable/9/sys/amd64/linux32/linux32_proto.h Tue Sep 23 16:05:23 2014 (r272030) +++ stable/9/sys/amd64/linux32/linux32_proto.h Tue Sep 23 16:06:28 2014 (r272031) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/9/sys/amd64/linux32/syscalls.master 248532 2013-03-19 20:18:30Z jkim + * created from FreeBSD: stable/9/sys/amd64/linux32/syscalls.master 272029 2014-09-23 16:03:57Z bz */ #ifndef _LINUX_SYSPROTO_H_ @@ -14,6 +14,7 @@ #include #include #include +#include #include @@ -782,19 +783,25 @@ struct linux_set_tid_address_args { char tidptr_l_[PADL_(int *)]; int * tidptr; char tidptr_r_[PADR_(int *)]; }; struct linux_timer_create_args { - register_t dummy; + char clock_id_l_[PADL_(clockid_t)]; clockid_t clock_id; char clock_id_r_[PADR_(clockid_t)]; + char evp_l_[PADL_(struct sigevent *)]; struct sigevent * evp; char evp_r_[PADR_(struct sigevent *)]; + char timerid_l_[PADL_(l_timer_t *)]; l_timer_t * timerid; char timerid_r_[PADR_(l_timer_t *)]; }; struct linux_timer_settime_args { - register_t dummy; + char timerid_l_[PADL_(l_timer_t)]; l_timer_t timerid; char timerid_r_[PADR_(l_timer_t)]; + char flags_l_[PADL_(l_int)]; l_int flags; char flags_r_[PADR_(l_int)]; + char new_l_[PADL_(const struct itimerspec *)]; const struct itimerspec * new; char new_r_[PADR_(const struct itimerspec *)]; + char old_l_[PADL_(struct itimerspec *)]; struct itimerspec * old; char old_r_[PADR_(struct itimerspec *)]; }; struct linux_timer_gettime_args { - register_t dummy; + char timerid_l_[PADL_(l_timer_t)]; l_timer_t timerid; char timerid_r_[PADR_(l_timer_t)]; + char setting_l_[PADL_(struct itimerspec *)]; struct itimerspec * setting; char setting_r_[PADR_(struct itimerspec *)]; }; struct linux_timer_getoverrun_args { - register_t dummy; + char timerid_l_[PADL_(l_timer_t)]; l_timer_t timerid; char timerid_r_[PADR_(l_timer_t)]; }; struct linux_timer_delete_args { - register_t dummy; + char timerid_l_[PADL_(l_timer_t)]; l_timer_t timerid; char timerid_r_[PADR_(l_timer_t)]; }; struct linux_clock_settime_args { char which_l_[PADL_(clockid_t)]; clockid_t which; char which_r_[PADR_(clockid_t)]; Modified: stable/9/sys/amd64/linux32/linux32_syscall.h ============================================================================== --- stable/9/sys/amd64/linux32/linux32_syscall.h Tue Sep 23 16:05:23 2014 (r272030) +++ stable/9/sys/amd64/linux32/linux32_syscall.h Tue Sep 23 16:06:28 2014 (r272031) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/9/sys/amd64/linux32/syscalls.master 248532 2013-03-19 20:18:30Z jkim + * created from FreeBSD: stable/9/sys/amd64/linux32/syscalls.master 272029 2014-09-23 16:03:57Z bz */ #define LINUX_SYS_exit 1 Modified: stable/9/sys/amd64/linux32/linux32_syscalls.c ============================================================================== --- stable/9/sys/amd64/linux32/linux32_syscalls.c Tue Sep 23 16:05:23 2014 (r272030) +++ stable/9/sys/amd64/linux32/linux32_syscalls.c Tue Sep 23 16:06:28 2014 (r272031) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/9/sys/amd64/linux32/syscalls.master 248532 2013-03-19 20:18:30Z jkim + * created from FreeBSD: stable/9/sys/amd64/linux32/syscalls.master 272029 2014-09-23 16:03:57Z bz */ const char *linux_syscallnames[] = { Modified: stable/9/sys/amd64/linux32/linux32_sysent.c ============================================================================== --- stable/9/sys/amd64/linux32/linux32_sysent.c Tue Sep 23 16:05:23 2014 (r272030) +++ stable/9/sys/amd64/linux32/linux32_sysent.c Tue Sep 23 16:06:28 2014 (r272031) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/9/sys/amd64/linux32/syscalls.master 248532 2013-03-19 20:18:30Z jkim + * created from FreeBSD: stable/9/sys/amd64/linux32/syscalls.master 272029 2014-09-23 16:03:57Z bz */ #include "opt_compat.h" @@ -278,11 +278,11 @@ struct sysent linux_sysent[] = { { 0, (sy_call_t *)linux_epoll_wait, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 256 = linux_epoll_wait */ { 0, (sy_call_t *)linux_remap_file_pages, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 257 = linux_remap_file_pages */ { AS(linux_set_tid_address_args), (sy_call_t *)linux_set_tid_address, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 258 = linux_set_tid_address */ - { 0, (sy_call_t *)linux_timer_create, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 259 = linux_timer_create */ - { 0, (sy_call_t *)linux_timer_settime, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 260 = linux_timer_settime */ - { 0, (sy_call_t *)linux_timer_gettime, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 261 = linux_timer_gettime */ - { 0, (sy_call_t *)linux_timer_getoverrun, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 262 = linux_timer_getoverrun */ - { 0, (sy_call_t *)linux_timer_delete, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 263 = linux_timer_delete */ + { AS(linux_timer_create_args), (sy_call_t *)linux_timer_create, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 259 = linux_timer_create */ + { AS(linux_timer_settime_args), (sy_call_t *)linux_timer_settime, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 260 = linux_timer_settime */ + { AS(linux_timer_gettime_args), (sy_call_t *)linux_timer_gettime, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 261 = linux_timer_gettime */ + { AS(linux_timer_getoverrun_args), (sy_call_t *)linux_timer_getoverrun, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 262 = linux_timer_getoverrun */ + { AS(linux_timer_delete_args), (sy_call_t *)linux_timer_delete, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 263 = linux_timer_delete */ { AS(linux_clock_settime_args), (sy_call_t *)linux_clock_settime, AUE_CLOCK_SETTIME, NULL, 0, 0, 0, SY_THR_STATIC }, /* 264 = linux_clock_settime */ { AS(linux_clock_gettime_args), (sy_call_t *)linux_clock_gettime, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 265 = linux_clock_gettime */ { AS(linux_clock_getres_args), (sy_call_t *)linux_clock_getres, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 266 = linux_clock_getres */ Modified: stable/9/sys/amd64/linux32/linux32_systrace_args.c ============================================================================== --- stable/9/sys/amd64/linux32/linux32_systrace_args.c Tue Sep 23 16:05:23 2014 (r272030) +++ stable/9/sys/amd64/linux32/linux32_systrace_args.c Tue Sep 23 16:06:28 2014 (r272031) @@ -1723,27 +1723,43 @@ systrace_args(int sysnum, void *params, } /* linux_timer_create */ case 259: { - *n_args = 0; + struct linux_timer_create_args *p = params; + iarg[0] = p->clock_id; /* clockid_t */ + uarg[1] = (intptr_t) p->evp; /* struct sigevent * */ + uarg[2] = (intptr_t) p->timerid; /* l_timer_t * */ + *n_args = 3; break; } /* linux_timer_settime */ case 260: { - *n_args = 0; + struct linux_timer_settime_args *p = params; + iarg[0] = p->timerid; /* l_timer_t */ + iarg[1] = p->flags; /* l_int */ + uarg[2] = (intptr_t) p->new; /* const struct itimerspec * */ + uarg[3] = (intptr_t) p->old; /* struct itimerspec * */ + *n_args = 4; break; } /* linux_timer_gettime */ case 261: { - *n_args = 0; + struct linux_timer_gettime_args *p = params; + iarg[0] = p->timerid; /* l_timer_t */ + uarg[1] = (intptr_t) p->setting; /* struct itimerspec * */ + *n_args = 2; break; } /* linux_timer_getoverrun */ case 262: { - *n_args = 0; + struct linux_timer_getoverrun_args *p = params; + iarg[0] = p->timerid; /* l_timer_t */ + *n_args = 1; break; } /* linux_timer_delete */ case 263: { - *n_args = 0; + struct linux_timer_delete_args *p = params; + iarg[0] = p->timerid; /* l_timer_t */ + *n_args = 1; break; } /* linux_clock_settime */ @@ -4840,18 +4856,71 @@ systrace_setargdesc(int sysnum, int ndx, break; /* linux_timer_create */ case 259: + switch(ndx) { + case 0: + p = "clockid_t"; + break; + case 1: + p = "struct sigevent *"; + break; + case 2: + p = "l_timer_t *"; + break; + default: + break; + }; break; /* linux_timer_settime */ case 260: + switch(ndx) { + case 0: + p = "l_timer_t"; + break; + case 1: + p = "l_int"; + break; + case 2: + p = "const struct itimerspec *"; + break; + case 3: + p = "struct itimerspec *"; + break; + default: + break; + }; break; /* linux_timer_gettime */ case 261: + switch(ndx) { + case 0: + p = "l_timer_t"; + break; + case 1: + p = "struct itimerspec *"; + break; + default: + break; + }; break; /* linux_timer_getoverrun */ case 262: + switch(ndx) { + case 0: + p = "l_timer_t"; + break; + default: + break; + }; break; /* linux_timer_delete */ case 263: + switch(ndx) { + case 0: + p = "l_timer_t"; + break; + default: + break; + }; break; /* linux_clock_settime */ case 264: Modified: stable/9/sys/i386/linux/linux_proto.h ============================================================================== --- stable/9/sys/i386/linux/linux_proto.h Tue Sep 23 16:05:23 2014 (r272030) +++ stable/9/sys/i386/linux/linux_proto.h Tue Sep 23 16:06:28 2014 (r272031) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/9/sys/i386/linux/syscalls.master 248532 2013-03-19 20:18:30Z jkim + * created from FreeBSD: stable/9/sys/i386/linux/syscalls.master 272029 2014-09-23 16:03:57Z bz */ #ifndef _LINUX_SYSPROTO_H_ @@ -14,6 +14,7 @@ #include #include #include +#include #include @@ -788,6 +789,7 @@ struct linux_timer_create_args { }; struct linux_timer_settime_args { char timerid_l_[PADL_(l_timer_t)]; l_timer_t timerid; char timerid_r_[PADR_(l_timer_t)]; + char flags_l_[PADL_(l_int)]; l_int flags; char flags_r_[PADR_(l_int)]; char new_l_[PADL_(const struct itimerspec *)]; const struct itimerspec * new; char new_r_[PADR_(const struct itimerspec *)]; char old_l_[PADL_(struct itimerspec *)]; struct itimerspec * old; char old_r_[PADR_(struct itimerspec *)]; }; Modified: stable/9/sys/i386/linux/linux_syscall.h ============================================================================== --- stable/9/sys/i386/linux/linux_syscall.h Tue Sep 23 16:05:23 2014 (r272030) +++ stable/9/sys/i386/linux/linux_syscall.h Tue Sep 23 16:06:28 2014 (r272031) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/9/sys/i386/linux/syscalls.master 248532 2013-03-19 20:18:30Z jkim + * created from FreeBSD: stable/9/sys/i386/linux/syscalls.master 272029 2014-09-23 16:03:57Z bz */ #define LINUX_SYS_exit 1 Modified: stable/9/sys/i386/linux/linux_syscalls.c ============================================================================== --- stable/9/sys/i386/linux/linux_syscalls.c Tue Sep 23 16:05:23 2014 (r272030) +++ stable/9/sys/i386/linux/linux_syscalls.c Tue Sep 23 16:06:28 2014 (r272031) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/9/sys/i386/linux/syscalls.master 248532 2013-03-19 20:18:30Z jkim + * created from FreeBSD: stable/9/sys/i386/linux/syscalls.master 272029 2014-09-23 16:03:57Z bz */ const char *linux_syscallnames[] = { Modified: stable/9/sys/i386/linux/linux_sysent.c ============================================================================== --- stable/9/sys/i386/linux/linux_sysent.c Tue Sep 23 16:05:23 2014 (r272030) +++ stable/9/sys/i386/linux/linux_sysent.c Tue Sep 23 16:06:28 2014 (r272031) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/9/sys/i386/linux/syscalls.master 248532 2013-03-19 20:18:30Z jkim + * created from FreeBSD: stable/9/sys/i386/linux/syscalls.master 272029 2014-09-23 16:03:57Z bz */ #include Modified: stable/9/sys/i386/linux/linux_systrace_args.c ============================================================================== --- stable/9/sys/i386/linux/linux_systrace_args.c Tue Sep 23 16:05:23 2014 (r272030) +++ stable/9/sys/i386/linux/linux_systrace_args.c Tue Sep 23 16:06:28 2014 (r272031) @@ -1784,9 +1784,10 @@ systrace_args(int sysnum, void *params, case 260: { struct linux_timer_settime_args *p = params; iarg[0] = p->timerid; /* l_timer_t */ - uarg[1] = (intptr_t) p->new; /* const struct itimerspec * */ - uarg[2] = (intptr_t) p->old; /* struct itimerspec * */ - *n_args = 3; + iarg[1] = p->flags; /* l_int */ + uarg[2] = (intptr_t) p->new; /* const struct itimerspec * */ + uarg[3] = (intptr_t) p->old; /* struct itimerspec * */ + *n_args = 4; break; } /* linux_timer_gettime */ @@ -5023,9 +5024,12 @@ systrace_setargdesc(int sysnum, int ndx, p = "l_timer_t"; break; case 1: - p = "const struct itimerspec *"; + p = "l_int"; break; case 2: + p = "const struct itimerspec *"; + break; + case 3: p = "struct itimerspec *"; break; default: From bzeeb-lists at lists.zabbadoz.net Tue Sep 23 16:13:40 2014 From: bzeeb-lists at lists.zabbadoz.net (Bjoern A. Zeeb) Date: Tue, 23 Sep 2014 16:13:20 +0000 Subject: svn commit: r266269 - in stable/9/sys: amd64/include i386/include modules modules/xenhvm xen In-Reply-To: <201405161928.s4GJSNBN050222@svn.freebsd.org> References: <201405161928.s4GJSNBN050222@svn.freebsd.org> Message-ID: <02652F0F-9BCC-42BA-9F81-09BC24A1390C@lists.zabbadoz.net> On 16 May 2014, at 19:28 , Colin Percival wrote: > Author: cperciva > Date: Fri May 16 19:28:22 2014 > New Revision: 266269 > URL: http://svnweb.freebsd.org/changeset/base/266269 > > Log: > Add xenhvm.ko, which can be loaded along with a !XENHVM kernel in order to > provide support for the Xen/HVM environment. > > This code is compiled with XENHVM defined; since this would result in the > (no longer used) "last processed" values being included in PCPU data > structures, an additional MODXENHVM define is used to exclude those. This > allows KBI to be retained for both GENERIC and XENHVM kernel configurations > (which are not KBI compatible with each other). > > This is a direct commit to stable/9, since stable/10 and HEAD have XENHVM > merged into the GENERIC kernel configuration (but the changes in stable/10 > and HEAD cannot be MFCed as-is). > > Discussed with: royger, gjb > Relnotes: FreeBSD 9.3-RELEASE can run in Xen/HVM environments, > including Amazon EC2, using GENERIC + xenhvm.ko. > I think it is this commit that completely broke the pc98 build on stable/9 and probably has been broken since? The modules Makefile probably wants MACHINE == ?i386? and not MACHINE_CPUARCH for this module (as in you want to mov the _xenhvm= into the dedicated amd64 and i386 sections? >>> stage 3.1: making dependencies -------------------------------------------------------------- /scratch/tmp/bz/stable9.svn/sys/modules/xenhvm/../../dev/xen//balloon/balloon.c:43:32: error: machine/xen/xen-os.h: No such file or directory /scratch/tmp/bz/stable9.svn/sys/modules/xenhvm/../../dev/xen//balloon/balloon.c:44:32: error: machine/xen/xenvar.h: No such file or directory /scratch/tmp/bz/stable9.svn/sys/modules/xenhvm/../../dev/xen//balloon/balloon.c:45:33: error: machine/xen/xenfunc.h: No such file or directory In file included from @/xen/interface/xen.h:33, from @/xen/hypervisor.h:32, from /scratch/tmp/bz/stable9.svn/sys/modules/xenhvm/../../dev/xen//balloon/balloon.c:46: @/xen/interface/arch-x86/xen.h:35:2: error: #error "using old handle" In file included from /scratch/tmp/bz/stable9.svn/sys/modules/xenhvm/../../dev/xen//balloon/balloon.c:46: @/xen/hypervisor.h:39:35: error: machine/xen/hypercall.h: No such file or directory /scratch/tmp/bz/stable9.svn/sys/modules/xenhvm/../../dev/xen//blkfront/blkfront.c:54:32: error: machine/xen/xen-os.h: No such file or directory /scratch/tmp/bz/stable9.svn/sys/modules/xenhvm/../../dev/xen//blkfront/blkfront.c:55:32: error: machine/xen/xenvar.h: No such file or directory /scratch/tmp/bz/stable9.svn/sys/modules/xenhvm/../../dev/xen//blkfront/blkfront.c:56:33: error: machine/xen/xenfunc.h: No such file or directory In file included from @/xen/interface/xen.h:33, from @/xen/hypervisor.h:32, from /scratch/tmp/bz/stable9.svn/sys/modules/xenhvm/../../dev/xen//blkfront/blkfront.c:58: @/xen/interface/arch-x86/xen.h:35:2: error: #error "using old handle" In file included from /scratch/tmp/bz/stable9.svn/sys/modules/xenhvm/../../dev/xen//blkfront/blkfront.c:58: @/xen/hypervisor.h:39:35: error: machine/xen/hypercall.h: No such file or directory In file included from /scratch/tmp/bz/stable9.svn/sys/modules/xenhvm/../../dev/xen//blkfront/blkfront.c:60: @/xen/evtchn.h:16:38: error: machine/xen/synch_bitops.h: No such file or directory /scratch/tmp/bz/stable9.svn/sys/modules/xenhvm/../../dev/xen//blkback/blkback.c:73:32: error: machine/xen/xen-os.h: No such file or directory In file included from @/xen/interface/xen.h:33, from @/xen/hypervisor.h:32, from @/xen/evtchn.h:15, from /scratch/tmp/bz/stable9.svn/sys/modules/xenhvm/../../dev/xen//blkback/blkback.c:80: @/xen/interface/arch-x86/xen.h:35:2: error: #error "using old handle" In file included from @/xen/evtchn.h:15, from /scratch/tmp/bz/stable9.svn/sys/modules/xenhvm/../../dev/xen//blkback/blkback.c:80: @/xen/hypervisor.h:39:35: error: machine/xen/hypercall.h: No such file or directory In file included from /scratch/tmp/bz/stable9.svn/sys/modules/xenhvm/../../dev/xen//blkback/blkback.c:80: @/xen/evtchn.h:16:38: error: machine/xen/synch_bitops.h: No such file or directory /scratch/tmp/bz/stable9.svn/sys/modules/xenhvm/../../dev/xen//control/control.c:131:32: error: machine/xen/xen-os.h: No such file or directory In file included from @/xen/interface/xen.h:33, from @/xen/hypervisor.h:32, from @/xen/evtchn.h:15, from /scratch/tmp/bz/stable9.svn/sys/modules/xenhvm/../../dev/xen//control/control.c:138: @/xen/interface/arch-x86/xen.h:35:2: error: #error "using old handle" In file included from @/xen/evtchn.h:15, from /scratch/tmp/bz/stable9.svn/sys/modules/xenhvm/../../dev/xen//control/control.c:138: @/xen/hypervisor.h:39:35: error: machine/xen/hypercall.h: No such file or directory In file included from /scratch/tmp/bz/stable9.svn/sys/modules/xenhvm/../../dev/xen//control/control.c:138: @/xen/evtchn.h:16:38: error: machine/xen/synch_bitops.h: No such file or directory /scratch/tmp/bz/stable9.svn/sys/modules/xenhvm/../../dev/xen//netback/netback.c:83:32: error: machine/xen/xen-os.h: No such file or directory /scratch/tmp/bz/stable9.svn/sys/modules/xenhvm/../../dev/xen//netback/netback.c:84:32: error: machine/xen/xenvar.h: No such file or directory In file included from @/xen/interface/xen.h:33, from @/xen/hypervisor.h:32, ? ? Bjoern A. Zeeb "Come on. Learn, goddamn it.", WarGames, 1983 From bz at FreeBSD.org Tue Sep 23 19:32:43 2014 From: bz at FreeBSD.org (Bjoern A. Zeeb) Date: Tue, 23 Sep 2014 19:32:43 +0000 (UTC) Subject: svn commit: r272039 - stable/9/sys/modules Message-ID: <201409231932.s8NJWh2L071038@svn.freebsd.org> Author: bz Date: Tue Sep 23 19:32:42 2014 New Revision: 272039 URL: http://svnweb.freebsd.org/changeset/base/272039 Log: After r266269 unbreak the pc98 builds by only building the xenhvm module for amd64 and i386 but not for pc98. Modified: stable/9/sys/modules/Makefile Modified: stable/9/sys/modules/Makefile ============================================================================== --- stable/9/sys/modules/Makefile Tue Sep 23 19:24:13 2014 (r272038) +++ stable/9/sys/modules/Makefile Tue Sep 23 19:32:42 2014 (r272039) @@ -369,7 +369,6 @@ SUBDIR= \ .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" _filemon= filemon -_xenhvm= xenhvm .endif .if ${MACHINE_CPUARCH} != "powerpc" && ${MACHINE_CPUARCH} != "arm" && \ @@ -614,6 +613,7 @@ _twa= twa _vesa= vesa _virtio= virtio _x86bios= x86bios +_xenhvm= xenhvm .elif ${MACHINE} == "pc98" _canbepm= canbepm _canbus= canbus @@ -738,6 +738,7 @@ _viawd= viawd _virtio= virtio _vxge= vxge _x86bios= x86bios +_xenhvm= xenhvm _wbwd= wbwd _wi= wi _wpi= wpi From bzeeb-lists at lists.zabbadoz.net Tue Sep 23 19:34:00 2014 From: bzeeb-lists at lists.zabbadoz.net (Bjoern A. Zeeb) Date: Tue, 23 Sep 2014 19:33:14 +0000 Subject: svn commit: r266269 - in stable/9/sys: amd64/include i386/include modules modules/xenhvm xen In-Reply-To: <02652F0F-9BCC-42BA-9F81-09BC24A1390C@lists.zabbadoz.net> References: <201405161928.s4GJSNBN050222@svn.freebsd.org> <02652F0F-9BCC-42BA-9F81-09BC24A1390C@lists.zabbadoz.net> Message-ID: <4BCBE502-37D6-4D00-AB51-EBAA46BE3097@lists.zabbadoz.net> On 23 Sep 2014, at 16:13 , Bjoern A. Zeeb wrote: > > On 16 May 2014, at 19:28 , Colin Percival wrote: > >> Author: cperciva >> Date: Fri May 16 19:28:22 2014 >> New Revision: 266269 >> URL: http://svnweb.freebsd.org/changeset/base/266269 >> >> Log: >> Add xenhvm.ko, which can be loaded along with a !XENHVM kernel in order to >> provide support for the Xen/HVM environment. >> >> This code is compiled with XENHVM defined; since this would result in the >> (no longer used) "last processed" values being included in PCPU data >> structures, an additional MODXENHVM define is used to exclude those. This >> allows KBI to be retained for both GENERIC and XENHVM kernel configurations >> (which are not KBI compatible with each other). >> >> This is a direct commit to stable/9, since stable/10 and HEAD have XENHVM >> merged into the GENERIC kernel configuration (but the changes in stable/10 >> and HEAD cannot be MFCed as-is). >> >> Discussed with: royger, gjb >> Relnotes: FreeBSD 9.3-RELEASE can run in Xen/HVM environments, >> including Amazon EC2, using GENERIC + xenhvm.ko. >> > > I think it is this commit that completely broke the pc98 build on stable/9 > and probably has been broken since? > > The modules Makefile probably wants MACHINE == ?i386? and not MACHINE_CPUARCH for this module (as in you want to mov the _xenhvm= into the dedicated amd64 and i386 sections? OK, just done so in r272039. Case closed. ? Bjoern A. Zeeb "Come on. Learn, goddamn it.", WarGames, 1983 From cperciva at freebsd.org Tue Sep 23 19:38:27 2014 From: cperciva at freebsd.org (Colin Percival) Date: Tue, 23 Sep 2014 12:37:50 -0700 Subject: svn commit: r266269 - in stable/9/sys: amd64/include i386/include modules modules/xenhvm xen In-Reply-To: <4BCBE502-37D6-4D00-AB51-EBAA46BE3097@lists.zabbadoz.net> References: <201405161928.s4GJSNBN050222@svn.freebsd.org> <02652F0F-9BCC-42BA-9F81-09BC24A1390C@lists.zabbadoz.net> <4BCBE502-37D6-4D00-AB51-EBAA46BE3097@lists.zabbadoz.net> Message-ID: <5421CC0E.7010909@freebsd.org> On 09/23/14 12:33, Bjoern A. Zeeb wrote: > On 23 Sep 2014, at 16:13 , Bjoern A. Zeeb wrote: >> On 16 May 2014, at 19:28 , Colin Percival wrote: >>> Author: cperciva >>> Date: Fri May 16 19:28:22 2014 >>> New Revision: 266269 >>> URL: http://svnweb.freebsd.org/changeset/base/266269 >>> >>> Log: >>> Add xenhvm.ko, which can be loaded along with a !XENHVM kernel in order to >>> provide support for the Xen/HVM environment. >>> [...] >> I think it is this commit that completely broke the pc98 build on stable/9 >> and probably has been broken since? >> >> The modules Makefile probably wants MACHINE == ?i386? and not MACHINE_CPUARCH for this module (as in you want to mov the _xenhvm= into the dedicated amd64 and i386 sections? > > OK, just done so in r272039. Case closed. Thanks! I'm sure I ran a 'make universe' before that commit though... (/me runs off to catch his next flight) -- Colin Percival Security Officer Emeritus, FreeBSD | The power to serve Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid From pjd at FreeBSD.org Tue Sep 23 21:56:16 2014 From: pjd at FreeBSD.org (Pawel Jakub Dawidek) Date: Tue, 23 Sep 2014 21:56:15 +0000 (UTC) Subject: svn commit: r272042 - stable/9/contrib/openbsm/bin/auditdistd Message-ID: <201409232156.s8NLuFvc038801@svn.freebsd.org> Author: pjd Date: Tue Sep 23 21:56:15 2014 New Revision: 272042 URL: http://svnweb.freebsd.org/changeset/base/272042 Log: MFC r271577: Fix descriptors leak. PR: bin/191002 Reported by: Ryan Steinmetz Submitted by: mjg Modified: stable/9/contrib/openbsm/bin/auditdistd/subr.c Directory Properties: stable/9/contrib/openbsm/ (props changed) Modified: stable/9/contrib/openbsm/bin/auditdistd/subr.c ============================================================================== --- stable/9/contrib/openbsm/bin/auditdistd/subr.c Tue Sep 23 21:38:05 2014 (r272041) +++ stable/9/contrib/openbsm/bin/auditdistd/subr.c Tue Sep 23 21:56:15 2014 (r272042) @@ -228,6 +228,11 @@ wait_for_file_init(int fd) PJDLOG_ASSERT(fd != -1); #ifdef HAVE_KQUEUE + if (wait_for_file_kq != -1) { + close(wait_for_file_kq); + wait_for_file_kq = -1; + } + kq = kqueue(); if (kq == -1) { pjdlog_errno(LOG_WARNING, "kqueue() failed"); From pjd at FreeBSD.org Tue Sep 23 22:27:35 2014 From: pjd at FreeBSD.org (Pawel Jakub Dawidek) Date: Tue, 23 Sep 2014 22:27:34 +0000 (UTC) Subject: svn commit: r272048 - stable/9/sys/kern Message-ID: <201409232227.s8NMRYGC054369@svn.freebsd.org> Author: pjd Date: Tue Sep 23 22:27:34 2014 New Revision: 272048 URL: http://svnweb.freebsd.org/changeset/base/272048 Log: MFC r236360,r236361: - Add missing system calls. - Remove rmdirat system call which doesn't exist. Modified: stable/9/sys/kern/capabilities.conf Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/capabilities.conf ============================================================================== --- stable/9/sys/kern/capabilities.conf Tue Sep 23 22:23:58 2014 (r272047) +++ stable/9/sys/kern/capabilities.conf Tue Sep 23 22:27:34 2014 (r272048) @@ -445,13 +445,17 @@ olio_listio faccessat fstatat fchmodat +fchownat futimesat +linkat mkdirat -rmdirat mkfifoat mknodat openat +readlinkat renameat +symlinkat +unlinkat ## ## Allow entry into open(2). This system call will fail, since access to the From hselasky at FreeBSD.org Thu Sep 25 05:59:13 2014 From: hselasky at FreeBSD.org (Hans Petter Selasky) Date: Thu, 25 Sep 2014 05:59:13 +0000 (UTC) Subject: svn commit: r272092 - stable/9/sys/dev/usb/controller Message-ID: <201409250559.s8P5xDWW054115@svn.freebsd.org> Author: hselasky Date: Thu Sep 25 05:59:12 2014 New Revision: 272092 URL: http://svnweb.freebsd.org/changeset/base/272092 Log: MFC r271953: Some XHCI hardware requires dropping the endpoint context before adding it again. Modified: stable/9/sys/dev/usb/controller/xhci.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/controller/xhci.c ============================================================================== --- stable/9/sys/dev/usb/controller/xhci.c Thu Sep 25 05:47:33 2014 (r272091) +++ stable/9/sys/dev/usb/controller/xhci.c Thu Sep 25 05:59:12 2014 (r272092) @@ -2217,7 +2217,14 @@ xhci_configure_mask(struct usb_device *u xhci_ctx_set_le32(sc, &pinp->ctx_input.dwInCtx0, mask); xhci_ctx_set_le32(sc, &pinp->ctx_input.dwInCtx1, 0); } else { - xhci_ctx_set_le32(sc, &pinp->ctx_input.dwInCtx0, 0); + /* + * Some hardware requires that we drop the endpoint + * context before adding it again: + */ + xhci_ctx_set_le32(sc, &pinp->ctx_input.dwInCtx0, + mask & XHCI_INCTX_NON_CTRL_MASK); + + /* Add new endpoint context */ xhci_ctx_set_le32(sc, &pinp->ctx_input.dwInCtx1, mask); /* find most significant set bit */ From thomas at FreeBSD.org Fri Sep 26 19:13:14 2014 From: thomas at FreeBSD.org (Thomas Quinot) Date: Fri, 26 Sep 2014 19:13:14 +0000 (UTC) Subject: svn commit: r272184 - stable/9/tools/tools/nanobsd Message-ID: <201409261913.s8QJDEne031969@svn.freebsd.org> Author: thomas Date: Fri Sep 26 19:13:13 2014 New Revision: 272184 URL: http://svnweb.freebsd.org/changeset/base/272184 Log: MFC rev. 258705 to stable/9: Define NANO_MAKE (single threaded MAKE) and use it for installworld, installkernel, and distribution. Required in order to fix regression introduced by MFC rev. 265894 for kern/162736, since that change depends on this one. PR: 193808 Modified: stable/9/tools/tools/nanobsd/nanobsd.sh Modified: stable/9/tools/tools/nanobsd/nanobsd.sh ============================================================================== --- stable/9/tools/tools/nanobsd/nanobsd.sh Fri Sep 26 18:53:00 2014 (r272183) +++ stable/9/tools/tools/nanobsd/nanobsd.sh Fri Sep 26 19:13:13 2014 (r272184) @@ -57,7 +57,8 @@ NANO_PACKAGE_LIST="*" # default is ${NANO_OBJ} #NANO_DISKIMGDIR="" -# Parallel Make +# Make & parallel Make +NANO_MAKE="make" NANO_PMAKE="make -j 3" # The default name for any image we create. @@ -254,7 +255,7 @@ install_world ( ) ( cd ${NANO_SRC} env TARGET_ARCH=${NANO_ARCH} \ - ${NANO_PMAKE} __MAKE_CONF=${NANO_MAKE_CONF_INSTALL} installworld \ + ${NANO_MAKE} __MAKE_CONF=${NANO_MAKE_CONF_INSTALL} installworld \ DESTDIR=${NANO_WORLDDIR} \ > ${NANO_OBJ}/_.iw 2>&1 chflags -R noschg ${NANO_WORLDDIR} @@ -267,7 +268,7 @@ install_etc ( ) ( cd ${NANO_SRC} env TARGET_ARCH=${NANO_ARCH} \ - ${NANO_PMAKE} __MAKE_CONF=${NANO_MAKE_CONF_INSTALL} distribution \ + ${NANO_MAKE} __MAKE_CONF=${NANO_MAKE_CONF_INSTALL} distribution \ DESTDIR=${NANO_WORLDDIR} \ > ${NANO_OBJ}/_.etc 2>&1 # make.conf doesn't get created by default, but some ports need it @@ -886,6 +887,7 @@ fi if $do_clean ; then true else + NANO_MAKE="${NANO_MAKE} -DNO_CLEAN" NANO_PMAKE="${NANO_PMAKE} -DNO_CLEAN" fi @@ -905,6 +907,7 @@ export NANO_DRIVE export NANO_HEADS export NANO_IMAGES export NANO_IMGNAME +export NANO_MAKE export NANO_MAKE_CONF_BUILD export NANO_MAKE_CONF_INSTALL export NANO_MEDIASIZE From mav at FreeBSD.org Sat Sep 27 08:35:24 2014 From: mav at FreeBSD.org (Alexander Motin) Date: Sat, 27 Sep 2014 08:35:24 +0000 (UTC) Subject: svn commit: r272205 - stable/9/sys/compat/linux Message-ID: <201409270835.s8R8ZOlb017776@svn.freebsd.org> Author: mav Date: Sat Sep 27 08:35:23 2014 New Revision: 272205 URL: http://svnweb.freebsd.org/changeset/base/272205 Log: MFC r272059: Remake Linux' SOUND_MIXER_INFO IOCTL as a wrapper around new FreeBSD's one. Submitted by: Dmitry Luhtionov Modified: stable/9/sys/compat/linux/linux_ioctl.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/compat/linux/linux_ioctl.c ============================================================================== --- stable/9/sys/compat/linux/linux_ioctl.c Sat Sep 27 08:33:50 2014 (r272204) +++ stable/9/sys/compat/linux/linux_ioctl.c Sat Sep 27 08:35:23 2014 (r272205) @@ -1665,13 +1665,6 @@ linux_ioctl_vfat(struct thread *td, stru * Sound related ioctls */ -struct linux_mixer_info { - char id[16]; - char name[32]; - int modify_counter; - int fillers[10]; -}; - struct linux_old_mixer_info { char id[16]; char name[32]; @@ -1759,12 +1752,8 @@ linux_ioctl_sound(struct thread *td, str /* Key on encoded length */ switch ((args->cmd >> 16) & 0x1fff) { case 0x005c: { /* SOUND_MIXER_INFO */ - struct linux_mixer_info info; - bzero(&info, sizeof(info)); - strncpy(info.id, "OSS", sizeof(info.id) - 1); - strncpy(info.name, "FreeBSD OSS Mixer", sizeof(info.name) - 1); - copyout(&info, (void *)args->arg, sizeof(info)); - return (0); + args->cmd = SOUND_MIXER_INFO; + return (sys_ioctl(td, (struct ioctl_args *)args)); } case 0x0030: { /* SOUND_OLD_MIXER_INFO */ struct linux_old_mixer_info info; From hselasky at FreeBSD.org Sat Sep 27 18:10:53 2014 From: hselasky at FreeBSD.org (Hans Petter Selasky) Date: Sat, 27 Sep 2014 18:10:52 +0000 (UTC) Subject: svn commit: r272219 - in stable/9/sys/dev/usb: . serial Message-ID: <201409271810.s8RIAqxC095355@svn.freebsd.org> Author: hselasky Date: Sat Sep 27 18:10:52 2014 New Revision: 272219 URL: http://svnweb.freebsd.org/changeset/base/272219 Log: MFC r271874: Add new USB IDs. PR: 193775 Modified: stable/9/sys/dev/usb/serial/u3g.c stable/9/sys/dev/usb/usbdevs Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/serial/u3g.c ============================================================================== --- stable/9/sys/dev/usb/serial/u3g.c Sat Sep 27 18:08:39 2014 (r272218) +++ stable/9/sys/dev/usb/serial/u3g.c Sat Sep 27 18:10:52 2014 (r272219) @@ -250,6 +250,8 @@ static const STRUCT_USB_HOST_ID u3g_devs U3G_DEV(DLINK3, DWM652, 0), U3G_DEV(HP, EV2200, 0), U3G_DEV(HP, HS2300, 0), + U3G_DEV(HP, UN2420_QDL, 0), + U3G_DEV(HP, UN2420, 0), U3G_DEV(HUAWEI, E1401, U3GINIT_HUAWEI), U3G_DEV(HUAWEI, E1402, U3GINIT_HUAWEI), U3G_DEV(HUAWEI, E1403, U3GINIT_HUAWEI), Modified: stable/9/sys/dev/usb/usbdevs ============================================================================== --- stable/9/sys/dev/usb/usbdevs Sat Sep 27 18:08:39 2014 (r272218) +++ stable/9/sys/dev/usb/usbdevs Sat Sep 27 18:10:52 2014 (r272219) @@ -2220,6 +2220,8 @@ product HP 3300C 0x0205 ScanJet 3300C product HP CDW8200 0x0207 CD-Writer Plus 8200e product HP MMKEYB 0x020c Multimedia keyboard product HP 1220C 0x0212 DeskJet 1220C +product HP UN2420_QDL 0x241d UN2420 QDL Firmware Loader +product HP UN2420 0x251d UN2420 WWAN/GPS Module product HP 810C 0x0304 DeskJet 810C/812C product HP 4300C 0x0305 Scanjet 4300C product HP CDW4E 0x0307 CD-Writer+ CD-4e From wblock at FreeBSD.org Sun Sep 28 23:22:47 2014 From: wblock at FreeBSD.org (Warren Block) Date: Sun, 28 Sep 2014 23:22:47 +0000 (UTC) Subject: svn commit: r272276 - stable/9/etc Message-ID: <201409282322.s8SNMlGF029915@svn.freebsd.org> Author: wblock (doc committer) Date: Sun Sep 28 23:22:46 2014 New Revision: 272276 URL: http://svnweb.freebsd.org/changeset/base/272276 Log: MFC r272137: Revised to better point to release notes and errata, security advisories, and be more specific about the -questions list. Modified: stable/9/etc/motd Directory Properties: stable/9/etc/ (props changed) Modified: stable/9/etc/motd ============================================================================== --- stable/9/etc/motd Sun Sep 28 23:15:18 2014 (r272275) +++ stable/9/etc/motd Sun Sep 28 23:22:46 2014 (r272276) @@ -1,12 +1,13 @@ FreeBSD ?.?.? (UNKNOWN) -Welcome to FreeBSD! Handy technical support resources: +Welcome to FreeBSD! -Security advisories and errata: https://www.FreeBSD.org/releases/ -Handbook: https://www.FreeBSD.org/handbook/ -FAQ: https://www.FreeBSD.org/faq/ -Mailing list: https://lists.FreeBSD.org/mailman/listinfo/freebsd-questions/ -Forums: https://forums.FreeBSD.org/ +Release Notes, Errata: https://www.FreeBSD.org/releases/ +Security Advisories: https://www.FreeBSD.org/security/ +FreeBSD Handbook: https://www.FreeBSD.org/handbook/ +FreeBSD FAQ: https://www.FreeBSD.org/faq/ +Questions List: https://lists.FreeBSD.org/mailman/listinfo/freebsd-questions/ +FreeBSD Forums: https://forums.FreeBSD.org/ Documents installed with the system are in the /usr/local/share/doc/freebsd/ directory, or can be installed later with: pkg install en-freebsd-doc @@ -14,7 +15,6 @@ For other languages, replace "en" with a Show the version of FreeBSD installed: uname -a Please include that output and any error messages when posting questions. - Introduction to manual pages: man man FreeBSD directory layout: man hier From emaste at FreeBSD.org Tue Sep 30 15:05:28 2014 From: emaste at FreeBSD.org (Ed Maste) Date: Tue, 30 Sep 2014 15:05:28 +0000 (UTC) Subject: svn commit: r272302 - stable/9/contrib/llvm/tools/clang/lib/CodeGen Message-ID: <201409301505.s8UF5SAd041037@svn.freebsd.org> Author: emaste Date: Tue Sep 30 15:05:27 2014 New Revision: 272302 URL: http://svnweb.freebsd.org/changeset/base/272302 Log: MFC r271432: Merge upstream Clang rev 205331 debuginfo crash fix: Debug info: fix a crash when emitting IndirectFieldDecls, which were previously not handled at all. rdar://problem/16348575 Modified: stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp Directory Properties: stable/9/contrib/llvm/ (props changed) stable/9/contrib/llvm/tools/clang/ (props changed) Modified: stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp ============================================================================== --- stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp Tue Sep 30 13:56:32 2014 (r272301) +++ stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp Tue Sep 30 15:05:27 2014 (r272302) @@ -1239,7 +1239,7 @@ CollectTemplateParams(const TemplatePara V = CGM.GetAddrOfFunction(FD); // Member data pointers have special handling too to compute the fixed // offset within the object. - if (isa(D)) { + if (isa(D) || isa(D)) { // These five lines (& possibly the above member function pointer // handling) might be able to be refactored to use similar code in // CodeGenModule::getMemberPointerConstant From emaste at FreeBSD.org Tue Sep 30 15:07:07 2014 From: emaste at FreeBSD.org (Ed Maste) Date: Tue, 30 Sep 2014 15:07:07 +0000 (UTC) Subject: svn commit: r272303 - stable/9/contrib/llvm/patches Message-ID: <201409301507.s8UF77am041344@svn.freebsd.org> Author: emaste Date: Tue Sep 30 15:07:06 2014 New Revision: 272303 URL: http://svnweb.freebsd.org/changeset/base/272303 Log: MFC r271433: Add clang patch corresponding to r271432 Added: stable/9/contrib/llvm/patches/patch-r271432-clang-r205331-debug-info-crash.diff - copied unchanged from r271433, head/contrib/llvm/patches/patch-r271432-clang-r205331-debug-info-crash.diff Modified: Directory Properties: stable/9/contrib/llvm/ (props changed) Copied: stable/9/contrib/llvm/patches/patch-r271432-clang-r205331-debug-info-crash.diff (from r271433, head/contrib/llvm/patches/patch-r271432-clang-r205331-debug-info-crash.diff) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/contrib/llvm/patches/patch-r271432-clang-r205331-debug-info-crash.diff Tue Sep 30 15:07:06 2014 (r272303, copy of r271433, head/contrib/llvm/patches/patch-r271432-clang-r205331-debug-info-crash.diff) @@ -0,0 +1,46 @@ +commit 96365aef99ec463375dfdaf6eb260823e0477b6a +Author: Adrian Prantl +Date: Tue Apr 1 17:52:06 2014 +0000 + + Debug info: fix a crash when emitting IndirectFieldDecls, which were + previously not handled at all. + rdar://problem/16348575 + + git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk at 205331 91177308-0d34-0410-b5e6-96231b3b80d8 + +diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp +index 82db942..2556cf9 100644 +--- tools/clang/lib/CodeGen/CGDebugInfo.cpp ++++ tools/clangb/lib/CodeGen/CGDebugInfo.cpp +@@ -1252,7 +1252,7 @@ CollectTemplateParams(const TemplateParameterList *TPList, + V = CGM.GetAddrOfFunction(FD); + // Member data pointers have special handling too to compute the fixed + // offset within the object. +- if (isa(D)) { ++ if (isa(D) || isa(D)) { + // These five lines (& possibly the above member function pointer + // handling) might be able to be refactored to use similar code in + // CodeGenModule::getMemberPointerConstant +diff --git a/test/CodeGenCXX/debug-info-indirect-field-decl.cpp b/test/CodeGenCXX/debug-info-indirect-field-decl.cpp +new file mode 100644 +index 0000000..131ceba +--- /dev/null ++++ tools/clang/test/CodeGenCXX/debug-info-indirect-field-decl.cpp +@@ -0,0 +1,17 @@ ++// RUN: %clang_cc1 -emit-llvm -g -triple x86_64-apple-darwin %s -o - | FileCheck %s ++// ++// Test that indirect field decls are handled gracefully. ++// rdar://problem/16348575 ++// ++template class Foo { }; ++ ++struct Bar { ++ int i1; ++ // CHECK: [ DW_TAG_member ] [line [[@LINE+1]], size 32, align 32, offset 32] [from _ZTSN3BarUt_E] ++ union { ++ // CHECK: [ DW_TAG_member ] [i2] [line [[@LINE+1]], size 32, align 32, offset 0] [from int] ++ int i2; ++ }; ++}; ++ ++Foo the_foo; From emaste at FreeBSD.org Tue Sep 30 15:10:42 2014 From: emaste at FreeBSD.org (Ed Maste) Date: Tue, 30 Sep 2014 15:10:41 +0000 (UTC) Subject: svn commit: r272304 - in stable/9/contrib/llvm: patches tools/clang/lib/CodeGen Message-ID: <201409301510.s8UFAfQr044906@svn.freebsd.org> Author: emaste Date: Tue Sep 30 15:10:40 2014 New Revision: 272304 URL: http://svnweb.freebsd.org/changeset/base/272304 Log: MFC Clang debug info crash fix 271282: Merge Clang debug info crash fix rev 200797: Debug info: fix a crasher when when emitting debug info for not-yet-completed templated types. getTypeSize() needs a complete type. rdar://problem/15931354 271283: Add clang patch for r271282 Note that r271282 contains only the src change from Clang rev 200797. This patch file includes two follow-on changes to the test case, which do not apply to the copy in the FreeBSD tree. Upstream Clang revisions: 200797: Debug info: fix a crasher when when emitting debug info for not-yet-completed templated types. getTypeSize() needs a complete type. rdar://problem/15931354 200798: Simplify testcase from r200797 some more. 200805: Further simplify r200797 and add an explanatory comment. PR: 193347 Added: stable/9/contrib/llvm/patches/patch-r271282-clang-r200797-r200798-r200805-debug-info-crash.diff - copied unchanged from r271283, head/contrib/llvm/patches/patch-r271282-clang-r200797-r200798-r200805-debug-info-crash.diff Modified: stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp Directory Properties: stable/9/contrib/llvm/ (props changed) stable/9/contrib/llvm/tools/clang/ (props changed) Copied: stable/9/contrib/llvm/patches/patch-r271282-clang-r200797-r200798-r200805-debug-info-crash.diff (from r271283, head/contrib/llvm/patches/patch-r271282-clang-r200797-r200798-r200805-debug-info-crash.diff) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/contrib/llvm/patches/patch-r271282-clang-r200797-r200798-r200805-debug-info-crash.diff Tue Sep 30 15:10:40 2014 (r272304, copy of r271283, head/contrib/llvm/patches/patch-r271282-clang-r200797-r200798-r200805-debug-info-crash.diff) @@ -0,0 +1,51 @@ +diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp +index 59ba47c..dddc7e7 100644 +--- a/lib/CodeGen/CGDebugInfo.cpp ++++ b/lib/CodeGen/CGDebugInfo.cpp +@@ -2251,9 +2251,10 @@ llvm::DICompositeType CGDebugInfo::CreateLimitedType(const RecordType *Ty) { + if (T && (!T.isForwardDecl() || !RD->getDefinition())) + return T; + +- // If this is just a forward declaration, construct an appropriately +- // marked node and just return it. +- if (!RD->getDefinition()) ++ // If this is just a forward or incomplete declaration, construct an ++ // appropriately marked node and just return it. ++ const RecordDecl *D = RD->getDefinition(); ++ if (!D || !D->isCompleteDefinition()) + return getOrCreateRecordFwdDecl(Ty, RDContext); + + uint64_t Size = CGM.getContext().getTypeSize(Ty); +diff --git a/test/CodeGenCXX/debug-info-template-fwd.cpp b/test/CodeGenCXX/debug-info-template-fwd.cpp +new file mode 100644 +index 0000000..b2b7073 +--- /dev/null ++++ b/test/CodeGenCXX/debug-info-template-fwd.cpp +@@ -0,0 +1,27 @@ ++// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin -g -emit-llvm -o - | FileCheck %s ++// This test is for a crash when emitting debug info for not-yet-completed ++// types. ++// Test that we don't actually emit a forward decl for the offending class: ++// CHECK: [ DW_TAG_structure_type ] [Derived] {{.*}} [def] ++// rdar://problem/15931354 ++template class Derived; ++ ++template class Base { ++ static Derived *create(); ++}; ++ ++template struct Derived : Base { ++}; ++ ++Base *f; ++ ++// During the instantiation of Derived, Base becomes required to be ++// complete - since the declaration has already been emitted (due to 'f', ++// above), we immediately try to build debug info for Base which then ++// requires the (incomplete definition) of Derived which is problematic. ++// ++// (if 'f' is not present, the point at which Base becomes required to be ++// complete during the instantiation of Derived is a no-op because ++// Base was never emitted so we ignore it and carry on until we ++// wire up the base class of Derived in the debug info later on) ++Derived d; Modified: stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp ============================================================================== --- stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp Tue Sep 30 15:07:06 2014 (r272303) +++ stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp Tue Sep 30 15:10:40 2014 (r272304) @@ -2233,9 +2233,10 @@ llvm::DICompositeType CGDebugInfo::Creat if (T && (!T.isForwardDecl() || !RD->getDefinition())) return T; - // If this is just a forward declaration, construct an appropriately - // marked node and just return it. - if (!RD->getDefinition()) + // If this is just a forward or incomplete declaration, construct an + // appropriately marked node and just return it. + const RecordDecl *D = RD->getDefinition(); + if (!D || !D->isCompleteDefinition()) return getOrCreateRecordFwdDecl(Ty, RDContext); uint64_t Size = CGM.getContext().getTypeSize(Ty);