svn commit: r320932 - head/contrib/libarchive/libarchive

2017-07-12 Thread Martin Matuska
Author: mm
Date: Thu Jul 13 04:46:00 2017
New Revision: 320932
URL: https://svnweb.freebsd.org/changeset/base/320932

Log:
  Fix libarchive mismerge of r320927 in libarchive_entry.h
  
  MFC after:1 week
  X-MFC-with:   320927
  Reported by:  Ngie Cooper 

Modified:
  head/contrib/libarchive/libarchive/archive_entry.h

Modified: head/contrib/libarchive/libarchive/archive_entry.h
==
--- head/contrib/libarchive/libarchive/archive_entry.h  Thu Jul 13 04:42:29 
2017(r320931)
+++ head/contrib/libarchive/libarchive/archive_entry.h  Thu Jul 13 04:46:00 
2017(r320932)
@@ -30,7 +30,7 @@
 #defineARCHIVE_ENTRY_H_INCLUDED
 
 /* Note: Compiler will complain if this does not match archive.h! */
-#defineARCHIVE_VERSION_NUMBER 3003001
+#defineARCHIVE_VERSION_NUMBER 3003002
 
 /*
  * Note: archive_entry.h is for use outside of libarchive; the
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r320931 - head/contrib/libarchive/libarchive

2017-07-12 Thread Martin Matuska
Author: mm
Date: Thu Jul 13 04:42:29 2017
New Revision: 320931
URL: https://svnweb.freebsd.org/changeset/base/320931

Log:
  Fix libarchive mismerge of r320927
  
  MFC after:1 week
  X-MFC-with:   320927
  Reported by:  Ngie Cooper 

Modified:
  head/contrib/libarchive/libarchive/archive.h

Modified: head/contrib/libarchive/libarchive/archive.h
==
--- head/contrib/libarchive/libarchive/archive.hThu Jul 13 03:52:54 
2017(r320930)
+++ head/contrib/libarchive/libarchive/archive.hThu Jul 13 04:42:29 
2017(r320931)
@@ -36,7 +36,7 @@
  * assert that ARCHIVE_VERSION_NUMBER >= 2012108.
  */
 /* Note: Compiler will complain if this does not match archive_entry.h! */
-#defineARCHIVE_VERSION_NUMBER 3003001
+#defineARCHIVE_VERSION_NUMBER 3003002
 
 #include 
 #include   /* for wchar_t */
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r320930 - in head: etc/mtree usr.bin/hexdump usr.bin/hexdump/tests

2017-07-12 Thread Kyle Evans
Author: kevans
Date: Thu Jul 13 03:52:54 2017
New Revision: 320930
URL: https://svnweb.freebsd.org/changeset/base/320930

Log:
  Add some basic tests for hexdump(1)'s various output flags. Formatting
  tests are omitted for this initial run as there are still some bugs to work
  out there.
  
  This covers -s flag testing on devices and non-devices that would have
  caught breakage found in PR 219173 as well as other subtle breakage caused
  locally.
  
  Reviewed by:  cem, ngie
  Approved by:  cem (acting co-mentor)
  MFC after:2 weeks
  Differential Revision:https://reviews.freebsd.org/D11279

Added:
  head/usr.bin/hexdump/tests/
  head/usr.bin/hexdump/tests/Makefile   (contents, props changed)
  head/usr.bin/hexdump/tests/d_hexdump_UCflag_a.out   (contents, props changed)
  head/usr.bin/hexdump/tests/d_hexdump_UCflag_b.out   (contents, props changed)
  head/usr.bin/hexdump/tests/d_hexdump_UCflag_c.out   (contents, props changed)
  head/usr.bin/hexdump/tests/d_hexdump_a.in   (contents, props changed)
  head/usr.bin/hexdump/tests/d_hexdump_b.in   (contents, props changed)
  head/usr.bin/hexdump/tests/d_hexdump_bflag_a.out   (contents, props changed)
  head/usr.bin/hexdump/tests/d_hexdump_bflag_b.out   (contents, props changed)
  head/usr.bin/hexdump/tests/d_hexdump_bflag_c.out   (contents, props changed)
  head/usr.bin/hexdump/tests/d_hexdump_c.in   (contents, props changed)
  head/usr.bin/hexdump/tests/d_hexdump_cflag_a.out   (contents, props changed)
  head/usr.bin/hexdump/tests/d_hexdump_cflag_b.out   (contents, props changed)
  head/usr.bin/hexdump/tests/d_hexdump_cflag_c.out   (contents, props changed)
  head/usr.bin/hexdump/tests/d_hexdump_dflag_a.out   (contents, props changed)
  head/usr.bin/hexdump/tests/d_hexdump_dflag_b.out   (contents, props changed)
  head/usr.bin/hexdump/tests/d_hexdump_dflag_c.out   (contents, props changed)
  head/usr.bin/hexdump/tests/d_hexdump_nflag_a.out   (contents, props changed)
  head/usr.bin/hexdump/tests/d_hexdump_oflag_a.out   (contents, props changed)
  head/usr.bin/hexdump/tests/d_hexdump_oflag_b.out   (contents, props changed)
  head/usr.bin/hexdump/tests/d_hexdump_oflag_c.out   (contents, props changed)
  head/usr.bin/hexdump/tests/d_hexdump_sflag_a.out   (contents, props changed)
  head/usr.bin/hexdump/tests/d_hexdump_xflag_a.out   (contents, props changed)
  head/usr.bin/hexdump/tests/d_hexdump_xflag_b.out   (contents, props changed)
  head/usr.bin/hexdump/tests/d_hexdump_xflag_c.out   (contents, props changed)
  head/usr.bin/hexdump/tests/hexdump_test.sh   (contents, props changed)
Modified:
  head/etc/mtree/BSD.tests.dist
  head/usr.bin/hexdump/Makefile

Modified: head/etc/mtree/BSD.tests.dist
==
--- head/etc/mtree/BSD.tests.dist   Thu Jul 13 02:20:07 2017
(r320929)
+++ head/etc/mtree/BSD.tests.dist   Thu Jul 13 03:52:54 2017
(r320930)
@@ -644,6 +644,8 @@
 ..
 gzip
 ..
+hexdump
+..
 ident
 ..
 indent

Modified: head/usr.bin/hexdump/Makefile
==
--- head/usr.bin/hexdump/Makefile   Thu Jul 13 02:20:07 2017
(r320929)
+++ head/usr.bin/hexdump/Makefile   Thu Jul 13 03:52:54 2017
(r320930)
@@ -1,11 +1,17 @@
 #  @(#)Makefile8.1 (Berkeley) 6/6/93
 # $FreeBSD$
 
+.include 
+
 PROG=  hexdump
 SRCS=  conv.c display.c hexdump.c hexsyntax.c odsyntax.c parse.c
 MAN=   hexdump.1 od.1
 MLINKS=hexdump.1 hd.1
 LINKS= ${BINDIR}/hexdump ${BINDIR}/od
 LINKS+=${BINDIR}/hexdump ${BINDIR}/hd
+
+.if ${MK_TESTS} != "no"
+SUBDIR+=   tests
+.endif
 
 .include 

Added: head/usr.bin/hexdump/tests/Makefile
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/usr.bin/hexdump/tests/Makefile Thu Jul 13 03:52:54 2017
(r320930)
@@ -0,0 +1,31 @@
+# $FreeBSD$
+
+PACKAGE=   tests
+
+ATF_TESTS_SH=  hexdump_test
+
+${PACKAGE}FILES+=  d_hexdump_a.in
+${PACKAGE}FILES+=  d_hexdump_b.in
+${PACKAGE}FILES+=  d_hexdump_c.in
+${PACKAGE}FILES+=  d_hexdump_bflag_a.out
+${PACKAGE}FILES+=  d_hexdump_bflag_b.out
+${PACKAGE}FILES+=  d_hexdump_bflag_c.out
+${PACKAGE}FILES+=  d_hexdump_cflag_a.out
+${PACKAGE}FILES+=  d_hexdump_cflag_b.out
+${PACKAGE}FILES+=  d_hexdump_cflag_c.out
+${PACKAGE}FILES+=  d_hexdump_dflag_a.out
+${PACKAGE}FILES+=  d_hexdump_dflag_b.out
+${PACKAGE}FILES+=  d_hexdump_dflag_c.out
+${PACKAGE}FILES+=  d_hexdump_nflag_a.out
+${PACKAGE}FILES+=  d_hexdump_oflag_a.out
+${PACKAGE}FILES+=  d_hexdump_oflag_b.out
+${PACKAGE}FILES+=  d_hexdump_oflag_c.out
+${PACKAGE}FILES+=  d_hexdump_sflag_a.out
+${PACKAGE}FILES+=  d_hexdump_UCflag_a.out
+${PACKAGE}FILES+=  d_hexdump_UCflag_b.out
+${PACKAGE}FILES+=  

svn commit: r320929 - head/sys/dev/usb/controller

2017-07-12 Thread Ian Lepore
Author: ian
Date: Thu Jul 13 02:20:07 2017
New Revision: 320929
URL: https://svnweb.freebsd.org/changeset/base/320929

Log:
  Put an #ifdef notyet wrapper around a function that's not being used yet,
  to avoid compile warnings.

Modified:
  head/sys/dev/usb/controller/ehci_imx.c

Modified: head/sys/dev/usb/controller/ehci_imx.c
==
--- head/sys/dev/usb/controller/ehci_imx.c  Thu Jul 13 02:16:15 2017
(r320928)
+++ head/sys/dev/usb/controller/ehci_imx.c  Thu Jul 13 02:20:07 2017
(r320929)
@@ -162,6 +162,7 @@ imx_usbmisc_set_ctrl(device_t dev, u_int index, uint32
bus_write_4(sc->mmio, index * sizeof(uint32_t), reg | bits);
 }
 
+#ifdef notyet
 static void
 imx_usbmisc_clr_ctrl(device_t dev, u_int index, uint32_t bits)
 {
@@ -172,6 +173,7 @@ imx_usbmisc_clr_ctrl(device_t dev, u_int index, uint32
reg = bus_read_4(sc->mmio, index * sizeof(uint32_t));
bus_write_4(sc->mmio, index * sizeof(uint32_t), reg & ~bits);
 }
+#endif
 
 static int
 imx_usbmisc_probe(device_t dev)
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r320928 - in head/sys: arm/freescale/imx dev/usb/controller

2017-07-12 Thread Ian Lepore
Author: ian
Date: Thu Jul 13 02:16:15 2017
New Revision: 320928
URL: https://svnweb.freebsd.org/changeset/base/320928

Log:
  Support the "disable-over-current" property for imx ehci controllers.
  
  It turns out that this is more than a power optization.  The OTG port
  won't work on boards that have this property unless this setting is honored.
  
  Also ensure that the usb phy device attaches before ehci.

Modified:
  head/sys/arm/freescale/imx/imx6_usbphy.c
  head/sys/dev/usb/controller/ehci_imx.c

Modified: head/sys/arm/freescale/imx/imx6_usbphy.c
==
--- head/sys/arm/freescale/imx/imx6_usbphy.cThu Jul 13 00:28:36 2017
(r320927)
+++ head/sys/arm/freescale/imx/imx6_usbphy.cThu Jul 13 02:16:15 2017
(r320928)
@@ -198,5 +198,11 @@ static driver_t usbphy_driver = {
 
 static devclass_t usbphy_devclass;
 
-DRIVER_MODULE(usbphy, simplebus, usbphy_driver, usbphy_devclass, 0, 0);
+/*
+ * This driver needs to start before the ehci driver, but later than the usual
+ * "special" drivers like clocks and cpu.  Ehci starts at DEFAULT so
+ * DEFAULT-1000 seems good.
+ */
+EARLY_DRIVER_MODULE(usbphy, simplebus, usbphy_driver, usbphy_devclass, 0, 0,
+BUS_PASS_DEFAULT - 1000);
 

Modified: head/sys/dev/usb/controller/ehci_imx.c
==
--- head/sys/dev/usb/controller/ehci_imx.c  Thu Jul 13 00:28:36 2017
(r320927)
+++ head/sys/dev/usb/controller/ehci_imx.c  Thu Jul 13 02:16:15 2017
(r320928)
@@ -83,12 +83,11 @@ __FBSDID("$FreeBSD$");
  * data, this means that the resources (memory-mapped register range) for the
  * non-core registers belongs to a device other than the echi devices.
  *
- * At the moment we have no need to access the non-core registers, so all of
- * this amounts to documenting what's known.  The following compat strings have
- * been seen in existing FDT data:
- *   - "fsl,imx25-usbmisc"
- *   - "fsl,imx51-usbmisc";
- *   - "fsl,imx6q-usbmisc";
+ * Because the main ehci device cannot access registers in a range that's
+ * defined in the fdt data as belonging to another device, we implement a teeny
+ * little "usbmisc" driver which exists only to provide access to the usbmisc
+ * control register for each of the 4 usb controller instances.  That little
+ * driver is implemented here in this file, before the main driver.
  *
  * In addition to the single usbmisc device, the existing FDT data defines a
  * separate device for each of the OTG or EHCI cores within the USBOH3.  Each 
of
@@ -133,18 +132,127 @@ __FBSDID("$FreeBSD$");
  *
  */
 
-static struct ofw_compat_data compat_data[] = {
-   {"fsl,imx6q-usb",   1},
-   {"fsl,imx53-usb",   1},
-   {"fsl,imx51-usb",   1},
-   {"fsl,imx28-usb",   1},
-   {"fsl,imx27-usb",   1},
-   {"fsl,imx25-usb",   1},
-   {"fsl,imx23-usb",   1},
-   {NULL,  0},
+/*-
+ * imx_usbmisc driver
+ *---*/
+
+#defineUSBNC_OVER_CUR_POL(1u << 8)
+#defineUSBNC_OVER_CUR_DIS(1u << 7)
+
+struct imx_usbmisc_softc {
+   device_tdev;
+   struct resource *mmio;
 };
 
+static struct ofw_compat_data usbmisc_compat_data[] = {
+   {"fsl,imx6q-usbmisc",   true},
+   {"fsl,imx51-usbmisc",   true},
+   {"fsl,imx25-usbmisc",   true},
+   {NULL,  false},
+};
+
+static void
+imx_usbmisc_set_ctrl(device_t dev, u_int index, uint32_t bits)
+{
+   struct imx_usbmisc_softc *sc;
+   uint32_t reg;
+
+   sc = device_get_softc(dev);
+   reg = bus_read_4(sc->mmio, index * sizeof(uint32_t));
+   bus_write_4(sc->mmio, index * sizeof(uint32_t), reg | bits);
+}
+
+static void
+imx_usbmisc_clr_ctrl(device_t dev, u_int index, uint32_t bits)
+{
+   struct imx_usbmisc_softc *sc;
+   uint32_t reg;
+
+   sc = device_get_softc(dev);
+   reg = bus_read_4(sc->mmio, index * sizeof(uint32_t));
+   bus_write_4(sc->mmio, index * sizeof(uint32_t), reg & ~bits);
+}
+
+static int
+imx_usbmisc_probe(device_t dev)
+{
+
+   if (!ofw_bus_status_okay(dev))
+   return (ENXIO);
+
+   if (ofw_bus_search_compatible(dev, usbmisc_compat_data)->ocd_data) {
+   device_set_desc(dev, "i.MX USB Misc Control");
+   return (BUS_PROBE_DEFAULT);
+   }
+   return (ENXIO);
+}
+
+static int
+imx_usbmisc_detach(device_t dev)
+{
+   struct imx_usbmisc_softc *sc;
+
+   sc = device_get_softc(dev);
+
+   if (sc->mmio != NULL)
+   bus_release_resource(dev, SYS_RES_MEMORY, 0, sc->mmio);
+
+   return (0);
+}
+
+static int
+imx_usbmisc_attach(device_t dev)
+{
+   struct imx_usbmisc_softc *sc;
+   int err, rid;
+
+   sc = 

Re: svn commit: r320927 - in head: contrib/libarchive contrib/libarchive/libarchive contrib/libarchive/libarchive/test usr.bin/bsdcat usr.bin/cpio usr.bin/tar

2017-07-12 Thread Ngie Cooper
On Wed, Jul 12, 2017 at 5:28 PM, Martin Matuska  wrote:
> Author: mm
> Date: Thu Jul 13 00:28:36 2017
> New Revision: 320927
> URL: https://svnweb.freebsd.org/changeset/base/320927
>
> Log:
>   MFV r320924:
>   Bump libarchive to 3.3.2
>
>   Vendor changes:
> PR #901: don't depend on stdin in a testcase
>
>   MFC after:1 week

This commit broke the tests:
https://ci.freebsd.org/job/FreeBSD-head-amd64-test/3457/testReport/junit/lib.libarchive/functional_test/test_archive_api_feature/
Thanks,
-Ngie
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r320927 - in head: contrib/libarchive contrib/libarchive/libarchive contrib/libarchive/libarchive/test usr.bin/bsdcat usr.bin/cpio usr.bin/tar

2017-07-12 Thread Martin Matuska
Author: mm
Date: Thu Jul 13 00:28:36 2017
New Revision: 320927
URL: https://svnweb.freebsd.org/changeset/base/320927

Log:
  MFV r320924:
  Bump libarchive to 3.3.2
  
  Vendor changes:
PR #901: don't depend on stdin in a testcase
  
  MFC after:1 week

Modified:
  head/contrib/libarchive/NEWS
  head/contrib/libarchive/libarchive/archive.h
  
head/contrib/libarchive/libarchive/test/test_archive_read_close_twice_open_filename.c
  head/usr.bin/bsdcat/Makefile
  head/usr.bin/cpio/Makefile
  head/usr.bin/tar/Makefile
Directory Properties:
  head/contrib/libarchive/   (props changed)

Modified: head/contrib/libarchive/NEWS
==
--- head/contrib/libarchive/NEWSThu Jul 13 00:20:37 2017
(r320926)
+++ head/contrib/libarchive/NEWSThu Jul 13 00:28:36 2017
(r320927)
@@ -1,3 +1,5 @@
+Jul 09, 2017: libarchive 3.3.2 released
+
 Mar 16, 2017: NFSv4 ACL support for Linux (librichacl)
 
 Feb 26, 2017: libarchive 3.3.1 released

Modified: head/contrib/libarchive/libarchive/archive.h
==
--- head/contrib/libarchive/libarchive/archive.hThu Jul 13 00:20:37 
2017(r320926)
+++ head/contrib/libarchive/libarchive/archive.hThu Jul 13 00:28:36 
2017(r320927)
@@ -155,7 +155,7 @@ __LA_DECL int   archive_version_number(void);
 /*
  * Textual name/version of the library, useful for version displays.
  */
-#defineARCHIVE_VERSION_ONLY_STRING "3.3.1"
+#defineARCHIVE_VERSION_ONLY_STRING "3.3.2"
 #defineARCHIVE_VERSION_STRING "libarchive " ARCHIVE_VERSION_ONLY_STRING
 __LA_DECL const char * archive_version_string(void);
 

Modified: 
head/contrib/libarchive/libarchive/test/test_archive_read_close_twice_open_filename.c
==
--- 
head/contrib/libarchive/libarchive/test/test_archive_read_close_twice_open_filename.c
   Thu Jul 13 00:20:37 2017(r320926)
+++ 
head/contrib/libarchive/libarchive/test/test_archive_read_close_twice_open_filename.c
   Thu Jul 13 00:28:36 2017(r320927)
@@ -28,10 +28,12 @@ __FBSDID("$FreeBSD$");
 
 DEFINE_TEST(test_archive_read_close_twice_open_filename)
 {
+   const char *filename = "empty.file";
struct archive* a = archive_read_new();
 
+   assertMakeFile(filename, 0644, "");
assertEqualInt(ARCHIVE_OK, archive_read_support_format_empty(a));
-   assertEqualInt(ARCHIVE_OK, archive_read_open_filename(a, 0, 0));
+   assertEqualInt(ARCHIVE_OK, archive_read_open_filename(a, filename, 0));
assertEqualInt(0, archive_errno(a));
assertEqualString(NULL, archive_error_string(a));
 

Modified: head/usr.bin/bsdcat/Makefile
==
--- head/usr.bin/bsdcat/MakefileThu Jul 13 00:20:37 2017
(r320926)
+++ head/usr.bin/bsdcat/MakefileThu Jul 13 00:28:36 2017
(r320927)
@@ -6,7 +6,7 @@ _LIBARCHIVEDIR= ${SRCTOP}/contrib/libarchive
 _LIBARCHIVECONFDIR=${SRCTOP}/lib/libarchive
 
 PROG=  bsdcat
-BSDCAT_VERSION_STRING= 3.3.1
+BSDCAT_VERSION_STRING= 3.3.2
 
 .PATH: ${_LIBARCHIVEDIR}/cat
 SRCS=  bsdcat.c cmdline.c

Modified: head/usr.bin/cpio/Makefile
==
--- head/usr.bin/cpio/Makefile  Thu Jul 13 00:20:37 2017(r320926)
+++ head/usr.bin/cpio/Makefile  Thu Jul 13 00:28:36 2017(r320927)
@@ -6,7 +6,7 @@ _LIBARCHIVEDIR= ${SRCTOP}/contrib/libarchive
 _LIBARCHIVECONFDIR=${SRCTOP}/lib/libarchive
 
 PROG=  bsdcpio
-BSDCPIO_VERSION_STRING=3.3.1
+BSDCPIO_VERSION_STRING=3.3.2
 
 .PATH: ${_LIBARCHIVEDIR}/cpio
 SRCS=  cpio.c cmdline.c

Modified: head/usr.bin/tar/Makefile
==
--- head/usr.bin/tar/Makefile   Thu Jul 13 00:20:37 2017(r320926)
+++ head/usr.bin/tar/Makefile   Thu Jul 13 00:28:36 2017(r320927)
@@ -4,7 +4,7 @@
 _LIBARCHIVEDIR=${SRCTOP}/contrib/libarchive
 
 PROG=  bsdtar
-BSDTAR_VERSION_STRING= 3.3.1
+BSDTAR_VERSION_STRING= 3.3.2
 
 .PATH: ${_LIBARCHIVEDIR}/tar
 SRCS=  bsdtar.c\
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r320926 - vendor/libarchive/3.3.2

2017-07-12 Thread Martin Matuska
Author: mm
Date: Thu Jul 13 00:20:37 2017
New Revision: 320926
URL: https://svnweb.freebsd.org/changeset/base/320926

Log:
  Re-tag 3.3.2

Replaced:
  vendor/libarchive/3.3.2/
 - copied from r320925, vendor/libarchive/dist/
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r320925 - in vendor/libarchive/3.3.2: . build libarchive libarchive/test

2017-07-12 Thread Martin Matuska
Author: mm
Date: Thu Jul 13 00:17:40 2017
New Revision: 320925
URL: https://svnweb.freebsd.org/changeset/base/320925

Log:
  Tag libarchive 3.3.2

Added:
  vendor/libarchive/3.3.2/
 - copied from r320923, vendor/libarchive/dist/
Replaced:
  vendor/libarchive/3.3.2/CMakeLists.txt
 - copied unchanged from r320924, vendor/libarchive/dist/CMakeLists.txt
  vendor/libarchive/3.3.2/Makefile.am
 - copied unchanged from r320924, vendor/libarchive/dist/Makefile.am
  vendor/libarchive/3.3.2/NEWS
 - copied unchanged from r320924, vendor/libarchive/dist/NEWS
  vendor/libarchive/3.3.2/build/version
 - copied unchanged from r320924, vendor/libarchive/dist/build/version
  vendor/libarchive/3.3.2/configure.ac
 - copied unchanged from r320924, vendor/libarchive/dist/configure.ac
  vendor/libarchive/3.3.2/libarchive/archive.h
 - copied unchanged from r320924, 
vendor/libarchive/dist/libarchive/archive.h
  
vendor/libarchive/3.3.2/libarchive/test/test_archive_read_close_twice_open_filename.c
 - copied unchanged from r320924, 
vendor/libarchive/dist/libarchive/test/test_archive_read_close_twice_open_filename.c

Copied: vendor/libarchive/3.3.2/CMakeLists.txt (from r320924, 
vendor/libarchive/dist/CMakeLists.txt)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ vendor/libarchive/3.3.2/CMakeLists.txt  Thu Jul 13 00:17:40 2017
(r320925, copy of r320924, vendor/libarchive/dist/CMakeLists.txt)
@@ -0,0 +1,1916 @@
+#
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.12 FATAL_ERROR)
+#
+PROJECT(libarchive C)
+#
+SET(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/build/cmake")
+if(NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY)
+  set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${libarchive_BINARY_DIR}/bin)
+endif()
+#
+# Set the Build type for make based generators.
+# You can choose following types:
+#   Debug  : Debug build
+#   Release: Release build
+#   RelWithDebInfo : Release build with Debug Info
+#   MinSizeRel : Release Min Size build
+IF(NOT CMAKE_BUILD_TYPE)
+  SET(CMAKE_BUILD_TYPE "Release" CACHE STRING "Build Type" FORCE)
+ENDIF(NOT CMAKE_BUILD_TYPE)
+# Set a value type to properly display CMAKE_BUILD_TYPE on GUI if the
+# value type is "UNINITIALIZED".
+GET_PROPERTY(cached_type CACHE CMAKE_BUILD_TYPE PROPERTY TYPE)
+IF("${cached_type}" STREQUAL "UNINITIALIZED")
+  SET(CMAKE_BUILD_TYPE "${CMAKE_BUILD_TYPE}" CACHE STRING "Build Type" FORCE)
+ENDIF("${cached_type}" STREQUAL "UNINITIALIZED")
+# Check the Build Type.
+IF(NOT "${CMAKE_BUILD_TYPE}"
+   MATCHES "^(Debug|Release|RelWithDebInfo|MinSizeRel)\$")
+  MESSAGE(FATAL_ERROR
+  "Unknown keyword for CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}\n"
+  "Acceptable keywords: Debug,Release,RelWithDebInfo,MinSizeRel")
+ENDIF(NOT "${CMAKE_BUILD_TYPE}"
+  MATCHES "^(Debug|Release|RelWithDebInfo|MinSizeRel)\$")
+
+# On MacOS, prefer MacPorts libraries to system libraries.
+# I haven't come up with a compelling argument for this to be conditional.
+list(APPEND CMAKE_PREFIX_PATH /opt/local)
+# Enable @rpath in the install name.
+# detail in "cmake  --help-policy CMP0042"
+SET(CMAKE_MACOSX_RPATH ON)
+
+#
+# Version - read from 'version' file.
+#
+FILE(STRINGS ${CMAKE_CURRENT_SOURCE_DIR}/build/version _version)
+STRING(REGEX REPLACE
+ "^([0-9])[0-9][0-9][0-9][0-9][0-9][0-9][a-z]*$" "\\1" _major ${_version})
+STRING(REGEX REPLACE
+ "^[0-9]([0-9][0-9][0-9])[0-9][0-9][0-9][a-z]*$" "\\1" _minor ${_version})
+STRING(REGEX REPLACE
+ "^[0-9][0-9][0-9][0-9]([0-9][0-9][0-9])[a-z]*$" "\\1" _revision ${_version})
+STRING(REGEX REPLACE
+ "^[0-9][0-9][0-9][0-9][0-9][0-9][0-9]([a-z]*)$" "\\1" _quality ${_version})
+SET(_version_number ${_major}${_minor}${_revision})
+STRING(REGEX REPLACE "[0]*([^0]*[0-9])$" "\\1" _trimmed_minor ${_minor})
+STRING(REGEX REPLACE "[0]*([^0]*[0-9])$" "\\1" _trimmed_revision ${_revision})
+#
+SET(VERSION
"${_major}.${_trimmed_minor}.${_trimmed_revision}${_quality}")
+SET(BSDCPIO_VERSION_STRING "${VERSION}")
+SET(BSDTAR_VERSION_STRING  "${VERSION}")
+SET(BSDCAT_VERSION_STRING  "${VERSION}")
+SET(LIBARCHIVE_VERSION_NUMBER  "${_version_number}")
+SET(LIBARCHIVE_VERSION_STRING  "${VERSION}")
+
+# INTERFACE_VERSION increments with every release
+# libarchive 2.7 == interface version 9 = 2 + 7
+# libarchive 2.8 == interface version 10 = 2 + 8
+# libarchive 2.9 == interface version 11 = 2 + 9
+# libarchive 3.0 == interface version 12
+# libarchive 3.1 == interface version 13
+math(EXPR INTERFACE_VERSION  "13 + ${_minor}")
+
+# Set SOVERSION == Interface version
+# ?? Should there be more here ??
+SET(SOVERSION "${INTERFACE_VERSION}")
+
+# Enalbe CMAKE_PUSH_CHECK_STATE() and CMAKE_POP_CHECK_STATE() macros
+# saving and restoring the state of the variables.
+INCLUDE(CMakePushCheckState)
+
+# Initialize the state of the variables. This initialization is not
+# necessary but this shows you what value the 

svn commit: r320924 - in vendor/libarchive/dist: . build libarchive libarchive/test

2017-07-12 Thread Martin Matuska
Author: mm
Date: Thu Jul 13 00:16:51 2017
New Revision: 320924
URL: https://svnweb.freebsd.org/changeset/base/320924

Log:
  Update vendor/libarchive to git 98a695399e8e7420635a5448aecde8b0a82fb83a
  
  Release 3.3.2
  
  Vendor changes:
PR #901: don't depend on stdin in a testcase

Modified:
  vendor/libarchive/dist/CMakeLists.txt
  vendor/libarchive/dist/Makefile.am
  vendor/libarchive/dist/NEWS
  vendor/libarchive/dist/build/version
  vendor/libarchive/dist/configure.ac
  vendor/libarchive/dist/libarchive/archive.h
  
vendor/libarchive/dist/libarchive/test/test_archive_read_close_twice_open_filename.c

Modified: vendor/libarchive/dist/CMakeLists.txt
==
--- vendor/libarchive/dist/CMakeLists.txt   Wed Jul 12 22:16:54 2017
(r320923)
+++ vendor/libarchive/dist/CMakeLists.txt   Thu Jul 13 00:16:51 2017
(r320924)
@@ -15,7 +15,7 @@ endif()
 #   RelWithDebInfo : Release build with Debug Info
 #   MinSizeRel : Release Min Size build
 IF(NOT CMAKE_BUILD_TYPE)
-  SET(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Build Type" FORCE)
+  SET(CMAKE_BUILD_TYPE "Release" CACHE STRING "Build Type" FORCE)
 ENDIF(NOT CMAKE_BUILD_TYPE)
 # Set a value type to properly display CMAKE_BUILD_TYPE on GUI if the
 # value type is "UNINITIALIZED".

Modified: vendor/libarchive/dist/Makefile.am
==
--- vendor/libarchive/dist/Makefile.am  Wed Jul 12 22:16:54 2017
(r320923)
+++ vendor/libarchive/dist/Makefile.am  Thu Jul 13 00:16:51 2017
(r320924)
@@ -23,7 +23,7 @@ TESTS_ENVIRONMENT= $(libarchive_TESTS_ENVIRONMENT) $(b
 DISTCHECK_CONFIGURE_FLAGS = --enable-bsdtar --enable-bsdcpio
 # The next line is commented out by default in shipping libarchive releases.
 # It is uncommented by default in trunk.
-DEV_CFLAGS=-Werror -Wextra -Wunused -Wshadow -Wmissing-prototypes -Wcast-qual 
-g
+# DEV_CFLAGS=-Werror -Wextra -Wunused -Wshadow -Wmissing-prototypes 
-Wcast-qual -g
 AM_CFLAGS=$(DEV_CFLAGS)
 PLATFORMCPPFLAGS = @PLATFORMCPPFLAGS@
 AM_CPPFLAGS=$(PLATFORMCPPFLAGS)
@@ -850,6 +850,7 @@ libarchive_test_EXTRA_DIST=\
libarchive/test/test_read_format_zip_winzip_aes256.zip.uu \
libarchive/test/test_read_format_zip_winzip_aes256_large.zip.uu \
libarchive/test/test_read_format_zip_winzip_aes256_stored.zip.uu \
+   
libarchive/test/test_read_format_zip_with_invalid_traditional_eocd.zip.uu \
libarchive/test/test_read_format_zip_zip64a.zip.uu \
libarchive/test/test_read_format_zip_zip64b.zip.uu \
libarchive/test/test_read_large_splitted_rar_aa.uu \

Modified: vendor/libarchive/dist/NEWS
==
--- vendor/libarchive/dist/NEWS Wed Jul 12 22:16:54 2017(r320923)
+++ vendor/libarchive/dist/NEWS Thu Jul 13 00:16:51 2017(r320924)
@@ -1,3 +1,5 @@
+Jul 09, 2017: libarchive 3.3.2 released
+
 Mar 16, 2017: NFSv4 ACL support for Linux (librichacl)
 
 Feb 26, 2017: libarchive 3.3.1 released

Modified: vendor/libarchive/dist/build/version
==
--- vendor/libarchive/dist/build/versionWed Jul 12 22:16:54 2017
(r320923)
+++ vendor/libarchive/dist/build/versionThu Jul 13 00:16:51 2017
(r320924)
@@ -1 +1 @@
-3003002dev
+3003002

Modified: vendor/libarchive/dist/configure.ac
==
--- vendor/libarchive/dist/configure.ac Wed Jul 12 22:16:54 2017
(r320923)
+++ vendor/libarchive/dist/configure.ac Thu Jul 13 00:16:51 2017
(r320924)
@@ -4,7 +4,7 @@ dnl First, define all of the version numbers up front.
 dnl In particular, this allows the version macro to be used in AC_INIT
 
 dnl These first two version numbers are updated automatically on each release.
-m4_define([LIBARCHIVE_VERSION_S],[3.3.2dev])
+m4_define([LIBARCHIVE_VERSION_S],[3.3.2])
 m4_define([LIBARCHIVE_VERSION_N],[3003002])
 
 dnl bsdtar and bsdcpio versioning tracks libarchive

Modified: vendor/libarchive/dist/libarchive/archive.h
==
--- vendor/libarchive/dist/libarchive/archive.h Wed Jul 12 22:16:54 2017
(r320923)
+++ vendor/libarchive/dist/libarchive/archive.h Thu Jul 13 00:16:51 2017
(r320924)
@@ -155,7 +155,7 @@ __LA_DECL int   archive_version_number(void);
 /*
  * Textual name/version of the library, useful for version displays.
  */
-#defineARCHIVE_VERSION_ONLY_STRING "3.3.2dev"
+#defineARCHIVE_VERSION_ONLY_STRING "3.3.2"
 #defineARCHIVE_VERSION_STRING "libarchive " ARCHIVE_VERSION_ONLY_STRING
 __LA_DECL const char * archive_version_string(void);
 

Modified: 
vendor/libarchive/dist/libarchive/test/test_archive_read_close_twice_open_filename.c

Re: svn commit: r320908 - head/sys/kern

2017-07-12 Thread Ryan Libby
On Wed, Jul 12, 2017 at 3:20 PM, John Baldwin  wrote:
> On Wednesday, July 12, 2017 01:09:39 AM Ryan Libby wrote:
>> On Wed, Jul 12, 2017 at 12:43 AM, Roman Divacky  wrote:
>> > Clang knows about %b modifier and can do some semantic analysis on it.
>> > Currently it type checks the first arg to be an int and the second to be
>> > a char*.
>> >
>> > Do you think it would be worth modifying the checks to include
>> > this new functionality? Do you think you would like to take a stab
>> > at it?
>>
>> Yes, I plan to send that to clang upstream.  I originally had those
>> changes in this commit but I was directed rather to send them first to
>> upstream.  See here [1] for roughly what I plan to send upstream
>> (although I have since noticed some unit tests that I guess should be
>> extended).
>>
>> For now, the semantic analysis should be fine as the change should be
>> backward compatible and I haven't yet changed any of the users of
>> %b to use the new capabilities.
>
> There is also '%b' support in GCC via -fformat-extensions.  GCC 4.2.1
> probably matters less, but the external GCC toolchain ports use a patch in
> /usr/ports/devel/powerpc64-gcc/files/freebsd-format-extensions that you may
> need to adjust as well.

Thanks.  I knew about the in-tree gcc format extensions, but hadn't
considered ports.  I'll follow up with this in a little bit.  I
currently have a few other patches in gestation working through some
bitrot with gcc amd64 kernel builds.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r320916 - head/sys/dev/ixgbe

2017-07-12 Thread Ngie Cooper
On Wed, Jul 12, 2017 at 10:35 AM, Sean Bruno  wrote:
> Author: sbruno
> Date: Wed Jul 12 17:35:32 2017
> New Revision: 320916
> URL: https://svnweb.freebsd.org/changeset/base/320916
>
> Log:
>   Reset unsupported SFP tuneable back to original entry name.
>
>   Reported by:  olivier@

The new name kinda makes more sense -- why not keep it and make a
backwards compatible OID for the old name?
Thanks,
-Ngie
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r320918 - head/sbin/savecore

2017-07-12 Thread Mark Johnston
On Wed, Jul 12, 2017 at 02:23:52PM -0700, John Baldwin wrote:
> On Wednesday, July 12, 2017 06:29:25 PM Mark Johnston wrote:
> > Author: markj
> > Date: Wed Jul 12 18:29:25 2017
> > New Revision: 320918
> > URL: https://svnweb.freebsd.org/changeset/base/320918
> > 
> > Log:
> >   Add a newline after the version string.
> >   
> >   MFC after:3 days
> 
> I think the version string normally has a trailing \n emedded in it?  

You're right. The problem in my case is that the version string is
getting truncated in mkdumpheader(), and so the trailing \n is omitted.

> Also,
> have you verified that crashinfo is still able to match the Version String
> from the generated info.X file?  I think it might as it stops printing lines
> once it matches the second line of the version, so I think (just reading the
> awk) that it will not include the extra newline in the 'ivers' compared
> against 'version' from gdb.

That's true, but it looks like it doesn't work properly in the truncated
case. What if we declare a match when the version string in the info.X
file matches a prefix of the version string reported by gdb?

diff --git a/sbin/savecore/savecore.c b/sbin/savecore/savecore.c
index 22b4793f4ff5..f5862782bb21 100644
--- a/sbin/savecore/savecore.c
+++ b/sbin/savecore/savecore.c
@@ -119,7 +119,7 @@ printheader(xo_handle_t *xo, const struct kerneldumpheader 
*h, const char *devic
xo_emit_h(xo, "{P:  }{Lwc:Dumptime}{:dumptime/%s}", ctime());
xo_emit_h(xo, "{P:  }{Lwc:Hostname}{:hostname/%s}\n", h->hostname);
xo_emit_h(xo, "{P:  }{Lwc:Magic}{:magic/%s}\n", h->magic);
-   xo_emit_h(xo, "{P:  }{Lwc:Version String}{:version_string/%s}\n", 
h->versionstring);
+   xo_emit_h(xo, "{P:  }{Lwc:Version String}{:version_string/%s}", 
h->versionstring);
xo_emit_h(xo, "{P:  }{Lwc:Panic String}{:panic_string/%s}\n", 
h->panicstring);
xo_emit_h(xo, "{P:  }{Lwc:Dump Parity}{:dump_parity/%u}\n", h->parity);
xo_emit_h(xo, "{P:  }{Lwc:Bounds}{:bounds/%d}\n", bounds);
diff --git a/sys/kern/kern_shutdown.c b/sys/kern/kern_shutdown.c
index 5c6c0e136769..d87b63461de5 100644
--- a/sys/kern/kern_shutdown.c
+++ b/sys/kern/kern_shutdown.c
@@ -1229,6 +1229,7 @@ void
 mkdumpheader(struct kerneldumpheader *kdh, char *magic, uint32_t archver,
 uint64_t dumplen, uint32_t dumpkeysize, uint32_t blksz)
 {
+   size_t dstsize;
 
bzero(kdh, sizeof(*kdh));
strlcpy(kdh->magic, magic, sizeof(kdh->magic));
@@ -1240,7 +1241,9 @@ mkdumpheader(struct kerneldumpheader *kdh, char *magic, 
uint32_t archver,
kdh->dumpkeysize = htod32(dumpkeysize);
kdh->blocksize = htod32(blksz);
strlcpy(kdh->hostname, prison0.pr_hostname, sizeof(kdh->hostname));
-   strlcpy(kdh->versionstring, version, sizeof(kdh->versionstring));
+   dstsize = sizeof(kdh->versionstring);
+   if (strlcpy(kdh->versionstring, version, dstsize) >= dstsize)
+   kdh->versionstring[dstsize - 2] = '\n';
if (panicstr != NULL)
strlcpy(kdh->panicstring, panicstr, sizeof(kdh->panicstring));
kdh->parity = kerneldump_parity(kdh);
diff --git a/usr.sbin/crashinfo/crashinfo.sh b/usr.sbin/crashinfo/crashinfo.sh
index e52c01419b0d..b3029c6eea4a 100755
--- a/usr.sbin/crashinfo/crashinfo.sh
+++ b/usr.sbin/crashinfo/crashinfo.sh
@@ -85,8 +85,9 @@ find_kernel()
 
# Look for a matching kernel version.
for k in `sysctl -n kern.bootfile` $(ls -t /boot/*/kernel); do
-   kvers=$(gdb_command $k 'printf "  Version String: %s", version' 
\
-2>/dev/null)
+   kvers=$(gdb_command $k 'printf "  Version String: %s", version' 
| \
+   awk "{line=line\$0\"\n\"} END{print 
substr(line,1,${#ivers})}" \
+   2>/dev/null)
if [ "$ivers" = "$kvers" ]; then
KERNEL=$k
break
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r320908 - head/sys/kern

2017-07-12 Thread John Baldwin
On Wednesday, July 12, 2017 01:09:39 AM Ryan Libby wrote:
> On Wed, Jul 12, 2017 at 12:43 AM, Roman Divacky  wrote:
> > Clang knows about %b modifier and can do some semantic analysis on it.
> > Currently it type checks the first arg to be an int and the second to be
> > a char*.
> >
> > Do you think it would be worth modifying the checks to include
> > this new functionality? Do you think you would like to take a stab
> > at it?
> 
> Yes, I plan to send that to clang upstream.  I originally had those
> changes in this commit but I was directed rather to send them first to
> upstream.  See here [1] for roughly what I plan to send upstream
> (although I have since noticed some unit tests that I guess should be
> extended).
> 
> For now, the semantic analysis should be fine as the change should be
> backward compatible and I haven't yet changed any of the users of
> %b to use the new capabilities.

There is also '%b' support in GCC via -fformat-extensions.  GCC 4.2.1
probably matters less, but the external GCC toolchain ports use a patch in
/usr/ports/devel/powerpc64-gcc/files/freebsd-format-extensions that you may
need to adjust as well.

-- 
John Baldwin
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r320918 - head/sbin/savecore

2017-07-12 Thread John Baldwin
On Wednesday, July 12, 2017 06:29:25 PM Mark Johnston wrote:
> Author: markj
> Date: Wed Jul 12 18:29:25 2017
> New Revision: 320918
> URL: https://svnweb.freebsd.org/changeset/base/320918
> 
> Log:
>   Add a newline after the version string.
>   
>   MFC after:  3 days

I think the version string normally has a trailing \n emedded in it?  Also,
have you verified that crashinfo is still able to match the Version String
from the generated info.X file?  I think it might as it stops printing lines
once it matches the second line of the version, so I think (just reading the
awk) that it will not include the extra newline in the 'ivers' compared
against 'version' from gdb.

-- 
John Baldwin
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r320923 - in stable/10: share/man/man4 share/man/man4/man4.i386 sys/dev/digi sys/dev/ie sys/dev/mcd sys/dev/scd sys/dev/si sys/dev/wl sys/i386/isa usr.sbin/sicontrol usr.sbin/wlconfig

2017-07-12 Thread John Baldwin
Author: jhb
Date: Wed Jul 12 22:16:54 2017
New Revision: 320923
URL: https://svnweb.freebsd.org/changeset/base/320923

Log:
  Add deprecation notices for various device drivers removed in 12.0.
  
  This is a direct commit to stable/10 since these files have already
  been removed in head.

Modified:
  stable/10/share/man/man4/digi.4
  stable/10/share/man/man4/man4.i386/ie.4
  stable/10/share/man/man4/man4.i386/wl.4
  stable/10/share/man/man4/mcd.4
  stable/10/share/man/man4/scd.4
  stable/10/share/man/man4/si.4
  stable/10/share/man/man4/spic.4
  stable/10/sys/dev/digi/digi.c
  stable/10/sys/dev/ie/if_ie.c
  stable/10/sys/dev/mcd/mcd.c
  stable/10/sys/dev/scd/scd.c
  stable/10/sys/dev/si/si.c
  stable/10/sys/dev/wl/if_wl.c
  stable/10/sys/i386/isa/spic.c
  stable/10/usr.sbin/sicontrol/sicontrol.8
  stable/10/usr.sbin/wlconfig/wlconfig.8

Modified: stable/10/share/man/man4/digi.4
==
--- stable/10/share/man/man4/digi.4 Wed Jul 12 21:46:16 2017
(r320922)
+++ stable/10/share/man/man4/digi.4 Wed Jul 12 22:16:54 2017
(r320923)
@@ -37,7 +37,7 @@
 .\"from: sio.4,v 1.15 1994/12/06 20:14:30 bde Exp
 .\" $FreeBSD$
 .\"
-.Dd December 7, 2003
+.Dd July 8, 2017
 .Dt DIGI 4
 .Os
 .Sh NAME
@@ -84,6 +84,11 @@ Device numbering:
   \fBI\fPnitial
\fBP\fPort number
 .Ed
+.Sh DEPRECATION NOTICE
+The
+.Nm
+driver will be removed in
+.Fx 12.0 .
 .Sh DESCRIPTION
 The
 .Nm

Modified: stable/10/share/man/man4/man4.i386/ie.4
==
--- stable/10/share/man/man4/man4.i386/ie.4 Wed Jul 12 21:46:16 2017
(r320922)
+++ stable/10/share/man/man4/man4.i386/ie.4 Wed Jul 12 22:16:54 2017
(r320923)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd July 16, 2005
+.Dd July 8, 2017
 .Dt IE 4 i386
 .Os
 .Sh NAME
@@ -52,6 +52,11 @@ In
 .Cd hint.ie.0.port="0x300"
 .Cd hint.ie.0.irq="5"
 .Cd hint.ie.0.maddr="0xd"
+.Sh DEPRECATION NOTICE
+The
+.Nm
+driver will be removed in
+.Fx 12.0 .
 .Sh HARDWARE
 The
 .Nm

Modified: stable/10/share/man/man4/man4.i386/wl.4
==
--- stable/10/share/man/man4/man4.i386/wl.4 Wed Jul 12 21:46:16 2017
(r320922)
+++ stable/10/share/man/man4/man4.i386/wl.4 Wed Jul 12 22:16:54 2017
(r320923)
@@ -29,7 +29,7 @@
 .\" SUCH DAMAGE.
 .\"
 .\" $FreeBSD$
-.Dd September 29, 2006
+.Dd July 8, 2017
 .Dt WL 4 i386
 .Os
 .Sh NAME
@@ -37,6 +37,11 @@
 .Nd T1 speed ISA/radio lan card
 .Sh SYNOPSIS
 .Cd "device wl0 at isa? port 0x300 irq 5"
+.Sh DEPRECATION NOTICE
+The
+.Nm
+driver will be removed in
+.Fx 12.0 .
 .Sh DESCRIPTION
 The
 .Nm

Modified: stable/10/share/man/man4/mcd.4
==
--- stable/10/share/man/man4/mcd.4  Wed Jul 12 21:46:16 2017
(r320922)
+++ stable/10/share/man/man4/mcd.4  Wed Jul 12 22:16:54 2017
(r320923)
@@ -26,7 +26,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd December 8, 1994
+.Dd July 8, 2017
 .Dt MCD 4
 .Os
 .Sh NAME
@@ -40,6 +40,11 @@ In
 .Cd hint.mcd.0.at="isa"
 .Cd hint.mcd.0.port="0x300"
 .Cd hint.mcd.0.irq="10"
+.Sh DEPRECATION NOTICE
+The
+.Nm
+driver will be removed in
+.Fx 12.0 .
 .Sh DESCRIPTION
 The
 .Nm

Modified: stable/10/share/man/man4/scd.4
==
--- stable/10/share/man/man4/scd.4  Wed Jul 12 21:46:16 2017
(r320922)
+++ stable/10/share/man/man4/scd.4  Wed Jul 12 22:16:54 2017
(r320923)
@@ -26,7 +26,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd March 17, 2008
+.Dd July 8, 2017
 .Dt SCD 4
 .Os
 .Sh NAME
@@ -39,6 +39,11 @@ In
 .Pa /boot/device.hints :
 .Cd hint.scd.0.at="isa"
 .Cd hint.scd.0.port="0x230"
+.Sh DEPRECATION NOTICE
+The
+.Nm
+driver will be removed in
+.Fx 12.0 .
 .Sh DESCRIPTION
 The
 .Nm

Modified: stable/10/share/man/man4/si.4
==
--- stable/10/share/man/man4/si.4   Wed Jul 12 21:46:16 2017
(r320922)
+++ stable/10/share/man/man4/si.4   Wed Jul 12 22:16:54 2017
(r320923)
@@ -1,5 +1,5 @@
 .\" $FreeBSD$
-.Dd September 16, 1995
+.Dd July 8, 2017
 .Dt SI 4
 .Os
 .Sh NAME
@@ -13,6 +13,11 @@ For ISA host cards put the following lines in
 .Cd hint.si.0.at="isa"
 .Cd hint.si.0.maddr="0xd"
 .Cd hint.si.0.irq="12"
+.Sh DEPRECATION NOTICE
+The
+.Nm
+driver will be removed in
+.Fx 12.0 .
 .Sh DESCRIPTION
 The Specialix SI/XIO and SX hardware makes up an 8 to 32 port RS-232 serial
 multiplexor.

Modified: stable/10/share/man/man4/spic.4
==
--- stable/10/share/man/man4/spic.4 Wed Jul 12 21:46:16 2017
(r320922)
+++ stable/10/share/man/man4/spic.4 Wed Jul 12 22:16:54 2017
(r320923)
@@ -25,7 +25,7 @@
 .\"
 .\" 

svn commit: r320922 - releng/11.1/sys/dev/sdhci

2017-07-12 Thread Marius Strobl
Author: marius
Date: Wed Jul 12 21:46:16 2017
New Revision: 320922
URL: https://svnweb.freebsd.org/changeset/base/320922

Log:
  MF11: r320898; MFC: r320577, r320620
  
  Retry up to 2 ms to enable bus power as at least with some Intel
  SDHCI/eMMC controllers the first attempt after a D3 to D0 transition,
  i. e. when the firmware has put the devices into D3 state before,
  can fail.
  
  Approved by:  re (gjb)

Modified:
  releng/11.1/sys/dev/sdhci/sdhci.c
Directory Properties:
  releng/11.1/   (props changed)

Modified: releng/11.1/sys/dev/sdhci/sdhci.c
==
--- releng/11.1/sys/dev/sdhci/sdhci.c   Wed Jul 12 20:10:53 2017
(r320921)
+++ releng/11.1/sys/dev/sdhci/sdhci.c   Wed Jul 12 21:46:16 2017
(r320922)
@@ -366,6 +366,7 @@ sdhci_set_clock(struct sdhci_slot *slot, uint32_t cloc
 static void
 sdhci_set_power(struct sdhci_slot *slot, u_char power)
 {
+   int i;
uint8_t pwr;
 
if (slot->power == power)
@@ -394,9 +395,20 @@ sdhci_set_power(struct sdhci_slot *slot, u_char power)
break;
}
WR1(slot, SDHCI_POWER_CONTROL, pwr);
-   /* Turn on the power. */
+   /*
+* Turn on VDD1 power.  Note that at least some Intel controllers can
+* fail to enable bus power on the first try after transiting from D3
+* to D0, so we give them up to 2 ms.
+*/
pwr |= SDHCI_POWER_ON;
-   WR1(slot, SDHCI_POWER_CONTROL, pwr);
+   for (i = 0; i < 20; i++) {
+   WR1(slot, SDHCI_POWER_CONTROL, pwr);
+   if (RD1(slot, SDHCI_POWER_CONTROL) & SDHCI_POWER_ON)
+   break;
+   DELAY(100);
+   }
+   if (!(RD1(slot, SDHCI_POWER_CONTROL) & SDHCI_POWER_ON))
+   slot_printf(slot, "Bus power failed to enable");
 
if (slot->quirks & SDHCI_QUIRK_INTEL_POWER_UP_RESET) {
WR1(slot, SDHCI_POWER_CONTROL, pwr | 0x10);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r320921 - in stable/11: share/man/man4 share/man/man4/man4.i386 sys/dev/digi sys/dev/ie sys/dev/mcd sys/dev/scd sys/dev/si sys/dev/wl sys/i386/isa usr.sbin/sicontrol usr.sbin/wlconfig

2017-07-12 Thread John Baldwin
Author: jhb
Date: Wed Jul 12 20:10:53 2017
New Revision: 320921
URL: https://svnweb.freebsd.org/changeset/base/320921

Log:
  Add deprecation notices for various device drivers removed in 12.0.
  
  This is a direct commit to stable/11 since these files have already
  been removed in head.
  
  Reviewed by:  sbruno, gjb
  Differential Revision:https://reviews.freebsd.org/D11542

Modified:
  stable/11/share/man/man4/digi.4
  stable/11/share/man/man4/man4.i386/ie.4
  stable/11/share/man/man4/man4.i386/wl.4
  stable/11/share/man/man4/mcd.4
  stable/11/share/man/man4/scd.4
  stable/11/share/man/man4/si.4
  stable/11/share/man/man4/spic.4
  stable/11/sys/dev/digi/digi.c
  stable/11/sys/dev/ie/if_ie.c
  stable/11/sys/dev/mcd/mcd.c
  stable/11/sys/dev/scd/scd.c
  stable/11/sys/dev/si/si.c
  stable/11/sys/dev/wl/if_wl.c
  stable/11/sys/i386/isa/spic.c
  stable/11/usr.sbin/sicontrol/sicontrol.8
  stable/11/usr.sbin/wlconfig/wlconfig.8

Modified: stable/11/share/man/man4/digi.4
==
--- stable/11/share/man/man4/digi.4 Wed Jul 12 19:13:58 2017
(r320920)
+++ stable/11/share/man/man4/digi.4 Wed Jul 12 20:10:53 2017
(r320921)
@@ -33,7 +33,7 @@
 .\"from: sio.4,v 1.15 1994/12/06 20:14:30 bde Exp
 .\" $FreeBSD$
 .\"
-.Dd December 7, 2003
+.Dd July 8, 2017
 .Dt DIGI 4
 .Os
 .Sh NAME
@@ -80,6 +80,11 @@ Device numbering:
   \fBI\fPnitial
\fBP\fPort number
 .Ed
+.Sh DEPRECATION NOTICE
+The
+.Nm
+driver will be removed in
+.Fx 12.0 .
 .Sh DESCRIPTION
 The
 .Nm

Modified: stable/11/share/man/man4/man4.i386/ie.4
==
--- stable/11/share/man/man4/man4.i386/ie.4 Wed Jul 12 19:13:58 2017
(r320920)
+++ stable/11/share/man/man4/man4.i386/ie.4 Wed Jul 12 20:10:53 2017
(r320921)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd July 16, 2005
+.Dd July 8, 2017
 .Dt IE 4 i386
 .Os
 .Sh NAME
@@ -52,6 +52,11 @@ In
 .Cd hint.ie.0.port="0x300"
 .Cd hint.ie.0.irq="5"
 .Cd hint.ie.0.maddr="0xd"
+.Sh DEPRECATION NOTICE
+The
+.Nm
+driver will be removed in
+.Fx 12.0 .
 .Sh HARDWARE
 The
 .Nm

Modified: stable/11/share/man/man4/man4.i386/wl.4
==
--- stable/11/share/man/man4/man4.i386/wl.4 Wed Jul 12 19:13:58 2017
(r320920)
+++ stable/11/share/man/man4/man4.i386/wl.4 Wed Jul 12 20:10:53 2017
(r320921)
@@ -29,7 +29,7 @@
 .\" SUCH DAMAGE.
 .\"
 .\" $FreeBSD$
-.Dd September 29, 2006
+.Dd July 8, 2017
 .Dt WL 4 i386
 .Os
 .Sh NAME
@@ -37,6 +37,11 @@
 .Nd T1 speed ISA/radio lan card
 .Sh SYNOPSIS
 .Cd "device wl0 at isa? port 0x300 irq 5"
+.Sh DEPRECATION NOTICE
+The
+.Nm
+driver will be removed in
+.Fx 12.0 .
 .Sh DESCRIPTION
 The
 .Nm

Modified: stable/11/share/man/man4/mcd.4
==
--- stable/11/share/man/man4/mcd.4  Wed Jul 12 19:13:58 2017
(r320920)
+++ stable/11/share/man/man4/mcd.4  Wed Jul 12 20:10:53 2017
(r320921)
@@ -26,7 +26,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd December 8, 1994
+.Dd July 8, 2017
 .Dt MCD 4
 .Os
 .Sh NAME
@@ -40,6 +40,11 @@ In
 .Cd hint.mcd.0.at="isa"
 .Cd hint.mcd.0.port="0x300"
 .Cd hint.mcd.0.irq="10"
+.Sh DEPRECATION NOTICE
+The
+.Nm
+driver will be removed in
+.Fx 12.0 .
 .Sh DESCRIPTION
 The
 .Nm

Modified: stable/11/share/man/man4/scd.4
==
--- stable/11/share/man/man4/scd.4  Wed Jul 12 19:13:58 2017
(r320920)
+++ stable/11/share/man/man4/scd.4  Wed Jul 12 20:10:53 2017
(r320921)
@@ -26,7 +26,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd March 17, 2008
+.Dd July 8, 2017
 .Dt SCD 4
 .Os
 .Sh NAME
@@ -39,6 +39,11 @@ In
 .Pa /boot/device.hints :
 .Cd hint.scd.0.at="isa"
 .Cd hint.scd.0.port="0x230"
+.Sh DEPRECATION NOTICE
+The
+.Nm
+driver will be removed in
+.Fx 12.0 .
 .Sh DESCRIPTION
 The
 .Nm

Modified: stable/11/share/man/man4/si.4
==
--- stable/11/share/man/man4/si.4   Wed Jul 12 19:13:58 2017
(r320920)
+++ stable/11/share/man/man4/si.4   Wed Jul 12 20:10:53 2017
(r320921)
@@ -1,5 +1,5 @@
 .\" $FreeBSD$
-.Dd September 16, 1995
+.Dd July 8, 2017
 .Dt SI 4
 .Os
 .Sh NAME
@@ -13,6 +13,11 @@ For ISA host cards put the following lines in
 .Cd hint.si.0.at="isa"
 .Cd hint.si.0.maddr="0xd"
 .Cd hint.si.0.irq="12"
+.Sh DEPRECATION NOTICE
+The
+.Nm
+driver will be removed in
+.Fx 12.0 .
 .Sh DESCRIPTION
 The Specialix SI/XIO and SX hardware makes up an 8 to 32 port RS-232 serial
 multiplexor.

Modified: stable/11/share/man/man4/spic.4
==
--- stable/11/share/man/man4/spic.4 Wed Jul 12 19:13:58 2017
(r320920)
+++ 

Re: svn commit: r320452 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys

2017-07-12 Thread Peter Wemm
On Tuesday, July 11, 2017 11:55:47 PM Peter Wemm wrote:
> On Tuesday, July 11, 2017 11:08:15 PM Peter Wemm wrote:
> > On Wednesday, June 28, 2017 01:59:20 PM Andriy Gapon wrote:
> > >   A side bonus of this change is that now a vdev zio has a pointer
> > >   to its corresponding bio while the zio is active.
> > 
> > fault virtual address   = 0x28
> > 
> > 
> > db> where
> > Tracing pid 0 tid 100471 td 0xf80005452000
> > vdev_geom_io_done() at vdev_geom_io_done+0x36/frame 0xfe0239f9eaa0
> > zio_vdev_io_done() at zio_vdev_io_done+0x176/frame 0xfe0239f9ead0
> > zio_execute() at zio_execute+0xac/frame 0xfe0239f9eb20
> 
> Oops, truncated.
> 
> 
> taskqueue_run_locked() at taskqueue_run_locked+0x127/frame
> 0xfe0239f9eb80 taskqueue_thread_loop() at
> taskqueue_thread_loop+0xc8/frame 0xfe0239f9ebb0 fork_exit() at
> fork_exit+0x85/frame 0xfe0239f9ebf0
> fork_trampoline() at fork_trampoline+0xe/frame 0xfe0239f9ebf0
> --- trap 0, rip = 0, rsp = 0, rbp = 0 ---

Likewise with a disk failing or being put offline.   eg: the explicit offlining 
case, making a vdev degrade:

r...@nope.ysv:/home/peter # zpool offline zroot mfid5p3

atal trap 12: page fault while in kernel mode
cpuid = 4; apic id = 04

Fatal trap 12: page fault while in kernel mode
fault virtual address   = 0x28
Fatal trap 12: page fault while in kernel mode

Fatal trap 12: page fault while in kernel mode
Fatal trap 12: page fault while in kernel mode
cpuid = 7; apic id = 07
cpuid = 1; apic id = 01
fault virtual address   = 0x28
fault code  = supervisor read data, page not present
cpuid = 3; cpuid = 5; apic id = 03
Fatal trap 12: page fault while in kernel mode
apic id = 05
fault virtual address   = 0x28
fault virtual address   = 0x28
fault code  = supervisor read data, page not present
instruction pointer = 0x20:0x803aab56
stack pointer   = 0x28:0xfe085fb3aa90
instruction pointer = 0x20:0x803aab56
fault code  = supervisor read data, page not present
cpuid = 6; fault virtual address= 0x28
Fatal trap 12: page fault while in kernel mode
fault code  = supervisor read data, page not present
instruction pointer = 0x20:0x803aab56
stack pointer   = 0x28:0xfe085fb3fa90
frame pointer   = 0x28:0xfe085fb3aaa0
fault code  = supervisor read data, page not present
cpuid = 2; apic id = 02
apic id = 06
instruction pointer = 0x20:0x803aab56
fault virtual address   = 0x28
fault code  = supervisor read data, page not present
stack pointer   = 0x28:0xfe085fb30a90
instruction pointer = 0x20:0x803aab56
stack pointer   = 0x28:0xfe085fb35a90
frame pointer   = 0x28:0xfe085fb3faa0
code segment= base 0x0, limit 0xf, type 0x1b
stack pointer   = 0x28:0xfe085fb44a90
frame pointer   = 0x28:0xfe085fb44aa0
code segment= base 0x0, limit 0xf, type 0x1b
= DPL 0, pres 1, long 1, def32 0, gran 1
fault virtual address   = 0x28
= DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags= interrupt enabled, instruction pointer= 0x20:6
frame pointer   = 0x28:0xfe085fb30aa0
code segment= base 0x0, limit 0xf, type 0x1b
code segment= base 0x0, limit 0xf, type 0x1b
frame pointer   = 0x28:0xfe085fb35aa0
code segment= base 0x0, limit 0xf, type 0x1b
resume, IOPL = 0
stack pointer   = 0x28:0xfe085fb26a90
= DPL 0, pres 1, long 1, def32 0, gran 1
= DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags= fault code= supervisor read data, page not
frame pointer   = 0x28:0xfe085fb26aa0
instruction pointer = 0x20:0x803aab56
processor eflags= interrupt enabled, code segment   = base b
= DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags= interrupt enabled, resume, IOPL = 0
current process = 0 (zio_write_intr_2)
[ thread pid 0 tid 100500 ]
Stopped at  vdev_geom_io_done+0x36: movq0x28(%rbx),%rsi
db> where
Tracing pid 0 tid 100500 td 0xf8000aae6000
vdev_geom_io_done() at vdev_geom_io_done+0x36/frame 0xfe085fb30aa0
zio_vdev_io_done() at zio_vdev_io_done+0x176/frame 0xfe085fb30ad0
zio_execute() at zio_execute+0xac/frame 0xfe085fb30b20
taskqueue_run_locked() at taskqueue_run_locked+0x127/frame 0xfe085fb30b80
taskqueue_thread_loop() at taskqueue_thread_loop+0xc8/frame 0xfe085fb30bb0
fork_exit() at fork_exit+0x85/frame 0xfe085fb30bf0
fork_trampoline() at fork_trampoline+0xe/frame 0xfe085fb30bf0
--- trap 0, rip = 0, rsp = 0, rbp = 0 ---
db> 

-- 
Peter Wemm - pe...@wemm.org; pe...@freebsd.org; pe...@yahoo-inc.com; KI6FJV
UTF-8: for when a ' or ... just won\342\200\231t do\342\200\246


svn commit: r320919 - head/sys/conf

2017-07-12 Thread Bryan Drewery
Author: bdrewery
Date: Wed Jul 12 19:01:25 2017
New Revision: 320919
URL: https://svnweb.freebsd.org/changeset/base/320919

Log:
  META_MODE: Fix not writing .meta files in the kernel build.
  
  This was a regression in r320220 due to improper porting of the
  same logic from share/mk/bsd.dep.mk and having only tested with
  -DNO_FILEMON at the time.
  
  Pointyhat to: bdrewery
  Reported by:  Mark Millard, dhw, O. Hartmann
  Sponsored by: Dell EMC Isilon

Modified:
  head/sys/conf/kern.post.mk

Modified: head/sys/conf/kern.post.mk
==
--- head/sys/conf/kern.post.mk  Wed Jul 12 18:29:25 2017(r320918)
+++ head/sys/conf/kern.post.mk  Wed Jul 12 19:01:25 2017(r320919)
@@ -203,8 +203,7 @@ _meta_filemon=  1
 # for _meta_filemon but not for _SKIP_DEPEND.
 .if !empty(.MAKEFLAGS:M-V${_V_READ_DEPEND}) || make(*obj) || \
 ${.TARGETS:M*clean*} == ${.TARGETS} || \
-${.TARGETS:M*install*} == ${.TARGETS} || \
-defined(_meta_filemon)
+${.TARGETS:M*install*} == ${.TARGETS}
 _SKIP_DEPEND=  1
 .endif
 .if defined(_SKIP_DEPEND) || defined(_meta_filemon)
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r320918 - head/sbin/savecore

2017-07-12 Thread Mark Johnston
Author: markj
Date: Wed Jul 12 18:29:25 2017
New Revision: 320918
URL: https://svnweb.freebsd.org/changeset/base/320918

Log:
  Add a newline after the version string.
  
  MFC after:3 days

Modified:
  head/sbin/savecore/savecore.c

Modified: head/sbin/savecore/savecore.c
==
--- head/sbin/savecore/savecore.c   Wed Jul 12 17:51:00 2017
(r320917)
+++ head/sbin/savecore/savecore.c   Wed Jul 12 18:29:25 2017
(r320918)
@@ -119,7 +119,7 @@ printheader(xo_handle_t *xo, const struct kerneldumphe
xo_emit_h(xo, "{P:  }{Lwc:Dumptime}{:dumptime/%s}", ctime());
xo_emit_h(xo, "{P:  }{Lwc:Hostname}{:hostname/%s}\n", h->hostname);
xo_emit_h(xo, "{P:  }{Lwc:Magic}{:magic/%s}\n", h->magic);
-   xo_emit_h(xo, "{P:  }{Lwc:Version String}{:version_string/%s}", 
h->versionstring);
+   xo_emit_h(xo, "{P:  }{Lwc:Version String}{:version_string/%s}\n", 
h->versionstring);
xo_emit_h(xo, "{P:  }{Lwc:Panic String}{:panic_string/%s}\n", 
h->panicstring);
xo_emit_h(xo, "{P:  }{Lwc:Dump Parity}{:dump_parity/%u}\n", h->parity);
xo_emit_h(xo, "{P:  }{Lwc:Bounds}{:bounds/%d}\n", bounds);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r320917 - stable/11/sys/dev/ixgbe

2017-07-12 Thread Sean Bruno
Author: sbruno
Date: Wed Jul 12 17:51:00 2017
New Revision: 320917
URL: https://svnweb.freebsd.org/changeset/base/320917

Log:
  MFC r320916
  
  Reset unsupported SFP tuneable back to original entry name.
  
  Reported by:  olivier@

Modified:
  stable/11/sys/dev/ixgbe/if_ix.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/dev/ixgbe/if_ix.c
==
--- stable/11/sys/dev/ixgbe/if_ix.c Wed Jul 12 17:35:32 2017
(r320916)
+++ stable/11/sys/dev/ixgbe/if_ix.c Wed Jul 12 17:51:00 2017
(r320917)
@@ -333,7 +333,7 @@ SYSCTL_INT(_hw_ix, OID_AUTO, rxd, CTLFLAG_RDTUN, 
  * doing so you are on your own :)
  */
 static int allow_unsupported_sfp = FALSE;
-SYSCTL_INT(_hw_ix, OID_AUTO, allow_unsupported_sfp, CTLFLAG_RDTUN,
+SYSCTL_INT(_hw_ix, OID_AUTO, unsupported_sfp, CTLFLAG_RDTUN,
 _unsupported_sfp, 0,
 "Allow unsupported SFP modules...use at your own risk");
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r320916 - head/sys/dev/ixgbe

2017-07-12 Thread Sean Bruno
Author: sbruno
Date: Wed Jul 12 17:35:32 2017
New Revision: 320916
URL: https://svnweb.freebsd.org/changeset/base/320916

Log:
  Reset unsupported SFP tuneable back to original entry name.
  
  Reported by:  olivier@

Modified:
  head/sys/dev/ixgbe/if_ix.c

Modified: head/sys/dev/ixgbe/if_ix.c
==
--- head/sys/dev/ixgbe/if_ix.c  Wed Jul 12 15:16:01 2017(r320915)
+++ head/sys/dev/ixgbe/if_ix.c  Wed Jul 12 17:35:32 2017(r320916)
@@ -333,7 +333,7 @@ SYSCTL_INT(_hw_ix, OID_AUTO, rxd, CTLFLAG_RDTUN, 
  * doing so you are on your own :)
  */
 static int allow_unsupported_sfp = FALSE;
-SYSCTL_INT(_hw_ix, OID_AUTO, allow_unsupported_sfp, CTLFLAG_RDTUN,
+SYSCTL_INT(_hw_ix, OID_AUTO, unsupported_sfp, CTLFLAG_RDTUN,
 _unsupported_sfp, 0,
 "Allow unsupported SFP modules...use at your own risk");
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r320897 - in stable/11/sys: conf dev/ixgbe modules/ix modules/ixv

2017-07-12 Thread Sean Bruno
Just so that its clear, this will be changed back to the original string
shortly.

sean

On 07/12/17 11:16, Mike Tancsa wrote:
> Hi Eric,
>   For stable users, can the loader.conf variable not be the original one
> ? Especially for servers that are physically remote, a sysadmin might
> expect (wrongly or not) for the name not the change in a stable branch.
> If the box is remote, they would not be able to see the new dmesg error.
> Rather than change the name, perhaps a deprecation warning saying "In
> FreeBSD 12, this will be hw.ix.allow_unsupported_sfp" ?
> 
>   ---Mike
> 
> 
> On 7/12/2017 12:35 PM, Eric Joyner wrote:
>> Olivier,
>>
>> There is a message about it in dmesg, right? For the error code, there's
>> not much we can do there aside from adding a new unsupported SFP+ code to
>> errno.h, which doesn't seem appropriate.
>>
>> On Wed, Jul 12, 2017 at 9:27 AM Olivier Cochard-Labbé 
>> wrote:
>>
>>> On Wed, Jul 12, 2017 at 5:39 PM, Eric Joyner  wrote:
>>>
 I think it may have been silently renamed to "allow_unsupported_sfp"
 instead of "unsupported_sfp". Could you try changing the name of that
 tunable in your config?


>>> ​Thanks Eric!
>>>
>>> Replacing this previous line into my /boot/loader.conf
>>> hw.ix.unsupported_sfp="1"
>>> by this new one:
>>> hw.ix.allow_unsupported_sfp="1"​
>>>
>>>
>>> ​solved the problem: -) but this broke POLA :-(
>>>
>>> And the default behavior is not very sysadmin friendly:
>>> How, with the message "device_attach: ix0 attach returned 5" and no more
>>> ix interface detected, can I know it just came from using unsupported SFP ?
>>>
>>>
>> ___
>> svn-src-stable...@freebsd.org mailing list
>> https://lists.freebsd.org/mailman/listinfo/svn-src-stable-11
>> To unsubscribe, send any mail to "svn-src-stable-11-unsubscr...@freebsd.org"
>>
>>
> 
> 



signature.asc
Description: OpenPGP digital signature


Re: svn commit: r320897 - in stable/11/sys: conf dev/ixgbe modules/ix modules/ixv

2017-07-12 Thread Mike Tancsa
Hi Eric,
For stable users, can the loader.conf variable not be the original one
? Especially for servers that are physically remote, a sysadmin might
expect (wrongly or not) for the name not the change in a stable branch.
If the box is remote, they would not be able to see the new dmesg error.
Rather than change the name, perhaps a deprecation warning saying "In
FreeBSD 12, this will be hw.ix.allow_unsupported_sfp" ?

---Mike


On 7/12/2017 12:35 PM, Eric Joyner wrote:
> Olivier,
> 
> There is a message about it in dmesg, right? For the error code, there's
> not much we can do there aside from adding a new unsupported SFP+ code to
> errno.h, which doesn't seem appropriate.
> 
> On Wed, Jul 12, 2017 at 9:27 AM Olivier Cochard-Labbé 
> wrote:
> 
>> On Wed, Jul 12, 2017 at 5:39 PM, Eric Joyner  wrote:
>>
>>> I think it may have been silently renamed to "allow_unsupported_sfp"
>>> instead of "unsupported_sfp". Could you try changing the name of that
>>> tunable in your config?
>>>
>>>
>> ​Thanks Eric!
>>
>> Replacing this previous line into my /boot/loader.conf
>> hw.ix.unsupported_sfp="1"
>> by this new one:
>> hw.ix.allow_unsupported_sfp="1"​
>>
>>
>> ​solved the problem: -) but this broke POLA :-(
>>
>> And the default behavior is not very sysadmin friendly:
>> How, with the message "device_attach: ix0 attach returned 5" and no more
>> ix interface detected, can I know it just came from using unsupported SFP ?
>>
>>
> ___
> svn-src-stable...@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/svn-src-stable-11
> To unsubscribe, send any mail to "svn-src-stable-11-unsubscr...@freebsd.org"
> 
> 


-- 
---
Mike Tancsa, tel +1 519 651 3400
Sentex Communications, m...@sentex.net
Providing Internet services since 1994 www.sentex.net
Cambridge, Ontario Canada   http://www.tancsa.com/
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Re: svn commit: r320897 - in stable/11/sys: conf dev/ixgbe modules/ix modules/ixv

2017-07-12 Thread Eric Joyner
Olivier,

There is a message about it in dmesg, right? For the error code, there's
not much we can do there aside from adding a new unsupported SFP+ code to
errno.h, which doesn't seem appropriate.

On Wed, Jul 12, 2017 at 9:27 AM Olivier Cochard-Labbé 
wrote:

> On Wed, Jul 12, 2017 at 5:39 PM, Eric Joyner  wrote:
>
>> I think it may have been silently renamed to "allow_unsupported_sfp"
>> instead of "unsupported_sfp". Could you try changing the name of that
>> tunable in your config?
>>
>>
> ​Thanks Eric!
>
> Replacing this previous line into my /boot/loader.conf
> hw.ix.unsupported_sfp="1"
> by this new one:
> hw.ix.allow_unsupported_sfp="1"​
>
>
> ​solved the problem: -) but this broke POLA :-(
>
> And the default behavior is not very sysadmin friendly:
> How, with the message "device_attach: ix0 attach returned 5" and no more
> ix interface detected, can I know it just came from using unsupported SFP ?
>
>
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Re: svn commit: r320900 - in head/sys: fs/cd9660 fs/ext2fs fs/fifofs fs/msdosfs fs/nandfs fs/nfsclient fs/smbfs fs/tmpfs ufs/ufs

2017-07-12 Thread John Baldwin
On Wednesday, July 12, 2017 08:08:42 PM Bruce Evans wrote:
> On Tue, 11 Jul 2017, John Baldwin wrote:
> 
> > Log:
> >  Consistently use vop_stdpathconf() for default pathconf values.
> >
> >  Update filesystems not currently using vop_stdpathconf() in pathconf
> >  VOPs to use vop_stdpathconf() for any configuration variables that do
> >  not have filesystem-specific values.  vop_stdpathconf() is used for
> >  variables that have system-wide settings as well as providing default
> >  values for some values based on system limits.  Filesystems can still
> >  explicitly override individual settings.
> 
> This is sort of backwards.  Not many settings are the same for most
> file systems, and many that did were wrong.  Now more are wrong.
> 
> > Modified: head/sys/fs/cd9660/cd9660_vnops.c
> > ==
> > --- head/sys/fs/cd9660/cd9660_vnops.c   Tue Jul 11 21:52:11 2017
> > (r320899)
> > +++ head/sys/fs/cd9660/cd9660_vnops.c   Tue Jul 11 21:55:20 2017
> > (r320900)
> > @@ -792,20 +792,11 @@ cd9660_pathconf(ap)
> > else
> > *ap->a_retval = 37;
> > return (0);
> > -   case _PC_PATH_MAX:
> > -   *ap->a_retval = PATH_MAX;
> > -   return (0);
> 
> PATH_MAX is one of the few that is system-wide.
> 
> > -   case _PC_PIPE_BUF:
> > -   *ap->a_retval = PIPE_BUF;
> > -   return (0);
> 
> PIPE_BUF isn't system wide.  cd9660 does support fifos, but setting it
> for files that aren't fifos or directories is bogus.  POSIX allows such
> bogus settings, and needs complicated wording to describe this.  E.g.,
> PIPE_BUF for a directory is not completely bogus and it means that the
> value for the directory applies to all fifos in the directory and is
> ignored for all non-fifos in the directory.  It is unclear if PIPE_BUF
> must be set for a directory if there is any fifo in the directory.
> FreeBSD's man pages give no details about this.

PIPE_BUF is system wide because all FIFOs in FreeBSD are implemented via
a common fifo implementation that has a single size.  The wording about
PIPE_BUF from
http://pubs.opengroup.org/onlinepubs/009695399/functions/fpathconf.html:

If path refers to a FIFO, or fildes refers to a pipe or FIFO, the
value returned shall apply to the referenced object. If path or fildes
refers to a directory, the value returned shall apply to any FIFO that
exists or can be created within the directory. If path or fildes refers
to any other type of file, it is unspecified whether an implementation
supports an association of the variable name with the specified file.

This leaves the value for non-directories and non-FIFOs undefined.  We
could perhaps add more complexity to fail with EINVAL for types other
than VFIFO or VDIR, and filesystems that do not support FIFOs could
fail _PC_PIPE_BUF in their fs-specific vnop, but this would not be any
more correct as both behaviors fall into "undefined", but the current
one is simpler to implement.

> > -   case _PC_CHOWN_RESTRICTED:
> > -   *ap->a_retval = 1;
> > -   return (0);
> 
> This is system-wide.
> 
> > case _PC_NO_TRUNC:
> > *ap->a_retval = 1;
> > return (0);
> 
> This is almost system-wide.
> 
> > default:
> > -   return (EINVAL);
> > +   return (vop_stdpathconf(ap));
> 
> This is fail-unsafe.  It gives bogus settings like PIPE_BUF for all cases.
> Case statements in file systems need to be even larger to kill defaults,
> and the code becomes harder to read since it is harder to see the final
> values.
> 
> vop_stdpathconf() has defaults for:
> - ASYNC_IO.  Is this system-wide (all in vfs?)

Yes.

> - NAME_MAX.  This is very far from system-wide
> - PATH_MAX.  This is system-wide.
> - LINK_MAX.  This is very far from system-wide, especially after expansion
>of nlink_t.  Most file systems get this wrong.  LINK_MAX is bogusly
>defined to be the constant 32767, but the value is very variable.
>zfs_pathconf() returns INT_MAX and zfs uses something like int32_t
>internally, but zfs_getattr() clamps to LINK_MAX.  ext2fs limits to
>32000 for ext2 and 65000 for ext4 internally but ext2_pathconf()
>only returns this limit in some cases -- other cases return INT_MAX.

In theory if a filesystem supported an infinite link count or name count
it would have no filesystem-specific limit and having LINK_MAX and
NAME_MAX provide the system limits gives a reasonable default in that case.
I don't know if any filesystem supports infinite limits in practice, but
it's also true that the correct behavior in each filesystem would be to
return a value like MIN(fs_limit, system_limit), not just the native
filesystem limit.  Perhaps this could be implemented by a post-processing
step for VOP_PATHCONF that truncates values that exceed system limits to
system limits.

> - MAX_CANON.  This is garbage except for 

Re: svn commit: r320897 - in stable/11/sys: conf dev/ixgbe modules/ix modules/ixv

2017-07-12 Thread Olivier Cochard-Labbé
On Wed, Jul 12, 2017 at 5:39 PM, Eric Joyner  wrote:

> I think it may have been silently renamed to "allow_unsupported_sfp"
> instead of "unsupported_sfp". Could you try changing the name of that
> tunable in your config?
>
>
​Thanks Eric!

Replacing this previous line into my /boot/loader.conf
hw.ix.unsupported_sfp="1"
by this new one:
hw.ix.allow_unsupported_sfp="1"​


​solved the problem: -) but this broke POLA :-(

And the default behavior is not very sysadmin friendly:
How, with the message "device_attach: ix0 attach returned 5" and no more ix
interface detected, can I know it just came from using unsupported SFP ?
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Re: svn commit: r320897 - in stable/11/sys: conf dev/ixgbe modules/ix modules/ixv

2017-07-12 Thread Eric Joyner
I think it may have been silently renamed to "allow_unsupported_sfp"
instead of "unsupported_sfp". Could you try changing the name of that
tunable in your config?

On Wed, Jul 12, 2017 at 7:58 AM Olivier Cochard-Labbé 
wrote:

> On Wed, Jul 12, 2017 at 4:34 PM, Sean Bruno  wrote:
>
>> Huh ... is there anything in your console boot messages that would seem
>> to indicate an error on attach?
>>
>>
> ​Good catch, I didn't notice it before: "device_attach: ix0 attach
> returned 5".
>
> dmeg before this commit:
>
> ix0: 
> port 0x2020-0x203f mem 0xfbe8-0xfbef,0xfbf04000-0xfbf07fff irq 24
> at device 0.0 on pci3
> ix0: Using MSIX interrupts with 5 vectors
> WARNING: Intel (R) Network Connections are quality tested using Intel (R)
> Ethernet Optics. Using untested modules is not supported and may cause
> unstable operation or damage to the module or the adapter. Intel
> Corporation is not responsible for any harm caused by using untested
> modules.
> ix0: Ethernet address: 90:e2:ba:84:20:38
> WARNING: Intel (R) Network Connections are quality tested using Intel (R)
> Ethernet Optics. Using untested modules is not supported and may cause
> unstable operation or damage to the module or the adapter. Intel
> Corporation is not responsible for any harm caused by using untested
> modules.
> ix0: PCI Express Bus: Speed 5.0GT/s Width x8
> ix0: netmap queues/slots: TX 4/2048, RX 4/2048
> ix1: 
> port 0x2000-0x201f mem 0xfbe0-0xfbe7,0xfbf0-0xfbf03fff irq 34
> at device 0.1 on pci3
> ix1: Using MSIX interrupts with 5 vectors
> WARNING: Intel (R) Network Connections are quality tested using Intel (R)
> Ethernet Optics. Using untested modules is not supported and may cause
> unstable operation or damage to the module or the adapter. Intel
> Corporation is not responsible for any harm caused by using untested
> modules.
> ix1: Ethernet address: 90:e2:ba:84:20:39
> WARNING: Intel (R) Network Connections are quality tested using Intel (R)
> Ethernet Optics. Using untested modules is not supported and may cause
> unstable operation or damage to the module or the adapter. Intel
> Corporation is not responsible for any harm caused by using untested
> modules.
> ix1: PCI Express Bus: Speed 5.0GT/s Width x8
> ix1: netmap queues/slots: TX 4/2048, RX 4/2048
>
> dmesg after this commit:
>
> ​ix0: 
> port 0x2020-0x203f mem 0xfbe8-0xfbef,0xfbf04000-0xfbf07fff irq 24
> at device 0.0 on pci3
> ix0: Using MSI-X interrupts with 5 vectors
> ix0: Unsupported SFP+ module detected!
> device_attach: ix0 attach returned 5
> ix0: 
> port 0x2000-0x201f mem 0xfbe0-0xfbe7,0xfbf0-0xfbf03fff irq 34
> at device 0.1 on pci3
> ix0: Using MSI-X interrupts with 5 vectors
> ix0: Unsupported SFP+ module detected!
> device_attach: ix0 attach returned 5
>
> Is it a regression regarding hw.ix.unsupported_sfp="1" value ?
>
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Re: svn commit: r320901 - in head/sys: amd64/amd64 isa x86/isa

2017-07-12 Thread Bruce Evans

On Wed, 12 Jul 2017, Ian Lepore wrote:


Log:
 Protect access to the AT realtime clock with its own mutex.

 The mutex protecting access to the registered realtime clock should not be
 overloaded to protect access to the atrtc hardware, which might not even be
 the registered rtc. More importantly, the resettodr mutex needs to be
 eliminated to remove locking/sleeping restrictions on clock drivers, and
 that can't happen if MD code for amd64 depends on it. This change moves the
 protection into what's really being protected: access to the atrtc date and
 time registers.


The spin mutex provided some protection against timing bugs caused by
preemption, but it is impossible to hold the mutex around the user code
that is setting the time, so both the kernel and user code should check
if the operation took too long and fail/retry if it did.

With correct code like that, spin mutexes are still good for limiting
retries.  I think it is best to try to hold one around the entire kernel
part of the operation, and release it when sleeping at lower levels.


Modified: head/sys/x86/isa/atrtc.c
==
--- head/sys/x86/isa/atrtc.cTue Jul 11 21:55:20 2017(r320900)
+++ head/sys/x86/isa/atrtc.cWed Jul 12 02:42:57 2017(r320901)
@@ -53,9 +53,17 @@ __FBSDID("$FreeBSD$");
#include 
#include "clock_if.h"

+/*
+ * clock_lock protects low-level access to individual hardware registers.
+ * atrtc_time_lock protects the entire sequence of accessing multiple registers
+ * to read or write the date and time.
+ */
#define RTC_LOCKdo { if (!kdb_active) mtx_lock_spin(_lock); } 
while (0)
#define RTC_UNLOCK  do { if (!kdb_active) mtx_unlock_spin(_lock); } 
while (0)


This has a lot of old design and implementation bugs:
- it abuses the i8254 mutex for the rtc
- it obfuscates this using macros
- locking individual register accesses is buggy.  Register accesses need to
  be locked in groups like your new code does
- the kdb_active hack is buggy (it can't use mutexes and is unnecessarily
  non-reentrant)
The locks should be separate and statically allocated.



+struct mtx atrtc_time_lock;
+MTX_SYSINIT(atrtc_lock_init, _time_lock, "atrtc", MTX_DEF);
+


I think the old mutex should be used here, after fixing it.  Locking
individual register access is a special case of locking groups of
register acceses.  It must be a spin mutex for low-level use, and that
is good for high-level use too, to complete the high-level operations
as soon as possible.

You used this mutex for efirt.c, but I think that is another error like
sharing the i8254 mutex (or the resettodr mutex).   Different clock
drivers should just use different mutexes.  Perhaps some drivers actually
need sleep mutexes.


...
@@ -352,6 +364,7 @@ atrtc_gettime(device_t dev, struct timespec *ts)
 * to make sure that no more than 240us pass after we start reading,
 * and try again if so.
 */
+   mtx_lock(_time_lock);
while (rtcin(RTC_STATUSA) & RTCSA_TUP)
continue;
critical_enter();


Note the comment about the 240us window.  On i386, this was broken by
SMPng, and almost fixed by starting the locking outside of the loop
(a spin mutex would fix it).

On i386, before SMPng, there was an splhigh() starting before the loop.
rtcin() also used splhigh().  This was only shortly before SMPng --
FreeBSD-4 had both splhigh()'s, but FreeBSD-3 had neither.

With no locking, an interrupt after the read of the status register can
occur, and interrupt handling can easily take longer than the 240us window
even if it doesn't cause preemption.

critical_enter() in the above gives poor man's locking which blocks
preemption but not-so-fast interrupt handlers.

The race is not very important since this code only runs at boot time.

The old splhigh() locking and a [spin] mutex around the loop lock out
interrupts and/or preemption for too long (0-1 seconds), but again this
is not very important since this code only runs at boot time.

This is fixed in my version, but only for spl locking.  The lock is
acquired before each test in the loop and dropped after each failing
test in the loop.  Then operation is completed as far as necessary
while the lock is still held.


@@ -369,6 +382,7 @@ atrtc_gettime(device_t dev, struct timespec *ts)
ct.year += (ct.year < 80 ? 2000 : 1900);
#endif
critical_exit();
+   mtx_unlock(_time_lock);
/* Set dow = -1 because some clocks don't set it correctly. */
ct.dow = -1;
return (clock_ct_to_ts(, ts));


The new mtx_lock() should be placed next to the old critical_enter() too.
Put these before or after the loop depending on whether races or high
latency are preferred.

Bruce
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to 

svn commit: r320915 - releng/10.3/crypto/heimdal/lib/krb5

2017-07-12 Thread Xin LI
Author: delphij
Date: Wed Jul 12 15:16:01 2017
New Revision: 320915
URL: https://svnweb.freebsd.org/changeset/base/320915

Log:
  Add the missed Heimdal patch, freebsd-update bits are not affected.
  
  Noticed by:   gordon
  Approved by:  so

Modified:
  releng/10.3/crypto/heimdal/lib/krb5/ticket.c

Modified: releng/10.3/crypto/heimdal/lib/krb5/ticket.c
==
--- releng/10.3/crypto/heimdal/lib/krb5/ticket.cWed Jul 12 14:51:32 
2017(r320914)
+++ releng/10.3/crypto/heimdal/lib/krb5/ticket.cWed Jul 12 15:16:01 
2017(r320915)
@@ -713,8 +713,8 @@ _krb5_extract_ticket(krb5_context context,
 /* check server referral and save principal */
 ret = _krb5_principalname2krb5_principal (context,
  _principal,
- rep->kdc_rep.ticket.sname,
- rep->kdc_rep.ticket.realm);
+ rep->enc_part.sname,
+ rep->enc_part.srealm);
 if (ret)
goto out;
 if((flags & EXTRACT_TICKET_ALLOW_SERVER_MISMATCH) == 0){
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r320897 - in stable/11/sys: conf dev/ixgbe modules/ix modules/ixv

2017-07-12 Thread Olivier Cochard-Labbé
On Wed, Jul 12, 2017 at 4:34 PM, Sean Bruno  wrote:

> Huh ... is there anything in your console boot messages that would seem
> to indicate an error on attach?
>
>
​Good catch, I didn't notice it before: "device_attach: ix0 attach returned
5".

dmeg before this commit:

ix0: 
port 0x2020-0x203f mem 0xfbe8-0xfbef,0xfbf04000-0xfbf07fff irq 24
at device 0.0 on pci3
ix0: Using MSIX interrupts with 5 vectors
WARNING: Intel (R) Network Connections are quality tested using Intel (R)
Ethernet Optics. Using untested modules is not supported and may cause
unstable operation or damage to the module or the adapter. Intel
Corporation is not responsible for any harm caused by using untested
modules.
ix0: Ethernet address: 90:e2:ba:84:20:38
WARNING: Intel (R) Network Connections are quality tested using Intel (R)
Ethernet Optics. Using untested modules is not supported and may cause
unstable operation or damage to the module or the adapter. Intel
Corporation is not responsible for any harm caused by using untested
modules.
ix0: PCI Express Bus: Speed 5.0GT/s Width x8
ix0: netmap queues/slots: TX 4/2048, RX 4/2048
ix1: 
port 0x2000-0x201f mem 0xfbe0-0xfbe7,0xfbf0-0xfbf03fff irq 34
at device 0.1 on pci3
ix1: Using MSIX interrupts with 5 vectors
WARNING: Intel (R) Network Connections are quality tested using Intel (R)
Ethernet Optics. Using untested modules is not supported and may cause
unstable operation or damage to the module or the adapter. Intel
Corporation is not responsible for any harm caused by using untested
modules.
ix1: Ethernet address: 90:e2:ba:84:20:39
WARNING: Intel (R) Network Connections are quality tested using Intel (R)
Ethernet Optics. Using untested modules is not supported and may cause
unstable operation or damage to the module or the adapter. Intel
Corporation is not responsible for any harm caused by using untested
modules.
ix1: PCI Express Bus: Speed 5.0GT/s Width x8
ix1: netmap queues/slots: TX 4/2048, RX 4/2048

dmesg after this commit:

​ix0: 
port 0x2020-0x203f mem 0xfbe8-0xfbef,0xfbf04000-0xfbf07fff irq 24
at device 0.0 on pci3
ix0: Using MSI-X interrupts with 5 vectors
ix0: Unsupported SFP+ module detected!
device_attach: ix0 attach returned 5
ix0: 
port 0x2000-0x201f mem 0xfbe0-0xfbe7,0xfbf0-0xfbf03fff irq 34
at device 0.1 on pci3
ix0: Using MSI-X interrupts with 5 vectors
ix0: Unsupported SFP+ module detected!
device_attach: ix0 attach returned 5

Is it a regression regarding hw.ix.unsupported_sfp="1" value ?
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

svn commit: r320914 - head/contrib/netbsd-tests/lib/libc/gen

2017-07-12 Thread Alan Somers
Author: asomers
Date: Wed Jul 12 14:51:32 2017
New Revision: 320914
URL: https://svnweb.freebsd.org/changeset/base/320914

Log:
  Remove an extraneous strlen from t_setdomainname.c
  
  Reported by:  Coverity
  CID:  1377568
  MFC after:15 days
  X-MFC-With:   320737
  Sponsored by: Spectra Logic Corp

Modified:
  head/contrib/netbsd-tests/lib/libc/gen/t_setdomainname.c

Modified: head/contrib/netbsd-tests/lib/libc/gen/t_setdomainname.c
==
--- head/contrib/netbsd-tests/lib/libc/gen/t_setdomainname.cWed Jul 12 
11:40:09 2017(r320913)
+++ head/contrib/netbsd-tests/lib/libc/gen/t_setdomainname.cWed Jul 12 
14:51:32 2017(r320914)
@@ -83,7 +83,7 @@ restore_domain(void)
n += r;
if (r < 0)
err(1, "read");
-   if (setdomainname(domain, strlen(domain)) != 0)
+   if (setdomainname(domain, n) != 0)
err(1, "setdomainname");
close(fd);
 }
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r320897 - in stable/11/sys: conf dev/ixgbe modules/ix modules/ixv

2017-07-12 Thread Sean Bruno


On 07/12/17 06:35, Olivier Cochard-Labbé wrote:
> On Tue, Jul 11, 2017 at 11:25 PM, Eric Joyner  > wrote:
> 
> Author: erj
> Date: Tue Jul 11 21:25:07 2017
> New Revision: 320897
> URL: https://svnweb.freebsd.org/changeset/base/320897
> 
> 
> Log:
>   MFC r316541, r316544, and r320688 from HEAD to stable/11.
> 
> 
> ​Hi Eric,
> 
> I've got a regression with this commit: My Intel 82599ES is no more
> detected.
> 
> Before this commit:
> 
> ​[root@R1]~# uname -a
> FreeBSD R1 11.1-PRERELEASE FreeBSD 11.1-PRERELEASE  r320896M  amd64
> [root@R1]~# pciconf -lv
> ix0@pci0:21:0:0:class=0x02 card=0x00038086 chip=0x10fb8086
> rev=0x01 hdr=0x00
> vendor = 'Intel Corporation'
> device = '82599ES 10-Gigabit SFI/SFP+ Network Connection'
> class  = network
> subclass   = ethernet
> ix1@pci0:21:0:1:class=0x02 card=0x00038086 chip=0x10fb8086
> rev=0x01 hdr=0x00
> vendor = 'Intel Corporation'
> device = '82599ES 10-Gigabit SFI/SFP+ Network Connection'
> class  = network
> subclass   = ethernet
> ​
> ​After this commit:​
> ​[root@R1]~# uname -a
> FreeBSD R1 11.1-PRERELEASE FreeBSD 11.1-PRERELEASE  r320897M  amd64
> [root@R1]~# pciconf -lv
> none17@pci0:21:0:0: class=0x02 card=0x00038086 chip=0x10fb8086
> rev=0x01 hdr=0x00
> vendor = 'Intel Corporation'
> device = '82599ES 10-Gigabit SFI/SFP+ Network Connection'
> class  = network
> subclass   = ethernet
> none18@pci0:21:0:1: class=0x02 card=0x00038086 chip=0x10fb8086
> rev=0x01 hdr=0x00
> vendor = 'Intel Corporation'
> device = '82599ES 10-Gigabit SFI/SFP+ Network Connection'
> class  = network
> subclass   = ethernet


Huh ... is there anything in your console boot messages that would seem
to indicate an error on attach?

sean



signature.asc
Description: OpenPGP digital signature


Re: svn commit: r320897 - in stable/11/sys: conf dev/ixgbe modules/ix modules/ixv

2017-07-12 Thread Olivier Cochard-Labbé
On Tue, Jul 11, 2017 at 11:25 PM, Eric Joyner  wrote:

> Author: erj
> Date: Tue Jul 11 21:25:07 2017
> New Revision: 320897
> URL: https://svnweb.freebsd.org/changeset/base/320897
>
> Log:
>   MFC r316541, r316544, and r320688 from HEAD to stable/11.
>
>
​Hi Eric,

I've got a regression with this commit: My Intel 82599ES is no more
detected.

Before this commit:

​[root@R1]~# uname -a
FreeBSD R1 11.1-PRERELEASE FreeBSD 11.1-PRERELEASE  r320896M  amd64
[root@R1]~# pciconf -lv
ix0@pci0:21:0:0:class=0x02 card=0x00038086 chip=0x10fb8086
rev=0x01 hdr=0x00
vendor = 'Intel Corporation'
device = '82599ES 10-Gigabit SFI/SFP+ Network Connection'
class  = network
subclass   = ethernet
ix1@pci0:21:0:1:class=0x02 card=0x00038086 chip=0x10fb8086
rev=0x01 hdr=0x00
vendor = 'Intel Corporation'
device = '82599ES 10-Gigabit SFI/SFP+ Network Connection'
class  = network
subclass   = ethernet
​
​After this commit:​
​[root@R1]~# uname -a
FreeBSD R1 11.1-PRERELEASE FreeBSD 11.1-PRERELEASE  r320897M  amd64
[root@R1]~# pciconf -lv
none17@pci0:21:0:0: class=0x02 card=0x00038086 chip=0x10fb8086
rev=0x01 hdr=0x00
vendor = 'Intel Corporation'
device = '82599ES 10-Gigabit SFI/SFP+ Network Connection'
class  = network
subclass   = ethernet
none18@pci0:21:0:1: class=0x02 card=0x00038086 chip=0x10fb8086
rev=0x01 hdr=0x00
vendor = 'Intel Corporation'
device = '82599ES 10-Gigabit SFI/SFP+ Network Connection'
class  = network
subclass   = ethernet
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Re: svn commit: r320803 - head/sbin/mount

2017-07-12 Thread Bruce Evans

On Tue, 11 Jul 2017, John Baldwin wrote:


On Tuesday, July 11, 2017 02:35:15 PM Ian Lepore wrote:

I think the docs on this are pretty clear... under -u it says:

The set of options is determined by applying the options specified
in the argument to -o and finally applying the -r or -w option.

To me, that says that nothing in /etc/fstab is germane to mount -u
unless one of the other args to mount -u is -o fstab.

This change (r320803) seems like an acceptable workaround, but I think
the correct long term fix would be to not even open /etc/fstab on mount
-u without -o fstab.  But that may be harder to do than to say; I still
haven't actually looked at the code involved.


I thought that it did do that (not look in fstab, except possibly for
pathnames).


I concur with this.  I've always viewed '-u' as meaning "apply a delta
to the current configuration", not "add this delta to the fstab options
and then apply that entire set of options".   In practice, it seems that
it doesn't do either of those, but instead it seems to treats the options
passed to -o as the entire list of options.  This is perhaps a bit
surprising.


I thought that everyone knew that the behaviour is to blow away the current
options, since this is surprisingly bad.  My fingers know this, and exploit
it to reduce typing for mounting the root file system rw:
- "rw" is not an option, but is the absense of the "ro" option, so to change
  the root file system from read-only to read-write, my fingers type
  "mount /" -- this blows away "ro"
- however, all my fs's are mounted with noatime and I don't want to blow this
  away unintentionally.  My fingers know this, so they actually type
  "mount -o noatime" for the previous operation.

This is part of a large suite of design and implementation bugs.  dwmalone@
added [-u -o] "fstab" and "current" options to give more control and save
typing, but these weren't complete and they rotted with the larger design
and implementation bug nmount(2).  "current" only gives the current
settings that are in the mount flags returned by statfs(2), and "fstab"
doesn't blow away the current settings that aren't in the mount flags.
nmount(2) increased the problem by making it too easy to add unstructured
options that are not in the mount flags and moving parsing of options to
the kernel.

mount(8) with no args only displays the options in the mount flags.



For example, suppose you had this:

/etc/fstab:

/dev/md0/barufs ro,noauto,noexec0   0

# mount /bar
# mount | grep bar

ooop

/dev/md0 on /bar (ufs, local, noexec, read-only)
# mount -u -o rw /bar
/dev/md0 on /bar (ufs, local)

(We just lost "noexec" from fstab by upgrading to read-write)


Expect to lose that are in the mount flags like this.

But unstructured options tend to be sticky due to undocumented
implementation details.  This causes my most problems with nfs tcp/udp
flags and nfs read/write sizes.  Even when these were parsed in
nfs_mount(8), IIRC the absence of an option in the command line was
passed to the kernel as nothing and interpreted by the kernel as
a null change.  With nmount(2), userland does almost no option
processing so more clearly passes absent options as nothing so the
result is whatever undocumented interpretation the kernel prefers.
For read/write sizes, nfs also "fixes" wrong sizes by adjusting to
limits.  There is API for determining what sizes its ends up with,
so the only way to know what sizes you are setting is to always
set sizes that won't be adjusted and remember what these are in
userland.


# mount -u -o nosuid /bar
# mount | grep bar
/dev/md0 on /bar (ufs, local, nosuid)

(Did not lose "read-write" somehow, RO vs RW must be magically sticky?)


RW is just the default.  It is not a flag, but the absense of the "ro"
flag.

nmount(2) still handles negative options worse than mount(8) using much
much larger code, but after many years of fixes it handles this "rw"
negative option well enough.  Most generic flags have 3 variants like
"ro", "noro" and "nonoro", and "ro" also has variants "" "rw".
Non-generic flags (implemented in individual file systems) tend to
have less orthogonality.  Sometimes if the basic flag is "nofoo", there
is no flag "foo".  Sometimes there is a flag "nonofoo" to negate "foo".


# mount -u -o fstab,nosuid /bar
# mount |grep bar
/dev/md0 on /bar (ufs, local, noexec, nosuid)

(Did not honor "ro" from fstab!  Left mount RW)


Correction: after many years of fixes, nmount(2) still doesn't understand
the "ro" flag.  This example works correctly with old mount utilities
using mount(2).  This is with the same current kernel -- mount(8) from
FreeBSD-~5.2 parses the options correctly and then uses mount(2), while
mount(8) from FreeBSD-10 uses nmount(2).  Even nmount(2) can handle this,
so the bug must be in parsing or concatenating fstab options.  "fstab"
seems to work correctly with newer mount(8) for options in fstab except
"ro".


It would seem that there 

svn commit: r320913 - stable/10/release

2017-07-12 Thread Glen Barber
Author: gjb
Date: Wed Jul 12 11:40:09 2017
New Revision: 320913
URL: https://svnweb.freebsd.org/changeset/base/320913

Log:
  MFC r300761, r300762:
   r300761:
Disconnect the AZURE target from the CLOUDWARE list.
  
Microsoft has graciously overtaken publication of FreeBSD
on Azure since 10.3-RELEASE.
  
Many thanks to Microsoft for their support of FreeBSD on
Azure.
  
   r300762:
Disconnect the OPENSTACK target from the CLOUDWARE list.
  
This was reported to not work as expected, and feedback
following the report was never received.  In addition, we
do not publish these anywhere publicly.
  
  Sponsored by: The FreeBSD Foundation

Modified:
  stable/10/release/Makefile.vm
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/release/Makefile.vm
==
--- stable/10/release/Makefile.vm   Wed Jul 12 08:07:55 2017
(r320912)
+++ stable/10/release/Makefile.vm   Wed Jul 12 11:40:09 2017
(r320913)
@@ -16,10 +16,8 @@ VMDK_DESC=   VMWare, VirtualBox disk image
 QCOW2_DESC=Qemu, KVM disk image
 RAW_DESC=  Unformatted raw disk image
 
-CLOUDWARE?=AZURE \
-   EC2 \
+CLOUDWARE?=EC2 \
GCE \
-   OPENSTACK \
VAGRANT-VIRTUALBOX \
VAGRANT-VMWARE
 AZURE_FORMAT=  vhdf
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r320900 - in head/sys: fs/cd9660 fs/ext2fs fs/fifofs fs/msdosfs fs/nandfs fs/nfsclient fs/smbfs fs/tmpfs ufs/ufs

2017-07-12 Thread Bruce Evans

On Tue, 11 Jul 2017, John Baldwin wrote:


Log:
 Consistently use vop_stdpathconf() for default pathconf values.

 Update filesystems not currently using vop_stdpathconf() in pathconf
 VOPs to use vop_stdpathconf() for any configuration variables that do
 not have filesystem-specific values.  vop_stdpathconf() is used for
 variables that have system-wide settings as well as providing default
 values for some values based on system limits.  Filesystems can still
 explicitly override individual settings.


This is sort of backwards.  Not many settings are the same for most
file systems, and many that did were wrong.  Now more are wrong.


Modified: head/sys/fs/cd9660/cd9660_vnops.c
==
--- head/sys/fs/cd9660/cd9660_vnops.c   Tue Jul 11 21:52:11 2017
(r320899)
+++ head/sys/fs/cd9660/cd9660_vnops.c   Tue Jul 11 21:55:20 2017
(r320900)
@@ -792,20 +792,11 @@ cd9660_pathconf(ap)
else
*ap->a_retval = 37;
return (0);
-   case _PC_PATH_MAX:
-   *ap->a_retval = PATH_MAX;
-   return (0);


PATH_MAX is one of the few that is system-wide.


-   case _PC_PIPE_BUF:
-   *ap->a_retval = PIPE_BUF;
-   return (0);


PIPE_BUF isn't system wide.  cd9660 does support fifos, but setting it
for files that aren't fifos or directories is bogus.  POSIX allows such
bogus settings, and needs complicated wording to describe this.  E.g.,
PIPE_BUF for a directory is not completely bogus and it means that the
value for the directory applies to all fifos in the directory and is
ignored for all non-fifos in the directory.  It is unclear if PIPE_BUF
must be set for a directory if there is any fifo in the directory.
FreeBSD's man pages give no details about this.


-   case _PC_CHOWN_RESTRICTED:
-   *ap->a_retval = 1;
-   return (0);


This is system-wide.


case _PC_NO_TRUNC:
*ap->a_retval = 1;
return (0);


This is almost system-wide.


default:
-   return (EINVAL);
+   return (vop_stdpathconf(ap));


This is fail-unsafe.  It gives bogus settings like PIPE_BUF for all cases.
Case statements in file systems need to be even larger to kill defaults,
and the code becomes harder to read since it is harder to see the final
values.

vop_stdpathconf() has defaults for:
- ASYNC_IO.  Is this system-wide (all in vfs?)
- NAME_MAX.  This is very far from system-wide
- PATH_MAX.  This is system-wide.
- LINK_MAX.  This is very far from system-wide, especially after expansion
  of nlink_t.  Most file systems get this wrong.  LINK_MAX is bogusly
  defined to be the constant 32767, but the value is very variable.
  zfs_pathconf() returns INT_MAX and zfs uses something like int32_t
  internally, but zfs_getattr() clamps to LINK_MAX.  ext2fs limits to
  32000 for ext2 and 65000 for ext4 internally but ext2_pathconf()
  only returns this limit in some cases -- other cases return INT_MAX.
- MAX_CANON.  This is garbage except for terminals (and directories).
  Its value is also wrong.
- MAX_INPUT.  Like MAX_CANON.
- PIPE_BUF.  Like MAX_CANON, for fifos instead of terminals.
- CHOWN_RESTRICTED.  Wrong for file systems that don't support ownerships
  or changing them.  Might depend on mount options.
- VDISABLE.  Like MAX_CANON.

This is easy to improve:
- NAME_MAX, LINK_MAX: move to individual fs's
- MAX_CANON, MAX_INPUT, VDISABLE: move to devfs_pathconf().
- PIPE_BUF: move to fifo_pathconf()?  What about directories?


}
/* NOTREACHED */


Bogus comment.  Even lint should understand that default prevents reaching
this.


Modified: head/sys/fs/fifofs/fifo_vnops.c
==
--- head/sys/fs/fifofs/fifo_vnops.c Tue Jul 11 21:52:11 2017
(r320899)
+++ head/sys/fs/fifofs/fifo_vnops.c Tue Jul 11 21:55:20 2017
(r320900)
@@ -337,34 +336,6 @@ fifo_print(ap)
fifo_printinfo(ap->a_vp);
printf("\n");
return (0);
-}
-
-/*
- * Return POSIX pathconf information applicable to fifo's.
- */
-static int
-fifo_pathconf(ap)
-   struct vop_pathconf_args /* {
-   struct vnode *a_vp;
-   int a_name;
-   int *a_retval;
-   } */ *ap;
-{
-
-   switch (ap->a_name) {
-   case _PC_LINK_MAX:
-   *ap->a_retval = LINK_MAX;
-   return (0);
-   case _PC_PIPE_BUF:
-   *ap->a_retval = PIPE_BUF;
-   return (0);
-   case _PC_CHOWN_RESTRICTED:
-   *ap->a_retval = 1;
-   return (0);
-   default:
-   return (EINVAL);
-   }
-   /* NOTREACHED */
}


This was small and hopefully correct.  Not many settings apply to fifos.
It seems a but too small to be correct -- why would LINK_MAX apply but
not PATH_MAX?  Using the default, a 

Re: svn commit: r320908 - head/sys/kern

2017-07-12 Thread Ryan Libby
On Wed, Jul 12, 2017 at 12:43 AM, Roman Divacky  wrote:
> Clang knows about %b modifier and can do some semantic analysis on it.
> Currently it type checks the first arg to be an int and the second to be
> a char*.
>
> Do you think it would be worth modifying the checks to include
> this new functionality? Do you think you would like to take a stab
> at it?

Yes, I plan to send that to clang upstream.  I originally had those
changes in this commit but I was directed rather to send them first to
upstream.  See here [1] for roughly what I plan to send upstream
(although I have since noticed some unit tests that I guess should be
extended).

For now, the semantic analysis should be fine as the change should be
backward compatible and I haven't yet changed any of the users of
%b to use the new capabilities.

Ryan

[1] https://reviews.freebsd.org/D11284?id=29866
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r320911 - in releng/11.0: . crypto/heimdal/lib/krb5 sys/conf

2017-07-12 Thread Xin LI
Author: delphij
Date: Wed Jul 12 08:07:36 2017
New Revision: 320911
URL: https://svnweb.freebsd.org/changeset/base/320911

Log:
  Fix heimdal KDC-REP service name validation vulnerability [SA-17:05]
  
  Approved by:  so

Modified:
  releng/11.0/UPDATING
  releng/11.0/crypto/heimdal/lib/krb5/ticket.c
  releng/11.0/sys/conf/newvers.sh

Modified: releng/11.0/UPDATING
==
--- releng/11.0/UPDATINGWed Jul 12 08:07:16 2017(r320910)
+++ releng/11.0/UPDATINGWed Jul 12 08:07:36 2017(r320911)
@@ -16,7 +16,11 @@ from older versions of FreeBSD, try WITHOUT_CLANG and 
 the tip of head, and then rebuild without this option. The bootstrap process
 from older version of current across the gcc/clang cutover is a bit fragile.
 
-20170427p10 FreeBSD-SA-17:04.ipfilter
+20170712   p11 FreeBSD-SA-17:05.heimdal
+
+   Fix heimdal KDC-REP service name validation vulnerability.
+
+20170427   p10 FreeBSD-SA-17:04.ipfilter
 
Fix ipfilter(4) fragment handling panic. [SA-17:04]
 

Modified: releng/11.0/crypto/heimdal/lib/krb5/ticket.c
==
--- releng/11.0/crypto/heimdal/lib/krb5/ticket.cWed Jul 12 08:07:16 
2017(r320910)
+++ releng/11.0/crypto/heimdal/lib/krb5/ticket.cWed Jul 12 08:07:36 
2017(r320911)
@@ -713,8 +713,8 @@ _krb5_extract_ticket(krb5_context context,
 /* check server referral and save principal */
 ret = _krb5_principalname2krb5_principal (context,
  _principal,
- rep->kdc_rep.ticket.sname,
- rep->kdc_rep.ticket.realm);
+ rep->enc_part.sname,
+ rep->enc_part.srealm);
 if (ret)
goto out;
 if((flags & EXTRACT_TICKET_ALLOW_SERVER_MISMATCH) == 0){

Modified: releng/11.0/sys/conf/newvers.sh
==
--- releng/11.0/sys/conf/newvers.sh Wed Jul 12 08:07:16 2017
(r320910)
+++ releng/11.0/sys/conf/newvers.sh Wed Jul 12 08:07:36 2017
(r320911)
@@ -32,7 +32,7 @@
 
 TYPE="FreeBSD"
 REVISION="11.0"
-BRANCH="RELEASE-p10"
+BRANCH="RELEASE-p11"
 if [ -n "${BRANCH_OVERRIDE}" ]; then
BRANCH=${BRANCH_OVERRIDE}
 fi
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r320912 - in releng/10.3: . sys/cam/ata sys/conf sys/dev/hyperv/include sys/dev/hyperv/storvsc sys/dev/hyperv/utilities sys/dev/hyperv/vmbus sys/sys sys/x86/x86

2017-07-12 Thread Xin LI
Author: delphij
Date: Wed Jul 12 08:07:55 2017
New Revision: 320912
URL: https://svnweb.freebsd.org/changeset/base/320912

Log:
  Fix heimdal KDC-REP service name validation vulnerability [SA-17:05]
  
  Boot compatibility improvements with Azure VMs. [EN-17:06]
  
  Approved by:  so

Modified:
  releng/10.3/UPDATING
  releng/10.3/sys/cam/ata/ata_xpt.c
  releng/10.3/sys/conf/files.amd64
  releng/10.3/sys/conf/files.i386
  releng/10.3/sys/conf/newvers.sh
  releng/10.3/sys/dev/hyperv/include/hyperv.h
  releng/10.3/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c
  releng/10.3/sys/dev/hyperv/storvsc/hv_vstorage.h
  releng/10.3/sys/dev/hyperv/utilities/hv_kvp.c
  releng/10.3/sys/dev/hyperv/vmbus/hv_vmbus_drv_freebsd.c
  releng/10.3/sys/sys/eventhandler.h
  releng/10.3/sys/x86/x86/intr_machdep.c

Modified: releng/10.3/UPDATING
==
--- releng/10.3/UPDATINGWed Jul 12 08:07:36 2017(r320911)
+++ releng/10.3/UPDATINGWed Jul 12 08:07:55 2017(r320912)
@@ -16,6 +16,13 @@ from older versions of FreeBSD, try WITHOUT_CLANG to b
 stable/10, and then rebuild without this option. The bootstrap process from
 older version of current is a bit fragile.
 
+20170712   p20 FreeBSD-SA-17:05.heimdal
+   FreeBSD-EN-17:06.hyperv
+
+   Fix heimdal KDC-REP service name validation vulnerability [SA-17:05]
+
+   Boot compatibility improvements with Azure VMs. [EN-17:06]
+
 20170427   p19 FreeBSD-SA-17:04.ipfilter
 
Fix ipfilter(4) fragment handling panic. [SA-17:04]

Modified: releng/10.3/sys/cam/ata/ata_xpt.c
==
--- releng/10.3/sys/cam/ata/ata_xpt.c   Wed Jul 12 08:07:36 2017
(r320911)
+++ releng/10.3/sys/cam/ata/ata_xpt.c   Wed Jul 12 08:07:55 2017
(r320912)
@@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
+#include 
 #include 
 #include 
 #include 
@@ -827,12 +828,18 @@ noerror:
{
struct ccb_pathinq cpi;
int16_t *ptr;
+   int veto = 0;
 
ident_buf = >ident_data;
for (ptr = (int16_t *)ident_buf;
 ptr < (int16_t *)ident_buf + sizeof(struct ata_params)/2; 
ptr++) {
*ptr = le16toh(*ptr);
}
+   EVENTHANDLER_INVOKE(ada_probe_veto, path, ident_buf, );
+   if (veto) {
+   goto device_fail;
+   }
+
if (strncmp(ident_buf->model, "FX", 2) &&
strncmp(ident_buf->model, "NEC", 3) &&
strncmp(ident_buf->model, "Pioneer", 7) &&

Modified: releng/10.3/sys/conf/files.amd64
==
--- releng/10.3/sys/conf/files.amd64Wed Jul 12 08:07:36 2017
(r320911)
+++ releng/10.3/sys/conf/files.amd64Wed Jul 12 08:07:55 2017
(r320912)
@@ -262,7 +262,6 @@ dev/hwpmc/hwpmc_x86.c   optionalhwpmc
 dev/hyperv/netvsc/hv_net_vsc.c optionalhyperv
 dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c  optionalhyperv
 dev/hyperv/netvsc/hv_rndis_filter.coptionalhyperv
-dev/hyperv/stordisengage/hv_ata_pci_disengage.coptional
hyperv
 dev/hyperv/storvsc/hv_storvsc_drv_freebsd.coptionalhyperv
 dev/hyperv/utilities/hv_kvp.c  optionalhyperv
 dev/hyperv/utilities/hv_util.c optionalhyperv

Modified: releng/10.3/sys/conf/files.i386
==
--- releng/10.3/sys/conf/files.i386 Wed Jul 12 08:07:36 2017
(r320911)
+++ releng/10.3/sys/conf/files.i386 Wed Jul 12 08:07:55 2017
(r320912)
@@ -240,7 +240,6 @@ dev/hwpmc/hwpmc_x86.c   optional hwpmc
 dev/hyperv/netvsc/hv_net_vsc.c optionalhyperv
 dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c  optionalhyperv
 dev/hyperv/netvsc/hv_rndis_filter.coptionalhyperv
-dev/hyperv/stordisengage/hv_ata_pci_disengage.coptional
hyperv
 dev/hyperv/storvsc/hv_storvsc_drv_freebsd.coptionalhyperv
 dev/hyperv/utilities/hv_kvp.c  optionalhyperv
 dev/hyperv/utilities/hv_util.c optionalhyperv

Modified: releng/10.3/sys/conf/newvers.sh
==
--- releng/10.3/sys/conf/newvers.sh Wed Jul 12 08:07:36 2017
(r320911)
+++ releng/10.3/sys/conf/newvers.sh Wed Jul 12 08:07:55 2017
(r320912)
@@ -32,7 +32,7 @@
 
 TYPE=

svn commit: r320910 - releng/11.1/crypto/heimdal/lib/krb5

2017-07-12 Thread Xin LI
Author: delphij
Date: Wed Jul 12 08:07:16 2017
New Revision: 320910
URL: https://svnweb.freebsd.org/changeset/base/320910

Log:
  MFS r320907: MFC r320906: MFV r320905: Import upstream fix for
  CVE-2017-11103.
  
  In _krb5_extract_ticket() the KDC-REP service name must be obtained
  from encrypted version stored in 'enc_part' instead of the unencrypted
  version stored in 'ticket'.  Use of the unecrypted version provides an
  opportunity for successful server impersonation and other attacks.
  
  Submitted by: hrs
  Obtained from:Heimdal
  Security: FreeBSD-SA-17:05.heimdal
  Security: CVE-2017-11103
  Approved by:  re (kib)

Modified:
  releng/11.1/crypto/heimdal/lib/krb5/ticket.c
Directory Properties:
  releng/11.1/   (props changed)

Modified: releng/11.1/crypto/heimdal/lib/krb5/ticket.c
==
--- releng/11.1/crypto/heimdal/lib/krb5/ticket.cWed Jul 12 07:31:28 
2017(r320909)
+++ releng/11.1/crypto/heimdal/lib/krb5/ticket.cWed Jul 12 08:07:16 
2017(r320910)
@@ -713,8 +713,8 @@ _krb5_extract_ticket(krb5_context context,
 /* check server referral and save principal */
 ret = _krb5_principalname2krb5_principal (context,
  _principal,
- rep->kdc_rep.ticket.sname,
- rep->kdc_rep.ticket.realm);
+ rep->enc_part.sname,
+ rep->enc_part.srealm);
 if (ret)
goto out;
 if((flags & EXTRACT_TICKET_ALLOW_SERVER_MISMATCH) == 0){
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r320908 - head/sys/kern

2017-07-12 Thread Roman Divacky
Clang knows about %b modifier and can do some semantic analysis on it.
Currently it type checks the first arg to be an int and the second to be
a char*.

Do you think it would be worth modifying the checks to include
this new functionality? Do you think you would like to take a stab
at it? 

Search for FreeBSDbArg in contrib/llvm/tools/clang/lib/Sema/SemaChecking.cpp
if you want to take a look.

Thanks, Roman

On Wed, Jul 12, 2017 at 07:30:14AM +, Ryan Libby wrote:
> Author: rlibby
> Date: Wed Jul 12 07:30:14 2017
> New Revision: 320908
> URL: https://svnweb.freebsd.org/changeset/base/320908
> 
> Log:
>   kvprintf %b enhancements
>   
>   Make the %b formatter accept number formatting flags. It will now accept
>   alternate form, precision, and length modifiers. It also now partially
>   supports field width (but forces left justification).
>   
>   Reviewed by:markj
>   Approved by:markj (mentor)
>   Sponsored by:   Dell EMC Isilon
>   Differential Revision:  https://reviews.freebsd.org/D11284
> 
> Modified:
>   head/sys/kern/subr_prf.c
> 
> Modified: head/sys/kern/subr_prf.c
> ==
> --- head/sys/kern/subr_prf.c  Wed Jul 12 07:26:07 2017(r320907)
> +++ head/sys/kern/subr_prf.c  Wed Jul 12 07:30:14 2017(r320908)
> @@ -650,7 +650,7 @@ kvprintf(char const *fmt, void (*func)(int, void*), vo
>   uintmax_t num;
>   int base, lflag, qflag, tmp, width, ladjust, sharpflag, neg, sign, dot;
>   int cflag, hflag, jflag, tflag, zflag;
> - int dwidth, upper;
> + int bconv, dwidth, upper;
>   char padc;
>   int stop = 0, retval = 0;
>  
> @@ -676,7 +676,7 @@ kvprintf(char const *fmt, void (*func)(int, void*), vo
>   }
>   percent = fmt - 1;
>   qflag = 0; lflag = 0; ladjust = 0; sharpflag = 0; neg = 0;
> - sign = 0; dot = 0; dwidth = 0; upper = 0;
> + sign = 0; dot = 0; bconv = 0; dwidth = 0; upper = 0;
>   cflag = 0; hflag = 0; jflag = 0; tflag = 0; zflag = 0;
>  reswitch:switch (ch = (u_char)*fmt++) {
>   case '.':
> @@ -724,28 +724,9 @@ reswitch:switch (ch = (u_char)*fmt++) {
>   width = n;
>   goto reswitch;
>   case 'b':
> - num = (u_int)va_arg(ap, int);
> - p = va_arg(ap, char *);
> - for (q = ksprintn(nbuf, num, *p++, NULL, 0); *q;)
> - PCHAR(*q--);
> -
> - if (num == 0)
> - break;
> -
> - for (tmp = 0; *p;) {
> - n = *p++;
> - if (num & (1 << (n - 1))) {
> - PCHAR(tmp ? ',' : '<');
> - for (; (n = *p) > ' '; ++p)
> - PCHAR(n);
> - tmp = 1;
> - } else
> - for (; *p > ' '; ++p)
> - continue;
> - }
> - if (tmp)
> - PCHAR('>');
> - break;
> + ladjust = 1;
> + bconv = 1;
> + goto handle_nosign;
>   case 'c':
>   width -= 1;
>  
> @@ -883,6 +864,10 @@ handle_nosign:
>   num = (u_char)va_arg(ap, int);
>   else
>   num = va_arg(ap, u_int);
> + if (bconv) {
> + q = va_arg(ap, char *);
> + base = *q++;
> + }
>   goto number;
>  handle_sign:
>   if (jflag)
> @@ -939,6 +924,26 @@ number:
>  
>   while (*p)
>   PCHAR(*p--);
> +
> + if (bconv && num != 0) {
> + /* %b conversion flag format. */
> + tmp = retval;
> + while (*q) {
> + n = *q++;
> + if (num & (1 << (n - 1))) {
> + PCHAR(retval != tmp ?
> + ',' : '<');
> + for (; (n = *q) > ' '; ++q)
> + PCHAR(n);
> + } else
> + for (; *q > ' '; ++q)
> + continue;
> + }
> + if (retval != tmp) {
> + PCHAR('>');
> 

svn commit: r320909 - releng/11.1/sys/vm

2017-07-12 Thread Konstantin Belousov
Author: kib
Date: Wed Jul 12 07:31:28 2017
New Revision: 320909
URL: https://svnweb.freebsd.org/changeset/base/320909

Log:
  MFS r320889:
  Restore layout of struct vm_map_entry.
  
  Approved by:  re (delphij)

Modified:
  releng/11.1/sys/vm/vm_map.h
Directory Properties:
  releng/11.1/   (props changed)

Modified: releng/11.1/sys/vm/vm_map.h
==
--- releng/11.1/sys/vm/vm_map.h Wed Jul 12 07:30:14 2017(r320908)
+++ releng/11.1/sys/vm/vm_map.h Wed Jul 12 07:31:28 2017(r320909)
@@ -103,6 +103,7 @@ struct vm_map_entry {
struct vm_map_entry *right; /* right child in binary search tree */
vm_offset_t start;  /* start address */
vm_offset_t end;/* end address */
+   vm_offset_t pad0;
vm_offset_t next_read;  /* vaddr of the next sequential read */
vm_size_t adj_free; /* amount of adjacent free space */
vm_size_t max_free; /* max free space in subtree */
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r320908 - head/sys/kern

2017-07-12 Thread Ryan Libby
Author: rlibby
Date: Wed Jul 12 07:30:14 2017
New Revision: 320908
URL: https://svnweb.freebsd.org/changeset/base/320908

Log:
  kvprintf %b enhancements
  
  Make the %b formatter accept number formatting flags. It will now accept
  alternate form, precision, and length modifiers. It also now partially
  supports field width (but forces left justification).
  
  Reviewed by:  markj
  Approved by:  markj (mentor)
  Sponsored by: Dell EMC Isilon
  Differential Revision:https://reviews.freebsd.org/D11284

Modified:
  head/sys/kern/subr_prf.c

Modified: head/sys/kern/subr_prf.c
==
--- head/sys/kern/subr_prf.cWed Jul 12 07:26:07 2017(r320907)
+++ head/sys/kern/subr_prf.cWed Jul 12 07:30:14 2017(r320908)
@@ -650,7 +650,7 @@ kvprintf(char const *fmt, void (*func)(int, void*), vo
uintmax_t num;
int base, lflag, qflag, tmp, width, ladjust, sharpflag, neg, sign, dot;
int cflag, hflag, jflag, tflag, zflag;
-   int dwidth, upper;
+   int bconv, dwidth, upper;
char padc;
int stop = 0, retval = 0;
 
@@ -676,7 +676,7 @@ kvprintf(char const *fmt, void (*func)(int, void*), vo
}
percent = fmt - 1;
qflag = 0; lflag = 0; ladjust = 0; sharpflag = 0; neg = 0;
-   sign = 0; dot = 0; dwidth = 0; upper = 0;
+   sign = 0; dot = 0; bconv = 0; dwidth = 0; upper = 0;
cflag = 0; hflag = 0; jflag = 0; tflag = 0; zflag = 0;
 reswitch:  switch (ch = (u_char)*fmt++) {
case '.':
@@ -724,28 +724,9 @@ reswitch:  switch (ch = (u_char)*fmt++) {
width = n;
goto reswitch;
case 'b':
-   num = (u_int)va_arg(ap, int);
-   p = va_arg(ap, char *);
-   for (q = ksprintn(nbuf, num, *p++, NULL, 0); *q;)
-   PCHAR(*q--);
-
-   if (num == 0)
-   break;
-
-   for (tmp = 0; *p;) {
-   n = *p++;
-   if (num & (1 << (n - 1))) {
-   PCHAR(tmp ? ',' : '<');
-   for (; (n = *p) > ' '; ++p)
-   PCHAR(n);
-   tmp = 1;
-   } else
-   for (; *p > ' '; ++p)
-   continue;
-   }
-   if (tmp)
-   PCHAR('>');
-   break;
+   ladjust = 1;
+   bconv = 1;
+   goto handle_nosign;
case 'c':
width -= 1;
 
@@ -883,6 +864,10 @@ handle_nosign:
num = (u_char)va_arg(ap, int);
else
num = va_arg(ap, u_int);
+   if (bconv) {
+   q = va_arg(ap, char *);
+   base = *q++;
+   }
goto number;
 handle_sign:
if (jflag)
@@ -939,6 +924,26 @@ number:
 
while (*p)
PCHAR(*p--);
+
+   if (bconv && num != 0) {
+   /* %b conversion flag format. */
+   tmp = retval;
+   while (*q) {
+   n = *q++;
+   if (num & (1 << (n - 1))) {
+   PCHAR(retval != tmp ?
+   ',' : '<');
+   for (; (n = *q) > ' '; ++q)
+   PCHAR(n);
+   } else
+   for (; *q > ' '; ++q)
+   continue;
+   }
+   if (retval != tmp) {
+   PCHAR('>');
+   width -= retval - tmp;
+   }
+   }
 
if (ladjust)
while (width-- > 0)
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r320907 - in stable: 10/crypto/heimdal/lib/krb5 11/crypto/heimdal/lib/krb5

2017-07-12 Thread Xin LI
Author: delphij
Date: Wed Jul 12 07:26:07 2017
New Revision: 320907
URL: https://svnweb.freebsd.org/changeset/base/320907

Log:
  MFC r320906: MFV r320905: Import upstream fix for CVE-2017-11103.
  
  In _krb5_extract_ticket() the KDC-REP service name must be obtained from
  encrypted version stored in 'enc_part' instead of the unencrypted version
  stored in 'ticket'.  Use of the unecrypted version provides an
  opportunity for successful server impersonation and other attacks.
  
  Submitted by: hrs
  Obtained from:Heimdal
  Security: FreeBSD-SA-17:05.heimdal
  Security: CVE-2017-11103

Modified:
  stable/11/crypto/heimdal/lib/krb5/ticket.c
Directory Properties:
  stable/11/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/10/crypto/heimdal/lib/krb5/ticket.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/11/crypto/heimdal/lib/krb5/ticket.c
==
--- stable/11/crypto/heimdal/lib/krb5/ticket.c  Wed Jul 12 07:19:06 2017
(r320906)
+++ stable/11/crypto/heimdal/lib/krb5/ticket.c  Wed Jul 12 07:26:07 2017
(r320907)
@@ -713,8 +713,8 @@ _krb5_extract_ticket(krb5_context context,
 /* check server referral and save principal */
 ret = _krb5_principalname2krb5_principal (context,
  _principal,
- rep->kdc_rep.ticket.sname,
- rep->kdc_rep.ticket.realm);
+ rep->enc_part.sname,
+ rep->enc_part.srealm);
 if (ret)
goto out;
 if((flags & EXTRACT_TICKET_ALLOW_SERVER_MISMATCH) == 0){
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r320907 - in stable: 10/crypto/heimdal/lib/krb5 11/crypto/heimdal/lib/krb5

2017-07-12 Thread Xin LI
Author: delphij
Date: Wed Jul 12 07:26:07 2017
New Revision: 320907
URL: https://svnweb.freebsd.org/changeset/base/320907

Log:
  MFC r320906: MFV r320905: Import upstream fix for CVE-2017-11103.
  
  In _krb5_extract_ticket() the KDC-REP service name must be obtained from
  encrypted version stored in 'enc_part' instead of the unencrypted version
  stored in 'ticket'.  Use of the unecrypted version provides an
  opportunity for successful server impersonation and other attacks.
  
  Submitted by: hrs
  Obtained from:Heimdal
  Security: FreeBSD-SA-17:05.heimdal
  Security: CVE-2017-11103

Modified:
  stable/10/crypto/heimdal/lib/krb5/ticket.c
Directory Properties:
  stable/10/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/11/crypto/heimdal/lib/krb5/ticket.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/10/crypto/heimdal/lib/krb5/ticket.c
==
--- stable/10/crypto/heimdal/lib/krb5/ticket.c  Wed Jul 12 07:19:06 2017
(r320906)
+++ stable/10/crypto/heimdal/lib/krb5/ticket.c  Wed Jul 12 07:26:07 2017
(r320907)
@@ -713,8 +713,8 @@ _krb5_extract_ticket(krb5_context context,
 /* check server referral and save principal */
 ret = _krb5_principalname2krb5_principal (context,
  _principal,
- rep->kdc_rep.ticket.sname,
- rep->kdc_rep.ticket.realm);
+ rep->enc_part.sname,
+ rep->enc_part.srealm);
 if (ret)
goto out;
 if((flags & EXTRACT_TICKET_ALLOW_SERVER_MISMATCH) == 0){
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r320906 - head/crypto/heimdal/lib/krb5

2017-07-12 Thread Xin LI
Author: delphij
Date: Wed Jul 12 07:19:06 2017
New Revision: 320906
URL: https://svnweb.freebsd.org/changeset/base/320906

Log:
  MFV r320905: Import upstream fix for CVE-2017-11103.
  
  In _krb5_extract_ticket() the KDC-REP service name must be obtained from
  encrypted version stored in 'enc_part' instead of the unencrypted version
  stored in 'ticket'.  Use of the unecrypted version provides an
  opportunity for successful server impersonation and other attacks.
  
  Submitted by: hrs
  Obtained from:Heimdal
  Security: FreeBSD-SA-17:05.heimdal
  Security: CVE-2017-11103

Modified:
  head/crypto/heimdal/lib/krb5/ticket.c
Directory Properties:
  head/crypto/heimdal/   (props changed)

Modified: head/crypto/heimdal/lib/krb5/ticket.c
==
--- head/crypto/heimdal/lib/krb5/ticket.c   Wed Jul 12 07:13:56 2017
(r320905)
+++ head/crypto/heimdal/lib/krb5/ticket.c   Wed Jul 12 07:19:06 2017
(r320906)
@@ -713,8 +713,8 @@ _krb5_extract_ticket(krb5_context context,
 /* check server referral and save principal */
 ret = _krb5_principalname2krb5_principal (context,
  _principal,
- rep->kdc_rep.ticket.sname,
- rep->kdc_rep.ticket.realm);
+ rep->enc_part.sname,
+ rep->enc_part.srealm);
 if (ret)
goto out;
 if((flags & EXTRACT_TICKET_ALLOW_SERVER_MISMATCH) == 0){
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r320905 - vendor-crypto/heimdal/dist/lib/krb5

2017-07-12 Thread Xin LI
Author: delphij
Date: Wed Jul 12 07:13:56 2017
New Revision: 320905
URL: https://svnweb.freebsd.org/changeset/base/320905

Log:
  Import upstream fix for CVE-2017-11103:
  
CVE-2017-11103: Orpheus' Lyre KDC-REP service name validation
In _krb5_extract_ticket() the KDC-REP service name must be obtained from
encrypted version stored in 'enc_part' instead of the unencrypted 
version
stored in 'ticket'.  Use of the unecrypted version provides an
opportunity for successful server impersonation and other attacks.
  
Identified by Jeffrey Altman, Viktor Duchovni and Nico Williams.
  
Change-Id: I45ef61e8a46e0f6588d64b5bd572a24c7432547c
  
  Submitted by: hrs
  Obtained from:
https://github.com/heimdal/heimdal/commit/6dd3eb836bbb80a00ffced4ad57077a1cdf227ea
  Security: CVE-2017-11103
  Security: FreeBSD-SA-17:05.heimdal

Modified:
  vendor-crypto/heimdal/dist/lib/krb5/ticket.c

Modified: vendor-crypto/heimdal/dist/lib/krb5/ticket.c
==
--- vendor-crypto/heimdal/dist/lib/krb5/ticket.cWed Jul 12 07:00:56 
2017(r320904)
+++ vendor-crypto/heimdal/dist/lib/krb5/ticket.cWed Jul 12 07:13:56 
2017(r320905)
@@ -713,8 +713,8 @@ _krb5_extract_ticket(krb5_context context,
 /* check server referral and save principal */
 ret = _krb5_principalname2krb5_principal (context,
  _principal,
- rep->kdc_rep.ticket.sname,
- rep->kdc_rep.ticket.realm);
+ rep->enc_part.sname,
+ rep->enc_part.srealm);
 if (ret)
goto out;
 if((flags & EXTRACT_TICKET_ALLOW_SERVER_MISMATCH) == 0){
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r320904 - releng/11.1/sys/vm

2017-07-12 Thread Konstantin Belousov
Author: kib
Date: Wed Jul 12 07:00:56 2017
New Revision: 320904
URL: https://svnweb.freebsd.org/changeset/base/320904

Log:
  MFC r320843 MFS r320903:
  Fix loop termination in vm_map_find_min().
  
  Approved by:  re (delphij)

Modified:
  releng/11.1/sys/vm/vm_map.c
Directory Properties:
  releng/11.1/   (props changed)

Modified: releng/11.1/sys/vm/vm_map.c
==
--- releng/11.1/sys/vm/vm_map.c Wed Jul 12 06:49:32 2017(r320903)
+++ releng/11.1/sys/vm/vm_map.c Wed Jul 12 07:00:56 2017(r320904)
@@ -1571,7 +1571,7 @@ vm_map_find_min(vm_map_t map, vm_object_t object, vm_o
find_space, prot, max, cow);
if (rv == KERN_SUCCESS || min_addr >= hint)
return (rv);
-   *addr = min_addr;
+   *addr = hint = min_addr;
}
 }
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r320452 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys

2017-07-12 Thread Peter Wemm
On Tuesday, July 11, 2017 11:08:15 PM Peter Wemm wrote:
> On Wednesday, June 28, 2017 01:59:20 PM Andriy Gapon wrote:
> >   A side bonus of this change is that now a vdev zio has a pointer
> >   to its corresponding bio while the zio is active.

> fault virtual address   = 0x28

> 
> db> where
> Tracing pid 0 tid 100471 td 0xf80005452000
> vdev_geom_io_done() at vdev_geom_io_done+0x36/frame 0xfe0239f9eaa0
> zio_vdev_io_done() at zio_vdev_io_done+0x176/frame 0xfe0239f9ead0
> zio_execute() at zio_execute+0xac/frame 0xfe0239f9eb20

Oops, truncated.


taskqueue_run_locked() at taskqueue_run_locked+0x127/frame 0xfe0239f9eb80
taskqueue_thread_loop() at taskqueue_thread_loop+0xc8/frame 0xfe0239f9ebb0
fork_exit() at fork_exit+0x85/frame 0xfe0239f9ebf0
fork_trampoline() at fork_trampoline+0xe/frame 0xfe0239f9ebf0
--- trap 0, rip = 0, rsp = 0, rbp = 0 ---


-- 
Peter Wemm - pe...@wemm.org; pe...@freebsd.org; pe...@yahoo-inc.com; KI6FJV
UTF-8: for when a ' or ... just won\342\200\231t do\342\200\246

signature.asc
Description: This is a digitally signed message part.


svn commit: r320903 - stable/11/sys/vm

2017-07-12 Thread Konstantin Belousov
Author: kib
Date: Wed Jul 12 06:49:32 2017
New Revision: 320903
URL: https://svnweb.freebsd.org/changeset/base/320903

Log:
  MFC r320843:
  Fix loop termination in vm_map_find_min().

Modified:
  stable/11/sys/vm/vm_map.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/vm/vm_map.c
==
--- stable/11/sys/vm/vm_map.c   Wed Jul 12 02:53:54 2017(r320902)
+++ stable/11/sys/vm/vm_map.c   Wed Jul 12 06:49:32 2017(r320903)
@@ -1571,7 +1571,7 @@ vm_map_find_min(vm_map_t map, vm_object_t object, vm_o
find_space, prot, max, cow);
if (rv == KERN_SUCCESS || min_addr >= hint)
return (rv);
-   *addr = min_addr;
+   *addr = hint = min_addr;
}
 }
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r320452 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys

2017-07-12 Thread Peter Wemm
On Wednesday, June 28, 2017 01:59:20 PM Andriy Gapon wrote:

>   A side bonus of this change is that now a vdev zio has a pointer
>   to its corresponding bio while the zio is active.

> @@ -1094,6 +1088,15 @@ sendreq:
>  static void
>  vdev_geom_io_done(zio_t *zio)
>  {
> + struct bio *bp = zio->io_bio;
> +
> + if (zio->io_type == ZIO_TYPE_READ) {
> + abd_return_buf_copy(zio->io_abd, bp->bio_data, zio->io_size);
> + } else if (zio->io_type == ZIO_TYPE_WRITE) {
> + abd_return_buf(zio->io_abd, bp->bio_data, zio->io_size);
> + }
> +
> + g_destroy_bio(bp);
>  }

We are getting a 100% repeatable failure when trying to boot machines with 
degraded volumes in the freebsd.org cluster.

<118>Setting hostname: tiny.nyi.freebsd.org.
<118>Setting up harvesting: [UMA],
[FS_ATIME],SWI,INTERRUPT,NET_NG,NET_ETHER,NET_TUN,MOUSE,KEYBOARD,D
<118>Feeding entropy: .

Fatal trap 12: page fault while in kernel mode
cpuid = 1; apic id = 01
fault virtual address   = 0x28

Fatal trap 12: page fault while in kernel mode
cpuid = 3; apic id = 07
fault virtual address   = 0x28

Fatal trap 12: page fault while in kernel mode
cpuid = 2; apic id = 06
apic id = 00
fault virtual address   = 0x28
= DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags= interrupt enabled, resume, fault virtual address  
= 0x28
fault code  = supervisor read data, page not present
instruction pointer = 0x20:0x803aab56
stack pointer   = 0x28:0xfe0239fa3a90
fault code  = supervisor read data, page not present
IOPL = 0
current process = 0 (zio_write_intr_0)
frame pointer   = 0x28:0xfe0239fa3aa0

db> where   
Tracing pid 0 tid 100471 td 0xf80005452000
vdev_geom_io_done() at vdev_geom_io_done+0x36/frame 0xfe0239f9eaa0
zio_vdev_io_done() at zio_vdev_io_done+0x176/frame 0xfe0239f9ead0
zio_execute() at zio_execute+0xac/frame 0xfe0239f9eb20

This is dereferencing a null bp (ie: zio->io_bio).  It traps on multiple cores 
concurrently.

FreeBSD 12.0-CURRENT #0 r320900: Wed Jul 12 03:00:15 UTC 2017

(This is a smoke-test machine, recycled from somewhere else)

-- 
Peter Wemm - pe...@wemm.org; pe...@freebsd.org; pe...@yahoo-inc.com; KI6FJV
UTF-8: for when a ' or ... just won\342\200\231t do\342\200\246

signature.asc
Description: This is a digitally signed message part.